Created
January 10, 2014 04:50
-
-
Save sintaxi/8347177 to your computer and use it in GitHub Desktop.
How to do navigation with Harp. Put the following files in a directory and start the server with `harp server`. Compile to html by running `harp compile`.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
doctype | |
html | |
head | |
link(rel="stylesheet" href="/main.css") | |
body | |
ul | |
li(class="#{ current.source == 'index' ? 'active' : '' }") | |
a(href="/") Home | |
li(class="#{ current.source == 'about' ? 'active' : '' }") | |
a(href="/about") About | |
!= yield |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
h2 about | |
h3 this is my about page |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
h2 Welcome to My Site. | |
h3 This is the home page |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment