Make theme more generic, flexibility on description and home img
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
{{ end }}
|
||||
<article class="card-body">
|
||||
<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">
|
||||
<p>Posted <time datetime="{{ .PublishDate.Format "2006-01-02 12:00" }}">{{ .PublishDate.Format "Jan 2, 2006" }}</time></p>
|
||||
<p>{{ range .Params.categories }}#{{ . }} {{ end }}</p>
|
||||
@@ -4,19 +4,26 @@
|
||||
<body class="single-body">
|
||||
{{ partial "nav-bar.html" . }}
|
||||
<main class="content side-text-padding">
|
||||
<article class="post">
|
||||
<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="{{ .Site.BaseURL }}/{{.Params.featuredimage }}">
|
||||
<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" . }}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<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
|
||||
</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