Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.

+ add another resource

JavaScript

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

Packages

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.

Behavior

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.

HTML

              
                <div id="app">
  <header class="bg-indigo-800 p-6 shadow-lg">
    <div class="container mx-auto">
      <nav class="flex items-center justify-between flex-wrap">
        <div class="flex items-center flex-shrink-0 text-white mr-6">
          <span class="font-semibold text-xl tracking-tight">{{ meta.title }}</span>
        </div>
        <a :href="meta.readMore" class="text-white hover:text-indigo-300 py-2 rounded-lg" target="_blank">Read More &#8594;</a>
      </nav>
    </div>
  </header>
  <main>
    <div class="container mx-auto">
      <div class="flex flex-wrap -mx-3 py-8">
        <div class="w-1/1 md:w-1/2 lg:w-1/3 px-3 pb-6" v-for="item in items">
          <div class="rounded overflow-hidden shadow-lg">
            <img class="w-full object-cover h-64" :src="item.screenshot" :alt="item.title">
            <div class="px-6 py-4">
              <div class="font-bold text-xl mb-2">{{ item.title }}</div>
              <p class="text-gray-700 text-base">{{ item.description }}</p>
            </div>
            <div class="px-6 py-4">
              <span class="inline-block bg-gray-200 rounded-full px-3 py-1 text-sm font-semibold text-gray-700 mr-2" v-for="tag in getTags(item.tags)">#{{ tag }}</span>
            </div>
          </div>
        </div>
      </div>
    </div>
  </main>
  <footer>
    <div class="container mx-auto pb-8 text-gray-500">{{ meta.footer }}</div>
  </footer>
</div>

              
            
!

CSS

              
                
              
            
!

JS

              
                var app = new Vue({
  el: '#app',
  data: {
    meta: [], // Meta data from Google Sheet
    items: [] // Items data from Google Sheet
  },
  mounted () {
    // Fetch the Meta data from Sheety API
    axios
      .get('https://v2-api.sheety.co/fb81b8176e802682971503045a529074/portfolio/meta')
      .then(response => (this.meta = response.data.meta[0]))
    
    // Fetch the Items data from Sheety API
    axios
      .get('https://v2-api.sheety.co/fb81b8176e802682971503045a529074/portfolio/items')
      .then(response => (this.items = response.data.items))
  },
  methods: {
    // Convert comma seperated tags to an array
    getTags: function (tags) {
      return tags.split(',')
    }
  }
})
              
            
!
999px

Console