Skip to content
Open
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
4 changes: 2 additions & 2 deletions layouts/404.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<div class="post">
<h1>404 Not Found</h1>
<p>What you're looking for isn't here, sorry!</p>
<p><a href="{{ .Site.BaseUrl }}">&larr; Click here to go back home</a></p>
<p><a href="{{ .Site.BaseURL }}">&larr; Click here to go back home</a></p>
</div>
</div>
{{ partial "foot.html" . }}
{{ partial "foot.html" . }}
4 changes: 2 additions & 2 deletions layouts/_default/list.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
<li><a href="{{ .Permalink }}">{{ .Title }}</a>
{{ if isset .Params "categories" }}
&middot;
{{ $baseUrl := .Site.BaseUrl }}
{{ $baseUrl := .Site.BaseURL }}
{{ range .Params.categories }}<a class="label" href="{{ $baseUrl }}/categories/{{ . | urlize }}">{{ . }}</a>{{ end }}
{{ end }}</span>
&middot; <time>{{ .Date.Format "Jan 2, 2006" }}</time></li>
{{ end }}
</ul>
</div>
{{ partial "foot.html" . }}
{{ partial "foot.html" . }}
16 changes: 13 additions & 3 deletions layouts/index.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,16 @@
{{ partial "head.html" . }}
<div class="content container">
{{ if isset .Site.Params "hometag" }}
{{ range .Data.Pages }}
{{ if in .Params.tags .Site.Params.hometag }}
<h1>{{ .Title }}</h1>
{{ .Content }}
{{ end }}
{{ end }}
{{ else }}
<div class="posts">
{{ $paginator := .Paginate (where .Data.Pages "Type" "post") }}
{{ $homesection := (or .Site.Params.homesection "post") }}
{{ $paginator := .Paginate (where .Data.Pages "Type" $homesection) }}
{{ range $paginator.Pages }}
<div class="post">
<h1 class="post-title">
Expand All @@ -10,7 +19,7 @@ <h1 class="post-title">
<span class="post-date">{{ .Date.Format "Jan 2, 2006" }} &middot; {{ .ReadingTime }} minute read{{ if .Site.DisqusShortname }} &middot; <a href="{{ .Permalink }}#disqus_thread">Comments</a>{{ end }}
{{ if isset .Params "categories" }}
<br/>
{{ $baseUrl := .Site.BaseUrl }}
{{ $baseUrl := .Site.BaseURL }}
{{ range .Params.categories }}<a class="label" href="{{ $baseUrl }}/categories/{{ . | urlize }}">{{ . }}</a>{{ end }}
{{ end }}</span>
<p>{{ .Description }}</p>
Expand All @@ -19,6 +28,7 @@ <h1 class="post-title">
{{ end }}
{{ template "_internal/pagination.html" . }}
</div>
{{ end }}
</div>

{{ with .Site.DisqusShortname }}
Expand All @@ -32,4 +42,4 @@ <h1 class="post-title">
}());
</script>
{{ end }}
{{ partial "foot.html" . }}
{{ partial "foot.html" . }}
4 changes: 2 additions & 2 deletions layouts/partials/foot.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{ if isset .Site.Params "highlight" }}<script src="{{ .Site.BaseUrl }}/js/highlight.pack.js"></script>
{{ if isset .Site.Params "highlight" }}<script src="{{ .Site.BaseURL }}/js/highlight.pack.js"></script>
<script>hljs.initHighlightingOnLoad();</script>{{ end }}
{{ with .Site.Params.googleAnalytics }}
<script>
Expand All @@ -9,4 +9,4 @@
</script>
{{ end }}
</body>
</html>
</html>
12 changes: 6 additions & 6 deletions layouts/partials/head.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@
<title>{{ .Title }} &middot; {{ .Site.Author.name }}</title>

