Pen Settings



CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ add another resource


Babel includes JSX processing.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource


Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.


Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.


                <div class="container" id="bg">
  <div id="blog">
    <div class="row">
      <div v-for="post in posts" class="artist" :style="makeBackground(getFeatured(post))">
        <a :href="" target="_blank" class="commit">
          <!-- Rendered HTML is templated differently  -->

          <div class="thumby">     
        <!--<div v-html="postContent(post)" class="post-excerpt">--></div>



                :root {
  --animation-time: 2s; 

body {
  font-family: sans-serif;
  margin: 0;

a {
  text-decoration: none;

#bg {
  width: 100%;
  height: 1200px;
  background-color: blue;
  margin: 0;
  background-image: url("");

.artist {
  display: inline-block;
  position: relative;
  float: left;
  overflow: hidden;
  width: 280px;
  height: 280px;
  -webkit-clip-path: polygon(27% 0, 100% 38%, 82% 100%, 25% 80%, 0% 38%);
  clip-path: polygon(27% 0, 100% 38%, 82% 100%, 25% 80%, 0% 38%);

.post-title  {
    color: #fff;
    text-decoration: none;
    margin: 40% 20%;
    padding: 5px 15px;




var blogURL = ''

var blog = new Vue({
  el: '#blog',
  data: {
		currentPage: 1,
		posts: null,
    scrolled: false
  watch: {
		currentPage: 'fetchData'

  created: function () {
  methods: {
    fetchData: function () {
      var xhr = new XMLHttpRequest()
      var self = this'GET', blogURL + self.currentPage )
      xhr.onload = function () {
        self.posts = JSON.parse(xhr.responseText)
    hasFeatured: function(post) {
      return post._embedded['wp:featuredmedia'] && post._embedded['wp:featuredmedia'][0].media_details.sizes.medium;

    getFeatured: function (post) {
      return post._embedded['wp:featuredmedia'][0].media_details.sizes.medium.source_url;
    makeBackground: function(featured){
      return 'background-image:url('+featured+');'
  randomColor: function(){
      bgColors = ['#72984b', '#e1261c', '#8a2432', '#b9d9ec', '#f9e08e ']
      var rand = Math.floor(Math.random() * bgColors.length)
      return bgColors[rand]

  randomAngles: function(){
   return Math.floor(Math.random() * 80)
  clipPath: function (random) {
    return 'clip-path: polygon('+ random + ')'

    postContent: function(post){
      return post.content.rendered;
    postExcerpt: function(post){
      return post.excerpt.rendered;
    authorName: function(post){
   pageUp: function(){
     this.currentPage = this.currentPage+1

var bg = new Trianglify({
  noiseIntensity: 0,
  cellsize: 50,
  cellpadding: 10,
  fillOpacity: 1,
  strokeOpacity: 0

var pattern = bg.generate(document.body.clientWidth, document.body.clientHeight);
document.getElementById('bg').setAttribute('style', 'background-image: '+pattern.dataUrl);