wiki/_layouts/default.html

117 lines
4.2 KiB
HTML

---
layout: compress
---
{% comment %}サイドメニューのMarkdownを読み込み、HTMLに変換{% endcomment %}
{% capture menu_markdown %}{% include menu.md %}{% endcapture %}
{% assign menu = (menu_markdown | markdownify) %}
{% comment %}SCSSを読み込み、CSSに変換{% endcomment %}
{% capture style_scss %}{% include style.scss %}{{ page.custom-style }}{% endcapture %}
{% assign style = (style_scss | scssify) %}
{% comment %}アイコンのURL{% endcomment %}
{% assign icon_url = (site.github.url | append: "/images/icon.png") %}
{% capture amp-boilerplate %}
body{-webkit-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-moz-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-ms-animation:-amp-start 8s steps(1,end) 0s 1 normal both;animation:-amp-start 8s steps(1,end) 0s 1 normal both}@-webkit-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-moz-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-ms-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-o-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}
{% endcapture %}
{% capture amp-boilerplate-noscript %}
body{-webkit-animation:none;-moz-animation:none;-ms-animation:none;animation:none}
{% endcapture %}
<!doctype html>
<html amp lang="ja">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,minimum-scale=1,initial-scale=1">
<meta name="theme-color" content="{{ site.wiki.theme_color }}">
<link rel="shortcut icon" href="{{ icon_url }}">
<link rel="apple-touch-icon" href="{{ icon_url }}">
<script async src="https://cdn.ampproject.org/v0.js"></script>
<script async custom-element="amp-sidebar" src="https://cdn.ampproject.org/v0/amp-sidebar-0.1.js"></script>
<style amp-custom>{{ style }}</style>
<style amp-boilerplate>{{ amp-boilerplate }}</style>
<noscript>
<style amp-boilerplate>{{ amp-boilerplate-noscript }}</style>
</noscript>
{% seo %}
{{ page.custom-head }}
</head>
<body>
{% comment %}コンテナ{% endcomment %}
<div id="container">
{% comment %}ヘッダ{% endcomment %}
<header>
{% comment %}Wikiタイトル{% endcomment %}
<a href="{{ site.github.url }}">
<amp-img
height = "2em"
width = "2em"
alt = ""
src = "{{ site.github.url }}/images/icon.svg">
</amp-img>
{{ site.wiki.title }}
</a>
{% comment %}モバイルメニュー表示ボタン{% endcomment %}
<button on="tap:sidebar.open">
<amp-img
height = "2em"
width = "2em"
alt = "メニュー"
src = "{{ site.github.url }}/images/menu.svg">
</amp-img>
</button>
</header>
{% comment %}左メニュー{% endcomment %}
<nav id="menu" class="article">
<h1 class="title">メニュー</h1>
<div class="body">{{ menu }}</div>
</nav>
{% comment %}本文{% endcomment %}
<article id="content" class="article">
<h1 class="title">
{{ page.title }}
<a title="GitHubで編集" href="{{ site.github.repository_url }}/edit/gh-pages/{{ page.path }}">
<amp-img
class = "edit"
height = "0.75em"
width = "0.75em"
alt = "編集"
src = "{{ site.github.url }}/images/edit.svg"
media = "{{ site.media-desktop }}">
</amp-img>
</a>
</h1>
<div class="body">{{ content }}</div>
</article>
{% comment %}フッタ{% endcomment %}
<footer>
© {{ site.time | date: "%Y" }} <a href="https://minetest-jp.github.io">Minetest-JP Team</a>
</footer>
</div>
{% comment %}モバイルメニュー{% endcomment %}
<amp-sidebar id="sidebar" side="left" layout="nodisplay">
<button on="tap:sidebar.close">
<amp-img
height = "2em"
width = "2em"
alt = "閉じる"
src="{{ site.github.url }}/images/menu_close.svg">
</amp-img>
</button>
{{ menu }}
</amp-sidebar>
</body>
</html>