Pen Settings

HTML

CSS

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

JavaScript

Babel is required to process package imports. If you need a different preprocessor remove all packages first.

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

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">
<section class="hero is-dark is-medium" class="masthead" role="img" v-bind:aria-label="this.featimgposts[0].title" v-bind:style="{ 'background': 'radial-gradient(ellipse at center, rgba(0,0,0,0) 0%, rgba(0,0,0,0) 39%, rgba(0,0,0,0.95) 100%), url(' + this.featimages[0] + ') no-repeat center center scroll' }">
  <!-- Hero head: will stick at the top -->
  <div class="hero-head">
    <nav class="navbar has-background-dark faded">
      <div class="container">
        <div class="navbar-brand">
          <a class="navbar-item is-size-4 has-text-weight-bold" href="#home">
            Joe Steinbring
          </a>
          <span class="navbar-burger burger has-text-white" data-target="navbarMenuHero" onclick="document.getElementById('navbarMenuHero').classList.toggle('is-active');">
            <span></span>
            <span></span>
            <span></span>
          </span>
        </div>
        <div id="navbarMenuHero" class="navbar-menu">
          <div class="navbar-end">
            <a class="navbar-item">
              About
            </a>
            <a class="navbar-item">
              Updates
            </a>
            <a class="navbar-item">
              Photos
            </a>
            <a class="navbar-item">
              Travel
            </a>
          </div>
        </div>
      </div>
    </nav>
  </div>

  <!-- Hero content: will be in the middle -->
  <div class="hero-body">
  </div>
</section>
</div>

<p>
	This merges the bulma-based nav bar that we did with the enhanced hero image.
</p>
              
            
!

CSS

              
                /* For the hero image */
.masthead {
  display: flex;
  align-items: center;
  flex-direction: column;
  width: 100%;
  height: 95vh; /* if you don't want it to take up the full screen, reduce this number */
  overflow: hidden;
  background-size: cover;
}
#app, body{
  margin:0;
  padding:0;
}
/* Used to make the navbar slightly faded */
.faded{
	opacity: 0.8;
}
              
            
!

JS

              
                new Vue({
  el: "#app",
  data() {
    return {
      featimgposts: null,
      featimages: []
    };
  },
  mounted() {
    // Get the featured image posts from the blogger site
    // this requires an API key
   axios.get("https://www.googleapis.com/blogger/v3/blogs/3412726727067752443/posts/search?q=label:fp&key=AIzaSyDMDCj74G_V9RzYRUXvQLsK2AWcob7FsKw")
      .then(response=> (this.featimgposts = response.data.items));
  },
  watch: {
    // Watch for the value of featimgposts to change
    'featimgposts': function() {
      // Track the array size for UI purposes
      this.arraySize = this.featimgposts.length;
      // Once featimgposts gets updated, this gets executed 
      for (var i = 0; i < this.arraySize; i++) {
        var x = this.featimgposts[i].content.indexOf("href=\"");
        var y = this.featimgposts[i].content.indexOf("\"",x+6);
        this.featimages.push(this.featimgposts[i].content.substring(x+6,y));
      }
    }
  }
  
});
              
            
!
999px

Console