planblog/layouts/partials/header.html
Mark Pitman e1efac013b added ability to change the top image for each post
just add an "image" parameter in the front matter of your post
2015-06-25 23:05:57 -07:00

68 lines
2.7 KiB
HTML

<!DOCTYPE html>
<html lang="ja">
<head prefix="og: http://ogp.me/ns#">
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1" />
<meta property="og:title" content="{{ if ne .URL "/" }} {{ .Title }} &middot; {{ end }} {{ .Site.Title }}" />
{{ with .Site.Params.themecolor }}
<meta name="theme-color" content="{{ . }}" />
{{ end }}
<meta property="og:site_name" content="{{ .Site.Title }}" />
<meta property="og:url" content="{{ .Permalink }}" />
{{ with .Params.images }}{{ range first 5 . }}
<meta property="og:image" content="{{ . }}" />
{{ end }}{{ end }}
{{ if .IsPage }}
<meta property="og:type" content="article" />
{{ with .Site.Params.facebook }}
<meta property="og:article:author" content="https://facebook.com/{{ . }}" />
{{ end }}
<meta property="og:article:published_time" content="{{ .Date.Format "2006-01-02T15:04:05Z07:00" | safeHTML }}" />
{{ range .Params.tags }}
<meta property="og:article:tag" content="{{ . }}" />
{{ end }}
{{ else }}
<meta property="og:type" content="website" />
{{ end }}
<title>
{{ if ne .URL "/" }} {{ .Title }} &middot; {{ end }} {{ .Site.Title }}
</title>
<link rel="stylesheet" href="{{ .Site.BaseURL }}css/bootstrap.min.css" />
<link rel="stylesheet" href="{{ .Site.BaseURL }}css/main.css" />
<link rel="stylesheet" href="{{ .Site.BaseURL }}css/font-awesome.min.css" />
<link rel="stylesheet" href="{{ .Site.BaseURL }}css/github.css" />
<link rel="stylesheet" href="//fonts.googleapis.com/css?family=Source+Sans+Pro:200,300,400" type="text/css">
<link rel="shortcut icon" href="{{ .Site.BaseURL }}images/favicon.ico" />
<link rel="apple-touch-icon" href="{{ .Site.BaseURL }}images/apple-touch-icon.png" />
{{ if eq .URL "/" }}
<link href="{{ .RSSLink }}" rel="alternate" type="application/rss+xml" title="{{ .Site.Title }}" />
{{ end }}
</head>
<body>
<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 }}
<div class="tag-line">
{{ . }}
</div>
{{ end }}
{{ partial "link.html" . }}
{{ if ne .URL "/" }}
<a href="{{ .Site.BaseURL }}" class="btn-header btn-back hidden-xs">
<i class="fa fa-angle-left"></i>
&nbsp;Home
</a>
{{ end }}
{{ with .RSSLink }}
<a href="{{ . }}" class="btn-header btn-subscribe hidden-xs">
<i class="fa fa-rss"></i>
&nbsp;Subscribe
</a>
{{ end }}
</section>
</header>
<main class="container">