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

github.com/gizak/nofancy.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZack Guo <zack.y.guo@gmail.com>2017-01-21 08:40:09 +0300
committerGitHub <noreply@github.com>2017-01-21 08:40:09 +0300
commit0f536cdbe29011500131a23ba9bd07865ad4486d (patch)
treeeed72b514746132a444654973e196d08f22d3672
parentc1113e80b9965c715681179d8f8556ea51fd7bd6 (diff)
parent02c33ca341229e6029015f1368eaa29338754908 (diff)
Merge pull request #10 from LiaungYip/Fixes
Fixes
-rw-r--r--README.md9
-rw-r--r--archetypes/default.md1
-rw-r--r--layouts/_default/list.html5
-rw-r--r--layouts/_default/single.html2
-rw-r--r--layouts/_default/terms.html20
-rw-r--r--layouts/index.html6
-rw-r--r--layouts/partials/footer.html85
-rw-r--r--layouts/partials/header.html15
-rw-r--r--layouts/partials/navbar.html35
-rw-r--r--static/css/custom.css27
10 files changed, 114 insertions, 91 deletions
diff --git a/README.md b/README.md
index 1f1af5f..0af0a03 100644
--- a/README.md
+++ b/README.md
@@ -45,8 +45,15 @@ title = "Hugo Themes"
copyright = "Copyright (c) 2008 - 2014, Steve Francia; all rights reserved."
[params]
+ # See themes/nofancy/static/highlight/styles for available options
+ # i.e. "default", "github", "monokai".
highlight="Assign a syntax highlight style"
-
+
+ # Controls what items are listed in the top nav menu
+ # "none", or "categories"
+ # If you have too many categories to fit in the top nav menu, set this to "none"
+ topmenu="categories"
+
[author]
name = "Steve Francia"
github = "spf13"
diff --git a/archetypes/default.md b/archetypes/default.md
index f1fa3e6..4a408b7 100644
--- a/archetypes/default.md
+++ b/archetypes/default.md
@@ -1,3 +1,4 @@
+++
categories = ["misc"]
+draft = "true"
+++
diff --git a/layouts/_default/list.html b/layouts/_default/list.html
index 007a2ba..fb39fd4 100644
--- a/layouts/_default/list.html
+++ b/layouts/_default/list.html
@@ -5,6 +5,7 @@
<div class="pure-g">
<div class="pure-u-1-24 pure-u-md-5-24"></div>
<div class="pure-u-11-12 pure-u-md-5-8">
+ <div class="post-content">
<p class="posts-name">{{ .Title }}:</p>
<ul class="posts">
@@ -12,6 +13,9 @@
{{ range $name, $page := .Data.Pages }}
{{ if eq .Type "post" }}
<li>
+ {{ if .Draft }}
+ DRAFT:
+ {{ end }}
<a href="{{ .Permalink }}">{{ $page.Title }}</a>
<p class="footnote">
@@ -39,6 +43,7 @@
{{ end }}
</ul>
</div>
+ </div>
<div class="pure-u-1-24 pure-u-md-1-6"></div>
</div>
diff --git a/layouts/_default/single.html b/layouts/_default/single.html
index a8f0cbe..c0094fe 100644
--- a/layouts/_default/single.html
+++ b/layouts/_default/single.html
@@ -25,7 +25,7 @@
series:{{ range .Params.series }}<a href="{{ $baseurl }}series/{{ . | urlize }}">{{ . }}</a> {{ end }}
{{ end }}
</p>
- <h1>{{ .Title }}</h1>
+ <h1>{{ if .Draft }}DRAFT: {{end}}{{ .Title }}</h1>
</div>
<div class="post-content">
diff --git a/layouts/_default/terms.html b/layouts/_default/terms.html
new file mode 100644
index 0000000..68169a9
--- /dev/null
+++ b/layouts/_default/terms.html
@@ -0,0 +1,20 @@
+{{ partial "header.html" . }}
+{{ partial "navbar.html" . }}
+<div class="pure-g">
+<div class="pure-u-1-24 pure-u-md-5-24"></div>
+<div class="pure-u-11-12 pure-u-md-5-8">
+ <p class="posts-name">{{ .Title }}:</p>
+ <div class="post-content">
+ <ul class="posts">
+ {{ $data := .Data }}
+ {{ range $key, $value := .Data.Terms.ByCount }}
+ <li>
+ <a href="{{ $value.Name | urlize }}">{{ $value.Name }}</a>
+ <span>&#40;{{ $value.Count }}&#41;</span>
+ </li>
+ {{ end }}
+ </ul>
+ </div>
+</div>
+<div class="pure-u-1-24 pure-u-md-1-6"></div>
+{{ partial "footer.html" . }}
diff --git a/layouts/index.html b/layouts/index.html
index 458b352..29a79bf 100644
--- a/layouts/index.html
+++ b/layouts/index.html
@@ -4,6 +4,8 @@
<div class="pure-g">
<div class="pure-u-1-24 pure-u-md-5-24"></div>
<div class="pure-u-11-12 pure-u-md-5-8">
+ <div class="post-content">
+ {{ .Content }}
<p class="posts-name">Recent posts:</p>
<ul class="posts">
@@ -11,6 +13,9 @@
{{ range $name, $page := .Site.Pages }}
{{ if eq .Type "post" }}
<li>
+ {{ if .Draft }}
+ DRAFT:
+ {{ end }}
<a href="{{ .Permalink }}">{{ $page.Title }}</a>
<p class="footnote">
@@ -38,6 +43,7 @@
{{ end }}
</ul>
</div>
+ </div>
<div class="pure-u-1-24 pure-u-md-1-6"></div>
</div>
diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html
index f5a69b2..bfb0f78 100644
--- a/layouts/partials/footer.html
+++ b/layouts/partials/footer.html
@@ -1,43 +1,50 @@
<div class="footer pure-g">
<div class="pure-u-1-24 pure-u-md-5-24"></div>
<div class="pure-u-11-12 pure-u-md-5-8">
- <div class="pure-menu pure-menu-horizontal footer-content">
- <ul>
- <li class="pure-menu-heading" id="foot-name">{{ .Site.Author.name }}:</li>
-
- {{ if .Site.Author.email }}
- <li class="pure-menu-item">
- <a href="mailto:{{ .Site.Author.email }}" class="pure-menu-link">Email</a>
- </li>
- {{ end }}
-
- {{ if .Site.Author.github }}
- <li class="pure-menu-item">
- <a href="https://github.com/{{ .Site.Author.github }}" class="pure-menu-link">GitHub</a>
- </li>
- {{ end }}
-
- {{ if .Site.Author.linkedin }}
- <li class="pure-menu-item">
- <a href="https://www.linkedin.com/in/{{ .Site.Author.linkedin }}" class="pure-menu-link">LinkedIn</a>
- </li>
- {{ end }}
-
- {{ if .Site.Author.facebook }}
- <li class="pure-menu-item">
- <a href="https://www.facebook.com/{{ .Site.Author.facebook }}" class="pure-menu-link">Facebook</a>
- </li>
- {{ end }}
-
- {{ if .Site.Author.twitter }}
- <li class="pure-menu-item">
- <a href="https://twitter.com/{{ .Site.Author.twitter }}" class="pure-menu-link">Twitter</a>
- </li>
- {{ end }}
-
- </ul>
- <a href="#" class="pure-menu-heading pull-right" id="gototop-btn">↑↑</a>
- </div>
+ <div class="footer-content">
+ <div class="pure-menu pure-menu-horizontal">
+ <ul>
+ {{ if .Site.Author.name }}
+ <li class="pure-menu-heading" id="foot-name">{{ .Site.Author.name }}:</li>
+ {{ end }}
+
+ {{ if .Site.Author.email }}
+ <li class="pure-menu-item">
+ <a href="mailto:{{ .Site.Author.email }}" class="pure-menu-link">Email</a>
+ </li>
+ {{ end }}
+
+ {{ if .Site.Author.github }}
+ <li class="pure-menu-item">
+ <a href="https://github.com/{{ .Site.Author.github }}" class="pure-menu-link">GitHub</a>
+ </li>
+ {{ end }}
+
+ {{ if .Site.Author.linkedin }}
+ <li class="pure-menu-item">
+ <a href="https://www.linkedin.com/in/{{ .Site.Author.linkedin }}" class="pure-menu-link">LinkedIn</a>
+ </li>
+ {{ end }}
+
+ {{ if .Site.Author.facebook }}
+ <li class="pure-menu-item">
+ <a href="https://www.facebook.com/{{ .Site.Author.facebook }}" class="pure-menu-link">Facebook</a>
+ </li>
+ {{ end }}
+
+ {{ if .Site.Author.twitter }}
+ <li class="pure-menu-item">
+ <a href="https://twitter.com/{{ .Site.Author.twitter }}" class="pure-menu-link">Twitter</a>
+ </li>
+ {{ end }}
+
+ </ul>
+ <a href="#" class="pure-menu-heading pull-right" id="gototop-btn">↑↑</a>
+ </div>
+ {{ if .Site.Copyright }}
+ <p id="foot-copyright">{{ .Site.Copyright | safeHTML }}</p>
+ {{ end }}
+ </div>
</div>
<div class="pure-u-1-24 pure-u-md-1-6"></div>
</div>
@@ -63,14 +70,14 @@
}
});
</script>
-{{ if .Site.Author.gaID }}
+{{ if .Site.Author.gaid }}
<script>
(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','//www.google-analytics.com/analytics.js','ga');
- ga('create', '{{ .Site.Author.gaID }}', 'auto');
+ ga('create', '{{ .Site.Author.gaid }}', 'auto');
ga('send', 'pageview');
</script>
{{ end }}
diff --git a/layouts/partials/header.html b/layouts/partials/header.html
index 971fce6..c51c1dd 100644
--- a/layouts/partials/header.html
+++ b/layouts/partials/header.html
@@ -1,3 +1,4 @@
+<!DOCTYPE html>
<html lang="en">
<head>
@@ -15,13 +16,13 @@
<link rel="stylesheet" href="{{ .Site.BaseURL }}css/fonts.css">
<!-- CSS –––––––––––––––––––––––––––––––––––––––––––––––––– -->
- <link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/pure/0.6.0/pure-min.css">
+ <link rel="stylesheet" href="https://unpkg.com/purecss@0.6.1/build/pure-min.css" integrity="sha384-CCTZv2q9I9m3UOxRLaJneXrrqKwUNOzZ6NGEUMwHtShDJ+nCoiXJCAgi05KfkLGY" crossorigin="anonymous">
<!--[if lte IE 8]>
- <link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/pure/0.6.0/grids-responsive-old-ie-min.css">
-<![endif]-->
-<!--[if gt IE 8]><!-->
- <link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/pure/0.6.0/grids-responsive-min.css">
-<!--<![endif]-->
+ <link rel="stylesheet" href="https://unpkg.com/purecss@0.6.1/build/grids-responsive-old-ie-min.css">
+ <![endif]-->
+ <!--[if gt IE 8]><!-->
+ <link rel="stylesheet" href="https://unpkg.com/purecss@0.6.1/build/grids-responsive-min.css">
+ <!--<![endif]-->
<link rel="stylesheet" href="{{ .Site.BaseURL }}css/custom.css">
<!--- highlight js -->
@@ -33,5 +34,7 @@
<script src="{{ .Site.BaseURL }}highlight/highlight.pack.js"></script>
<script>hljs.initHighlightingOnLoad();</script>
+ {{ .Hugo.Generator }}
+
</head>
<body>
diff --git a/layouts/partials/navbar.html b/layouts/partials/navbar.html
index 48ccb73..bdb1c0a 100644
--- a/layouts/partials/navbar.html
+++ b/layouts/partials/navbar.html
@@ -1,32 +1,3 @@
-<!--
-<header id="menu">
- <div class="pure-g">
- <div class="pure-u-1-24"></div>
- <div class="pure-u-11-12">
- <span class="logo">{{ .Site.Title }}</span>
- <a>&#9776;</a>
- </div>
- <div class="pure-u-1-24"></div>
- </div>
-</header>
-
-<nav class="navbar">
- <div class="pure-g">
- <div class="pure-u-1-24 pure-u-md-1-6"></div>
- <div class="pure-u-11-12 pure-u-md-2-3">
- <ul class="">
- {{ $burl := .Site.BaseURL }}
- <li class=""> <a href="{{ $burl }}" class="brand" style="font-weight:bold;font-size:normal"> {{ .Site.Title }} </a></li>
- <li class="pull-right cate"> <a href="{{ $burl }}about/" class=""> About </a></li>
- {{ range $name, $pages := .Site.Taxonomies.categories }}
- <li class="pull-right cate"> <a href="{{ $burl }}categories/{{ $name | urlize }}" class=""> {{ $name | title }} </a></li>
- {{ end }}
- </ul>
- </div>
- <div class="pure-u-1-24 pure-u-md-1-6"></div>
- </div>
-</nav>
--->
<div class="header pure-g">
<div class="pure-u-1-24 pure-u-md-5-24"></div>
<div class="pure-u-11-12 pure-u-md-5-8">
@@ -34,11 +5,13 @@
{{ $baseurl := .Site.BaseURL }}
<a href="{{$baseurl}}" class="site-title pure-menu-heading">{{ .Site.Title }}</a>
<ul class="pure-menu-list">
+ {{ if eq .Site.Params.topmenu "categories" }}
{{ range $name,$page := .Site.Taxonomies.categories }}
<li class="pure-menu-item">
<a href="{{ $baseurl }}categories/{{ $name | urlize }}" class="pure-menu-link">{{ $name | title }}</a>
</li>
{{ end }}
+ {{ end }}
<li class="pure-menu-item">
<a href="{{ $baseurl }}about/" class="pure-menu-link">About</a>
</li>
@@ -49,11 +22,13 @@
<a href="#" id="toggle-btn">&#9776;</a>
<ul class="pure-menu-list" id="toggle-content" style="display:none;">
{{ $baseurl := .Site.BaseURL }}
+ {{ if eq .Site.Params.topmenu "categories" }}
{{ range $name,$page := .Site.Taxonomies.categories }}
<li class="pure-menu-item">
<a href="{{ $baseurl }}categories/{{ $name | urlize }}" class="pure-menu-link">{{ $name | title }}</a>
</li>
{{ end }}
+ {{ end }}
<li class="pure-menu-item">
<a href="{{ .Site.BaseURL }}about" class="pure-menu-link">About</a>
</li>
@@ -61,4 +36,4 @@
</div>
</div>
<div class="pure-u-1-24 pure-u-md-1-6"></div>
-</div>
+</div> \ No newline at end of file
diff --git a/static/css/custom.css b/static/css/custom.css
index e367b01..16272a7 100644
--- a/static/css/custom.css
+++ b/static/css/custom.css
@@ -1,8 +1,3 @@
-/*
-footer {
- display:block;
-}
-*/
html {
min-height:100%;
width:100%;
@@ -15,7 +10,6 @@ body {
}
.nav-menu {
- /*box-shadow: 0 1px 1px rgba(0,0,0, 0.10);*/
border-bottom: 1px solid #e3e3e3;
}
@@ -25,9 +19,6 @@ body {
margin-bottom: .5em;
}
-.header .desktop ul {
- float: right;
-}
.header ul li {
height: auto;
}
@@ -103,10 +94,11 @@ body {
.footer-content {
border-top: 1px solid #e3e3e3;
+ font-size: 80%;
+ color: #bbb;
}
.footer-content a {
- font-size: 80%;
color: #bbb;
}
@@ -120,14 +112,16 @@ body {
#gototop-btn {
display: inline-block;
- color: #bbb;
- font-size: 80%;
}
#foot-name {
text-transform: none;
- font-size: 80%;
- color: #bbb;
+}
+
+#foot-copyright {
+ padding-left: 1em;
+ padding-bottom: 0.5em;
+ margin: 0;
}
.post {
@@ -151,6 +145,11 @@ body {
line-height:1.4;
}
+.post-content img {
+ max-width: 100%;
+ height: auto;
+}
+
.post a {
color:#c05b4d;
text-decoration: none;