-fixed unwanted scrollbar behavior

-modified font awesome links section of header
-cleaned up footer
-changed name to planblog to better fit my use
-added adsense support
This commit is contained in:
Jakub Filo 2017-03-29 22:24:53 +02:00
parent 890e97c5a0
commit 1d2d793065
11 changed files with 89 additions and 156 deletions

View File

@ -1,7 +1,7 @@
{{ partial "header.html" . }}
<section class="row not-found">
<h1 class="col-md-4 col-md-offset-4">404</h1>
<div class="col-md-4 col-md-offset-4">That page doesn't exist!</div>
<div class="col-md-4 col-md-offset-4">This page does not exist!</div>
</section>
{{ partial "footer.html" . }}

View File

@ -34,41 +34,6 @@
</script>
<noscript>Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
{{ end }}
<section class="author-info row">
<div class="author-avatar col-md-2">
{{ with .Site.Params.avatar }}
<img alt="Author Avatar" src="{{ . }}" />
{{ end }}
</div>
<div class="author-meta col-md-6">
{{ with .Site.Params.author }}
<h1 class="author-name text-primary">{{ . }}</h1>
{{ end }}
{{ with .Site.Params.bio }}
<div class="author-bio">{{ . }}</div>
{{ end }}
</div>
{{ with .Site.Params.contact }}
<div class="author-contact col-md-4">
<a href="{{ . }}">
<i class="fa fa-envelope-o" aria-hidden="true"></i>
&nbsp;Contact me
</a>
</div>
{{ end }}
</section>
<ul class="pager">
{{ if .Next }}
<li class="previous"><a href="{{ .Next.Permalink }}"><span aria-hidden="true">&larr;</span> Older</a></li>
{{ else }}
<li class="previous disabled"><a href="#"><span aria-hidden="true">&larr;</span> Older</a></li>
{{ end }}
{{ if .Prev }}
<li class="next"><a href="{{ .Prev.Permalink }}">Newer <span aria-hidden="true">&rarr;</span></a></li>
{{ else }}
<li class="next disabled"><a href="#">Newer <span aria-hidden="true">&rarr;</span></a></li>
{{ end }}
</ul>
</footer>
</article>

View File

@ -6,7 +6,7 @@
{{ end }}
{{ .Render "li" }}
{{ end }}
</div>
{{ partial "pagination.html" .Paginator }}
</div>
{{ partial "footer.html" . }}

View File

@ -0,0 +1,12 @@
{{ with .Site.Params.google_adsense }}
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<!-- plantroon blog -->
<ins class="adsbygoogle"
style="display:block"
data-ad-client="{{ . }}"
data-ad-slot="8599575024"
data-ad-format="auto"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
{{ end }}

View File

@ -1,10 +1,9 @@
</main>
<footer class="container global-footer">
<div class="copyright-note pull-left">
{{ .Site.Copyright | safeHTML }}
</div>
{{ partial "link.html" . }}
</footer>
</main>
<script src="{{ .Site.BaseURL }}js/highlight.pack.js"></script>
<script>

View File

@ -34,11 +34,19 @@
<link rel="stylesheet" href="{{ .Site.BaseURL }}css/font-awesome.min.css" />
<link rel="stylesheet" href="{{ .Site.BaseURL }}css/github.css" />
<link rel="stylesheet" href="//fonts.googleapis.com/css?family=Source+Sans+Pro:200,300,400" type="text/css">
<link rel="shortcut icon" href="{{ .Site.BaseURL }}images/favicon.ico" />
<link rel="apple-touch-icon" href="{{ .Site.BaseURL }}images/apple-touch-icon.png" />
<link rel="shortcut icon" href="{{ .Site.BaseURL }}images/favicon.png" />
{{ if eq .URL "/" }}
<link href="{{ .RSSLink }}" rel="alternate" type="application/rss+xml" title="{{ .Site.Title }}" />
{{ end }}
{{ with .Site.Params.google_adsense }}
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<script>
(adsbygoogle = window.adsbygoogle || []).push({
google_ad_client: "{{ . }}",
enable_page_level_ads: true
});
</script>
{{ end }}
</head>
<body>
<header class="global-header" style="background-image:url({{ if isset .Params "image" }}{{ .Params.image }} {{ else }} /images/bg.jpg {{ end }})">
@ -49,19 +57,16 @@
{{ . }}
</div>
{{ end }}
{{ partial "link.html" . }}
{{ if ne .URL "/" }}
<a href="{{ .Site.BaseURL }}" class="btn-header btn-back hidden-xs">
<i class="fa fa-angle-left" aria-hidden="true"></i>
&nbsp;Home
</a>
{{ end }}
{{ with .RSSLink }}
<a href="{{ . }}" class="btn-header btn-subscribe hidden-xs">
<i class="fa fa-rss" aria-hidden="true"></i>
&nbsp;Subscribe
</a>
{{ end }}
{{ partial "navi.html" . }}
</section>
</header>
<main class="container">
{{ with .Site.Params.google_adsense }}
<ins class="adsbygoogle"
style="display:block"
data-ad-client="{{ . }}"
data-ad-slot="8599575024"
data-ad-format="auto">
</ins>
<script> (adsbygoogle = window.adsbygoogle || []).push({}); </script>
{{ end }}

View File

