theme improvements

This commit is contained in:
Pat Dryburgh
2018-08-01 08:06:36 -07:00
parent 6371d0c7e2
commit 79a26d5774
11 changed files with 147 additions and 20 deletions

@ -0,0 +1,20 @@
{%- if page.comments != false and jekyll.environment == "production" -%}
<div id="disqus_thread"></div>
<script>
var disqus_config = function () {
this.page.url = '{{ page.url | absolute_url }}';
this.page.identifier = '{{ page.url | absolute_url }}';
};
(function() {
var d = document, s = d.createElement('script');
s.src = 'https://{{ site.disqus.shortname }}.disqus.com/embed.js';
s.setAttribute('data-timestamp', +new Date());
(d.head || d.body).appendChild(s);
})();
</script>
<noscript>Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript" rel="nofollow">comments powered by Disqus.</a></noscript>
{%- endif -%}

@ -0,0 +1,10 @@
<script>
if(!(window.doNotTrack === "1" || navigator.doNotTrack === "1" || navigator.doNotTrack === "yes" || navigator.msDoNotTrack === "1")) {
(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','https://www.google-analytics.com/analytics.js','ga');
ga('create', '{{ site.google_analytics }}', 'auto');
ga('send', 'pageview');
}
</script>

@ -1,15 +1,19 @@
<!DOCTYPE html>
<html>
<html lang="{{ page.lang | default: site.lang | default: "en" }}">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>{{ site.title }} &mdash; {{ page.title }}</title>
<title>{{ site.title }}{% if page.title %} &mdash; {{ page.title }}{% endif %}</title>
<link rel="stylesheet" href="{{ '/assets/css/main.css' | absolute_url }}?{{ site.time | date: '%s%N' }}">
{%- if jekyll.environment == 'production' and site.google_analytics -%}
{%- include google-analytics.html -%}
{%- endif -%}
</head>
<body>

@ -30,7 +30,7 @@ layout: default
{% endif %}
</header>
<main class="home">
<main class="home" aria-label="Content">
<h1 class="divided">
Contents

@ -1,5 +1,5 @@
---
layout: default
layout: post
---
{{ content }}

@ -6,17 +6,25 @@ layout: default
&#10094; Home
</a>
<article>
<article class="post h-entry" itemscope itemtype="http://schema.org/BlogPosting">
<h1 class="post-title divided">
<h1 class="post-title divided p-name" itemprop="name headline">
{{ page.title }}
</h1>
{{ content }}
<div class="article-meta">
<div>{{ page.author }}</div>
<div class="post-date">{{ page.date | date: "%B %-d, %Y" }}</div>
<div class="post-content e-content" itemprop="articleBody">
{{ content }}
</div>
<div class="post-meta">
{% if page.author %}
<div itemprop="author">{{ page.author }}</div>
{% endif %}
<time class="post-date dt-published" datetime="{{ page.date | date_to_xmlschema }}" itemprop="datePublished">{{ page.date | date: "%B %-d, %Y" }}</time>
</div>
{% if site.disqus.shortname %}
{% include disqus-comments.html %}
{% endif %}
</article>

@ -8,13 +8,13 @@ article > * {
article > h1 {
font-size: 2em;
max-width: 48rem;
padding: 2em 0;
padding: 2em 1em;
text-align: center;
}
article p {
text-align: justify;
text-indent: 1.5em;
text-indent: 1.5rem;
text-justify: inter-word;
}
@ -32,11 +32,11 @@ article img {
}
article li {
margin-left: 1.5em;
margin-right: 1.5em;
margin-left: 1.5rem;
margin-right: 1.5rem;
}
.article-meta {
.post-meta {
margin-bottom: 2em;
margin-top: 2em;
text-align: right;

@ -2,7 +2,7 @@
background: $brand-color;
box-sizing: border-box;
min-height: 100vh;
padding: 2em;
padding: 6em 2em;
position: relative;
display: flex;

@ -0,0 +1,84 @@
/**
* Syntax highlighting styles
*/
code.highlighter-rouge {
background: #eef;
font-family: courier, monospace;
font-size: .875em;
}
.highlight {
background: #fff;
font-family: courier, monospace;
font-size: .875em;
margin: 2rem auto;
> * {
padding: 0 1.5rem;
}
.highlighter-rouge & {
background: #eef;
}
.c { color: #998; font-style: italic } // Comment
.err { color: #a61717; background-color: #e3d2d2 } // Error
.k { font-weight: bold } // Keyword
.o { font-weight: bold } // Operator
.cm { color: #998; font-style: italic } // Comment.Multiline
.cp { color: #999; font-weight: bold } // Comment.Preproc
.c1 { color: #998; font-style: italic } // Comment.Single
.cs { color: #999; font-weight: bold; font-style: italic } // Comment.Special
.gd { color: #000; background-color: #fdd } // Generic.Deleted
.gd .x { color: #000; background-color: #faa } // Generic.Deleted.Specific
.ge { font-style: italic } // Generic.Emph
.gr { color: #a00 } // Generic.Error
.gh { color: #999 } // Generic.Heading
.gi { color: #000; background-color: #dfd } // Generic.Inserted
.gi .x { color: #000; background-color: #afa } // Generic.Inserted.Specific
.go { color: #888 } // Generic.Output
.gp { color: #555 } // Generic.Prompt
.gs { font-weight: bold } // Generic.Strong
.gu { color: #aaa } // Generic.Subheading
.gt { color: #a00 } // Generic.Traceback
.kc { font-weight: bold } // Keyword.Constant
.kd { font-weight: bold } // Keyword.Declaration
.kp { font-weight: bold } // Keyword.Pseudo
.kr { font-weight: bold } // Keyword.Reserved
.kt { color: #458; font-weight: bold } // Keyword.Type
.m { color: #099 } // Literal.Number
.s { color: #d14 } // Literal.String
.na { color: #008080 } // Name.Attribute
.nb { color: #0086B3 } // Name.Builtin
.nc { color: #458; font-weight: bold } // Name.Class
.no { color: #008080 } // Name.Constant
.ni { color: #800080 } // Name.Entity
.ne { color: #900; font-weight: bold } // Name.Exception
.nf { color: #900; font-weight: bold } // Name.Function
.nn { color: #555 } // Name.Namespace
.nt { color: #000080 } // Name.Tag
.nv { color: #008080 } // Name.Variable
.ow { font-weight: bold } // Operator.Word
.w { color: #bbb } // Text.Whitespace
.mf { color: #099 } // Literal.Number.Float
.mh { color: #099 } // Literal.Number.Hex
.mi { color: #099 } // Literal.Number.Integer
.mo { color: #099 } // Literal.Number.Oct
.sb { color: #d14 } // Literal.String.Backtick
.sc { color: #d14 } // Literal.String.Char
.sd { color: #d14 } // Literal.String.Doc
.s2 { color: #d14 } // Literal.String.Double
.se { color: #d14 } // Literal.String.Escape
.sh { color: #d14 } // Literal.String.Heredoc
.si { color: #d14 } // Literal.String.Interpol
.sx { color: #d14 } // Literal.String.Other
.sr { color: #009926 } // Literal.String.Regex
.s1 { color: #d14 } // Literal.String.Single
.ss { color: #990073 } // Literal.String.Symbol
.bp { color: #999 } // Name.Builtin.Pseudo
.vc { color: #008080 } // Name.Variable.Class
.vg { color: #008080 } // Name.Variable.Global
.vi { color: #008080 } // Name.Variable.Instance
.il { color: #099 } // Literal.Number.Integer.Long
}

@ -8,6 +8,7 @@ $asset_url: '{{ '/assets' | absolute_url }}';
@import
"reset",
"variables",
"syntax-highlighting",
"mixins",
"font",
"base",

@ -6,7 +6,7 @@ Gem::Specification.new do |spec|
spec.authors = ["Pat Dryburgh"]
spec.email = ["hello@patdryburgh.com"]
spec.summary = "An arguably beautiful theme for Jekyll."
spec.summary = "An inarguably well-designed theme for Jekyll."
spec.homepage = "http://patdryburgh.com/hitchens"
spec.license = "MIT"