Make theme more generic, flexibility on description and home img
This commit is contained in:
@@ -8,7 +8,7 @@
|
|||||||
{{ end }}
|
{{ end }}
|
||||||
<article class="card-body">
|
<article class="card-body">
|
||||||
<h2 class="card-title">{{ .Title }}</h2>
|
<h2 class="card-title">{{ .Title }}</h2>
|
||||||
<p class="card-text">{{ .Description }}</p>
|
<p class="card-text">{{ if (isset .Params "description") }}{{ index .Params "description" }}{{ else }}{{ .Summary }}{{ end }}</p>
|
||||||
<div class="card-subtext muted-text">
|
<div class="card-subtext muted-text">
|
||||||
<p>Posted <time datetime="{{ .PublishDate.Format "2006-01-02 12:00" }}">{{ .PublishDate.Format "Jan 2, 2006" }}</time></p>
|
<p>Posted <time datetime="{{ .PublishDate.Format "2006-01-02 12:00" }}">{{ .PublishDate.Format "Jan 2, 2006" }}</time></p>
|
||||||
<p>{{ range .Params.categories }}#{{ . }} {{ end }}</p>
|
<p>{{ range .Params.categories }}#{{ . }} {{ end }}</p>
|
||||||
@@ -4,19 +4,26 @@
|
|||||||
<body class="single-body">
|
<body class="single-body">
|
||||||
{{ partial "nav-bar.html" . }}
|
{{ partial "nav-bar.html" . }}
|
||||||
<main class="content side-text-padding">
|
<main class="content side-text-padding">
|
||||||
<article class="post">
|
<article class="post dropcase">
|
||||||
<header class="post-header">
|
<header class="post-header">
|
||||||
<h1 class="post-title">{{ .Title }}</h1>
|
<h1 class="post-title">{{ .Title }}</h1>
|
||||||
|
<p class="post-date">Posted <time datetime="{{ .Date.Format "2006-01-02" }}">{{ .Date.Format "Jan 2, 2006" }}</time></p>
|
||||||
</header>
|
</header>
|
||||||
{{ if isset .Params "featuredimage" }}
|
{{ if isset .Params "featuredimage" }}
|
||||||
<figure class="post-figure">
|
<figure class="post-figure">
|
||||||
<img src="{{ .Site.BaseURL }}/{{.Params.featuredimage }}">
|
<img src="{{.Params.featuredimage }}">
|
||||||
</figure>
|
</figure>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ .Content }}
|
{{ .Content }}
|
||||||
</article>
|
</article>
|
||||||
|
<!--
|
||||||
|
If you're going to use DISQUS comments, insert code here.
|
||||||
|
-->
|
||||||
</main>
|
</main>
|
||||||
<nav class="end-nav side-padding">
|
<nav class="end-nav side-padding">
|
||||||
|
{{ with .PrevPage }}
|
||||||
|
{{ .Render "li-next" }}
|
||||||
|
{{ end }}
|
||||||
{{ partial "home-card.html" . }}
|
{{ partial "home-card.html" . }}
|
||||||
</nav>
|
</nav>
|
||||||
{{ partial "scripts.html" . }}
|
{{ partial "scripts.html" . }}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<a ontouchstart="cardPressed.call(this)" ontouchend="cardReleased.call(this)" ontouchmove="cardReleased.call(this)"
|
<a ontouchstart="cardPressed.call(this)" ontouchend="cardReleased.call(this)" ontouchmove="cardReleased.call(this)"
|
||||||
href="/" class="card home-card" style="background-image: url({{ .Site.Params.homeimg }})" rel="bookmark" >
|
href="/" class="card home-card" style="background-image: url({{if isset .Site.Params "homeimg"}} {{ .Site.Params.homeimg }} {{ else }} /img/grey-cloud.jpg {{ end }})" rel="bookmark" >
|
||||||
Home
|
Home
|
||||||
</a>
|
</a>
|
||||||
@@ -1,31 +0,0 @@
|
|||||||
<!DOCTYPE html>
|
|
||||||
<html lang="{{ .Site.LanguageCode }}" dir="ltr">
|
|
||||||
{{ partial "head.html" . }}
|
|
||||||
<body class="single-body">
|
|
||||||
{{ partial "nav-bar.html" . }}
|
|
||||||
<main class="content side-text-padding">
|
|
||||||
<article class="post dropcase">
|
|
||||||
<header class="post-header">
|
|
||||||
<h1 class="post-title">{{ .Title }}</h1>
|
|
||||||
<p class="post-date">Posted <time datetime="{{ .Date.Format "2006-01-02" }}">{{ .Date.Format "Jan 2, 2006" }}</time></p>
|
|
||||||
</header>
|
|
||||||
{{ if isset .Params "featuredimage" }}
|
|
||||||
<figure class="post-figure">
|
|
||||||
<img src="{{.Params.featuredimage }}">
|
|
||||||
</figure>
|
|
||||||
{{ end }}
|
|
||||||
{{ .Content }}
|
|
||||||
</article>
|
|
||||||
<!--
|
|
||||||
If you're going to use DISQUS comments, insert code here.
|
|
||||||
-->
|
|
||||||
</main>
|
|
||||||
<nav class="end-nav side-padding">
|
|
||||||
{{ with .PrevPage }}
|
|
||||||
{{ .Render "li-next" }}
|
|
||||||
{{ end }}
|
|
||||||
{{ partial "home-card.html" . }}
|
|
||||||
</nav>
|
|
||||||
{{ partial "scripts.html" . }}
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
BIN
static/img/grey-cloud.jpg
Normal file
BIN
static/img/grey-cloud.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 908 KiB |
Reference in New Issue
Block a user