css Audio - Active file-generic CSS - Active Generic - Active HTML - Active JS - Active SVG - Active Text - Active file-generic Video - Active header Love html icon-new-collection icon-person icon-team numbered-list123 pop-out spinner split-screen star tv

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

You're using npm packages, so we've auto-selected Babel for you here, which we require to process imports and make it all work. If you need to use a different JavaScript preprocessor, remove the packages in the npm tab.

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

Use npm Packages

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.

Code Indentation

     

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.

HTML Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

            
              <main>
  
  <!-- Intro -->
  <article layout="centered" class="-text-center" skin="dark">
    <h1 class="-text-heading">
      Photo page layout
    </h1>
    <p class="-text-larger -text-italic -ph-4">
      Single photo + Placement + Size + Fit <br/> 
      with simplest html markup ever.
    </p>
    <a href="#" onclick="FOLIO.next();" class="-button -text-bold">Start</a>
    <a href="#" onclick="FOLIO.goto(26);" class="-button -button-text -color-grey -mt-3">See how it's done</a>
  </article>


  
  <!-- Section: Placement -->
  <article layout="centered" transition="fold-up">
    <h2 class="-text-heading">Placement options</h2>
  </article>

  <img src="worker.jpg" 
       alt="Single photo is centered on screen by default" />
  
  <img src="worker.jpg" 
       self="left" 
       alt="Placement: left" />
  
  <img src="worker.jpg" 
       self="right" 
       alt="Placement: right" />
  
  <img src="worker.jpg" 
       self="top" 
       alt="Placement: top" />
  
  <img src="worker.jpg" 
       self="bottom" 
       alt="Placement: bottom" />
  
  <img src="worker.jpg" 
       self="top right" 
       alt="Combine vertical and horizontal placement: top right"/>

  
  
  <!-- Section: Size -->
  <article layout="centered" transition="fold-up">
      <h2 class="-text-heading">Size options</h2>
      <p>Photo size relative to browser width</p>
  </article>
  
  <img src="worker.jpg" 
       self="size-2of3"  
       alt="Size: 2/3" />

  <img src="worker.jpg" 
       self="size-1of2"  
       alt="Size: 1/2" 
       transition="fade"/>
  
  <img src="worker.jpg" 
       self="size-1of3"  
       alt="Size: 1/3" 
       transition="fade"/>
  
  <img src="worker.jpg" 
       self="size-1of4"  
       alt="Size: 1/4" 
       transition="fade"/>
  
  <img src="worker.jpg" 
       self="size-1of5"  
       alt="Size: 1/5" 
       transition="fade"/>
  
  
  
  <!-- Section: Fit -->
  <article layout="centered" transition="fold-up">
    <h2 class="-text-heading">Fit options</h2>
    <p>
        Photo is scaled to fit browser window
    </p>
  </article>

  <img src="worker.jpg" 
       fit="contain"    
       alt="Fit: contain — photo is scaled to fit within browser window (aspect ratio preserved, photo is not cropped)"/>
  
  <img src="worker.jpg" 
       fit="cover"      
       alt="Fit: cover — photo is scaled to cover whole browser window (aspect ratio preserved, photo is cropped)"/>
  
  <img src="worker.jpg" 
       fit="cover top"  
       alt="Fit: cover top —  placement of cover image: top, bottom, left,  right or center (default)"/>

  
  
  <!-- Section: Examples -->
  <article layout="centered" transition="fold-up">
    <h2 class="-text-heading">
      Combined examples
    </h2>
    <p>
      Combine placement, size and fit options 
      for advanced photo page layout.
    </p>
  </article>

  <img src="worker.jpg" 
       self="size-1of2 right" 
       fit="cover"        
       alt="Fit: cover | Size: 1/2 | Placement: right"/>
  
  <img src="worker.jpg" 
       self="size-1of3 left" 
       fit="cover right"   
       alt="Fit: cover right | Size: 1/3 | Placement: left"/>
  
  <img src="worker.jpg" 
       self="size-2of3" 
       fit="cover"              
       alt="Fit: cover | Size: 2/3"/>
  
  <img src="worker.jpg" 
       self="size-1of2 left" 
       fit="cover"    
       alt="Fit: cover | Size: 1/2 | Placement: left"/>
  
  <img src="worker.jpg" 
       self="size-1of2 right" 
       fit="cover right"  
       alt="Fit: cover right | Placement: right | Size: 1/2"/>
  
  <img src="worker.jpg" 
       self="size-1of2 right" 
       fit="cover left"   
       alt="Fit: cover left | Placement: right | Size: 1/2"/>

  
  
  <!-- Article page: How it's done-->
  <article transition="fold-left" class="-text-medium" hash="how-its-done">
    <h2>How it's done?</h2>
    <p>Single photo page guidelines:</p>
    <ul>
      <li>Create photo <a href="http://docs.foliodot.com/elements#img" target="_blank">pages with <code>&lt;img&gt;</code> element</a></li>
      <li>Use <a href="http://docs.foliodot.com/layout#self-attribute" target="_blank">'self' attribute</a> to size photo</li>
      <li>Use <a href="http://docs.foliodot.com/layout#self-attribute" target="_blank">'self' attribute</a> attribute for photo placement</li>
      <li>Use <a href="http://docs.foliodot.dev/attributes#fit" target="_blank">'fit' attribute</a> to set photo fitting</li>
      </ul>
    <p>Related:</p>
    <ul>
      <li>
        'alt' attribute is used for 
        <a href="http://docs.foliodot.com/caption#simple" target="_blank">
          simple photo caption</a>.
      </li>
    </ul>
  </article>
  
  
  <!-- Article page: Outro -->
  <article layout="centered" transition="fold-left">
    <a href="#" onclick="FOLIO.toggle('sidebar');" class="-text-bold">
      About this project
    </a>
    <p class="-color-grey -mt-4">More pens:</p>
    <a href="https://codepen.io/foliodot/full/dGBjBR/" target="_blank">Narrative demo</a>
    <a href="https://codepen.io/foliodot/full/MKMZaY/" target="_blank">Photo gallery</a>
    <a href="https://codepen.io/foliodot/full/MKNeKB/" target="_blank">Page transitions</a>
  </article>
