[F] Add necessary files to support website generation for headtags.info

This commit is contained in:
Josh Buchea 2016-06-17 15:01:27 -07:00
parent e8f780b482
commit f15076cb62
13 changed files with 396 additions and 0 deletions

21
.gitignore vendored Normal file
View File

@ -0,0 +1,21 @@
# OS or Editor folders
*.esproj
*.sublime-project
*.sublime-workspace
.DS_Store
.Spotlight-V100
.Trashes
._*
.cache
.idea
.project
.settings
.tmproj
Desktop.ini
Thumb.db
Thumbs.db
nbproject
_site
.jekyll-metadata
.sass-cache

1
CNAME Normal file
View File

@ -0,0 +1 @@
headtags.info

24
_config.yml Normal file
View File

@ -0,0 +1,24 @@
# Site settings
title: <head> tags
description: A list of everything that could go in the <head> of your document
baseurl: "" # the subpath of your site, e.g. /blog/
url: "http://headtags.info" # the base hostname & protocol for your site (no trailing slash)
twitter_username: joshbuchea
github_username: joshbuchea
exclude: [readme.md]
sass:
#style: compressed
# Build settings
markdown: kramdown
# Compress HTML
compress_html:
clippings: all
comments: []
endings: [p, li, td]
ignore:
envs: []
blanklines: false
profile: false
startings: [html, head, body]

3
_includes/footer.html Normal file
View File

@ -0,0 +1,3 @@
<footer class="site__footer">
<!-- footer -->
</footer>

20
_includes/head.html Normal file
View File

@ -0,0 +1,20 @@
<head>
<meta charset="utf-8">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1.0">
<meta name="description" content="{{ site.description }}">
<meta name="apple-mobile-web-app-title" content="{% if page.title %}{{ page.title }}{% else %}{{ site.title }}{% endif %}">
<meta name="application-name" content="{% if page.title %}{{ page.title }}{% else %}{{ site.title }}{% endif %}">
<!-- <meta name="theme-color" content="#2980b9"> -->
<!-- <meta name="google-site-verification" content=""> -->
<!-- Open all links in a new tab/window -->
<base target="_blank">
<title>{% if page.title %}{{ page.title | xml_escape }}{% else %}{{ site.title | xml_escape }}{% endif %}</title>
<link rel="stylesheet" href="main.css">
<!-- <link rel="mask-icon" href="favicon.svg" color="#2980b9"> -->
<!-- <link rel="icon" href="apple-touch-icon-precomposed.png"> -->
<!-- <link rel="apple-touch-icon" href="apple-touch-icon-precomposed.png"> -->
</head>

17
_includes/header.html Normal file
View File

@ -0,0 +1,17 @@
<header class="site__header">
{% include share-page.html %}
<div>
By <a href="http://joshbuchea.com/">Josh Buchea</a> / <a href="https://twitter.com/{{ site.twitter_username }}">@{{ site.twitter_username }}</a>
</div>
<a href="//github.com/joshbuchea/head" class="github" target="_blank">
<svg xmlns="//www.w3.org/2000/svg" viewBox="0 0 250 250" fill="#fff">
<path d="M0 0l115 115h15l12 27 108 108V0z" fill="#70B7FD"/>
<path class="github__arm" d="M128 109c-15-9-9-19-9-19 3-7 2-11 2-11-1-7 3-2 3-2 4 5 2 11 2 11-3 10 5 15 9 16" style=""/>
<path class="github__body" d="M115 115s4 2 5 0l14-14c3-2 6-3 8-3-8-11-15-24 2-41 5-5 10-7 16-7 1-2 3-7 12-11 0 0 5 3 7 16 4 2 8 5 12 9s7 8 9 12c14 3 17 7 17 7-4 8-9 11-11 11 0 6-2 11-7 16-16 16-30 10-41 2 0 3-1 7-5 11l-12 11c-1 1 1 5 1 5z"/>
</svg>
</a>
</header>

48
_includes/share-page.html Normal file
View File

