mirror of
https://github.com/Noettore/cocoa-eh-hugo-theme.git
synced 2025-10-14 19:26:40 +02:00
Add optional enlarged mode, make header and footer padding symmetric
Enlarged mode is basically like using the theme at ~110% zoom. It can be enabled by setting `enlarged = true` as a config parameter. Other changes are only minor fixes that shouldn't significantly impact existing sites.
This commit is contained in:
@@ -46,9 +46,9 @@
|
||||
</div>
|
||||
<div class="markdown">
|
||||
{{ partial "content" . }}
|
||||
<br>
|
||||
</div>
|
||||
{{ if .Site.Params.share }}
|
||||
<br>
|
||||
<div class="share">
|
||||
{{ if .Site.Params.share_on_fb | default true }}
|
||||
<a href="" class="ssk ssk-facebook"></a>
|
||||
@@ -65,30 +65,32 @@
|
||||
</div>
|
||||
{{ end }}
|
||||
{{ if .Site.Params.posts_navigation }}
|
||||
<div class="navigation">
|
||||
{{ if .PrevInSection }}
|
||||
<div>
|
||||
<img class="icon" src="/img/back.svg" alt="back" />
|
||||
<a href="{{ .PrevInSection.Permalink }}">{{ .PrevInSection.Title }}</a>
|
||||
</div>
|
||||
{{ end }}
|
||||
<div style="width: 100%;"></div>
|
||||
{{ if .NextInSection }}
|
||||
<div>
|
||||
<a href="{{ .NextInSection.Permalink }}">{{ .NextInSection.Title }}</a>
|
||||
<img class="icon" src="/img/next.svg" alt="next" />
|
||||
</div>
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ end }}
|
||||
<br>
|
||||
<div class="navigation">
|
||||
{{ if .PrevInSection }}
|
||||
<div>
|
||||
<img class="icon" src="/img/back.svg" alt="back" />
|
||||
<a href="{{ .PrevInSection.Permalink }}">{{ .PrevInSection.Title }}</a>
|
||||
</div>
|
||||
{{ end }}
|
||||
<div style="width: 100%;"></div>
|
||||
{{ if .NextInSection }}
|
||||
<div>
|
||||
<a href="{{ .NextInSection.Permalink }}">{{ .NextInSection.Title }}</a>
|
||||
<img class="icon" src="/img/next.svg" alt="next" />
|
||||
</div>
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ end }}
|
||||
{{ if .Site.Params.disqusShortname }}
|
||||
<br>
|
||||
<div class="disqus">
|
||||
{{ template "_internal/disqus.html" . }}
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
{{ if .Site.Params.issoHost }}
|
||||
<br>
|
||||
<div class="isso" id="isso-thread"></div>
|
||||
<script
|
||||
data-isso="//{{ .Site.Params.issoHost }}/"
|
||||
@@ -99,6 +101,7 @@
|
||||
{{ end }}
|
||||
|
||||
{{ if .Site.Params.commentoHost }}
|
||||
<br>
|
||||
<div id="commento"></div>
|
||||
<script src="//{{ .Site.Params.commentoHost }}/js/commento.js"></script>
|
||||
{{ end }}
|
||||
|
@@ -157,7 +157,11 @@ div.header .content {
|
||||
align-items: center;
|
||||
}
|
||||
div.header .container .logo {
|
||||
{{ if .Site.Params.enlarged }}
|
||||
max-width: 200px;
|
||||
{{ else }}
|
||||
max-width: 100px;
|
||||
{{ end }}
|
||||
margin-left: -2em;
|
||||
}
|
||||
div.header .name {
|
||||
@@ -271,7 +275,11 @@ div.main .container {
|
||||
}
|
||||
div.main .content {
|
||||
color: #111111;
|
||||
{{ if .Site.Params.enlarged }}
|
||||
font-size: 17px;
|
||||
{{ else }}
|
||||
font-size: 16px;
|
||||
{{ end }}
|
||||
}
|
||||
div.main .content .title-container {
|
||||
display: -webkit-flex;
|
||||
@@ -285,7 +293,10 @@ div.main .content .title-container {
|
||||
justify-content: space-between;
|
||||
}
|
||||
div.main .content .posts {
|
||||
{{ $nbPosts := len (where .Data.Pages "Params.best" true) }}
|
||||
{{ if gt $nbPosts 0 }}
|
||||
margin-bottom: 4em;
|
||||
{{ end }}
|
||||
}
|
||||
div.main .content .page-heading {
|
||||
font-size: 20px;
|
||||
|
@@ -11,11 +11,19 @@ section {
|
||||
padding: 0 16px;
|
||||
margin-left: 100px;
|
||||
margin-right: 100px;
|
||||
{{ if .Site.Params.enlarged }}
|
||||
max-width: 825px;
|
||||
{{ else }}
|
||||
max-width: 750px;
|
||||
{{ end }}
|
||||
}
|
||||
div.column {
|
||||
padding: 0 16px;
|
||||
{{ if .Site.Params.enlarged }}
|
||||
max-width: 825px;
|
||||
{{ else }}
|
||||
max-width: 750px;
|
||||
{{ end }}
|
||||
}
|
||||
div.header {
|
||||
background-color: transparent;
|
||||
@@ -30,8 +38,8 @@ div.header .container .logo {
|
||||
margin: 0;
|
||||
}
|
||||
div.header-home .container .logo {
|
||||
max-width: 180px;
|
||||
margin-left: 20px;
|
||||
max-width: 216px;
|
||||
margin-left: 24px;
|
||||
}
|
||||
div.header-home .name-home {
|
||||
padding-top: 30px;
|
||||
@@ -116,7 +124,7 @@ padding-top: 60px;
|
||||
padding-bottom: 60px;
|
||||
}
|
||||
div.footer {
|
||||
padding-top: 30px;
|
||||
padding-top: 60px;
|
||||
padding-bottom: 60px;
|
||||
}
|
||||
div.main {
|
||||
@@ -130,10 +138,6 @@ padding-left: 1.5em;
|
||||
div.main .container .content .post-item .meta {
|
||||
display: block;
|
||||
}
|
||||
div.main.post {
|
||||
padding-top: 60px;
|
||||
padding-bottom: 60px;
|
||||
}
|
||||
div.main .content .markdown blockquote {
|
||||
padding-right: 5rem;
|
||||
padding-left: 1.25rem;
|
||||
|
Reference in New Issue
Block a user