Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tweaks #16

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 51 additions & 11 deletions assets/css/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ p code {

p code, pre { border-radius: 4px; }

#tag-cloud { max-width: 250px; }
#tag-cloud { max-width: 250px; font-family: monospace; }
#contents-list>.toc-list {
max-width: 250px;
overflow: hidden;
Expand All @@ -51,11 +51,17 @@ p code, pre { border-radius: 4px; }
@media (min-width: 1200px) {
#contents-list>.toc-list, #tag-cloud {
display: block;
top: 100px;
top: 150px;
}
#tag-cloud {
-webkit-transition: opacity .5s, visibility .5s;
transition: opacity .5s, visibility .5s;
/* font properties for tag cloud */
font-size: 14px;
line-height: 1;
}
#tag-cloud span {
font-size: larger;
}
}
@media (min-width: 1330px) { #contents-list>.toc-list { max-width: 300px; right: 3rem;}}
Expand Down Expand Up @@ -131,6 +137,10 @@ table tr th, table tr td {
color: var(--main-color);
margin-left: -1em;
}
hr {
border: 0 none;
border-top: 1px solid var(--main-color);
}

/* embedded subscribe form styling - outside the theme */
.mc-field-group {
Expand All @@ -143,6 +153,10 @@ table tr th, table tr td {
height: 1.5rem;
margin-left: 0.5rem;
padding: 0 0.5rem;
background-color: var(--code-background-color);
/* border: 1px solid var(--secondary-color); */
border: 0 none;
color: var(--body-text-color);
}

#mc-embedded-subscribe {
Expand Down Expand Up @@ -214,26 +228,25 @@ label#switch_mode::after {
transition: 0s color;
}

.post-tags {
/* margin-left: 0.2rem; */
}

.post-tags i.svg-icon {
position: relative;
top: 4px;
}

.post-tags a.link {
.post-tags a.link,
#tag-cloud a {
text-decoration: none;
font-size: small;
font-weight: 800;
line-height: 1;
display: inline-block;
padding: 4px 2px;
color: var(--body-text-color);
border-bottom: 1px solid var(--background-color);
}

.post-tags a.link {
color: var(--body-text-color);
}

.post-tags a.link:hover {
border-bottom: 1px solid var(--generic-link-color);
}
Expand Down Expand Up @@ -280,12 +293,22 @@ main>p {
line-height: 1.67rem;
}

ul.list {
section.post-content {
position: relative;
}

section.connect {
border: 1px solid rgba(0,0,0,0.01);
}

ul.list,
section.connect {
margin-top: 4rem;
position: relative;
}

ul.list::before {
ul.list::before,
section.connect::before {
position: absolute;
content: "";
top: -2rem;
Expand All @@ -303,3 +326,20 @@ ul.list::before {

/* scrolling */
html { scroll-behavior: smooth; }

/* tocbot style overrides */
.toc-link {
padding: 0 0.3rem;
font-size: 14px;
background-color: var(--background-color);
}
.is-active-link {
font-weight: 400 !important;
background-color: var(--secondary-color);
transition: background-color 200ms ease-in-out;
/* source-ordering issue: had to use !important because tocbot styles
load last and take precedence over these otherwise */
}
.list-pages a {
border-bottom: none;
}
1 change: 1 addition & 0 deletions assets/css/variables.css
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,5 @@ html.dark {
--code-background-color: #666;
--tag-background-color: #000;
--generic-link-color: var(--main-color);
--secondary-color: var(--main-color);
}
1 change: 1 addition & 0 deletions layouts/_default/list.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,5 @@ <h1 class="f2 fw6 heading-font">{{ .Title }}</h1>
<div class="pagination tc db fixed-l bottom-2-l right-2-l mb3 mb0-l">
{{ partial "back-to-top.html" . }}
</div>
{{ partial "tag_cloud.html" . }}
{{ end }}
35 changes: 20 additions & 15 deletions layouts/_default/single.html
Original file line number Diff line number Diff line change
@@ -1,20 +1,25 @@
{{ define "main" }}
<main class="center mv4 content-width ph3">
<div class="f3 fw6 heading-color heading-font post-title">{{ .Title }}</div>
<p class="silver f6 mt1 mb4 post-meta">
{{ if not .Date.IsZero }}<time>{{ .Date.Format "02 Jan 2006" }}</time> {{ end }}
{{ if .Params.draft }} | <strong>draft</strong>{{ end }}
{{ if or .Params.tags .Params.categories .Params.series }} | {{ end }}
{{ if isset .Params "categories" }}
categories: [ {{ range .Params.categories }}<a href='{{ "/categories/" | relLangURL }}{{ . | urlize }}' class="link silver">{{ . }}</a> {{ end }} ]
{{ end }}
{{ if isset .Params "tags" }}
<span class="post-tags"> {{ range .Params.tags }}<a href='{{ "/tags/" | relLangURL }}{{ . | urlize }}' class="link silver">{{ . }}</a> {{ end }} </span>
{{ end }}
</p>
<div class="lh-copy post-content">{{ .Content }}</div>
{{ partial "twitter" $.Site }}
{{ partial "mail-chimp" . }}
<section class="post-content mb4">
<div class="f3 fw6 heading-color heading-font post-title">{{ .Title }}</div>
<p class="silver f6 mt1 mb4 post-meta">
{{ if not .Date.IsZero }}<time>{{ .Date.Format "02 Jan 2006" }}</time> {{ end }}
{{ if .Params.draft }} | <strong>draft</strong>{{ end }}
{{ if or .Params.tags .Params.categories .Params.series }} | {{ end }}
{{ if isset .Params "categories" }}
categories: [ {{ range .Params.categories }}<a href='{{ "/categories/" | relLangURL }}{{ . | urlize }}' class="link silver">{{ . }}</a> {{ end }} ]
{{ end }}
{{ if isset .Params "tags" }}
<span class="post-tags"> {{ range .Params.tags }}<a href='{{ "/tags/" | relLangURL }}{{ . | urlize }}' class="link silver">{{ . }}</a> {{ end }} </span>
{{ end }}
</p>
<div class="lh-copy post-content">{{ .Content }}</div>
</section>

<section class="connect">
{{ partial "twitter" $.Site }}
{{ partial "mail-chimp" . }}
</section>
</main>
{{ partial "table-of-contents" . }}

Expand Down
2 changes: 1 addition & 1 deletion layouts/partials/footer.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<footer class="content-width mt0 mt5-l mb4 f6 center ph3 gray tc tl-l">
<hr class="dn db-l ml0-l gray w3"><br>
<hr class="db-l ml0-l w3 bg-transparent"><br>
{{ partial "indieweb.html" .Site }}
Powered by <a href="https://gohugo.io/" target="_blank" class="link gray dim">Hugo</a>, based on the <a href="https://github.com/punchagan/er" target="_blank" class="link gray dim">Er</a> theme. <br>
{{ with .Site.Copyright }}{{ . }}{{end}}
Expand Down
2 changes: 1 addition & 1 deletion layouts/partials/tag_cloud.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
{{ if .Site.Params.showTagCloud | default true }}
<div class="dn tr fixed right-2" id="tag-cloud">
<i class="svg-icon svg-icon--fill"><svg><use xlink:href="/images/icons.svg#icon-tag" /></svg></i>
tags <br>
<span class="dib mb2">tags</span> <br>
{{ range first $maxtags .Site.Taxonomies.tags.ByCount }}
<a class="silver no-underline" href="{{ "/tags/" | relLangURL }}{{ .Name | urlize }}">{{ .Name }}</a></li>
{{ end }}
Expand Down