<!-- CSS -->
<link rel="stylesheet" href="{{ .Site.BaseUrl }}/css/poole.css">
<link rel="stylesheet" href="{{ .Site.BaseUrl }}/css/hyde.css">
<link rel="stylesheet" href="{{ .Site.BaseUrl }}/css/poole-overrides.css">
<link rel="stylesheet" href="{{ .Site.BaseUrl }}/css/hyde-overrides.css">
<link rel="stylesheet" href="{{ .Site.BaseUrl }}/css/hyde-x.css">
{{ if isset .Site.Params "highlight" }}<link rel="stylesheet" href="{{ .Site.BaseUrl }}/css/highlight/{{ .Site.Params.highlight }}.css">{{ end }}
<link rel="stylesheet" href="{{ .Site.BaseURL }}/css/poole.css">
<link rel="stylesheet" href="{{ .Site.BaseURL }}/css/hyde.css">
<link rel="stylesheet" href="{{ .Site.BaseURL }}/css/poole-overrides.css">
<link rel="stylesheet" href="{{ .Site.BaseURL }}/css/hyde-overrides.css">
<link rel="stylesheet" href="{{ .Site.BaseURL }}/css/hyde-x.css">
{{ if isset .Site.Params "highlight" }}<link rel="stylesheet" href="{{ .Site.BaseURL }}/css/highlight/{{ .Site.Params.highlight }}.css">{{ end }}
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=PT+Sans:400,400italic,700|Abril+Fatface">
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css">

Expand Down
31 changes: 26 additions & 5 deletions layouts/partials/sidebar.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,30 @@
<div class="container sidebar-sticky">
<div class="sidebar-about">
{{ with .Site.Params.gravatarHash }}<img src="http://www.gravatar.com/avatar/{{ . }}?s=200" alt="gravatar">{{ end }}
<h1>{{ .Site.Author.name }}</h1>
<h1>{{ .Site.Title }}</h1>
{{ with .Site.Params.tagline }}<p class="lead">{{ . | markdownify }}</p>{{ end }}
</div>

<ul class="sidebar-nav">
<li class="sidebar-nav-item"><a href="{{ .Site.BaseUrl }}/">Blog</a></li>
{{ $homesection := (or .Site.Params.homesection "post") }}
{{ if isset .Site.Params "hometag" }}
{{ range .Site.Pages }}
{{ if in .Params.tags .Site.Params.hometag }}
<li class="sidebar-nav-item"><a href="{{ .Site.BaseURL }}/">{{ .Title }}</a></li>
{{ end }}
{{ end }}
{{ else }}
<li class="sidebar-nav-item"><a href="{{ .Site.BaseURL }}/">{{ title $homesection }}</a></li>
{{ end }}
{{ if not (.Site.Params.hidesections) }}
{{ range $key, $value := .Site.Sections }}
{{ if (and ($key) ( ne $key $homesection)) }}
<li class="sidebar-nav-item"><a href="/{{ $key }}">{{ title $key }}</a></li>
{{ end }}
{{end}}
{{ end }}
{{ range .Site.Menus.main }}
<li class="sidebar-nav-item"><a href="{{ .Url }}">{{ .Name }}</a></li>
<li class="sidebar-nav-item"><a href="{{ .URL }}">{{ .Name }}</a></li>
{{end}}
</ul>

Expand All @@ -24,7 +40,12 @@ <h1>{{ .Site.Author.name }}</h1>
</li>
</ul>

<p>Copyright &copy; {{ .Now.Format "2006" }} <a href="{{ .Site.BaseUrl }}/license">License</a><br/>
Powered by <a href="http://gohugo.io">Hugo</a> and <a href="https://github.com/zyro/hyde-x">Hyde-X</a></p>
<ul class="sidebar-nav">
<a href="http://shop.oreilly.com/product/0636920022022.do" class="sidebar-nav-item">Get the book</a>
<iframe src="{{ .Site.BaseURL }}/get-the-book-widget.html" height="500px" width="200px" scrolling="no" frameborder="0"></iframe>
</ul>

