Separate pages and refactors includes

This commit is contained in:
Ryan L McIntyre 2019-07-23 14:36:00 -07:00
parent f6c2d5de4b
commit 153a748613
11 changed files with 166 additions and 57 deletions

14
_includes/header.html Normal file
View file

@ -0,0 +1,14 @@
<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='https://fonts.googleapis.com/css?family=Raleway:400,300,700' rel='stylesheet' type='text/css'>
<link rel="canonical" href="https://www.nerdfonts.com" />
<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 %}
<meta name="google-site-verification" content="492okaDWvAC6AttbBxVRWxT7-KNmPqFlLiMupaXdFU0" />
</head>

9
_includes/scripts.html Normal file
View file

@ -0,0 +1,9 @@
<script async defer src="https://buttons.github.io/buttons.js"></script>
<script src="//ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script>
((window.gitter = {}).chat = {}).options = {
room: 'ryanoasis/nerd-fonts'
};
</script>
<script src="https://sidecar.gitter.im/dist/sidecar.v1.js" async defer></script>
<script src="site.js"></script>

20
_includes/section.html Normal file
View file

@ -0,0 +1,20 @@
{% 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>

30
_includes/topnav.html Normal file
View file

@ -0,0 +1,30 @@
<nav><ul>
{% for node in site.posts reversed %}
{% if node.page == page.page %}
{% assign active = 'active' %}
{% else %}
{% assign active = '' %}
{%endif %}
{% capture id %}{{ node.id | remove:'/' | downcase }}{% endcapture %}
<li class="p-{{id}} hide-on-larger-view {{active}}">
{% if node.page %}
<a href="/{{node.page}}">
{% elsif page.page %}
<a href="/#{{id}}">
{% else %}
<a href="#{{id}}">
{% endif %}
<i class="fa fa-{{ node.fa-icon }}"></i> {{node.short_title}}</a>
</li>
<li class="p-{{id}} hide-on-smaller-view {{active}}">
{% if node.page %}
<a href="/{{node.page}}">
{% elsif page.page %}
<a href="/#{{id}}">
{% else %}
<a href="#{{id}}">
{% endif %}
<i class="fa fa-{{ node.fa-icon }}"></i> {{node.title}}</a>
</li>
{% endfor %}
</ul></nav>

View file

@ -4,6 +4,7 @@ short_title: "Icons"
bg: gray
color: white
fa-icon: search
page: cheat-sheet
---
# Cheat Sheet

View file

@ -4,6 +4,7 @@ short_title: "People"
bg: 'red'
color: white
fa-icon: flask
page: contributors
---
# Thanks goes to these wonderful people

21
cheat-sheet.html Executable file
View file

@ -0,0 +1,21 @@
---
---
<!DOCTYPE html>
<html dir="ltr" lang="en">
{% include header.html %}
<body>
<div id="main" class="section-page-wrapper">
{% assign page = site.posts[2] %}
{% include topnav.html %}
{% include section.html %}
<div id="footer" class="section text-white">
<div class="container">
{% capture foottext %} {% include footer.md %} {% endcapture %}
{{ foottext | markdownify }}
</div>
</div>
</div>
{% include analytics.html %}
{% include scripts.html %}
</body>
</html>

21
contributors.html Executable file
View file

@ -0,0 +1,21 @@
---
---
<!DOCTYPE html>
<html dir="ltr" lang="en">
{% include header.html %}
<body>
<div id="main" class="section-page-wrapper">
{% assign page = site.posts[1] %}
{% include topnav.html %}
{% include section.html %}
<div id="footer" class="section text-white">
<div class="container">
{% capture foottext %} {% include footer.md %} {% endcapture %}
{{ foottext | markdownify }}
</div>
</div>
</div>
{% include analytics.html %}
{% include scripts.html %}
</body>
</html>

21
font-downloads.html Executable file
View file

@ -0,0 +1,21 @@
---
---
<!DOCTYPE html>
<html dir="ltr" lang="en">
{% include header.html %}
<body>
<div id="main" class="section-page-wrapper">
{% assign page = site.posts[3] %}
{% include topnav.html %}
{% include section.html %}
<div id="footer" class="section text-white">
<div class="container">
{% capture foottext %} {% include footer.md %} {% endcapture %}
{{ foottext | markdownify }}
</div>
</div>
</div>
{% include analytics.html %}
{% include scripts.html %}
</body>
</html>

View file

@ -2,60 +2,18 @@
---
<!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='https://fonts.googleapis.com/css?family=Raleway:400,300,700&display=swap' rel='stylesheet' type='text/css'>
<link rel="canonical" href="https://nerdfonts.com" />
<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 %}
<meta name="google-site-verification" content="492okaDWvAC6AttbBxVRWxT7-KNmPqFlLiMupaXdFU0" />
</head>
{% include header.html %}
<body>
<div id="main">
<nav><ul>
{% for node in site.posts reversed %}
{% capture id %}{{ node.id | remove:'/' | downcase }}{% endcapture %}
<li class="p-{{id}} hide-on-larger-view"><a href="#{{id}}">
<i class="fa fa-{{ node.fa-icon }}"></i> {{node.short_title}}</a>
</li>
<li class="p-{{id}} hide-on-smaller-view"><a href="#{{id}}">
<i class="fa fa-{{ node.fa-icon }}"></i> {{node.title}}</a>
</li>
{% endfor %}
</ul></nav>
{% include topnav.html %}
{% 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>
{% if page.page == nil %}
{% include section.html %}
{% 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 %}
@ -65,14 +23,6 @@
</div>
{% include analytics.html %}
<script async defer src="https://buttons.github.io/buttons.js"></script>
{% include scripts.html %}
</body>
<script src="//ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script>
((window.gitter = {}).chat = {}).options = {
room: 'ryanoasis/nerd-fonts'
};
</script>
<script src="https://sidecar.gitter.im/dist/sidecar.v1.js" async defer></script>
<script src="site.js"></script>
</html>

21
releases.html Executable file
View file

@ -0,0 +1,21 @@
---
---
<!DOCTYPE html>
<html dir="ltr" lang="en">
{% include header.html %}
<body>
<div id="main" class="section-page-wrapper">
{% assign page = site.posts[0] %}
{% include topnav.html %}
{% include section.html %}
<div id="footer" class="section text-white">
<div class="container">
{% capture foottext %} {% include footer.md %} {% endcapture %}
{{ foottext | markdownify }}
</div>
</div>
</div>
{% include analytics.html %}
{% include scripts.html %}
</body>
</html>