Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mikeblum/hugo-now.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormblum <me@mblum.me>2017-07-05 06:13:47 +0300
committermblum <me@mblum.me>2017-07-05 07:47:48 +0300
commit67bb9915b1cdedc09a49a80c7e4bc89256336c15 (patch)
tree9ccfb7ffa582073defa4d3d4ece9fda6ade36cd8 /exampleSite
parent24aeaa8ea71831072243f0705e7ff78560c1cacb (diff)
[JAVASCRIPT] support for Bootstrap 4 javascript and a post on the exampleSite demoing it
Diffstat (limited to 'exampleSite')
-rw-r--r--exampleSite/config.yaml2
-rw-r--r--exampleSite/content/post/javascript-support.md39
-rw-r--r--exampleSite/content/post/sample.md4
-rw-r--r--exampleSite/static/images/javascript.svg8
m---------exampleSite/themes/hugo-now8
5 files changed, 52 insertions, 9 deletions
diff --git a/exampleSite/config.yaml b/exampleSite/config.yaml
index c68d0a7..eca0b4d 100644
--- a/exampleSite/config.yaml
+++ b/exampleSite/config.yaml
@@ -4,6 +4,8 @@ languageCode: en
title: My New Hugo Site
# theme
theme: "hugo-now"
+# Comment the themesDir option if you use this theme in production
+themesDir: ../..
taxonomies:
category: "categories"
diff --git a/exampleSite/content/post/javascript-support.md b/exampleSite/content/post/javascript-support.md
new file mode 100644
index 0000000..db1a74e
--- /dev/null
+++ b/exampleSite/content/post/javascript-support.md
@@ -0,0 +1,39 @@
+---
+title: "Javascript Support"
+date: 2017-07-04T20:55:50-05:00
+tags: ["bootstrap", "javascript", "noscript"]
+---
+
+<div class="well content-header">
+ <img src="/images/javascript.svg" alt="javascript" />
+</div>
+
+<!--more-->
+
+---
+
+[Javascript Enabled](#javascript-enabled)
+
+---
+
+<noscript>
+ <div class="bd-callout bd-callout-warning">
+ <h4>Javascript Disabled</h4>
+ <p>Hugo Now assumes javascript is disabled (as does Github Pages) but if your posts make use of bootstrap JS plugins read on...</p>
+ <strong>No special fallbacks when JavaScript is disabled</strong>
+ <p>Bootstrap’s plugins don’t fall back particularly gracefully when JavaScript is disabled. If you care about the user experience in this case, use <noscript> to explain the situation (and how to re-enable JavaScript) to your users, and/or add your own custom fallbacks.
+ </p>
+ </div>
+</noscript>
+
+<div id="js-enabled-msg" class="bd-callout bd-callout-success js-enabled">
+ <h4>Javascript Enabled</h4>
+ <p>While Hugo Now assumes javascript is disabled, full Bootstrap JS is supported (see <code>partials/javascript.html</code>)</p>
+</div>
+
+<script type="text/javascript">
+ $( document ).ready(function() {
+ console.log( "Javascript enabled" );
+ $('#s-enabled-msg').show();
+ });
+</script> \ No newline at end of file
diff --git a/exampleSite/content/post/sample.md b/exampleSite/content/post/sample.md
index 8636269..5ce5799 100644
--- a/exampleSite/content/post/sample.md
+++ b/exampleSite/content/post/sample.md
@@ -17,4 +17,6 @@ tags: ["blog", "post"]
Section links are seperated with a |
-->
-[Section A](#Section-A) | [Section B](#Section-B) \ No newline at end of file
+[Section A](#Section-A) | [Section B](#Section-B)
+
+--- \ No newline at end of file
diff --git a/exampleSite/static/images/javascript.svg b/exampleSite/static/images/javascript.svg
new file mode 100644
index 0000000..23243bb
--- /dev/null
+++ b/exampleSite/static/images/javascript.svg
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
+<svg width="256px" height="256px" viewBox="0 0 256 256" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" preserveAspectRatio="xMidYMid">
+ <g>
+ <path d="M0,0 L256,0 L256,256 L0,256 L0,0 Z" fill="#F7DF1E"></path>
+ <path d="M67.311746,213.932292 L86.902654,202.076241 C90.6821079,208.777346 94.1202286,214.447137 102.367086,214.447137 C110.272203,214.447137 115.256076,211.354819 115.256076,199.326883 L115.256076,117.528787 L139.313575,117.528787 L139.313575,199.666997 C139.313575,224.58433 124.707759,235.925943 103.3984,235.925943 C84.1532952,235.925943 72.9819429,225.958603 67.3113397,213.93026" fill="#000000"></path>
+ <path d="M152.380952,211.354413 L171.969422,200.0128 C177.125994,208.433981 183.827911,214.619835 195.684368,214.619835 C205.652521,214.619835 212.009041,209.635962 212.009041,202.762159 C212.009041,194.513676 205.479416,191.592025 194.481168,186.78207 L188.468419,184.202565 C171.111213,176.81473 159.597308,167.53534 159.597308,147.944838 C159.597308,129.901308 173.344508,116.153295 194.825752,116.153295 C210.119924,116.153295 221.117765,121.48094 229.021663,135.400432 L210.29059,147.428775 C206.166146,140.040127 201.699556,137.119289 194.826159,137.119289 C187.78047,137.119289 183.312254,141.587098 183.312254,147.428775 C183.312254,154.646349 187.78047,157.568406 198.089956,162.036622 L204.103924,164.614095 C224.553448,173.378641 236.067352,182.313448 236.067352,202.418387 C236.067352,224.071924 219.055137,235.927975 196.200432,235.927975 C173.860978,235.927975 159.425829,225.274311 152.381359,211.354413" fill="#000000"></path>
+ </g>
+</svg>
diff --git a/exampleSite/themes/hugo-now b/exampleSite/themes/hugo-now
deleted file mode 160000
-Subproject 4d1f1e907cc842a1db4c7f89068ce5bf7d1c833