1
0
mirror of https://github.com/ryanoasis/nerd-fonts.git synced 2025-01-06 21:49:40 +02:00

Moved to theme 'SinglePaged' and added better sections

This commit is contained in:
Ryan L McIntyre 2017-04-22 17:41:03 -04:00
parent 6d964304da
commit 27f0b74dd3
17 changed files with 1216 additions and 7 deletions

2
.gitignore vendored Normal file → Executable file
View File

@ -1,3 +1,5 @@
_site/
.DS_Store
temp-glyph-source-fonts/*
temp/*
patched-fonts/Input*

BIN
.jekyll-metadata Normal file

Binary file not shown.

3
README.md Executable file
View File

@ -0,0 +1,3 @@
This is a compressed-commit version of
[github.com/t413/SinglePaged](https://github.com/t413/SinglePaged)

45
_config.yml Normal file → Executable file
View File

@ -1,8 +1,39 @@
title: "Nerd Fonts"
description: "Collection of 35+ patched fonts (over 74.5k possible variations) with a FontForge font patcher python script for Powerline, Font Awesome, Octicons, Devicons, and other icon fonts. Includes fonts: SourceCodePro, Hack, Droid Sans, Meslo, AnonymousPro, ProFont, Inconsolata, and more"
google_analytics: 'UA-91070609-1'
show_downloads: true
theme: jekyll-theme-minimal
---
port: 4000
host: 0.0.0.0
safe: false
### site serving configuration ###
exclude: [CNAME, README.md, .gitignore, private.cfg, "temp", "archives", "casks"]
permalink: /:title ## disables post output
timezone: null
lsi: false
markdown: kramdown
### content configuration ###
title: "Nerd Fonts - Iconic font aggregator, collection, and patcher"
keywords: "fonts collection patched-fonts powerline shell statusline python iconic-fonts patcher FontForge font-awesome octicons font-linux SourceCodePro Hack Droid Sans Meslo AnonymousPro ProFont Inconsolata"
description: "Iconic font aggregator, collection, and patcher: 37 patched fonts (71.4k+ variations). Includes popular glyph collections such as Font Awesome & fonts such as Hack"
source_link: "https://github.com/t413/SinglePaged"
favicon: "img/favicon.ico"
touch_icon: #put a path like: "img/apple-touch-icon.png"
google_analytics_key: 'UA-91070609-1'
### template colors, used site-wide via css ###
colors:
black: '#111111'
white: '#f8f8f8'
purewhite: '#ffffff'
blue: '#49a7e9'
green: '#9bcf2f'
purple: '#c869bf'
orange: '#fab125'
turquoise: '#0fbfcf'
kramdown:
auto_ids: false
gems:
- jekyll-mentions

15
_includes/analytics.html Executable file
View File

@ -0,0 +1,15 @@
{% if site.google_analytics_key %}
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', '{{ site.google_analytics_key }}']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
{% endif %}

366
_includes/css/base.css Normal file
View File

@ -0,0 +1,366 @@
/*
* Skeleton V1.2
* Copyright 2011, Dave Gamache
* www.getskeleton.com
* Free to use under the MIT license.
* http://www.opensource.org/licenses/mit-license.php
* 6/20/2012
*/
/* Table of Content
==================================================
#Reset & Basics
#Basic Styles
#Site Styles
#Typography
#Links
#Lists
#Images
#Buttons
#Forms
#Misc */
/* #Reset & Basics (Inspired by E. Meyers)
================================================== */
html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, canvas, details, embed, figure, figcaption, footer, header, hgroup, menu, nav, output, ruby, section, summary, time, mark, audio, video {
margin: 0;
padding: 0;
border: 0;
font-size: 100%;
font: inherit;
vertical-align: baseline; }
article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section {
display: block; }
body {
line-height: 1; }
ol, ul {
list-style: none; }
blockquote, q {
quotes: none; }
blockquote:before, blockquote:after,
q:before, q:after {
content: '';
content: none; }
table {
border-collapse: collapse;
border-spacing: 0; }
/* #Basic Styles
================================================== */
body {
background: #fff;
font: 14px/21px "Raleway", "HelveticaNeue-Light", Arial, sans-serif;
color: #444;
-webkit-font-smoothing: antialiased; /* Fix for webkit rendering */
-webkit-text-size-adjust: 100%;
}
/* #Typography
================================================== */
h1, h2, h3, h4, h5, h6 {
font-weight: 300; }
h1 a, h2 a, h3 a, h4 a, h5 a, h6 a { font-weight: inherit; }
h1 { font-size: 46px; line-height: 50px; margin-bottom: 14px;}
h2 { font-size: 35px; line-height: 40px; margin-bottom: 10px; }
h3 { font-size: 28px; line-height: 34px; margin-bottom: 8px; }
h4 { font-size: 21px; line-height: 30px; margin-bottom: 4px; }
h5 { font-size: 17px; line-height: 24px; }
h6 { font-size: 14px; line-height: 21px; }
.subheader { color: #777; }
p { margin: 0 0 20px 0; }
p img { margin: 0; }
p.lead { font-size: 21px; line-height: 27px; color: #777; }
em { font-style: italic; }
strong { font-weight: bold; }
small { font-size: 80%; }
/* Blockquotes */
blockquote, blockquote p { font-size: 17px; line-height: 24px; color: #777; font-style: italic; }
blockquote { margin: 0 0 20px; padding: 9px 20px 0 19px; border-left: 1px solid #ddd; }
blockquote cite { display: block; font-size: 12px; color: #555; }
blockquote cite:before { content: "\2014 \0020"; }
blockquote cite a, blockquote cite a:visited, blockquote cite a:visited { color: #555; }
hr { border: solid #ddd; border-width: 1px 0 0; clear: both; margin: 10px 0 30px; height: 0; }
/* #Links
================================================== */
a, a:visited { text-decoration: underline; outline: 0; }
a:hover, a:focus { }
p a, p a:visited { line-height: inherit; }
/* #Lists
================================================== */
ul, ol { margin-bottom: 20px; }
ul { list-style: none outside; }
ol { list-style: decimal; }
ul, ul.square { list-style: square outside; }
ul ul, ul.circle { list-style: circle outside; }
ul ul ul, ul.disc { list-style: disc outside; }
ul ul li, ul ol li,
ol ol li, ol ul li { margin-bottom: 6px; }
li { line-height: 18px; margin-bottom: 12px; }
ul.large li { line-height: 21px; }
li p { line-height: 21px; }
/* #Images
================================================== */
img.scale-with-grid {
max-width: 100%;
height: auto; }
/* #Buttons
================================================== */
.button,
button,
input[type="submit"],
input[type="reset"],
input[type="button"] {
background: #eee; /* Old browsers */
background: #eee -moz-linear-gradient(top, rgba(255,255,255,.2) 0%, rgba(0,0,0,.2) 100%); /* FF3.6+ */
background: #eee -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(255,255,255,.2)), color-stop(100%,rgba(0,0,0,.2))); /* Chrome,Safari4+ */
background: #eee -webkit-linear-gradient(top, rgba(255,255,255,.2) 0%,rgba(0,0,0,.2) 100%); /* Chrome10+,Safari5.1+ */
background: #eee -o-linear-gradient(top, rgba(255,255,255,.2) 0%,rgba(0,0,0,.2) 100%); /* Opera11.10+ */
background: #eee -ms-linear-gradient(top, rgba(255,255,255,.2) 0%,rgba(0,0,0,.2) 100%); /* IE10+ */
background: #eee linear-gradient(top, rgba(255,255,255,.2) 0%,rgba(0,0,0,.2) 100%); /* W3C */
border: 1px solid #aaa;
border-top: 1px solid #ccc;
border-left: 1px solid #ccc;
-moz-border-radius: 3px;
-webkit-border-radius: 3px;
border-radius: 3px;
color: #444;
display: inline-block;
font-size: 11px;
font-weight: bold;
text-decoration: none;
text-shadow: 0 1px rgba(255, 255, 255, .75);
cursor: pointer;
margin-bottom: 20px;
line-height: normal;
padding: 8px 10px;
font-family: "HelveticaNeue", "Helvetica Neue", Helvetica, Arial, sans-serif; }
.button:hover,
button:hover,
input[type="submit"]:hover,
input[type="reset"]:hover,
input[type="button"]:hover {
color: #222;
background: #ddd; /* Old browsers */
background: #ddd -moz-linear-gradient(top, rgba(255,255,255,.3) 0%, rgba(0,0,0,.3) 100%); /* FF3.6+ */
background: #ddd -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(255,255,255,.3)), color-stop(100%,rgba(0,0,0,.3))); /* Chrome,Safari4+ */
background: #ddd -webkit-linear-gradient(top, rgba(255,255,255,.3) 0%,rgba(0,0,0,.3) 100%); /* Chrome10+,Safari5.1+ */
background: #ddd -o-linear-gradient(top, rgba(255,255,255,.3) 0%,rgba(0,0,0,.3) 100%); /* Opera11.10+ */
background: #ddd -ms-linear-gradient(top, rgba(255,255,255,.3) 0%,rgba(0,0,0,.3) 100%); /* IE10+ */
background: #ddd linear-gradient(top, rgba(255,255,255,.3) 0%,rgba(0,0,0,.3) 100%); /* W3C */
border: 1px solid #888;
border-top: 1px solid #aaa;
border-left: 1px solid #aaa; }
.button:active,
button:active,
input[type="submit"]:active,
input[type="reset"]:active,
input[type="button"]:active {
border: 1px solid #666;
background: #ccc; /* Old browsers */
background: #ccc -moz-linear-gradient(top, rgba(255,255,255,.35) 0%, rgba(10,10,10,.4) 100%); /* FF3.6+ */
background: #ccc -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(255,255,255,.35)), color-stop(100%,rgba(10,10,10,.4))); /* Chrome,Safari4+ */
background: #ccc -webkit-linear-gradient(top, rgba(255,255,255,.35) 0%,rgba(10,10,10,.4) 100%); /* Chrome10+,Safari5.1+ */
background: #ccc -o-linear-gradient(top, rgba(255,255,255,.35) 0%,rgba(10,10,10,.4) 100%); /* Opera11.10+ */
background: #ccc -ms-linear-gradient(top, rgba(255,255,255,.35) 0%,rgba(10,10,10,.4) 100%); /* IE10+ */
background: #ccc linear-gradient(top, rgba(255,255,255,.35) 0%,rgba(10,10,10,.4) 100%); /* W3C */ }
.button.full-width,
button.full-width,
input[type="submit"].full-width,
input[type="reset"].full-width,
input[type="button"].full-width {
width: 100%;
padding-left: 0 !important;
padding-right: 0 !important;
text-align: center; }
/* Fix for odd Mozilla border & padding issues */
button::-moz-focus-inner,
input::-moz-focus-inner {
border: 0;
padding: 0;
}
/* #Forms
================================================== */
form {
margin-bottom: 20px; }
fieldset {
margin-bottom: 20px; }
input[type="text"],
input[type="password"],
input[type="email"],
textarea,
select {
border: 1px solid #ccc;
padding: 6px 4px;
outline: none;
-moz-border-radius: 2px;
-webkit-border-radius: 2px;
border-radius: 2px;
font: 13px "HelveticaNeue", "Helvetica Neue", Helvetica, Arial, sans-serif;
color: #777;
margin: 0;
width: 210px;
max-width: 100%;
display: block;
margin-bottom: 20px;
background: #fff; }
select {
padding: 0; }
input[type="text"]:focus,
input[type="password"]:focus,
input[type="email"]:focus,
textarea:focus {
border: 1px solid #aaa;
color: #444;
-moz-box-shadow: 0 0 3px rgba(0,0,0,.2);
-webkit-box-shadow: 0 0 3px rgba(0,0,0,.2);
box-shadow: 0 0 3px rgba(0,0,0,.2); }
textarea {
min-height: 60px; }
label,
legend {
display: block;
font-weight: bold;
font-size: 13px; }
select {
width: 220px; }
input[type="checkbox"] {
display: inline; }
label span,
legend span {
font-weight: normal;
font-size: 13px;
color: #444; }
/* #Misc
================================================== */
.remove-bottom { margin-bottom: 0 !important; }
.half-bottom { margin-bottom: 10px !important; }
.add-bottom { margin-bottom: 20px !important; }
/* #Syntax highlighting
================================================== */
.highlight {
color: #f8f8f2;
table-layout: fixed;
white-space: nowrap;
width:90%;
}
.highlight pre, .highlight code { display:block; margin:0; padding:0; background: none; overflow:auto; word-wrap: normal; }
.highlight, .linenodiv {
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVQIHWPQ1dU1BgABzQC7XXMTYQAAAABJRU5ErkJggg==);
display:block;
padding: 10px;
margin-bottom:20px;
}
.gutter, .lineno { color: #ccc; }
td.gl { width: 40px; }
.gutter {
border-right: none;
padding: 10px;
text-align: right;
}
span.lineno {
display: block;
float: left;
width: 40px;
padding-right: 8px;
text-align: right;
}
.hll { background-color: #49483e }
.c { color: #75715e } /* Comment */
.err { color: #960050; background-color: #1e0010 } /* Error */
.k { color: #66d9ef } /* Keyword */
.l { color: #ae81ff } /* Literal */
.n { color: #f8f8f2 } /* Name */
.o { color: #f92672 } /* Operator */
.p { color: #f8f8f2 } /* Punctuation */
.cm { color: #75715e } /* Comment.Multiline */
.cp { color: #75715e } /* Comment.Preproc */
.c1 { color: #75715e } /* Comment.Single */
.cs { color: #75715e } /* Comment.Special */
.ge { font-style: italic } /* Generic.Emph */
.gs { font-weight: bold } /* Generic.Strong */
.kc { color: #66d9ef } /* Keyword.Constant */
.kd { color: #66d9ef } /* Keyword.Declaration */
.kn { color: #f92672 } /* Keyword.Namespace */
.kp { color: #66d9ef } /* Keyword.Pseudo */
.kr { color: #66d9ef } /* Keyword.Reserved */
.kt { color: #66d9ef } /* Keyword.Type */
.ld { color: #e6db74 } /* Literal.Date */
.m { color: #ae81ff } /* Literal.Number */
.s { color: #e6db74 } /* Literal.String */
.na { color: #a6e22e } /* Name.Attribute */
.nb { color: #f8f8f2 } /* Name.Builtin */
.nc { color: #a6e22e } /* Name.Class */
.no { color: #66d9ef } /* Name.Constant */
.nd { color: #a6e22e } /* Name.Decorator */
.ni { color: #f8f8f2 } /* Name.Entity */
.ne { color: #a6e22e } /* Name.Exception */
.nf { color: #a6e22e } /* Name.Function */
.nl { color: #f8f8f2 } /* Name.Label */
.nn { color: #f8f8f2 } /* Name.Namespace */
.nx { color: #a6e22e } /* Name.Other */
.py { color: #f8f8f2 } /* Name.Property */
.nt { color: #f92672 } /* Name.Tag */
.nv { color: #f8f8f2 } /* Name.Variable */
.ow { color: #f92672 } /* Operator.Word */
.w { color: #f8f8f2 } /* Text.Whitespace */
.mf { color: #ae81ff } /* Literal.Number.Float */
.mh { color: #ae81ff } /* Literal.Number.Hex */
.mi { color: #ae81ff } /* Literal.Number.Integer */
.mo { color: #ae81ff } /* Literal.Number.Oct */
.sb { color: #e6db74 } /* Literal.String.Backtick */
.sc { color: #e6db74 } /* Literal.String.Char */
.sd { color: #e6db74 } /* Literal.String.Doc */
.s2 { color: #e6db74 } /* Literal.String.Double */
.se { color: #ae81ff } /* Literal.String.Escape */
.sh { color: #e6db74 } /* Literal.String.Heredoc */
.si { color: #e6db74 } /* Literal.String.Interpol */
.sx { color: #e6db74 } /* Literal.String.Other */
.sr { color: #e6db74 } /* Literal.String.Regex */
.s1 { color: #e6db74 } /* Literal.String.Single */
.ss { color: #e6db74 } /* Literal.String.Symbol */
.bp { color: #f8f8f2 } /* Name.Builtin.Pseudo */
.vc { color: #f8f8f2 } /* Name.Variable.Class */
.vg { color: #f8f8f2 } /* Name.Variable.Global */
.vi { color: #f8f8f2 } /* Name.Variable.Instance */
.il { color: #ae81ff } /* Literal.Number.Integer.Long */
.gh { } /* Generic Heading & Diff Header */
.gu { color: #75715e; } /* Generic.Subheading & Diff Unified/Comment? */
.gd { color: #f92672; } /* Generic.Deleted & Diff Deleted */
.gi { color: #a6e22e; } /* Generic.Inserted & Diff Inserted */

357
_includes/css/main.css Normal file
View File

@ -0,0 +1,357 @@
html { box-sizing: border-box; }
*, *:before, *:after { box-sizing: inherit; }
/* ---------------------------*/
/* ----- Special Styles ----- */
/* ---------------------------*/
/* ----- colors (autogenerated from _config.yml)----- */
{% for c in site.colors %}
.border-{{c[0]}} { border-color: {{ c[1] }} !important; }
.text-{{c[0]}} { color: {{ c[1] }}; }
.text-{{c[0]}} a { color: {{ c[1] }}; }
.bg-{{c[0]}} { background-color: {{ c[1] }} !important; }
{% endfor %}
/* ----- per-post colors! ----- */
{% for node in site.posts %}
{% capture id %}{{ node.id | remove:'/' | downcase }}{% endcapture %}
{% capture bg %}{% if site.colors[node.bg] %}{{ site.colors[node.bg] }}{% else %}{{ node.bg }}{% endif %}{% endcapture %}
{% capture fg %}{% if site.colors[node.color] %}{{ site.colors[node.color] }}{% else %}{{ node.color }}{% endif %}{% endcapture %}
nav .p-{{id}} { border-color: {{ bg }}; }
#{{id}} { background-color: {{ bg }} !important; color: {{ fg }}; }
#{{id}} a { color: {{ fg }}; }
#{{id}} .sectiondivider { color: {{ bg }}; }
{% endfor %}
/* ----- code, syntax highlighting, etc ----- */
code, pre { font-family: Monaco, Menlo, Consolas, "Courier New", monospace; }
/* spesifically inline code */
code, pre {
background: rgba(255,255,255,0.2);
display: inline;
word-wrap: break-word;
}
/* block code */
pre code { background: none; display: block; }
pre {
display: block;
margin: 20px 5%;
padding: 4px 8px;
background: rgba(255,255,255,0.1);
word-wrap: break-word;
}
.highlight { margin:20px 5%; }
/* ----- base elements ----- */
img {
max-width:100%!important;
height:auto;
vertical-align:middle;
}
hr {
margin:60px auto;
width:50%;
border-color: {{ site.colors.black }};
}
.container { word-wrap: break-word; }
.center { text-align: center; }
.left, .container .left { text-align: left; }
.container h1, .container h2, .container h3, .container h4 {
margin-bottom: 20px;
text-align: center;
padding: 0 4%;
}
.container p, .container ol, .container ul {
font-size: 17px;
padding: 0 5%;
}
.container ol, .container ul { padding: 0 8%; }
.container p:first-of-type {
margin-top: 40px;
}
/* keep embedded videos fluid! */
.icontain {
position: relative;
height: 0;
overflow: hidden;
padding-bottom: 56.25%; /* keep 16x9 Aspect Ratio */
}
.i4x3 { padding-bottom: 75.00%; } /* keep 4x3 Aspect Ratio */
.icontain iframe {
position: absolute;
top:0;
left: 0;
width: 100%;
height: 100%;
}
.inlineblock {
display:-moz-inline-stack;
display:inline-block;
zoom:1;
*display:inline;
}
/* ---------------------------*/
/* ----- Main Structure ----- */
/* ---------------------------*/
/* ----- top menu ----- */
{% assign navborder = 3 %}
{% assign navborder_active = 6 %}
nav {
font-size:15px;
width:100%;
position:fixed;
z-index:100;
top:0;
left:0;
background:#2e2e2e;
}
nav ul {
list-style:none;
text-align:center;
padding:0;
margin:0;
letter-spacing:-4px;
}
nav ul li {
display:inline-block;
border-top:{{navborder}}px solid;
padding: {{navborder}}px;
*display:inline;
zoom:1;
line-height:normal;
letter-spacing:normal;
text-transform:uppercase;
min-width:110px;
line-height:60px;
margin:0;
}
nav ul li a, nav ul li a:visited {
display:block;
color:#fff;
text-decoration:none;
font-weight:600;
opacity:.75;
}
nav ul li a:hover {
opacity:1
}
nav ul li:hover, nav ul li.active {
border-top-width: {{navborder_active}}px;
padding-top: 0;
}
/* ----- sections/articles ----- */
.section {
position:relative;
display:block;
width:100%;
min-height:300px;
padding:210px 0;
background:url(img/bgnoise.png);
/* generated noise from noisetexturegenerator.com */
}
.section:first-of-type {
padding-top: 140px;
}
#footer {
padding: 8px 0;
min-height:0;
text-align:center;
background-color:#2e2e2e;
background-image:none;
}
#footer .container p { font-size:13px; margin:0; }
.subtlecircle {
text-align:center;
z-index:3;
border-radius:50%;
-moz-border-radius:50%;
-webkit-border-radius:50%;
box-shadow: 0px 1px 15px rgba(0,0,0,0.05);
background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAF0lEQVQIHWP8//+/MQMaYELjg7kUCgIASm8DOqGzfp8AAAAASUVORK5CYII=);
}
.sectiondivider {
width:270px;
height:270px;
padding:15px;
position:absolute;
top:-135px;
left:50%;
margin-left:-135px;
}
.sectiondivider img {
width:200px;
height:240px;
position: static;
margin-top: -20px;
}
.sectiondivider .fa-stack {
font-size: 130px;
position: static;
margin-top: -8px;
}
.sectiondivider .fa-circle { color: #fff; }
.sectiondivider h5 {
font-size:15px;
font-weight:700;
text-transform:uppercase;
position:absolute;
bottom:50px;
left:auto;
text-align:center;
display:block;
z-index:6;
width:240px;
}
.sectiondivider.imaged {
text-shadow: 1px 1px 3px #333;
}
.columned {
-webkit-column-count: 3;
-moz-column-count: 3;
column-count: 3;
-webkit-column-gap: 40px;
-moz-column-gap: 40px;
column-gap: 40px;
-webkit-column-rule: 1px outset rgba(255,255,255,0.5);
-moz-column-rule: 1px outset rgba(255,255,255,0.5);
column-rule: 1px outset rgba(255,255,255,0.5);
}
.longlist { font-size: 14px !important; }
.longlist li { margin-bottom: 3px; }
/* ----- fork on github banner ----- */
#forkongithub a {
color:#fff;
text-decoration:none;
font-family:arial,sans-serif;
text-align:center;
font-weight:700;
font-size:1rem;
line-height:2rem;
position:relative;
transition:.5s;
padding:5px 40px;
}
#forkongithub a::before, #forkongithub a::after {
content:""; width:100%; display:block; position:absolute;
top:1px; left:0; height:1px; background:#fff;
}
#forkongithub a::after { bottom:1px; top:auto; }
@media screen and (min-width:800px) {
#forkongithub {
position:fixed;
display:block;
top:0;
right:0;
width:200px;
overflow:hidden;
height:200px;
z-index:9999;
}
#forkongithub a {
width:200px;
position:absolute;
top:60px;
right:-60px;
transform:rotate(45deg);
-webkit-transform:rotate(45deg);
-ms-transform:rotate(45deg);
-moz-transform:rotate(45deg);
-o-transform:rotate(45deg);
box-shadow:4px 4px 10px rgba(0,0,0,0.8);
box-sizing: content-box;
}
}
/* mid size (tablets, landscapes) */
@media only screen and (max-width: 679px) {
nav { font-size:11px; }
nav ul li {
min-width:60px;
line-height:40px;
}
}
/* tiny size (phones) */
@media only screen and (max-width: 380px) {
nav ul li { min-width:90px; line-height:20px; }
}
/* anything not desktop */
@media only screen and (max-width: 767px) {
.container h1 { font-size: 30px; }
.container h2 { font-size: 24px; }
.container h3 { font-size: 20px; }
.container h4 { font-size: 18px; }
.section { padding:130px 0; }
.sectiondivider {
width:200px;
height:200px;
padding:15px;
top:-100px;
margin-left:-100px;
}
.sectiondivider img {
width:150px;
height:180px;
}
.sectiondivider .fa-stack {
font-size: 100px;
margin-top: -14px;
}
.sectiondivider h5 {
font-size:15px;
bottom:30px;
width:170px
}
.columned {
-webkit-column-count: 2;
-moz-column-count: 2;
column-count: 2;
}
}

91
_includes/css/skeleton.css vendored Normal file
View File

@ -0,0 +1,91 @@
/* -----------------------------------*/
/* ----- 960px wide fancy grid! ----- */
/* -----------------------------------*/
/* by tim o'brien, t413.com
* based on getskeleton.com
*/
/* ----- base grid----- */
.container { position: relative; width: 960px; margin: 0 auto; padding: 0; }
.container .column { float: left; display: inline; margin-left: 10px; margin-right: 10px; }
.row { margin-bottom: 20px; }
.container .small.column { width: 300px; }
.container .half.column { width: 460px; }
.container .big.column { width: 620px; }
.container .full.column { width: 940px; }
/* ----- Tablet (Portrait) -- 768px ----- */
@media only screen and (min-width: 768px) and (max-width: 959px) {
.container { width: 768px; }
.container .small.column { width: 236px; }
.container .half.column { width: 364px; }
.container .big.column { width: 488px; }
.container .full.column { width: 748px; }
}
/* ----- Mobile (Portrait) ----- */
@media only screen and (max-width: 767px) {
.container { width: 96%; }
.container .column { margin: 1%; }
.container .small.column { width: 48%; }
.container .half.column { width: 48%; }
.container .big.column { width: 98%; }
.container .full.column { width: 98%; }
}
/* ----- Mobile (Landscape) -- 480px ----- */
@media only screen and (min-width: 480px) and (max-width: 767px) {
.container { width: 92%; }
.container .column { margin: 2%; }
.container .small.column { width: 46%; }
.container .half.column { width: 46%; }
.container .big.column { width: 96%; }
.container .full.column { width: 96%; }
}
/* ----- Clearing ----- */
/* Self Clearing Goodness */
.container:after { content: "\0020"; display: block; height: 0; clear: both; visibility: hidden; }
/* Use clearfix class on parent to clear nested columns,
or wrap each row of columns in a <div class="row"> */
.clearfix:before,
.clearfix:after,
.row:before,
.row:after {
content: '\0020';
display: block;
overflow: hidden;
visibility: hidden;
width: 0;
height: 0; }
.row:after,
.clearfix:after {
clear: both; }
.row,
.clearfix {
zoom: 1; }
/* You can also use a <br class="clear" /> to clear columns */
.clear {
clear: both;
display: block;
overflow: hidden;
visibility: hidden;
width: 0;
height: 0;
}

8
_includes/footer.md Executable file
View File

@ -0,0 +1,8 @@
Design by Tim O'Brien [t413.com](http://t413.com/)
&mdash;
[SinglePaged theme](https://github.com/t413/SinglePaged)
&mdash;
this site is [open source]({{ site.source_link }})

68
_posts/2017-01-01-home.md Normal file
View File

@ -0,0 +1,68 @@
---
title: "home"
bg: purewhite
color: black
style: center
---
<h1 align="center">
<a href="https://github.com/ryanoasis/nerd-fonts"><img src="https://raw.githubusercontent.com/ryanoasis/nerd-fonts/master/images/nerd-fonts-logo.png" alt="Nerd Fonts Logo" /></a>
</h1>
Iconic font aggregator, collection, and patcher: 37 patched fonts (71.4k+ variations). Includes popular glyph collections such as Font Awesome & fonts such as Hack
[![GitHub release][img-version-badge-with-logo]][repo]&nbsp;[![Gitter][img-gitter-badge]][gitter]&nbsp;&nbsp;&nbsp;[![Windows Logo][w-top]](#patched-fonts)&nbsp;&nbsp;&nbsp;[![macOS (OSX) Logo][m-top]](#patched-fonts)&nbsp;&nbsp;&nbsp;[![Linux Logo][l-top]](#patched-fonts)
**Nerd Fonts** is a project that patches developer targeted fonts with a high number of glyphs (icons). Specifically to add a high number of extra glyphs from popular 'iconic fonts' such as [Font Awesome][font-awesome], [Devicons][vorillaz-devicons], [Octicons][octicons], and others.
<h1 align="center">
<a href="https://github.com/ryanoasis/nerd-fonts"><img src="https://raw.githubusercontent.com/wiki/ryanoasis/nerd-fonts/screenshots/v1.0.x/custom-sankey-glyphs-combined-diagram.png" alt="Nerd Fonts Sankey Diagram" /></a>
</h1>
<sub><i>Diagram created using <a href="http://sankeymatic.com/" title="SankeyMATIC (BETA): A Sankey diagram builder for everyone">@SankeyMATIC</a></i></sub>
<!--
Repo References
-->
[vim-devicons]:https://github.com/ryanoasis/vim-devicons "VimDevIcons Vim Plugin (external link) ➶"
[vorillaz-devicons]:http://vorillaz.github.io/devicons/
[font-awesome]:https://github.com/FortAwesome/Font-Awesome
[font-awesome-extension]:https://github.com/AndreLGava/font-awesome-extension
[octicons]:https://github.com/github/octicons
[font-linux]:https://github.com/Lukas-W/font-linux
[gabrielelana-pomicons]:https://github.com/gabrielelana/pomicons
[Seti-UI]:https://atom.io/themes/seti-ui
[ryanoasis-powerline-extra-symbols]:https://github.com/ryanoasis/powerline-extra-symbols
[wiki]:https://github.com/ryanoasis/nerd-fonts/wiki
[wiki-project-purpose]:https://github.com/ryanoasis/nerd-fonts/wiki/Project-Purpose
[repo]:https://github.com/ryanoasis/nerd-fonts
[gitter]:https://gitter.im/ryanoasis/nerd-fonts
<!--
Website References
-->
[website-iecpower]:http://unicodepowersymbol.com/
<!--
Link References
-->
[w-top]:https://github.com/ryanoasis/nerd-fonts/wiki/screenshots/v1.0.x/windows-pass-sm.png "↓ Windows Compatibility Status ↓"
[l-top]:https://github.com/ryanoasis/nerd-fonts/wiki/screenshots/v1.0.x/linux-pass-sm.png "↓ Linux Compatibility Status ↓"
[m-top]:https://github.com/ryanoasis/nerd-fonts/wiki/screenshots/v1.0.x/mac-pass-sm.png "↓ macOS (OSX) Compatibility Status ↓"
[badge-version]:http://badge.fury.io/gh/ryanoasis%2Fnerd-fonts
[badge-gitter]:https://gitter.im/ryanoasis/nerd-fonts?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge
[img-version-badge-with-logo]:https://img.shields.io/github/release/ryanoasis/nerd-fonts.svg?style=flat-square&logo=data%3Aimage%2Fpng%3Bbase64%2CiVBORw0KGgoAAAANSUhEUgAAAEAAAAAeCAYAAACc7RhZAAAABmJLR0QA%2FwD%2FAP%2BgvaeTAAAACXBIWXMAABJ0AAASdAHeZh94AAAAB3RJTUUH4AsTAw4JCvVTMQAABhNJREFUWMPtmX2MnFUVxs%2BdmZ3dYit0DaQKVfmwLaAxRQhIaqKpaCBSkCbQAkEUY0KFxFAkAomdaDeCCuJHqgQCQvnQjYABJEZJs2AhDS4xCIvgaDutsFmWmTLs7sz7dc%2Fv%2Bgd3zJvJu7O73bF2iTfZ7Mw79557nueee%2B5z7ivy%2F7Zwmqp%2BFRgBGoAFqsAu4HZVvTwMw%2BPelcCbzeb7gSeccw5QoO6macBuYJu1dt3Y2NhhCx68tfYc4E0P7o9RFJ1QLpeLqnop8BfXoQEB8JiqXlar1ZYsKOCjo6OLgJ%2B1Vl1VbyyVSiaDoLOAJzuQ8CKQAG%2Br6jXt482hCD5JktPy%2Bfx2Y8xK51wIXFIoFB6eYczp%2BXx%2BwBizVkTEOTcpIvtEJBaRpv%2BrOeeeE5E%2BEdmTz%2Bd%2FdUgBHxwczAFbgMSvXsNa%2B%2BnZjK1UKr1JkpwJ3AfsAP4KhB0iIxoeHi5IHMerVfU6a%2B0Xp6amjvpfEgDclnKwYa39zHR9a7XaEmvtOuBmYGcnsG3A3wT%2B7JxztVptiajqxtSPU8D3G43GsoMNvlQqGaDh%2FYittZ%2FP6hdF0QrgDmA%2FMAS8nfLf%2Bj3%2FMHCTqm4GbgO2AQNADLwM7AH%2B1Uoi506TPX8eRdEJB5mAt3gn421s%2F71cLhc9iBqwHXgQmAT2AT%2B01p6dlekrlUovMAiMAb9PYfydiIiJomhlsVh8Jcsp5xwi8oiq3trT0%2FNsJwDj4%2BPvWbp06epcLrfKGHO0iBwlIv0iskREFolIr4gURCQnIioiiYg0RGRCRMacc3tFJOece7lQKDzRluDOyOfz20TknyISicg5IvIocPfWrVufLpVKbqbcsn79%2Bq8bYzYYY8702L6Ty%2BW2tPbemFdUj7VFggL%2FAP4O7LLWXpAWJ6p6CfAL4AUffuqFyC7gGR9qs9qbqTnHgSFV%2FbaqfgP4A%2B%2B0Ma8AH5iamjryABPsZGueOI4%2F9p9jELhXRC4IguD4vr6%2Bi4wxtxhjCqlIeFVEHhWRk0TkAyLSZ4w50TkXiMiQc26nX83DjTGrROQUEfmIMSbnnLP%2BKApFpCoi4%2F7%2FlIgcISKrfcTM2Jxzcb1eP7K%2Fv39irgREUbSiWCy%2B6u08n8vlTk2LifM9%2B9%2F1mnsDoBmr81tr7ReAHaq6WVWvBR5p7V3gSVX9chzHH200GssqlUrvbJwLguCDqropndCmiY7n56Eo17bsqOrFWQnmDaAZBMFyT8IVgM1wIgSabc8Goyg6sRvFzgwE%2FGYeti%2FyNl4fHh4uZHX4GhCq6hXpyACCDEde8pFQUdUbu6j7z8qYazIljAbmQcAmb%2BMHc5Wla4DxDMfUOeeiKFrVxXJ3U8r%2B42EYHu%2BJWeefPTRXm5VKpbderx8B%2FMiH%2F1fm7FgQBMuB57LCspVNu6QE7%2FFAx0ZHRxel5j%2FGP39raGgoP0dSb1DVbwEjzjmXJMmpB%2BScFxS3txOQJMmaLhKw1wO9uT1HtebrJI8zwG8EGqp6vbe7N6uinGuYXpi%2BkLDWntsN8FEUrUqR%2BokMcnZ7ENtnc%2BS1VJ%2BXvkNZxM7H2RWt5Kiql3dp%2F1%2FnnfzbNNFxS0vvJ0lyegc732yJLy%2FEnvKfk65Ke%2BBuT8DmeRC5Evj1yMhID7Crk71Go7EMmPBgRuM4%2FnhGwj7D3xkOqOqVwJ9SSfWmrl9QHqjharW62JexMfBCHMcnt4qwycnJ93U4Js9LHYkR8NMkSdbU6%2FXDR0ZGesIw%2FJCqXgbsSAGPgYF57%2F3plBXwy7kKEuA1P7bsV%2FYu%2F%2F3HszyWn5lFTREC98VxfPJ%2FpXwNw%2FBYP9HO2fSP4%2FiktpUZDoLgGFX9Umu%2FVqvVxXNYgPW%2B9m96GV4HnlbVq6y1n5uYmOg%2FGDc4u4Gw2WwePYu%2B96dC8idenHzPV5FRkiSfWogvKm5oXVfv37%2F%2FvTNEwGpVvdpa%2B1mgBLzux6KqGxbknb1PZns8kH3AliRJPhkEwfJqtbo4CILl1tq1vq6%2FtyV0UtugYq09f0G%2FuAjD8NjpZHKHC4%2BHVPXicrlclHdDK5VKxlp7NnAr8Kx%2FEQEw6r%2FfqaobwjD88KHm%2B78BVBigctRUCFcAAAAASUVORK5CYII%3D
[img-gitter-badge]:https://img.shields.io/gitter/room/nwjs/nw.js.svg?style=flat-square
[consolas]:https://www.microsoft.com/typography/fonts/family.aspx?FID=300
[input-mono]:http://input.fontbureau.com/download/
[pragmatapro]:http://www.fsd.it/shop/fonts/pragmatapro/
[release]:https://github.com/ryanoasis/nerd-fonts/releases/latest "Latest Release (external link) ➶"

View File

@ -0,0 +1,42 @@
---
title: "Font Downloads"
bg: '#3484bb'
color: white
fa-icon: download
---
#### Downloads
- [3270.zip](https://github.com/ryanoasis/nerd-fonts/releases/download/v1.0.0/3270.zip)
- [AnonymousPro.zip](https://github.com/ryanoasis/nerd-fonts/releases/download/v1.0.0/AnonymousPro.zip)
- [AurulentSansMono.zip](https://github.com/ryanoasis/nerd-fonts/releases/download/v1.0.0/AurulentSansMono.zip)
- [BitstreamVeraSansMono.zip](https://github.com/ryanoasis/nerd-fonts/releases/download/v1.0.0/BitstreamVeraSansMono.zip)
- [CodeNewRoman.zip](https://github.com/ryanoasis/nerd-fonts/releases/download/v1.0.0/CodeNewRoman.zip)
- [DejaVuSansMono.zip](https://github.com/ryanoasis/nerd-fonts/releases/download/v1.0.0/DejaVuSansMono.zip)
- [DroidSansMono.zip](https://github.com/ryanoasis/nerd-fonts/releases/download/v1.0.0/DroidSansMono.zip)
- [FantasqueSansMono.zip](https://github.com/ryanoasis/nerd-fonts/releases/download/v1.0.0/FantasqueSansMono.zip)
- [FiraCode.zip](https://github.com/ryanoasis/nerd-fonts/releases/download/v1.0.0/FiraCode.zip)
- [FiraMono.zip](https://github.com/ryanoasis/nerd-fonts/releases/download/v1.0.0/FiraMono.zip)
- [Gohu.zip](https://github.com/ryanoasis/nerd-fonts/releases/download/v1.0.0/Gohu.zip)
- [Hack.zip](https://github.com/ryanoasis/nerd-fonts/releases/download/v1.0.0/Hack.zip)
- [Hasklig.zip](https://github.com/ryanoasis/nerd-fonts/releases/download/v1.0.0/Hasklig.zip)
- [HeavyData.zip](https://github.com/ryanoasis/nerd-fonts/releases/download/v1.0.0/HeavyData.zip)
- [Hermit.zip](https://github.com/ryanoasis/nerd-fonts/releases/download/v1.0.0/Hermit.zip)
- [Inconsolata.zip](https://github.com/ryanoasis/nerd-fonts/releases/download/v1.0.0/Inconsolata.zip)
- [Iosevka.zip](https://github.com/ryanoasis/nerd-fonts/releases/download/v1.0.0/Iosevka.zip)
- [Lekton.zip](https://github.com/ryanoasis/nerd-fonts/releases/download/v1.0.0/Lekton.zip)
- [LiberationMono.zip](https://github.com/ryanoasis/nerd-fonts/releases/download/v1.0.0/LiberationMono.zip)
- [Meslo.zip](https://github.com/ryanoasis/nerd-fonts/releases/download/v1.0.0/Meslo.zip)
- [Monofur.zip](https://github.com/ryanoasis/nerd-fonts/releases/download/v1.0.0/Monofur.zip)
- [Monoid.zip](https://github.com/ryanoasis/nerd-fonts/releases/download/v1.0.0/Monoid.zip)
- [Mononoki.zip](https://github.com/ryanoasis/nerd-fonts/releases/download/v1.0.0/Mononoki.zip)
- [MPlus.zip](https://github.com/ryanoasis/nerd-fonts/releases/download/v1.0.0/MPlus.zip)
- [ProFont.zip](https://github.com/ryanoasis/nerd-fonts/releases/download/v1.0.0/ProFont.zip)
- [ProggyClean.zip](https://github.com/ryanoasis/nerd-fonts/releases/download/v1.0.0/ProggyClean.zip)
- [RobotoMono.zip](https://github.com/ryanoasis/nerd-fonts/releases/download/v1.0.0/RobotoMono.zip)
- [ShareTechMono.zip](https://github.com/ryanoasis/nerd-fonts/releases/download/v1.0.0/ShareTechMono.zip)
- [SourceCodePro.zip](https://github.com/ryanoasis/nerd-fonts/releases/download/v1.0.0/SourceCodePro.zip)
- [SpaceMono.zip](https://github.com/ryanoasis/nerd-fonts/releases/download/v1.0.0/SpaceMono.zip)
- [Terminus.zip](https://github.com/ryanoasis/nerd-fonts/releases/download/v1.0.0/Terminus.zip)
- [UbuntuMono.zip](https://github.com/ryanoasis/nerd-fonts/releases/download/v1.0.0/UbuntuMono.zip)

View File

@ -0,0 +1,62 @@
---
title: "Latest Release"
bg: '#ff8b25'
color: white
fa-icon: bullhorn
---
## v1.0.0 Release Changelog
### New Features
- Added 6 new fonts:
- Code New Roman (enhancement #85)
- Gohu (enhancement #90)
- Hasklig (enhancement PR #103) (@jrolfs)
- Mononoki (enhancement #89)
- Share Tech Mono (enhancement #105)
- Space Mono (enhancement #93)
- Added new Glyph Sets:
- [Font Awesome Extension](http://andrelgava.github.io/font-awesome-extension/) (Over 170 glyphs) (enhancement #96)
- [IEC Power Symbols](http://unicodepowersymbol.com/) (enhancement #94)
- Added additional methods to download the fonts:
- Support for [Home Brew fonts](https://github.com/caskroom/homebrew-fonts) (enhancement #72)
- Archive downloads via releases with scripts to generate archive downloads for patched fonts (enhancement #32)
- Added single Nerd Fonts glyphs only fonts for Fontconfig aliasing (enhancement #84)
- Added TTF version of Terminess (Terminus) font (fixes #23)
- Added support for custom symbol fonts (with `--custom` flag) (PR #107 @sharkusk)
- Added progress bars options: `--progressbars` & `--no-progressbars` to patcher script
- Added `--postprocess` flag to allow additional scripts to run after patching (related to #70)
### Updates / Improvements
- Improved repository size greatly (partially fixes #73)
- Provides only `complete` version of patched fonts by default (others are still possible via patcher script)
- Removed `minimal` version of patched fonts (not particularly useful)
- Removed `variation` versions of patched fonts and instead provides generated list of commands for each combination
- Updated Font Awesome to the latest version v4.7.0:
- https://github.com/FortAwesome/Font-Awesome/releases/tag/v4.7.0
- https://github.com/FortAwesome/Font-Awesome/issues?q=milestone%3A4.7.0
- Updated Octicons font from [v3.2.0](https://github.com/github/octicons/releases/tag/v3.2.0) to [v4.4.0](https://github.com/github/octicons/releases/tag/v4.4.0)
- Last version with [font support](https://github.com/primer/octicons/issues/108)
- Adds glyphs: `verified`, `smiley`, `unverified`, `ellipses`, `file`, `grabber`, `plus-small`, `reply`
- Various glyph modifications and fixes
- Updated [DejaVu Sans Mono](http://dejavu-fonts.org/wiki/Changelog) from version 2.33 to 2.37
- Updated readme with information on shallow cloning (enhancement #102)
- Updated readme with better readability, prose, and removes some passive voice issues
- Updated sankey diagram in readme with a more visual representation of the glyphs combined
- Updated readability and format of changelog (even past versions)
- Removed redundant flag `--limit-font-name-length`
### Fixes
- Added missing glyphs in range `2630` through `2637` (trigrams) to DejaVu Sans Mono (fixes #100)
- Fixed various missing glyphs such as `heart`, `zap`, `desktop` (fixes #87)
- Fixed several long standing issues (fix & enhancement PR #107) (@sharkusk)
- glyphs (scaling and positioning) (fixes #74)
- Monospaced font issues
- Windows and macOS issues (fixes #111)
- Fixed font name for glyph font 'PowerlineExtraSymbols.otf' (fixes #109)
- Fixed and tweaked various powerline gaps (PR #107 @sharkusk)
- Fixed Hack hints being removed in patched versions (Knack) (fixes #70, with help from @chrissimpkins)
- Fixed various issues with '--careful' flag (PR #107 @sharkusk)
- Fixed missing codepoint conflict information for Octicons & Font Awesome (fixes #116) (image from @kaymmm)
- Fixed and refactored various code logic and style

5
combo.css Normal file
View File

@ -0,0 +1,5 @@
---
---
{% include css/base.css %}
{% include css/skeleton.css %}
{% include css/main.css %}

BIN
img/bgnoise.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

BIN
img/favicon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

64
index.html Executable file
View File

@ -0,0 +1,64 @@
---
---
<!DOCTYPE html>
<html dir="ltr" lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>{{ site.title }}</title>
<meta name="keywords" content="{{ site.keywords }}">
<meta name="description" content="{{ site.description }}">
<link rel="stylesheet" href="combo.css">
<link href='http://fonts.googleapis.com/css?family=Raleway:400,300,700' rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="//netdna.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css">
{% if site.favicon %}<link rel="shortcut icon" href="{{ site.favicon }}" type="image/x-icon">{% endif %}
{% if site.touch_icon %}<link rel="apple-touch-icon" href="{{ site.touch_icon }}">{% endif %}
</head>
<body>
<div id="main">
<nav><ul>
{% for node in site.posts reversed %}
{% capture id %}{{ node.id | remove:'/' | downcase }}{% endcapture %}
<li class="p-{{id}}"><a href="#{{id}}">{{node.title}}</a></li>
{% endfor %}
</ul></nav>
{% for page in site.posts reversed %}
{% capture id %}{{ page.id | remove:'/' | downcase }}{% endcapture %}
<div id="{{id}}" class="section p-{{id}}">
{% if page.icon %}
<div class="subtlecircle sectiondivider imaged">
<img src="{{page.icon}}" alt="section icon" />
<h5 class="icon-title">{{ page.title }}</h5>
</div>
{% elsif page.fa-icon %}
<div class="subtlecircle sectiondivider faicon">
<span class="fa-stack">
<i class="fa fa-circle fa-stack-2x"></i>
<i class="fa fa-{{ page.fa-icon }} fa-stack-1x"></i>
</span>
<h5 class="icon-title">{{ page.title }}</h5>
</div>
{% endif %}
<div class="container {{ page.style }}">
{{ page.content }}
</div>
</div>
{% endfor %}
<div id="footer" class="section text-white">
<div class="container">
{% capture foottext %} {% include footer.md %} {% endcapture %}
{{ foottext | markdownify }}
</div>
</div>
</div>
{% include analytics.html %}
</body>
<script src="//ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="site.js"></script>
</html>

95
site.js Normal file
View File

@ -0,0 +1,95 @@
$.extend($.easing,
{
def: 'easeOutQuad',
easeInOutExpo: function (x, t, b, c, d) {
if (t==0) return b;
if (t==d) return b+c;
if ((t/=d/2) < 1) return c/2 * Math.pow(2, 10 * (t - 1)) + b;
return c/2 * (-Math.pow(2, -10 * --t) + 2) + b;
}
});
(function( $ ) {
var settings;
var disableScrollFn = false;
var navItems;
var navs = {}, sections = {};
$.fn.navScroller = function(options) {
settings = $.extend({
scrollToOffset: 170,
scrollSpeed: 800,
activateParentNode: true,
}, options );
navItems = this;
//attatch click listeners
navItems.on('click', function(event){
event.preventDefault();
var navID = $(this).attr("href").substring(1);
disableScrollFn = true;
activateNav(navID);
populateDestinations(); //recalculate these!
$('html,body').animate({scrollTop: sections[navID] - settings.scrollToOffset},
settings.scrollSpeed, "easeInOutExpo", function(){
disableScrollFn = false;
}
);
});
//populate lookup of clicable elements and destination sections
populateDestinations(); //should also be run on browser resize, btw
// setup scroll listener
$(document).scroll(function(){
if (disableScrollFn) { return; }
var page_height = $(window).height();
var pos = $(this).scrollTop();
for (i in sections) {
if ((pos + settings.scrollToOffset >= sections[i]) && sections[i] < pos + page_height){
activateNav(i);
}
}
});
};
function populateDestinations() {
navItems.each(function(){
var scrollID = $(this).attr('href').substring(1);
navs[scrollID] = (settings.activateParentNode)? this.parentNode : this;
sections[scrollID] = $(document.getElementById(scrollID)).offset().top;
});
}
function activateNav(navID) {
for (nav in navs) { $(navs[nav]).removeClass('active'); }
$(navs[navID]).addClass('active');
}
})( jQuery );
$(document).ready(function (){
$('nav li a').navScroller();
//section divider icon click gently scrolls to reveal the section
$(".sectiondivider").on('click', function(event) {
$('html,body').animate({scrollTop: $(event.target.parentNode).offset().top - 50}, 400, "linear");
});
//links going to other sections nicely scroll
$(".container a").each(function(){
if ($(this).attr("href").charAt(0) == '#'){
$(this).on('click', function(event) {
event.preventDefault();
var target = $(event.target).closest("a");
var targetHight = $(target.attr("href")).offset().top
$('html,body').animate({scrollTop: targetHight - 170}, 800, "easeInOutExpo");
});
}
});
});