all repos — h3rald @ 9187a4dd3e01b0592103432a479da5892ef80ec8

The sources of https://h3rald.com

Added templates.
h3rald h3rald@h3rald.com
Sat, 05 Aug 2017 14:42:17 +0200
commit

9187a4dd3e01b0592103432a479da5892ef80ec8

parent

4fa231fe644b664425d0c6f11f000902b4b3408d

M rules.minrules.min

@@ -10,24 +10,31 @@ asset "output/articles/$1/$1" (name) => % %id #asset

asset output-cp ) :copy-pdf-article-asset -( - (dict) expect -> =content -) :process-md-content - +; Process a content file applying the appropriate template +; and compiling markdown to HTML if necessary. ( (dict) expect -> =content -) :process-html-content + content /content-type :ct + content /id :id + "page" :tpl + (ct "article" ==) ("article" @tpl) when + (id "index" ==) ("home" @tpl) when + "" :page + "" :contents + content ( + (input-fread @contents content) + ((/ext ".md" ==) (=temp contents temp markdown @contents temp) when) + (contents %contents) + (=temp tpl temp mustache @page temp) + (page %contents) + ((id "index" !=)("$1/index" (id) => % %id ".html" %ext) when) + ) tap +) :process-content ;;;; MAIN ;;;; -contents ( - dup - ( - ((/ext ".md" ==) (process-md-content)) - ((/ext ".html" ==) (process-html-content)) - ) case -) foreach +contents (process-content output-fwrite) foreach ; Process all assets. assets (
A templates/_footer.mustache

@@ -0,0 +1,79 @@

+<footer class="navbar-static-bottom" id="site-footer"> +<div class="container"> + <div class="row copyright"> + <p><span class="h3rald h3rald-footer"></span> Web Site v8.4.2</p> + <p>&copy; 2004 &mdash; 2016 <em>Fabio Cevasco</em></p> + </div> + <div class="row"> + <div class="contact-list col-md-4"> + <h2><i class="h3-speech-bubbles"></i> Contact</h2> + <p>This site was made by Fabio Cevasco. For more information, see the <a href="/about/">About</a> page.</p> + <p>To contact me, use the links below.</p> + <ul> + <li><i class="h3-gmail"></i> <a href='&#109;&#97;&#105;&#108;&#116;&#111;&#58;&#104;&#51;&#114;&#97;&#108;&#100;&#64;&#104;&#51;&#114;&#97;&#108;&#100;&#46;&#99;&#111;&#109;'>&#104;&#51;&#114;&#97;&#108;&#100;&#64;&#104;&#51;&#114;&#97;&#108;&#100;&#46;&#99;&#111;&#109;</a></li> + <li><i class="h3-linkedin"></i> <a href="https://www.linkedin.com/in/fabiocevasco" title="LinkedIn">fabiocevasco</a></li> + <li><i class="h3-twitter"></i> <a href="http://twitter.com/h3rald" title="Twitter">@h3rald</a></li> + <li><i class="h3-pin-3"></i> <a href="http://pinboard.in/u:h3rald/" title="Pinboard">h3rald</a></li> + <li><i class="h3-instagram"></i> <a href="http://instagram.com/h3rald/" title="Instagram">h3rald</a></li> + <li><i class="h3-github-02"></i> <a href="https://github.com/h3rald" title="Github">h3rald</a></li> + <li><i class="h3-reddit"></i> <a href="https://www.reddit.com/user/h3rald" title="Reddit">h3rald</a></li> + <li><i class="h3-foursquare_1"></i> <a href="http://foursquare.com/h3rald" title="Foursquare">h3rald</a></li> + </ul> + </div> + <div class="col-md-4"> + <h2><i class="h3-key"></i> License</h2> + <p>Unless stated otherwise, all the articles and content published on this web site is licensed under the <a rel="license" href="http://creativecommons.org/licenses/by-nc-nd/3.0/">Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Unported License</a>.</p> + + <p class="license-logo"> + <img alt="Creative Commons License" src="/img/by-nc-nd.png" /> + </p> + + <p>The source code of this web site, such as its layout, <span class="caps">LESS/CSS</span> stylesheets, custom rake tasks and code is licensed under the terms of the <a href="http://creativecommons.org/licenses/MIT/"><span class="caps">MIT</span> License</a> and it is available on <a href="https://github.com/h3rald/h3rald">GitHub</a>.</p> + </div> + <div class="col-md-4"> + <h2><i class="h3-candle"></i> Credits</h2> + <p>Special thanks to the following people, who made this web site possible:</p> + <ul> + <li> + <a href="http://www.stoneship.org/">Denis Defreyne</a>, creator of the exceptional <a href="http://nanoc.stoneship.org/">nanoc</a> static site generator. + </li> + <li> + <a href="http://scholarsfonts.net/">David J. Perry</a>, who designed the <a href="http://scholarsfonts.net/cardofnt.html">Cardo</a> font used for the H3RALD logo. + </li> + <li> + <a href="http://atipo.es/en/">atipo</a>, who designed the <a href="http://calendasplus.com">Calendas Plus</a> font, used throughout this web site. + </li> + <li> + <a href="https://twitter.com/mdo">Mark Otto</a> and <a href="https://twitter.com/fat">fat-kun</a>, creators of the awesome <a href="http://getbootstrap.com">Bootstrap</a> framework. + </li> + <li> + <a href="http://twitter.com/davegandy">Dave Gandy</a>, designer of the <a href="http://fontawesome.io/">FontAwesome</a> font, used for some of the icons on this web site. + </li> + <li> + <a href="https://github.com/nagoshiashumari">Daniela Howe</a> and <a href="https://github.com/idmontie">Ivan Montiel</a>, designers of the <a href="http://nagoshiashumari.github.io/Rpg-Awesome/">RPG Awesome</a> font, used for some of the icons on this web site. + </li> + </ul> + </div> + </div> +</div> +</footer> + <script> + hljs.tabReplace = ' '; + hljs.initHighlightingOnLoad(); + </script> + <!-- Start Google Analytics --> + <script type="text/javascript"> + (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ + (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), + m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) + })(window,document,'script','//www.google-analytics.com/analytics.js','ga'); + + ga('create', 'UA-18587377-1', { + 'storage': 'none', + 'clientId': new Fingerprint().get() + }); + ga('set', 'anonymizeIp', true); + ga('send', 'pageview'); + + </script> + <!-- End Google Analytics -->
A templates/_head.mustache

@@ -0,0 +1,33 @@

+ <head> + <title>{{title}} - H3RALD</title> + <meta charset="utf-8" /> + <meta name="author" content="Fabio Cevasco" /> + <meta name="robots" content="all, follow" /> + <meta name="Revisit-After" content="2 Days" /> + <meta name="description" content="H3RALD - Fabio Cevasco's Web Site" /> + <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" /> + <!-- + min_keywords = "h3rald, fabio cevasco, " + default = "ruby, rails technical writing, reviews, software, browsers, articles, traveling, books, genova" + case @item[:type] + when 'article' then + keywords = min_keywords+@item[:tags].join(', ') + when 'project' then + keywords = @item[:permalink] == 'h3rald' ? "fabio cevasco, "+@item[:permalink] : min_keywords+@item[:permalink] + else + keywords = min_keywords+default + end + --> + <meta name="keywords" content="{{keywords}}" /> + <link rel="shortcut icon" href="/favicon.png" type="image/png" /> + <meta content="44.388041;9.073248" name="ICBM" /> + <link rel="stylesheet" type="text/css" href="/styles/style.css" /> + <script src="js/fingerprint.js"></script> + <script src="/js/jquery.js" type="text/javascript"></script> + <script src="/js/jquery-timeago.js" type="text/javascript"></script> + <script src="/js/date.js" type="text/javascript"></script> + <script src="/js/init.js" type="text/javascript"></script> + <script src="/js/search.js" type="text/javascript"></script> + <script src="/js/highlight.js" type="text/javascript"></script> + <script src="/js/bootstrap.js" type="text/javascript"></script> + </head>
A templates/_header.mustache

@@ -0,0 +1,35 @@

+<header class="container" id="site-header"> + <nav id="main-navbar" class="navbar navbar-fixed-top"> + <div class="container"> + <div class="navbar-header"> + <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse"> + <span class="sr-only">Toggle navigation</span> + <span class="icon-bar"></span> + <span class="icon-bar"></span> + <span class="icon-bar"></span> + </button> + <h1 class="navbar-brand"> + <a href="/" class="h3rald h3rald-header">&nbsp;</a> + </h1> + </div> + <div class="navbar-collapse collapse"> + <ul class="nav navbar-nav"> + <li><a href="/projects/"><i class="h3-fizzing-flask"></i> PROJECTS</a></li> + <li><a href="/tags/"><i class="h3-tags"></i> TAGS</a></li> + <li><a href="/archives/"><i class="h3-lb-book-02"></i> ARCHIVES</a></li> + <li><a href="/about/"><i class="h3-scroll-unfurled"></i> ABOUT</a></li> + <li> + </li> + </ul> + <form class="navbar-form navbar-right"> + <div class="input-group"> + <input type="text" class="form-control" name="q" placeholder="Search" id="h3rald-search-box"> + <span class="input-group-btn"> + <button class="btn btn-default" id="h3rald-search-btn" type="button"><i class="fa fa-search"></i></button> + </span> + </div> + </form> + </div> + </div> + </nav> +</header>
A templates/_page_header.mustache

@@ -0,0 +1,6 @@

+<header class="col-md-9"> + <h2>{{title}}</h2> + {{#subtitle}} + <h3>{{subtitle}}</h3> + {{/subtitle}} +</header>
A templates/article.mustache

@@ -0,0 +1,27 @@

+<!DOCTYPE html> +<html lang="en"> + {{> _head}} + <body> + <div id="wrap"> + {{> _header}} + <main id="main" class="container"> + <article class="{{content-type}}"> + <div class="row"> + {{> _page_header}} + <ul class="list-unstyled article-info col-md-3"> + <li><i class="h3-quill-ink"></i> <time datetime="{{date-iso8601}}">{{date}}</time></li> + <li><i class="h3-tags"></i> {{tag-links}}</li> + {{#pdf}} + <li><a href="/articles/{{id}}/{{id}}.pdf"><i class="fa fa-download"> </i>Download as PDF</a></li> + {{/pdf}} + </ul> + </div> + <div id="body-text" class="hyphenate"> + {{{contents}}} + </div> + </article> + </main> + {{> _footer}} + </div> + </body> +</html>
A templates/home.mustache

@@ -0,0 +1,13 @@

+<!DOCTYPE html> +<html lang="en"> + {{> _head}} + <body> + <div id="wrap"> + {{> _header}} + <main id="main" class="container"> + {{{contents}}} + </main> + {{> _footer}} + </div> + </body> +</html>
A templates/page.mustache

@@ -0,0 +1,20 @@

+<!DOCTYPE html> +<html lang="en"> + {{> _head}} + <body> + <div id="wrap"> + {{> _header}} + <main id="main" class="container"> + <article class="{{content-type}}"> + <div class="row"> + {{> _page_header}} + </div> + <div id="body-text" class="hyphenate"> + {{{contents}}} + </div> + </article> + </main> + {{> _footer}} + </div> + </body> +</html>