Merge pull request #14 from mapitman/master
added ability to change the top image for each post
This commit is contained in:
commit
cfc3cd6502
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
*.swp
|
@ -1,11 +1,12 @@
|
||||
{{ partial "header.html" . }}
|
||||
<div class="article-list">
|
||||
{{ range $index, $page := .Site.Pages }}
|
||||
{{ range $index, $page := .Paginator.Pages }}
|
||||
{{ if ne $index 0 }}
|
||||
<hr/>
|
||||
{{ end }}
|
||||
{{ .Render "li" }}
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ partial "pagination.html" .Paginator }}
|
||||
{{ partial "footer.html" . }}
|
||||
|
||||
|
@ -41,7 +41,7 @@
|
||||
{{ end }}
|
||||
</head>
|
||||
<body>
|
||||
<header class="global-header">
|
||||
<header class="global-header" style="background-image:url({{ if isset .Params "image" }}{{ .Params.image }} {{ else }} /images/bg.jpg {{ end }})">
|
||||
<section class="header-text">
|
||||
<h1><a href="{{ .Site.BaseURL }}">{{ .Site.Title }}</a></h1>
|
||||
{{ with .Site.Params.subtitle }}
|
||||
|
9
layouts/partials/pagination.html
Normal file
9
layouts/partials/pagination.html
Normal file
@ -0,0 +1,9 @@
|
||||
<nav class="pagination" role="navigation">
|
||||
{{if .HasPrev}}
|
||||
<a class="newer-posts" href="{{ .Prev.URL }}">« Newer Posts</a>
|
||||
{{end}}
|
||||
<span class="page-number">Page {{ .PageNumber }} of {{.TotalPages}}</span>
|
||||
{{if .HasNext}}
|
||||
<a class="older-posts" href="{{ .Next.URL }}">Older Posts »</a>
|
||||
{{end}}
|
||||
</nav>
|
@ -6,7 +6,7 @@ main {
|
||||
/* Header */
|
||||
|
||||
.global-header {
|
||||
background-image: url(/images/bg.jpg);
|
||||
background: #222 no-repeat center center;
|
||||
background-size: cover;
|
||||
}
|
||||
|
||||
@ -216,6 +216,47 @@ a.btn-back {
|
||||
color: rgba(255, 255, 255, 1.0);
|
||||
}
|
||||
|
||||
/* Pagination */
|
||||
|
||||
.pagination
|
||||
{
|
||||
width: 720px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.older-posts,.newer-posts
|
||||
{
|
||||
display: inline!important;
|
||||
border: 1px solid #ddd;
|
||||
border-radius: 15px;
|
||||
text-decoration: none;
|
||||
transition: border .3s ease;
|
||||
padding: 5px 14px;
|
||||
}
|
||||
|
||||
.page-number
|
||||
{
|
||||
display: inline-block;
|
||||
min-width: 100px;
|
||||
padding: 2px 0;
|
||||
}
|
||||
|
||||
.newer-posts
|
||||
{
|
||||
float: left;
|
||||
}
|
||||
|
||||
.older-posts
|
||||
{
|
||||
float: right;
|
||||
}
|
||||
|
||||
.older-posts:hover,.newer-posts:hover
|
||||
{
|
||||
color: #889093;
|
||||
border-color: #98a0a4;
|
||||
}
|
||||
|
||||
/* Override some of Bootstrap's styles */
|
||||
|
||||
pre {
|
||||
|
Loading…
Reference in New Issue
Block a user