@ -1,47 +0,0 @@
<div class="sns-links hidden-print">
{{ with .Site.Params.contact }}
<a href="{{ . }}">
<i class="fa fa-envelope"></i>
</a>
{{ end }}
{{ with .Site.Params.twitter }}
<a href="https://twitter.com/{{ . }}" target="_blank">
<i class="fa fa-twitter"></i>
</a>
{{ end }}
{{ with .Site.Params.instagram }}
<a href="https://instagram.com/{{ . }}" target="_blank">
<i class="fa fa-instagram"></i>
</a>
{{ end }}
{{ with .Site.Params.googleplus }}
<a href="https://plus.google.com/+{{ . }}" target="_blank">
<i class="fa fa-google"></i>
</a>
{{ end }}
{{ with .Site.Params.facebook }}
<a href="https://facebook.com/{{ . }}" target="_blank">
<i class="fa fa-facebook"></i>
</a>
{{ end }}
{{ with .Site.Params.github }}
<a href="https://github.com/{{ . }}" target="_blank">
<i class="fa fa-github"></i>
</a>
{{ end }}
{{ with .Site.Params.stackoverflow }}
<a href="https://stackoverflow.com/users/{{ . }}" target="_blank">
<i class="fa fa-stack-overflow"></i>
</a>
{{ end }}
{{ with .Site.Params.linkedin }}
<a href="https://linkedin.com/in/{{ . }}" target="_blank">
<i class="fa fa-linkedin"></i>
</a>
{{ end }}
{{ with .Site.Params.keybase }}
<a href="https://keybase.io/{{ . }}" target="_blank">
<i class="fa fa-key"></i>
</a>
{{ end }}
</div>

View File

@ -0,0 +1,37 @@
<div class="sns-navi hidden-print">
<a href="{{ .Site.BaseURL }}" target="_self" title="Blog">
{{ with .Site.Params.avatar }}
<img src="{{ . }}"/>
{{ end }}
</a>
{{ with .Site.Params.about }}
<a href="{{ . }}" title="About me">
<i class="fa fa-user"></i>
</a>
{{ end }}
{{ with .Site.Params.email }}
<a href="mailto:{{ . }}" target="_self" title="E-mail me">
<i class="fa fa-envelope"></i>
</a>
{{ end }}
{{ with .Site.Params.github }}
<a href="https://github.com/{{ . }}" target="_blank" title="Github">
<i class="fa fa-github"></i>
</a>
{{ end }}
{{ with .Site.Params.youtube }}
<a href="https://youtube.com/{{ . }}" target="_blank" title="Youtube">
<i class="fa fa-youtube"></i>
</a>
{{ end }}
{{ with .Site.Params.twitter }}
<a href="https://twitter.com/{{ . }}" target="_blank" title="Twitter">
<i class="fa fa-twitter"></i>
</a>
{{ end }}
{{ with .Site.Params.steam }}
<a href="https://steamcommunity.com/id/{{ . }}" target="_blank" title="Steam">
<i class="fa fa-steam"></i>
</a>
{{ end }}
</div>

File diff suppressed because one or more lines are too long

View File

@ -1,3 +1,7 @@
html {
overflow-y: scroll;
}
main {
max-width: 750px;
word-wrap: break-word;
@ -27,30 +31,25 @@ main {
font-weight: 300;
}
.header-text .sns-links {
margin: 20px auto;
.header-text .sns-navi {
text-align: center;
}
.header-text .sns-links a {
.header-text .sns-navi a {
display: inline-block;
margin: 0 2px;
width: 30px;
height: 30px;
border: 1px solid rgba(255, 255, 255, 0.6);
border-radius: 15px;
width: 42px;
height: 42px;
color: rgba(255, 255, 255, 0.6);
text-decoration: none;
font-size: 20px;
line-height: 30px;
font-size: 24px;
line-height: 24px;
transition: color,border-color 0.1s linear;
}
.header-text .sns-links a:hover {
.header-text .sns-navi a:hover {
border-color: rgba(255, 255, 255, 1.0);
color: rgba(255, 255, 255, 1.0);
}
.header-text h1 {
margin: 0 auto;
padding-top: 30px;
@ -82,10 +81,6 @@ a.btn-header:hover {
color: rgba(0, 0, 0, 1.0);
}
a.btn-subscribe {
right: 20px;
}
a.btn-back {
left: 20px;
}
@ -95,39 +90,12 @@ a.btn-back {
.global-footer {
margin-top: 10px;
padding-top: 10px;
max-width: 750px;
width: 100%;
height: 100px;
border-top: 1px solid rgba(0, 0, 0, 0.2);
color: rgba(0, 0, 0, 0.4);
}
.global-footer .sns-links {
float: right;
}
.global-footer .sns-links a {
display: inline-block;
width: 24px;
height: 24px;
border: 1px solid rgba(0, 0, 0, 0.4);
border-radius: 12px;
color: rgba(0, 0, 0, 0.4);
vertical-align: top;
text-align: center;
text-decoration: none;
font-size: 13px;
transition: color,border-color 0.1s linear;
}
.global-footer .sns-links a i {
vertical-align: middle;
}
.global-footer .sns-links a:hover {
border: 1px solid rgba(0, 0, 0, 0.8);
color: rgba(0, 0, 0, 0.7);
}
/* Article */
.article-list h2 a {
@ -182,14 +150,6 @@ a.btn-back {
color: rgba(0, 0, 0, 0.5);
}
.author-avatar img {
max-width: 100px;
max-height: 100px;
width: 100px;
height: 100px;
border-radius: 50px;
}
.author-contact {
position: relative;
display: inline-block;
@ -220,7 +180,7 @@ a.btn-back {
.pagination
{
width: 720px;
width: 100%;
text-align: center;
}

View File

@ -1,6 +1,7 @@
author = "Keichi Takahashi"
description = "Simple and clean blog theme for hugo"
modified_by = "Jakub Filo"
description = "Simple and clean blog theme for hugo. Added Adsense functionality, fixed unwanted scrollbar behavior and renamed for my personal use."
license = "MIT"
name = "vienna"
name = "planblog"
source_repo = "git@github.com:keichi/vienna.git"
tags = ["blog", "tags", "bootstrap"]