Pulp modifications as shown at brandonrozek.com

This commit is contained in:
Brandon Rozek 2020-01-15 22:07:43 -05:00
parent 997422cd16
commit 74b08eaf7a
10 changed files with 82 additions and 17 deletions

View file

@ -7,28 +7,28 @@ body {
padding: 20px;
box-sizing:border-box;
background-color: #EFEFEF;
color: #707070;
color: #575757;
text-align: center;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
line-height: 1.5;
font-size: 16px;
font-size: 1.05rem;
word-wrap: break-word;
}
a:link {
color: #707070;
color: #575757;
}
a:visited {
color: #707070;
color: #575757;
}
a:hover {
color: #707070;
color: #575757;
}
a:active {
color: #707070;
color: #575757;
}
/* Header */
@ -72,14 +72,15 @@ footer {
nav ul {
display: flex;
justify-content: space-evenly;
max-width: 300px;
/* max-width: 300px; */
margin: 20px auto;
padding: 0;
list-style: none;
flex-wrap: wrap;
}
nav li {
flex: 1;
margin: 10px;
}
/* Contents List */
@ -170,3 +171,7 @@ nav li {
padding: 20px 0;
text-align: left;
}
.title {
font-family: 'Comfortaa';
}

View file

@ -14,7 +14,6 @@
{{ if (ne $index 0) }}
<hr class="separator">
{{ end }}
<p class="date">{{ .Key }}</p>
{{ range .Pages }}
<p><a href="{{ .Permalink }}">{{ .Title }}</a></p>
{{ end }}

View file

@ -1,9 +1,6 @@
{{ define "main"}}
<h1>{{ .Title }}</h1>
<h1 class='title'>{{ .Title }}</h1>
{{ partial "header.html" . }}
<!-- date -->
{{ $singlePageDateFormat := .Site.Params.singlePageDateFormat | default "January 2, 2006"}}
<p class="date">{{ .Date.Format $singlePageDateFormat }}</p>
<!-- content -->
<div id="contentBody">
{{ .Content }}

7
layouts/blog/baseof.html Normal file
View file

@ -0,0 +1,7 @@
<!DOCTYPE html>
<html>
{{ partial "head.html" . }}
<body>
{{ block "main" . }}{{ end }}
</body>
</html>

30
layouts/blog/list.html Normal file
View file

@ -0,0 +1,30 @@
{{ define "main"}}
{{ partial "header.html" . }}
<!-- search box -->
<div id="searchBox">
<input type="text" id="searchBoxInput" placeholder="Search..." />
<img id="searchBoxIcon" src="{{ .Site.BaseURL }}/img/search.png" />
</div>
<!-- search results -->
<div id="searchResults"></div>
<!-- contents -->
<div id="contentsList">
{{ $listPageDateFormat := .Site.Params.listPageDateFormat | default "January, 2006"}}
{{ range $index, $value := .Pages.GroupByDate $listPageDateFormat }}
{{ if (ne $index 0) }}
<hr class="separator">
{{ end }}
<p class="date">{{ .Key }}</p>
{{ range .Pages }}
<p><a href="{{ .Permalink }}">{{ .Title }}</a></p>
{{ end }}
{{ end }}
</div>
{{ partial "footer.html" . }}
{{ $jquery := resources.Get "js/jquery-3.3.1.min.js" }}
{{ $mark := resources.Get "js/jquery.mark.es6.min.js" }}
{{ $lunr := resources.Get "js/lunr.js" }}
{{ $search := resources.Get "js/search.js" }}
{{ $js := slice $jquery $mark $lunr $search | resources.Concat "bundle.js" | resources.Minify | resources.Fingerprint }}
<script src="{{ $js.Permalink }}"></script>
{{ end }}

9
layouts/blog/list.json Normal file
View file

@ -0,0 +1,9 @@
[{{ range $index, $page := .Pages }}{{ if ne $index 0 }},{{ end }}
{
"ref": "{{ $page.Permalink }}",
"title": {{ $page.Title | jsonify }},
"section": "{{ $page.Section }}",
"date" : {{ $page.Date.Format "2006.01.02" | jsonify }},
"body": {{ $page.Plain | jsonify }}
}
{{ end }}]

12
layouts/blog/single.html Normal file
View file

@ -0,0 +1,12 @@
{{ define "main"}}
<h1 class='title'>{{ .Title }}</h1>
{{ partial "header.html" . }}
<!-- date -->
{{ $singlePageDateFormat := .Site.Params.singlePageDateFormat | default "January 2, 2006"}}
<p class="date">{{ .Date.Format $singlePageDateFormat }}</p>
<!-- content -->
<div id="contentBody">
{{ .Content }}
</div>
{{ partial "footer.html" . }}
{{ end }}

View file

@ -11,7 +11,7 @@
<img src="/img/avatar-border.svg" alt="avatar-border">
</div>
<!-- author -->
<h1 class="author">{{ .Site.Params.Author }}</h1>
<h1 class="author title">{{ .Site.Params.Author }}</h1>
</header>
<!-- description -->
<p>

View file

@ -2,9 +2,15 @@
<p>
&copy; {{ .Site.Params.publicationYear }} {{ .Site.Params.Author }}.
Powered by <a href="https://gohugo.io/">Hugo</a>
using the <a href="https://github.com/koirand/pulp/">pulp</a> theme.
using a modified version of the <a href="https://github.com/koirand/pulp/">pulp</a> theme.
</p>
</footer>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
tex2jax: {inlineMath: [['$','$']]}
});
</script>
<script src='https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/latest.js?config=TeX-MML-AM_CHTML' async></script>
{{- range .Site.Params.custom_js -}}
<script src="{{ . }}"></script>
{{ end }}

View file

@ -19,7 +19,7 @@
{{ $css := slice $style $markdown $syntaxHighlight | resources.Concat "style.css" | resources.Minify | resources.Fingerprint }}
<link rel="stylesheet" href="{{ $css.Permalink }}">
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.8.1/css/all.css" integrity="sha384-50oBUHEmvpQ+1lW4y57PTFmhCaXp0ML5d60M1M7uH2+nqUivzIebhndOJK28anvf" crossorigin="anonymous">
<link href="https://fonts.googleapis.com/css?family=Comfortaa|Open+Sans&display=swap" rel="stylesheet">
<!-- custom css -->
{{ range .Site.Params.custom_css }}
<link rel="stylesheet" href="{{ . }}">