@ -0,0 +1,48 @@
<div class="share-page">
<!-- Share via Facebook -->
<iframe
src="https://www.facebook.com/plugins/share_button.php?href={{ site.url }}{{ page.url }}&layout=button&mobile_iframe=true&width=58&height=20&appId"
width="58"
height="20"
style="border:none;overflow:hidden"
scrolling="no"
frameborder="0"
allowTransparency="true">
</iframe>
<!-- End Share via Facebook -->
<!-- Share via Twitter -->
<a
class="twitter-share-button"
href="https://twitter.com/share"
data-url="{{ site.url }}{{ page.url }}"
data-text="{{ site.description }}"
data-via="joshbuchea"
data-size="small">
Tweet
</a>
<script>
!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';
if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';
fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');
</script>
<!-- End Share via Twitter -->
<!-- <a href="https://twitter.com/joshbuchea" class="twitter-follow-button" data-show-count="false">Follow @joshbuchea</a> <script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script> -->
<!-- Star on GitHub -->
<a
class="github-button"
href="https://github.com/joshbuchea/HEAD"
data-icon="octicon-star"
data-count-href="/joshbuchea/HEAD/stargazers"
data-count-api="/repos/joshbuchea/HEAD#stargazers_count"
data-count-aria-label="# stargazers on GitHub"
aria-label="Star joshbuchea/HEAD on GitHub">
Star
</a>
<!-- Place this tag in your head or just before your close body tag. -->
<script async defer src="https://buttons.github.io/buttons.js"></script>
<!-- End Star on GitHub -->
</div>

36
_layouts/default.html Normal file
View File

@ -0,0 +1,36 @@
---
---
<!DOCTYPE html>
<html lang="en">
{% include head.html %}
<body>
<div class="container">
{% include header.html %}
<div class="site__main">
<h1 class="site__title">{{ site.title | xml_escape }}</h1>
{{ content }}
</div>
</div>
</body>
<!-- <script src="js/script.js"></script> -->
<script>
// highlight text in code blocks when clicked
var codeBlocks = document.querySelectorAll('.highlighter-rouge code');
for (var i = 0; i < codeBlocks.length; i++) {
codeBlocks[i].addEventListener('click', function() {
clip(this);
}, false);
}
var clip = function(el) {
var range = document.createRange();
range.selectNodeContents(el);
var sel = window.getSelection();
sel.removeAllRanges();
sel.addRange(range);
};
</script>
</html>

40
_sass/_github.scss Normal file
View File

@ -0,0 +1,40 @@
.github {
height: 80px;
width: 80px;
position: fixed;
right: 0;
top: 0;
transform: translateZ(0);
z-index: 1;
&:hover {
.github__arm {
@media (min-width: $media-sm) {
animation: octocat-wave 560ms ease-in-out;
}
}
}
&__arm {
transform-origin: 130px 106px;
}
}
a.github,
a.github:hover,
a.github:focus {
border-bottom: none;
}
@keyframes octocat-wave {
0%, 100%{
transform: rotate(0);
}
20%, 60%{
transform: rotate(-25deg);
}
40%, 80%{
transform: rotate(10deg);
}
}

65
_sass/_syntax.scss Normal file
View File

