No Javascript. Just HTML and CSS.
A Pen by Bubba Smith on CodePen.
| <div class="vertical-menu"> | |
| <div class="menu-close-cont"> | |
| <svg class="menu-close" data-src="http://jonathano.com/img/close.svg"></svg> | |
| </div> | |
| <ul class="vertical-links"> | |
| <li class="vertical-link"><a href="#">About</a></li> | |
| <li class="vertical-link"><a href="#">Skills</a></li> | |
| <li class="vertical-link"><a href="#">Work</a></li> | |
| <li class="vertical-link"><a href="#">Open Source</a></li> | |
| <li class="vertical-link"><a href="#">Contact</a></li> |
| <!-- Navigation bar --> | |
| <nav class="navbar navbar-inverse navbar-fixed-top"> | |
| <div class="container-fluid"> | |
| <!-- Brand and toggle get grouped for better mobile display--> | |
| <div class="nav-header"> | |
| <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#myNavbar"> | |
| <span class="sr-only">Toggle navigation</span> | |
| <span class="icon-bar"></span> | |
| <span class="icon-bar"></span> | |
| <span class="icon-bar"></span> |
| <h2>First gallery:</h2> | |
| <div class="my-gallery" itemscope itemtype="http://schema.org/ImageGallery"> | |
| <figure itemprop="associatedMedia" itemscope itemtype="http://schema.org/ImageObject"> | |
| <a href="https://farm3.staticflickr.com/2567/5697107145_a4c2eaa0cd_o.jpg" itemprop="contentUrl" data-size="1024x1024"> | |
| <img src="https://farm3.staticflickr.com/2567/5697107145_3c27ff3cd1_m.jpg" itemprop="thumbnail" alt="Image description" /> | |
| </a> | |
| <figcaption itemprop="caption description">Image caption 1</figcaption> | |
No Javascript. Just HTML and CSS.
A Pen by Bubba Smith on CodePen.
| .container | |
| .shadow.i1 | |
| .title Shadow 01 | |
| .shadow.i2 | |
| .title Shadow 02 | |
| .shadow.i3 | |
| .title Shadow 03 | |
| .shadow.i4 | |
| .title Shadow 04 | |
| .shadow.i5 |
| <!-- using the truncate filter --> | |
| {% for post in site.posts limit:10 %} | |
| <h2><a href="{{ post.url }}">{{ post.title }}</a></h2> | |
| <span class="post-date">{{ post.date | date: "%B %d, %Y" }}</span> | |
| {% if post.content.size > 2000 %} | |
| {{ post.content | truncatewords: 300 }} <!-- bad! content gives you rendered html and you will truncate in the middle of a node --> | |
| <a href="{{ post.url }}">read more</a> | |
| {% else %} | |
| {{ post.content }} | |
| {% endif %} |
| <!-- index.html --> | |
| <p class="post-excerpt"> | |
| {% if post.content contains '<!--excerpt.start-->' and post.content contains '<!--excerpt.end-->' %} | |
| {{ ((post.content | split:'<!--excerpt.start-->' | last) | split: '<!--excerpt.end-->' | first) | strip_html | truncatewords: 20 }} | |
| {% else %} | |
| {{ post.content | strip_html | truncatewords: 20 }} | |
| {% endif %} | |
| </p> |
| <link href='https://fonts.googleapis.com/css?family=Share+Tech&subset=latin,latin-ext' rel='stylesheet' type='text/css'> | |
| <body data-spy="scroll" data-target="#side-nav"> | |
| <div class="container"> | |
| <div class="row"> | |
| <div id="side-nav"> | |
| <ul class="nav nav-list affix"> | |
| <li><a href="#start">*Scroll Spy<br><sub>vertical height</sub></a></li> | |
| <li><a href="#one">N°1</a></li> | |
| <li><a href="#two">N°2</a></li> | |
| <li><a href="#three">N°3</a></li> |
A Pen by Matthew Bott on CodePen.