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. You can use the CSS from another Pen by using it's URL and the proper URL extention.

+ 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 id='app'>
  <blog-articles :dates-articles='datesArticles'></blog-articles>

<template id='my-template'>
  <div class='container'>
    <input v-model='searchQuery' class='search-box' placeholder='Search for articles...'>
    <div class='timeline' v-if='anyArticle()'>
      <div v-for='(dateWithArticles, date) in searchedArticles'>
        <p v-if='dateWithArticles.length > 0' class='date'>{{ date }}</p>
        <div v-for='article in dateWithArticles' class='article'>
          <span class='dot'></span>
          <p class='article-date'>{{ article.published_at }}</p>
          <h3><a :href="'#' + article.slug">{{ article.title }}</a></h3>
          <p>{{ article.teaser }}</p>
    <p v-else>No articles found.</p>


  outline: none
  box-sizing: border-box

  margin: 0 auto
  width: 100%
  max-width: 500px
    padding: 10px
    margin: 20px 0
    border: 1px solid black
    border-radius: 5px

    position: relative
    border-left: 1px solid black

      display: inline-block
      border: 1px solid black
      border-radius: 5px
      padding: 5px
      position: relative
      left: 15px
      margin: 15px 0

        content: ''
        position: absolute
        top: 50%
        left: -16px
        border: 1px solid black
        width: 14px

      position: relative
      left: 20px
      box-shadow: 0px 5px 10px 0px rgba(0,0,0,0.2)
      border-radius: 5px
      padding: 10px
      margin: 10px 0

        box-shadow: 0px 5px 10px 0px rgba(0,0,0,0.4)
        color: green
        text-decoration: none

        font-weight: 300
        font-size: 14px

        display: block
        position: absolute
        width: 10px
        height: 10px
        border-radius: 50%
        background: green
        left: -25.5px
        top: calc(50% - 5px)


                Vue.component('blog-articles', {
  template: '#my-template',
  props: ['datesArticles'],
  data() {
    return {
      searchQuery: ''
  computed: {
    searchedArticles() {
      var searchRegex = new RegExp(this.searchQuery, 'i');
      var searchedObj = {};

      if(this.searchQuery == '') {
         return this.datesArticles;

      for(var date in this.datesArticles) {
        searchedObj[date] = this.datesArticles[date].filter((article) => {
          return searchRegex.test(article.title) ||
                 searchRegex.test(article.teaser) ||
                 searchRegex.test(article.published_at) ||
      return searchedObj;
  methods: {
    anyArticle() {
      return this.countAllArticles() ? true : false;
    countAllArticles() {
      var count = 0;
      for(var date in this.searchedArticles) {
        count += this.searchedArticles[date].length;
      return count;

new Vue({
  el: '#app',
  data: {
    datesArticles: {
      'September, 2016': [
          title: 'Five',
          slug: 'five',
          teaser: 'five',
          published_at: '30.09.2016.'
          title: 'Four',
          slug: 'four',
          teaser: 'four',
          published_at: '15.09.2016.'
      'April, 2016': [
          title: 'Three',
          slug: 'three',
          teaser: 'three',
          published_at: '14.04.2016.'
          title: 'Two and a half',
          slug: 'two-and-a-half',
          teaser: 'two and a half',
          published_at: '02.04.2016.'
      'December, 2015': [
          title: 'Two',
          slug: 'two',
          teaser: 'two',
          published_at: '25.12.2015.'
          title: 'One',
          slug: 'one',
          teaser: 'one',
          published_at: '01.12.2015.'