<div class="sidebar-sticky"><p>&copy; {{ .Now.Format "2006" }} Diego Zamboni<br/>
Powered by <a href="http://gohugo.io">Hugo</a> and <a href="https://github.com/zyro/hyde-x">Hyde-X</a></p></div>
</div>
</div>
6 changes: 3 additions & 3 deletions layouts/post/single.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ <h1>{{ .Title }}</h1>
<span class="post-date">{{ .Date.Format "Jan 2, 2006" }} &middot; {{ .ReadingTime }} minute read{{ if .Site.DisqusShortname }} &middot; <a href="{{ .Permalink }}#disqus_thread">Comments</a>{{ end }}
{{ if isset .Params "categories" }}
<br/>
{{ $baseUrl := .Site.BaseUrl }}
{{ range .Params.categories }}<a class="label" href="{{ $baseUrl }}/categories/{{ . | urlize }}">{{ . }}</a>{{ end }}
{{ $baseURL := .Site.BaseURL }}
{{ range .Params.categories }}<a class="label" href="{{ $baseURL }}/categories/{{ . | urlize }}">{{ . }}</a>{{ end }}
{{ end }}</span>
{{ .Content }}
</div>
Expand Down Expand Up @@ -37,4 +37,4 @@ <h1>{{ .Title }}</h1>
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
<a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
{{ end }}
{{ partial "foot.html" . }}
{{ partial "foot.html" . }}
34 changes: 34 additions & 0 deletions layouts/section/blog.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{{ partial "head.html" . }}
<div class="content container">
<div class="posts">
{{ $paginator := .Paginate (where .Data.Pages "Type" "blog") }}
{{ range $paginator.Pages }}
<div class="post">
<h1 class="post-title">
<a href="{{ .Permalink }}">{{ .Title }}</a>
</h1>
<span class="post-date">{{ .Date.Format "Jan 2, 2006" }} &middot; {{ .ReadingTime }} minute read{{ if .Site.DisqusShortname }} &middot; <a href="{{ .Permalink }}#disqus_thread">Comments</a>{{ end }}
{{ if isset .Params "categories" }}
<br/>
{{ $baseUrl := .Site.BaseURL }}
{{ range .Params.categories }}<a class="label" href="{{ $baseUrl }}/categories/{{ . | urlize }}">{{ . }}</a>{{ end }}
{{ end }}</span>
{{ .Content }}
</div>
{{ end }}
{{ template "_internal/pagination.html" . }}
</div>
</div>

{{ with .Site.DisqusShortname }}
<script type="text/javascript">
var disqus_shortname = {{ . }};
(function () {
var s = document.createElement('script'); s.async = true;
s.type = 'text/javascript';
s.src = '//' + disqus_shortname + '.disqus.com/count.js';
(document.getElementsByTagName('HEAD')[0] || document.getElementsByTagName('BODY')[0]).appendChild(s);
}());
</script>
{{ end }}
{{ partial "foot.html" . }}
72 changes: 71 additions & 1 deletion static/css/hyde-overrides.css
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
.sidebar-about h1 {
color: #fff;
margin-top: 0;
font-family: "Abril Fatface", serif;
font-family: 'Quattrocento', serif;
font-size: 2.5rem;
}

Expand All @@ -14,3 +14,73 @@
list-style: none;
margin-bottom: 1rem;
}

.sidebar-sticky {
font-size: 0.8rem;
}

.sidebar {
background-color: #51121E;
}

html {
font-family: 'Quattrocento Sans', sans-serif;
}

p.clip-attribute {
text-align: right;
font-size: 0.8rem;
}

/* From http://askthecssguy.com/articles/showing-hyperlink-cues-with-css/ */

/* all A tags whose HREF attribute ends in .pdf */
a[href$='.pdf'] {
padding-left: 18px;
background: transparent url(/new/icons/icon_pdf.gif) no-repeat center left;
}

/* all A tags whose REL attribute equals pdf */
a[rel='pdf'] {
padding-left: 18px;
background: transparent url(/new/icons/icon_pdf.gif) no-repeat center left;
}

/* all A tags whose REL attributes has the letters pdf somewhere mixed in*/
a[rel*='pdf'] {
padding-left: 18px;
background: transparent url(/new/icons/icon_pdf.gif) no-repeat center left;
}

/* all A tags whose REL attribute contains the value pdf, seperated from other values with a space */
a[rel~='pdf'] {
padding-left: 18px;
background: transparent url(/new/icons/icon_pdf.gif) no-repeat center left;
}

/* all A tags whose HREF attribute starts with mailto: */
a[href ^="mailto:"] {
padding-left: 18px;
background: transparent url(/new/icons/icon_mailto.gif) no-repeat center left;

}

/* all A tags whose CLASS attribute is popup */
a[class ="popup"] {
padding-left: 18px;
background: transparent url(/new/icons/icon_popup.gif) no-repeat center left;
}


a[href$='.doc'] {
padding-left: 18px;
background: transparent url(/new/icons/icon_doc.gif) no-repeat center left;
}
a[href$='.xls'] {
padding-left: 18px;
background: transparent url(/new/icons/icon_xls.gif) no-repeat center left;
}
a[rel ~='external'] {
padding-left: 18px;
background: transparent url(/new/icons/icon_external.gif) no-repeat center left;
}
1 change: 0 additions & 1 deletion static/css/poole.css
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,6 @@ blockquote p:last-child {
}

img {
display: block;
max-width: 100%;
margin: 0 0 1rem;
border-radius: 5px;
Expand Down
Loading