Skip to content

Commit

Permalink
Fixed #16, #17, #18, and changed hash.json to assetsManifest.json
Browse files Browse the repository at this point in the history
  • Loading branch information
tomanistor committed Sep 24, 2017
1 parent c1589b5 commit 795f67f
Show file tree
Hide file tree
Showing 8 changed files with 33 additions and 38 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,9 @@ link2 = "https://github.com/tomanistor"
+++
```

### Contact Form
The email address specified in the config.toml file will be one receiving messages sent through the contact form. The contact form is operated by Formspree and requires that the form must be submitted once initially to confirm the email address being used. See instruction [here](https://formspree.io/).

### Custom CSS
To implement custom CSS sitewide, change the config.toml parameter `customCSS` from `false` to `true` and then create a `css.html` file in your `layouts/partials/` folder like the example below:

Expand Down
4 changes: 2 additions & 2 deletions layouts/_default/single.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ <h1>{{ if .Params.heading }} {{ .Params.heading }} {{ else }} {{ .Title }} {{ en
{{ .Date.Format (.Site.Params.dateform | default "January 2006") }} · {{ .ReadingTime }} minute read
</div>

<div class="entry-content">
<article class="entry-content">
{{ .Content }}
</div>
</article>

<div class="pagination">
{{ if .PrevInSection }}
Expand Down
4 changes: 2 additions & 2 deletions layouts/partials/footer.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<!-- Scripts -->
<script src="https://code.jquery.com/jquery-3.2.1.min.js" integrity="sha256-hwg4gsxgFZhOsEEamdOYGBf13FyQuiTwlAQgxVSNgt4=" crossorigin="anonymous"></script>
{{ if .IsHome }}
<script src="/scripts/{{ if .Site.Params.cacheBustJS }}{{ index .Site.Data.scripts.hash "index.js" }}{{ else }}index.js{{ end }}" type="text/javascript"></script>
<script src="/scripts/{{ if .Site.Params.cacheBustJS }}{{ index .Site.Data.cachedAssets "index.js" }}{{ else }}index.js{{ end }}" type="text/javascript"></script>
{{ if .Site.Params.ajaxFormspree }}
<!-- Formspree AJAX -->
<script>
Expand Down Expand Up @@ -66,7 +66,7 @@
</script>
{{ end }}
{{ else }}
<script src="/scripts/{{ if .Site.Params.cacheBustJS }}{{ index .Site.Data.scripts.hash "main.js" }}{{ else }}main.js{{ end }}" type="text/javascript"></script>
<script src="/scripts/{{ if .Site.Params.cacheBustJS }}{{ index .Site.Data.cachedAssets "main.js" }}{{ else }}main.js{{ end }}" type="text/javascript"></script>
{{ end }}
<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.10.0/highlight.min.js"></script>
</footer>
Expand Down
19 changes: 2 additions & 17 deletions layouts/partials/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -50,28 +50,13 @@
{{ else if .Summary }}<meta name="og:description" content="{{ .Summary }}">{{ end }}

{{ if .Site.Params.favicon }}
<link rel="apple-touch-icon" sizes="57x57" href="/images/logo/apple-icon-57x57.png">
<link rel="apple-touch-icon" sizes="60x60" href="/images/logo/apple-icon-60x60.png">
<link rel="apple-touch-icon" sizes="72x72" href="/images/logo/apple-icon-72x72.png">
<link rel="apple-touch-icon" sizes="76x76" href="/images/logo/apple-icon-76x76.png">
<link rel="apple-touch-icon" sizes="114x114" href="/images/logo/apple-icon-114x114.png">
<link rel="apple-touch-icon" sizes="120x120" href="/images/logo/apple-icon-120x120.png">
<link rel="apple-touch-icon" sizes="144x144" href="/images/logo/apple-icon-144x144.png">
<link rel="apple-touch-icon" sizes="152x152" href="/images/logo/apple-icon-152x152.png">
<link rel="apple-touch-icon" sizes="180x180" href="/images/logo/apple-icon-180x180.png">
<link rel="icon" type="image/png" sizes="192x192" href="images/logo/android-icon-192x192.png">
<link rel="icon" type="image/png" sizes="32x32" href="/images/logo/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="96x96" href="/images/logo/favicon-96x96.png">
<link rel="icon" type="image/png" sizes="16x16" href="/images/logo/favicon-16x16.png">
<link rel="manifest" href="images/logo/manifest.json">
<meta name="msapplication-TileColor" content="#FFF">
<meta name="msapplication-TileImage" content="/images/logo/ms-icon-144x144.png">
<link rel="icon" type="image/png" sizes="16x16" href="/images/logo/favicon.ico">
<meta name="theme-color" content="#FFF">
{{ end }}

<link rel="canonical" href="{{ .Permalink }}">
{{ if .RSSLink }}<link href="{{ .RSSLink }}" rel="alternate" type="application/rss+xml" title="{{ .Site.Title }}">{{ end }}
<link rel="stylesheet" href="{{ .Site.BaseURL }}/styles/{{ if .Site.Params.cacheBustCSS }}{{ index .Site.Data.styles.hash "main.css" }}{{ else }}main.css{{ end }}" type="text/css">
<link rel="stylesheet" href="{{ .Site.BaseURL }}/styles/{{ if .Site.Params.cacheBustCSS }}{{ index .Site.Data.cachedAssets "main.css" }}{{ else }}main.css{{ end }}" type="text/css">
{{ if .Site.Params.customCSS }}{{ partial "css.html" . }}{{ end }}
{{ if .Site.Params.highlightJS }}<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.10.0/styles/github.min.css">{{ end }}
{{ if .Site.GoogleAnalytics }}{{ template "_internal/google_analytics.html" . }}{{ end }}
Expand Down
22 changes: 11 additions & 11 deletions static/scripts/src/main.js
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
$(document).ready(function() {

// Nav is fixed to top
$("nav").addClass("nav-fixed");
$("nav > div.logo").css('visibility','visible').fadeIn();
$("nav > div.nav-toggle").css('visibility','visible').fadeIn();
$('nav').addClass('nav-fixed');
$('nav > div.logo').css('visibility','visible').fadeIn();
$('nav > div.nav-toggle').css('visibility','visible').fadeIn();

// Full screen nav open on click
$(".nav-icon").click(function(){
$(".nav-full").toggleClass("active");
$("main").toggleClass("active");
$(this).find("img").toggle();
$('.nav-icon').click(function(){
$(".nav-full").toggleClass('active');
$('main').toggleClass('active');
$(this).find('img').toggle();
});

// Full screen nav close on link click
$(".nav-full").find("a").click(function(){
$(".nav-full").toggleClass("active");
$("main").toggleClass("active");
$(".nav-icon").find("img").toggle();
$('.nav-full').find('a').click(function(){
$('.nav-full').toggleClass('active');
$('main').toggleClass('active');
$('.nav-icon').find('img').toggle();
});

// Highlight.js initialization
Expand Down
2 changes: 1 addition & 1 deletion static/styles/main.css

Large diffs are not rendered by default.

2 changes: 0 additions & 2 deletions static/styles/scss/flexboxgrid.scss
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
//column-base selectors
//.col-xs, .col-xs-1, .col-xs-2, .col-xs-3, .col-xs-4, .col-xs-5, .col-xs-6, .col-xs-7, .col-xs-8, .col-xs-9, .col-xs-10, .col-xs-11, .col-xs-12, .col-xs-offset-0, .col-xs-offset-1, .col-xs-offset-2, .col-xs-offset-3, .col-xs-offset-4, .col-xs-offset-5, .col-xs-offset-6, .col-xs-offset-7, .col-xs-offset-8, .col-xs-offset-9, .col-xs-offset-10, .col-xs-offset-11, .col-xs-offset-12
%column-base {
//Instead of the line below you could use @include box-sizing($bs)
box-sizing: border-box;
flex: 0 0 auto;
padding-right: 0.5rem;
padding-left: 0.5rem;
}

.container-fluid {
margin-right: auto;
margin-left: auto;
Expand Down
15 changes: 12 additions & 3 deletions static/styles/scss/main.scss
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
@import url("https://fonts.googleapis.com/css?family=Rubik|Bitter");
@import "flexboxgrid";

// TODO: Cleanup.
// TODO: Cleanup

// Colors
// https://coolors.co/1e1e1e-4e6b6c-f7f7f7-ffffff-da784d
Expand Down Expand Up @@ -66,14 +66,19 @@ $breakpoint-small: 25em; // 400px
display: none;
}
div.nav-toggle a {
display: block;
display: inline-block;
}
}
}
@media(max-width: 25em) {
body .container {
padding: $vertical-rhythm * 2 $vertical-rhythm;
}
nav {
div.logo, div.nav-toggle {
max-width: 50% !important;
}
}
}


Expand Down Expand Up @@ -128,10 +133,14 @@ nav {
font-weight: 600;
}
img {
max-width: 2.5em;
display: inline-block;
max-width: 10em;
max-height: 2.5em;
vertical-align: middle;
}
div.logo, div.nav-toggle {
visibility: hidden;
max-width: none;
}
.nav-toggle a {
display: none;
Expand Down

0 comments on commit 795f67f

Please sign in to comment.