Merge pull request #14 from mapitman/master

added ability to change the top image for each post
This commit is contained in:
Keichi Takahashi 2015-07-10 23:15:17 +09:00
commit cfc3cd6502
5 changed files with 55 additions and 3 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
*.swp

View File

@ -1,11 +1,12 @@
{{ partial "header.html" . }} {{ partial "header.html" . }}
<div class="article-list"> <div class="article-list">
{{ range $index, $page := .Site.Pages }} {{ range $index, $page := .Paginator.Pages }}
{{ if ne $index 0 }} {{ if ne $index 0 }}
<hr/> <hr/>
{{ end }} {{ end }}
{{ .Render "li" }} {{ .Render "li" }}
{{ end }} {{ end }}
</div> </div>
{{ partial "pagination.html" .Paginator }}
{{ partial "footer.html" . }} {{ partial "footer.html" . }}

View File

@ -41,7 +41,7 @@
{{ end }} {{ end }}
</head> </head>
<body> <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"> <section class="header-text">
<h1><a href="{{ .Site.BaseURL }}">{{ .Site.Title }}</a></h1> <h1><a href="{{ .Site.BaseURL }}">{{ .Site.Title }}</a></h1>
{{ with .Site.Params.subtitle }} {{ with .Site.Params.subtitle }}

View File

@ -0,0 +1,9 @@
<nav class="pagination" role="navigation">
{{if .HasPrev}}
<a class="newer-posts" href="{{ .Prev.URL }}">&laquo; Newer Posts</a>
{{end}}
<span class="page-number">Page {{ .PageNumber }} of {{.TotalPages}}</span>
{{if .HasNext}}
<a class="older-posts" href="{{ .Next.URL }}">Older Posts &raquo;</a>
{{end}}
</nav>

View File

@ -6,7 +6,7 @@ main {
/* Header */ /* Header */
.global-header { .global-header {
background-image: url(/images/bg.jpg); background: #222 no-repeat center center;
background-size: cover; background-size: cover;
} }
@ -216,6 +216,47 @@ a.btn-back {
color: rgba(255, 255, 255, 1.0); 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 */ /* Override some of Bootstrap's styles */
pre { pre {