Browse Source

a few styling changes and addition of bookmarks page

master
jk 4 years ago
parent
commit
6e0071caa2
  1. 7
      config.toml
  2. 9
      content/response/5ee88fab/index.md
  3. 9
      data/bookmarks/how-scotland-lost-her-parliament.yaml
  4. 7
      themes/nipponalba/layouts/_default/single.html
  5. 12
      themes/nipponalba/layouts/partials/bookmarks.html
  6. 13
      themes/nipponalba/static/css/style.css

7
config.toml

@ -40,6 +40,7 @@ type = "type"
likeof = "likeof"
inreplyto = "inreplyto"
repostof = "repostof"
bookmark = "bookmarkof"
posttype = "posttype"
slug = "slug"
@ -113,9 +114,9 @@ weight = 500
url = "/photo/"
[[languages.en.menu.main]]
name = "Responses"
weight = 500
url = "/response/"
name = "Bookmarks"
weight = 600
url = "/bookmarks/"
[languages.jp]
weight = 10

9
content/response/5ee88fab/index.md

@ -1,9 +0,0 @@
---
bookmarkof: "This Charles Waddie book, 'How Scotland Lost Her Parliament' (1891) is associated closely with our publication and I genuinely have a desire that every Scot read it. I feel it's really important. There's a reason it's not available anywhere. Trying to upload it as fast as possible so it exists for folk.\n\nAnswers all the questions 😉\n\nhttps://randomscottishhistory.com/how-scotland-lost-her-parliament-and-what-came-of-it-1891/​"
date: '2020-06-16 10:23:55'
draft: false
posttype: bookmarkof
slug: 5ee88fab
visibility: public
---
Test bookmark

9
data/bookmarks.yaml → data/bookmarks/how-scotland-lost-her-parliament.yaml

@ -1,9 +1,6 @@
---
entries:
---
bookmarkof: 'https://randomscottishhistory.com/how-scotland-lost-her-parliament-and-what-came-of-it-1891/​'
category:
- 'Scottish Politics'
bookmarkof: 'https://randomscottishhistory.com/how-scotland-lost-her-parliament-and-what-came-of-it-1891'
category: 'Scottish Politics'
date: '2020-06-16 10:57:50'
draft: false
name: 'How Scotland Lost Her Parliament'
@ -11,5 +8,5 @@ posttype: bookmarkof
slug: how-scotland-lost-her-parliament
title: 'How Scotland Lost Her Parliament'
visibility: public
content: 'This Charles Waddie book, "How Scotland Lost Her Parliament" (1891) should be read by every Scot'
---
This Charles Waddie book, 'How Scotland Lost Her Parliament' (1891) should be read by every Scot

7
themes/nipponalba/layouts/_default/single.html

@ -1,5 +1,5 @@
{{ define "main" }}
{{ if not (eq .Type "response")}}
{{ if not (eq .Type "response" "bookmarkof")}}
<article class="post h-entry entry contents">
<div class="author" style="display:none;">
<a rel="author" class="u-author h-card" rel="me" href="https://jk.nipponalba.scot">{{ .Site.Params.Title }}<img src="/images/profile.jpg"/></a>
@ -62,7 +62,10 @@
{{ end }}
</aside></div>
</article> {{ else }}
</article>
{{ else if eq .Type "bookmarkof" }}
{{ partial "bookmarks.html" . }}
{{ else }}
<section data-post-type="{{ .Params.posttype }}" data-post-id="{{ .Params.slug }}" class="h-entry">
<div class="author" style="display:none;">
<a rel="author" class="u-author h-card" rel="me" href="https://jk.nipponalba.scot">{{ .Site.Params.Title }}<img src="/images/profile.jpg"/></a>

12
themes/nipponalba/layouts/partials/bookmarks.html

@ -0,0 +1,12 @@
<h4>Scottish Politics</h4>
{{ range .Site.Data.bookmarks }}
{{ if eq .category "Scottish Politics"}}
<u><a href="{{ .bookmarkof | absURL }}">{{ .name }}</a></u> - {{ .content | markdownify }}
{{ end }}
{{ end }}
<h4>Vegan Recipes</h4>
{{ range .Site.Data.bookmarks }}
{{ if eq .category "Vegan Recipes"}}
<u><a href="{{ .bookmarkof }}">{{ .name }}</a></u> - {{ .content | markdownify }}
{{ end }}
{{ end }}

13
themes/nipponalba/static/css/style.css

@ -304,7 +304,7 @@ pre {
margin: 30px 0;
}
.post .banner{
width:100%;
width:90%;
max-height: 300px;
object-fit:scale-down;
object-position:top;
@ -349,7 +349,7 @@ pre {
}
.post .post-content table,.post .post-content table td, .post .post-content table th,
.h-entry table,.h-entry table td, .h-entry table th{
border: 1px dashed var(--text-colour);
border: 1px dotted var(--text-colour);
}
.post .post-content table td, .post .post-content table th,.h-entry table td, .h-entry table th{
padding: 15px
@ -375,7 +375,7 @@ pre {
}
.post .post-footer {
padding: 0 0 100px 0;
border-bottom: 1px solid var(--text-colour);
border-bottom: 1px dotted var(--text-colour);
}
.post .post-footer-page {
padding: 0 0 0 0;
@ -645,7 +645,7 @@ width:100%
display:none;
}
.content aside{
width:90%;
width:100%;
display:inline-block;
vertical-align: top;
}
@ -674,7 +674,10 @@ width:100%
margin:10px;
border: 1px solid var(--text-colour);
}
hr{
border-top:1px dotted var(--text-colour);
border-bottom:0;
}
.pagination {
list-style:none;
margin: 0 auto;