</main>


<!-- 
  Created with Foliodot starter template: https://foliodot.com 
  Documentaion: http://docs.foliodot.com/
  Image: Library of Congress, Prints & Photographs Division, FSA-OWI Collection on Flickr 
-->


<aside>
  <header>
    <h5>folio.demo</h5></header>
  <p>
    <a href="https://foliodot.com" target="_blank">Foliodot</a> is simplest starter template for photogrpahy portfolio websites and narrative photo projects:
  </p>
  <ul class="-ml-3">
    <li>Minimalistic markup</li>
    <li>Aesthetic simplicity</li>
    <li>Photobook layouts</li>
    <li>Versatile options</li>
  </ul>
  <p>You may actually enjoy making your website.</p>
  <p>See <a href="https://foliodot.com" target="_blank">foliodot.com</a></p>
  <p>—</p>
  <p>
    <a href="https://codepen.io/foliodot/" target="_blank">
      More pens
    </a>
  </p>
</aside>
            
          
!
            
              .page-caption {
  background-color: white;
}
            
          
!
            
              /* 
 - Documentaion: http://docs.foliodot.com/options
 - This demo uses foliodot javascript which is subject 
   to the terms at https://foliodot.com/legal/eula
*/
FOLIO.init({
  project : {
    buttonSection : 'overview'
  },
  thumbnails : {
    buttonSection : 'back to examples'
  }
});
            
          
!
999px
🕑 One or more of the npm packages you are using needs to be built. You're the first person to ever need it! We're building it right now and your preview will start updating again when it's ready.
Loading ..................

Console