@ -0,0 +1,65 @@
.highlight .hll { background-color: #ffc; }
.highlight .c { color: #999; } /* Comment */
.highlight .err { color: #a00; background-color: #faa } /* Error */
.highlight .k { color: #069; } /* Keyword */
.highlight .o { color: #555 } /* Operator */
.highlight .cm { color: #09f; font-style: italic } /* Comment.Multiline */
.highlight .cp { color: #099 } /* Comment.Preproc */
.highlight .c1 { color: #999; } /* Comment.Single */
.highlight .cs { color: #999; } /* Comment.Special */
.highlight .gd { background-color: #fcc; border: 1px solid #c00 } /* Generic.Deleted */
.highlight .ge { font-style: italic } /* Generic.Emph */
.highlight .gr { color: #f00 } /* Generic.Error */
.highlight .gh { color: #030; } /* Generic.Heading */
.highlight .gi { background-color: #cfc; border: 1px solid #0c0 } /* Generic.Inserted */
.highlight .go { color: #aaa } /* Generic.Output */
.highlight .gp { color: #009; } /* Generic.Prompt */
.highlight .gs { } /* Generic.Strong */
.highlight .gu { color: #030; } /* Generic.Subheading */
.highlight .gt { color: #9c6 } /* Generic.Traceback */
.highlight .kc { color: #069; } /* Keyword.Constant */
.highlight .kd { color: #069; } /* Keyword.Declaration */
.highlight .kn { color: #069; } /* Keyword.Namespace */
.highlight .kp { color: #069 } /* Keyword.Pseudo */
.highlight .kr { color: #069; } /* Keyword.Reserved */
.highlight .kt { color: #078; } /* Keyword.Type */
.highlight .m { color: #f60 } /* Literal.Number */
.highlight .s { color: #d44950 } /* Literal.String */
.highlight .na { color: #4f9fcf } /* Name.Attribute */
.highlight .nb { color: #366 } /* Name.Builtin */
.highlight .nc { color: #0a8; } /* Name.Class */
.highlight .no { color: #360 } /* Name.Constant */
.highlight .nd { color: #99f } /* Name.Decorator */
.highlight .ni { color: #999; } /* Name.Entity */
.highlight .ne { color: #c00; } /* Name.Exception */
.highlight .nf { color: #c0f } /* Name.Function */
.highlight .nl { color: #99f } /* Name.Label */
.highlight .nn { color: #0cf; } /* Name.Namespace */
.highlight .nt { color: #2f6f9f; } /* Name.Tag */
.highlight .nv { color: #033 } /* Name.Variable */
.highlight .ow { color: #000; } /* Operator.Word */
.highlight .w { color: #bbb } /* Text.Whitespace */
.highlight .mf { color: #f60 } /* Literal.Number.Float */
.highlight .mh { color: #f60 } /* Literal.Number.Hex */
.highlight .mi { color: #f60 } /* Literal.Number.Integer */
.highlight .mo { color: #f60 } /* Literal.Number.Oct */
.highlight .sb { color: #c30 } /* Literal.String.Backtick */
.highlight .sc { color: #c30 } /* Literal.String.Char */
.highlight .sd { color: #c30; font-style: italic } /* Literal.String.Doc */
.highlight .s2 { color: #c30 } /* Literal.String.Double */
.highlight .se { color: #c30; } /* Literal.String.Escape */
.highlight .sh { color: #c30 } /* Literal.String.Heredoc */
.highlight .si { color: #a00 } /* Literal.String.Interpol */
.highlight .sx { color: #c30 } /* Literal.String.Other */
.highlight .sr { color: #3aa } /* Literal.String.Regex */
.highlight .s1 { color: #c30 } /* Literal.String.Single */
.highlight .ss { color: #fc3 } /* Literal.String.Symbol */
.highlight .bp { color: #366 } /* Name.Builtin.Pseudo */
.highlight .vc { color: #033 } /* Name.Variable.Class */
.highlight .vg { color: #033 } /* Name.Variable.Global */
.highlight .vi { color: #033 } /* Name.Variable.Instance */
.highlight .il { color: #f60 } /* Literal.Number.Integer.Long */
.css .o,
.css .o + .nt,
.css .nt + .nt { color: #999; }

8
_sass/_variables.scss Normal file
View File

@ -0,0 +1,8 @@
$base-bgcolor: #fff;
$base-color: #555;
$base-font-family: 'Helvetica Neue';
$base-font-family-fallback: sans-serif;
$base-font-size: 16px;
$base-line-height: 1.5;
$media-sm: 320px;

5
index.md Normal file
View File

@ -0,0 +1,5 @@
---
layout: default
---
{% include_relative README.md %}

108
main.scss Normal file
View File

@ -0,0 +1,108 @@
---
# Stylesheet
---
@import 'variables';
@import 'github';
@import 'syntax';
body {
padding: 20px 10px;
font-family: $base-font-family, $base-font-family-fallback;
background-color: $base-bgcolor;
color: $base-color;
font-size: $base-font-size;
line-height: $base-line-height;
}
h1, h2, h3, h4, h5, h6 {
color: #333;
}
h1#head {
display: none;
}
a {
color: #70B7FD;
color: #222;
}
a:hover,
a:focus {
color: #70B7FD;
color: #000;
}
a {
transition: all .2s ease-in-out;
border-bottom: 1px solid #ddd;
text-decoration: none;
}
a:hover,
a:focus {
border-bottom: 1px solid #70B7FD;
}
img {
height: auto;
max-width: 100%;
vertical-align: middle;
}
.container {}
.site__main {
margin: auto;
max-width: 800px;
}
.site__main p:first-of-type {
font-size: 1.5em;
}
pre {
overflow-x: auto;
word-wrap: normal;
white-space: pre;
background-color: #f5f5f5;
padding: 16px;
font-size: 85%;
line-height: 1.45;
}
code {
border-radius: 0;
background-color: #f5f5f5;
padding: 0.2em 0;
}
.highlight {
margin-left: 0;
margin-right: 0;
border-radius: 0;
}
// #facebook.pluginButton {
// transform: scale(3.5);
// -ms-transform: scale(3.5);
// -webkit-transform: scale(3.5);
// -o-transform: scale(3.5);
// -moz-transform: scale(3.5);
// transform-origin: top left;
// -ms-transform-origin: top left;
// -webkit-transform-origin: top left;
// -moz-transform-origin: top left;
// -webkit-transform-origin: top left;
// }
//
// .pluginButtonIconSVG {
// height: 28px;
// width: 28px;
// }
//
// .plugin, .plugin button, .plugin input, .plugin label, .plugin select, .plugin td, .plugin textarea {
// font-size: 22px;
// }