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

github.com/ExchangeRate-API/strange-case.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid M <565357+David-N55@users.noreply.github.com>2021-03-04 15:57:49 +0300
committerGitHub <noreply@github.com>2021-03-04 15:57:49 +0300
commit3ea1d7d50bd0c1a0fa50747ec012a845d59810a3 (patch)
tree0ab2d9d28e417f95328bf72836607865fb7ac62a
parent26404ab591859b728b677f00b31e2d42f6775311 (diff)
parentaa133bcfe83440b629d827306f04183fe3ac5c23 (diff)
Merge pull request #14 from jkaye2012/masterHEADmaster
Fix deprecation warnings and correct README
-rw-r--r--README.md20
-rw-r--r--exampleSite/config.toml3
-rw-r--r--layouts/_default/single.html2
-rw-r--r--layouts/partials/header.html6
-rw-r--r--layouts/partials/sidebar-content.html28
-rw-r--r--static/css/strange-case.css7
6 files changed, 39 insertions, 27 deletions
diff --git a/README.md b/README.md
index 5607188..874a365 100644
--- a/README.md
+++ b/README.md
@@ -38,29 +38,33 @@ Next, open the `config.toml` file in the base of the Hugo folder and ensure the
There are various options you can easily set from your `config.toml` file.
-This text will appear after the Title of your site in your `<title>` meta tag:
+This text will appear after the Title of your site in your `<title>` meta tag, and after the Title in the sidebar:
description = "A Hugo Theme built with Bootstrap"
### Sidebar
-This text will appear in the sidebar immediately under your site's Title:
+This text will appear in a free paragraph below the Title & Description and above the menu links. Set it to "" if you don't want it.
- sidebarDescription = "A Hugo Theme built with Bootstrap"
+ sidebarFreeText = "A optional paragraph of free text. Set to blank in config.toml to clear..."
-This text will appear in a free paragraph below the Title & sidebarDescription and above the menu links. Set it to "" if you don't want it.
+You can include clickable icons (e.g. for social networks )by including `"menu=icons"` items in your `config.toml`. Example:
- sidebarFreeText = "A optional paragraph of free text. Set to blank in config.toml to clear..."
+ [[menu.icons]]
+ name = "GitHub"
+ post = "<img src=\"/images/github.png\""
+ url = "https://github.com"
-You can also include useful menu links by including `"menu=main"` items in your `config.toml`. Example:
+You can optionally use the `post` var to include HTML after the `name` in the resulting links.
+You can include useful menu links by including `"menu=main"` items in your `config.toml`. Example:
[[menu.main]]
name = "Hugo"
post = "<span class='glyphicon glyphicon-fire'></span>"
url = "http://gohugo.io"
-You can optionally use the `pre` and `post` vars to include HTML before or after the `name` in the resulting links.
+You can optionally use the `post` var to include HTML after the `name` in the resulting links.
You can use the `"contact_email"` field in `[params]` to set a mailto: link the in the sidebar. Leave blank if you don't want it.
@@ -94,7 +98,6 @@ Using a theme is as simple as changing the `colorScheme` param in your `config.t
colorScheme = "scheme-darkbrown"
DateFormat = "2 Jan 2006"
description = "A Hugo Theme built with Bootstrap"
- sidebarDescription = "A Hugo Theme built with Bootstrap"
sidebarFreeText = "A optional paragraph of free text. Set to blank in config.toml to clear..."
@@ -150,7 +153,6 @@ Here is a full example `config.toml`:
colorScheme = "scheme-darkbrown"
DateFormat = "2 Jan 2006"
description = "A blog about content"
- sidebarDescription = "This is my blog about content"
sidebarFreeText = "A optional paragraph of free text. Set to blank in config.toml to clear..."
piwikSiteID = ""
piwikURL = ""
diff --git a/exampleSite/config.toml b/exampleSite/config.toml
index 4c0e868..bad755e 100644
--- a/exampleSite/config.toml
+++ b/exampleSite/config.toml
@@ -13,7 +13,6 @@ theme = "strange-case"
colorScheme = "scheme-darkbrown"
dateformat = "Jan 2, 2006"
description = "A Hugo Theme built with Bootstrap"
- sidebarDescription = "A Hugo Theme built with Bootstrap"
sidebarFreeText = "A optional paragraph of free text. Set to blank in config.toml to clear..."
piwikSiteID = ""
piwikURL = ""
@@ -26,4 +25,4 @@ theme = "strange-case"
[[menu.main]]
name = "Bootstrap"
post = "<span class='glyphicon glyphicon-ok'></span>"
- url = "http://getbootstrap.com" \ No newline at end of file
+ url = "http://getbootstrap.com"
diff --git a/layouts/_default/single.html b/layouts/_default/single.html
index 26fec55..a97dfa8 100644
--- a/layouts/_default/single.html
+++ b/layouts/_default/single.html
@@ -13,7 +13,7 @@
<div class="post-heading">
<h1>{{ .Title }}</h1>
- <span class="post-date"><a href="{{ .Permalink }}"># {{ .Date.Format "Jan 2, 2006" }}{{ if .Params.author }} by {{ .Params.author }}{{ end }}</a></span>
+ <span class="post-date"># {{ .Date.Format "Jan 2, 2006" }}{{ if .Params.author }} by {{ .Params.author }}{{ end }}</span>
</div>
{{ .Content }}
diff --git a/layouts/partials/header.html b/layouts/partials/header.html
index 34377c7..e76b8ed 100644
--- a/layouts/partials/header.html
+++ b/layouts/partials/header.html
@@ -4,7 +4,7 @@
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
- {{ .Hugo.Generator }}
+ {{ hugo.Generator }}
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
<title>{{ .Title }} - {{ .Site.Params.description }}</title>
@@ -24,6 +24,6 @@
{{ "<![endif]-->" | safeHTML }}
<!-- RSS -->
- <link href="{{ .RSSLink }}" rel="alternate" type="application/rss+xml" title="{{ .Site.Title }}" />
+ <link href="{{ with .OutputFormats.Get "RSS" }}{{ .RelPermalink }}{{ end }}" rel="alternate" type="application/rss+xml" title="{{ .Site.Title }}" />
</head>
-<body class="{{ .Site.Params.colorScheme }}"> \ No newline at end of file
+<body class="{{ .Site.Params.colorScheme }}">
diff --git a/layouts/partials/sidebar-content.html b/layouts/partials/sidebar-content.html
index a76501d..6f1343d 100644
--- a/layouts/partials/sidebar-content.html
+++ b/layouts/partials/sidebar-content.html
@@ -10,20 +10,26 @@
</div>
{{ end }}
+ <ul class="sidebar-menus sidebar-icons">
+ {{ range .Site.Menus.icons }}
+ <li><a href="{{.URL}}">{{ .Post }}</a></li>
+ {{end}}
+ </ul>
+
<ul class="sidebar-menus">
- {{ range .Site.Menus.main }}
- <li>&#187; <a href="{{.URL}}">{{ .Name }}</a> {{ .Post }}</li>
- {{end}}
- </ul>
+ {{ range .Site.Menus.main }}
+ <li>&#187; <a href="{{.URL}}">{{ .Name }}</a>{{ .Post }}</li>
+ {{end}}
+ </ul>
<div class="sidebar-recent hidden-xs">
- <p>Recent Posts:</p>
- <ul>
- {{ range first 5 .Site.Pages }}
- <li><a href="{{.Permalink}}">{{ .Title }}</a></li>
- {{ end }}
- </ul>
- </div>
+ <p>Recent Posts:</p>
+ <ul>
+ {{ range first 5 (where .Site.RegularPages "Section" "posts") }}
+ <li><a href="{{.Permalink}}">{{ .Title }}</a></li>
+ {{ end }}
+ </ul>
+ </div>
{{ if .Site.Params.contact_email }}
<div class="sidebar-contact">
diff --git a/static/css/strange-case.css b/static/css/strange-case.css
index f6d4d55..9cebf14 100644
--- a/static/css/strange-case.css
+++ b/static/css/strange-case.css
@@ -51,6 +51,9 @@ img {
.post {
margin-bottom: 3em;
}
+.post a {
+ text-decoration: underline;
+}
.post .post-heading {
margin-bottom: 1em;
}
@@ -76,7 +79,6 @@ img {
/* SIDEBAR */
-
.sidebar {
padding: 2em;
font-size: 1.3em;
@@ -98,6 +100,9 @@ img {
list-style: none;
font-size:1em;
}
+.sidebar .sidebar-icons li {
+ display: inline-block;
+}
.sidebar .sidebar-recent {
margin-top: 1.5em;
}