summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README0
-rw-r--r--Rules31
-rw-r--r--content/about.rst2
-rw-r--r--content/css/blog.css170
-rw-r--r--content/css/blog_article.css230
-rw-r--r--content/css/cv.css84
-rw-r--r--content/css/cv_style.css.bak52
-rw-r--r--content/css/default.css118
-rw-r--r--content/css/internship.css82
-rw-r--r--content/imgs/logo.pngbin0 -> 67807 bytes
-rw-r--r--content/imgs/title.pngbin0 -> 49976 bytes
-rw-r--r--content/index.html11
-rw-r--r--layouts/about.html33
-rw-r--r--layouts/blog.html31
-rw-r--r--layouts/blog_article.html81
-rw-r--r--lib/filters/rbstfilter.rb11
-rw-r--r--lib/helpers/RstSemantic.rb18
-rw-r--r--lib/load_helpers.rb6
-rw-r--r--nanoc.yaml90
19 files changed, 1050 insertions, 0 deletions
diff --git a/README b/README
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/README
diff --git a/Rules b/Rules
new file mode 100644
index 0000000..12e8b2a
--- /dev/null
+++ b/Rules
@@ -0,0 +1,31 @@
+#!/usr/bin/env ruby
+
+compile '/**/*.html' do
+ filter :erb
+ layout '/blog.html'
+end
+
+compile '/**/*.rst' do
+ filter :rst
+ if item.identifier =~ /index.rst/
+ layout '/blog.html'
+ elsif item.identifier =~ /[0-9]{4}-[0-1][0-9]-[0-9]{1,2}\.[0-9]+\.rst/
+ layout '/blog_article.html'
+ else
+ layout '/about.html'
+ end
+end
+
+route '/**/*.{html,md,rst}' do
+ if item.identifier =~ '/index.*'
+ '/index.html'
+ else
+ item.identifier.without_ext + '.html'
+ end
+end
+
+compile '/**/*' do
+ write item.identifier.to_s
+end
+
+layout '/**/*', :erb
diff --git a/content/about.rst b/content/about.rst
new file mode 100644
index 0000000..ba8c0ce
--- /dev/null
+++ b/content/about.rst
@@ -0,0 +1,2 @@
+.. container:: content
+
diff --git a/content/css/blog.css b/content/css/blog.css
new file mode 100644
index 0000000..3f3036f
--- /dev/null
+++ b/content/css/blog.css
@@ -0,0 +1,170 @@
+/*
+body {
+ margin: 0 0 200px 0;
+}
+*/
+
+section#content {
+ padding: 1%;
+ width: 60%;
+ display: table-cell;
+ opacity: 1;
+}
+
+aside#left {
+ width: 20%;
+ padding: 0 calc(0.1 * 20%) 0 calc(0.1 * 20%);
+ min-width: 20%;
+}
+
+aside#right {
+ width: 20%;
+ padding: 0 calc(0.1 * 20%) 0 calc(0.1 * 20%);
+ min-width: 20%;
+}
+
+aside#left, aside#right {
+ display: table-cell;
+}
+
+div.art, div.boxleft, div.boxright {
+ margin: 0 0 20px 0;
+ background-color: white;
+ box-shadow: 0px 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
+ padding: 30px;
+ text-align: center;
+ opacity: 1;
+}
+
+div#content div.contents {
+ display: none;
+}
+
+div#content div.art > div.section {
+ padding: 1% 0 0 0;
+ width: 95%;
+ margin: 2%;
+}
+
+ul, ol, dl {
+ list-style-type: none;
+ padding: 0;
+}
+
+table ol,
+table ul,
+table dl {
+ list-style-position: inside;
+ text-align: left;
+}
+
+h1 a, h1 a:hover, h1 a:visited,
+h2 a, h2 a:hover, h2 a:visited,
+h3 a, h3 a:hover, h3 a:visited,
+h4 a, h4 a:hover, h4 a:visited,
+h5 a, h5 a:hover, h5 a:visited,
+h6 a, h6 a:hover, h6 a:visited {
+ text-decoration: none;
+ color: black;
+}
+
+div.section div.responsive-table {
+ width: 80%;
+ text-align: center;
+ margin: 0 0 1em 0;
+ padding: 0 0 0 7%;
+}
+
+div.section div.responsive-table > table {
+ width: 90%;
+ margin: 0 5% 1em 5%;
+ padding: 0;
+ border-collapse: collapse;
+ border-spacing: 0;
+}
+
+div.section th,
+div.section td {
+ text-align: center;
+ padding: 8px;
+}
+
+div.section th.field-name {
+ white-space:nowrap;
+}
+
+div.responsive-table {
+ overflow-x:auto;
+}
+
+div.section tr:nth-child(even) {
+ background-color: #cde2e5
+}
+
+div.section > h1 {
+ background-color: #cde2e5;
+ display: table;
+ text-align: left;
+ width: 95%;
+ font-size: 1.53em;
+ padding: 5px 0 5px 10px;
+ margin-bottom: 1.17em;
+ box-shadow: 0px 4px 8px 0 rgba(0, 0, 0, 0.2),
+ 0 6px 20px 0 rgba(0, 0, 0, 0.19);
+}
+
+div.section > h2 {
+ margin: 0 0 1.17em 5%;
+ border-bottom: 1px dashed #2196ff;
+ display: table;
+ text-align: left;
+ font-size: 1.17em;
+ padding: 5px 10px 5px 10px;
+}
+
+div.section p {
+ text-align: justify;
+}
+
+div.section > p {
+ width: 80%;
+ text-indent: 3em;
+ margin: 0 0 1em 7%;
+ text-align: justify;
+}
+
+div.section > ul,
+div.section > ol,
+div.section > dl {
+ width: calc(80% - 2em);
+ margin: 0 0 0 7%;
+ text-align: justify;
+ padding-left: 1em;
+}
+
+div.section > dl > dt,
+div.section > dl > dd {
+ float: left;
+ width: 50%;
+ padding: 0;
+ margin: 0 0 1em 0;
+}
+
+div.section > ul li > p,
+div.section > ol li > p,
+div.section > dl dt > p{
+ margin: 0 0 1em 0;
+}
+
+div.section > ul li,
+div.section > ol li {
+ margin: 0 0 1em 2em;
+}
+
+div.section ul {
+ list-style-type: disc;
+}
+
+div.section ol {
+ list-style-type: decimal;
+}
diff --git a/content/css/blog_article.css b/content/css/blog_article.css
new file mode 100644
index 0000000..2777bae
--- /dev/null
+++ b/content/css/blog_article.css
@@ -0,0 +1,230 @@
+/*
+body {
+ margin: 0 0 250px 0;
+}
+*/
+
+.progress-container {
+ clear: both;
+ width: 100%;
+ height: 4px;
+ background: rgba(204, 204, 204, 0.6);
+}
+
+.progress-bar {
+ height: 4px;
+ background: #2196FF;
+ width: 0%;
+}
+
+aside#left {
+ width: 20%;
+ padding: 0;
+ min-width: 20%;
+}
+
+aside#right {
+ width: 20%;
+ min-width: 20%;
+}
+
+aside#left, aside#right {
+ display: table-cell;
+}
+
+div.art {
+ /*box-shadow: 0px 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);*/
+ box-shadow: 8px 0px 4px -4px rgba(0, 0, 0, 0.2);
+ margin: 0 0 20px 0;
+ background-color: white;
+ padding: 30px;
+ text-align: center;
+ opacity: 1;
+}
+
+h1#article-title {
+ padding: 0 0 3px 0;
+ margin: 25px 16% 20px 16%;
+ border-bottom: 2px solid #3f7393;
+ text-align: center;
+}
+
+@media (min-width: 1024px) {
+ aside#right {
+ height: 100%;
+ }
+
+ aside#right div.contents {
+ border-left: 4px solid black;
+ text-align: center;
+ width: 20%;
+ margin: 3% 0% 3% 0%;
+ position: fixed;
+ }
+
+ aside#right div.contents p.topic-title {
+ display: none;
+ }
+
+ aside#right div.contents ul li,
+ aside#right div.contents ol li {
+ white-space: nowrap;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ padding-left: 1em;
+ margin: 5px;
+ text-align: left;
+ }
+
+ aside#right div.contents ul li > a.active-section,
+ aside#right div.contents ol li > a.active-section {
+ text-align: left;
+ font-size: 110%;
+ font-weight: bold;
+ text-shadow: 2px 2px #ccc;
+ }
+
+ aside#right div.contents ul li a,
+ aside#right div.contents ol li a {
+ text-decoration: none;
+ color: black;
+ }
+}
+
+@media (max-width: 1023px) {
+ aside#right {
+ display: none;
+ }
+}
+
+
+
+div#content div.document > div.section {
+ padding: 1% 0 0 0;
+ width: 70%;
+ margin: 20px 0 0 25%;
+}
+
+
+ul, ol, dl {
+ list-style-type: none;
+ padding: 0;
+}
+
+table ol,
+table ul,
+table dl {
+ list-style-position: inside;
+ text-align: left;
+}
+
+h1 a, h1 a:hover, h1 a:visited,
+h2 a, h2 a:hover, h2 a:visited,
+h3 a, h3 a:hover, h3 a:visited,
+h4 a, h4 a:hover, h4 a:visited,
+h5 a, h5 a:hover, h5 a:visited,
+h6 a, h6 a:hover, h6 a:visited {
+ text-decoration: none;
+ color: black;
+}
+
+div.section div.responsive-table {
+ width: 80%;
+ text-align: center;
+ margin: 0 0 1em 0;
+ padding: 0 0 0 7%;
+}
+
+div.section div.responsive-table > table {
+ width: 90%;
+ margin: 0 5% 1em 5%;
+ padding: 0;
+ border-collapse: collapse;
+ border-spacing: 0;
+}
+
+div.section th,
+div.section td {
+ text-align: center;
+ padding: 8px;
+}
+
+div.section th.field-name {
+ white-space:nowrap;
+}
+
+div.responsive-table {
+ overflow-x:auto;
+}
+
+div.section tr:nth-child(even) {
+ background-color: #cde2e5
+}
+
+div.section > h1 {
+ background-color: #cde2e5;
+ display: table;
+ text-align: left;
+ width: 100%;
+ font-size: 1.53em;
+ padding: 5px 0 5px 10px;
+ margin-bottom: 1.17em;
+ box-shadow: 0px 4px 8px 0 rgba(0, 0, 0, 0.2),
+ 0 6px 20px 0 rgba(0, 0, 0, 0.19);
+}
+
+div.section > h2 {
+ margin: 0 0 1.17em 5%;
+ border-bottom: 1px dashed #2196ff;
+ display: table;
+ text-align: left;
+ font-size: 1.17em;
+ padding: 5px 10px 5px 10px;
+}
+
+div.section p {
+ text-align: justify;
+}
+
+div.section > p {
+ width: 80%;
+ text-indent: 3em;
+ margin: 0 0 1em 7%;
+ text-align: justify;
+}
+
+div.section > ul,
+div.section > ol,
+div.section > dl {
+ width: calc(80% - 2em);
+ margin: 0 0 0 7%;
+ text-align: justify;
+ padding-left: 1em;
+}
+
+div.section > dl > dt,
+div.section > dl > dd {
+ float: left;
+ width: 50%;
+ padding: 0;
+ margin: 0 0 1em 0;
+}
+
+div.section > ul li > p,
+div.section > ol li > p,
+div.section > dl dt > p{
+ margin: 0 0 1em 0;
+}
+
+div.section > ul li,
+div.section > ol li {
+ margin: 0 0 1em 2em;
+}
+
+div.section ul {
+ list-style-type: disc;
+}
+
+div.section ol {
+ list-style-type: decimal;
+}
diff --git a/content/css/cv.css b/content/css/cv.css
new file mode 100644
index 0000000..0fe9e34
--- /dev/null
+++ b/content/css/cv.css
@@ -0,0 +1,84 @@
+.panel {
+ overflow: hidden;
+ display: inline-block;
+ width: 95%;
+ transition: max-height 0.2s ease-out;
+}
+
+section#content {
+ padding: 1%;
+ width: 70%;
+ display: table-cell;
+ opacity: 1;
+}
+
+aside#left, aside#right {
+ width: 15%;
+ padding: 0 calc(0.1 * 15%) 0 calc(0.1 * 15%);
+ display: table-cell;
+ min-width: 15%;
+}
+
+div.section h1:after {
+ content: '\2014';
+ color: #496c94;
+ float: right;
+ margin-right: 1%;
+}
+
+div.section h1.active:after {
+ content: "+";
+}
+
+div.section h1 {
+ cursor: pointer;
+ background-color: #cde2e5;
+ display: table;
+ text-align: left;
+ width: 100%;
+ font-size: 1.17em;
+ padding: 5px 0 5px 10px;
+ box-shadow: 0px 4px 8px 0 rgba(0, 0, 0, 0.2),
+ 0 6px 20px 0 rgba(0, 0, 0, 0.19);
+}
+
+div.section {
+ text-align: center;
+ margin: 0 2% 20px 2%;
+ width: 95%;
+ display: inline-block;
+}
+
+.panel {
+ padding: 15px 0 0 0;
+}
+
+div.boxright, div.boxleft {
+ margin: 0 0 20px 0;
+ background-color: white;
+ box-shadow: 0px 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
+ padding: 30px;
+ text-align: center;
+ opacity: 1;
+}
+
+table {
+ text-align: left;
+ border: transparent;
+ width: 100%
+}
+
+tr, td {
+ border: transparent;
+}
+
+table.footnote {
+ table-layout: fixed;
+ padding: 15px 0 0 0;
+ text-align: left;
+}
+
+table.footnote :nth-child(1) {
+ width: 2em;
+}
+
diff --git a/content/css/cv_style.css.bak b/content/css/cv_style.css.bak
new file mode 100644
index 0000000..297aa67
--- /dev/null
+++ b/content/css/cv_style.css.bak
@@ -0,0 +1,52 @@
+.accordion {
+ cursor: pointer;
+}
+
+.panel {
+ overflow: hidden;
+ display: inline-block;
+ transition: max-height 0.2s ease-out;
+}
+
+section#content article h1.accordion:after {
+ content: '—';
+ color: #496c94;
+ float: right;
+ margin-right: 1%;
+}
+
+section#content article h1.active:after {
+ content: "+";
+}
+
+section#content h1 {
+ background-color: #cde2e5;
+ display: table;
+ text-align: left;
+ width: 100%;
+ padding: 5px 0 5px 10px;
+ box-shadow: 0px 4px 8px 0 rgba(0, 0, 0, 0.2),
+ 0 6px 20px 0 rgba(0, 0, 0, 0.19);
+}
+
+section#content > article {
+ margin: 0 2% 20px 2%;
+ width: 95%;
+ display: inline-block;
+ text-align: left;
+}
+
+section#content .panel {
+ padding: 15px 0 0 0;
+}
+
+div.boxright, div.boxleft {
+ margin: 0 0 20px 0;
+ background-color: white;
+ box-shadow: 0px 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
+ padding: 30px;
+ text-align: center;
+ opacity: 1;
+}
+
+
diff --git a/content/css/default.css b/content/css/default.css
new file mode 100644
index 0000000..a9b8a93
--- /dev/null
+++ b/content/css/default.css
@@ -0,0 +1,118 @@
+* { margin: 0 }
+
+html {
+ position: relative;
+ min-height: 100%;
+}
+
+body {
+ font-family: Arial, Helvetica, sans-serif;
+}
+
+body > header {
+ width: 100%;
+ height: 200px;
+ background-image: url("../imgs/title.png");
+}
+
+body > header div#logo {
+ float: right;
+ width: 214px;
+ height: 180px;
+ margin: 10px 0 10px 0;
+ background-repeat: no-repeat;
+ background-image: url("../imgs/logo.png");
+ display: inline-block;
+ opacity: 0.45;
+}
+
+/*
+body > footer {
+ box-shadow: 0px -4px 8px 0 rgba(0, 0, 0, 0.2);
+ background-color: #3f7393;
+ height: 200px;
+ position: absolute;
+ bottom: 0;
+ left: 0;
+ right: 0;
+ width: 100%;
+}
+*/
+
+body > div#wrapper {
+ width: 100%;
+ display: table;
+ margin: 2% 0 2% 0;
+}
+
+nav.topnav {
+ display: block;
+ width: 100%;
+ overflow: hidden;
+ background-color: #3f7393;
+ position: sticky;
+ top: 0;
+ z-index: 1;
+ box-shadow: 0px 4px 8px 0 rgba(0, 0, 0, 0.2);
+}
+
+nav.topnav a {
+ display: inline-block;
+ color: white;
+ text-align: center;
+ padding: 14px 16px;
+ text-decoration: none;
+ font-size: 17px;
+}
+
+nav.topnav span {
+ display: inline-block;
+ color: white;
+ text-align: center;
+ padding: 14px 16px;
+ text-decoration: none;
+ font-size: 17px;
+}
+
+nav.topnav div.outer-title {
+ padding: 0 15px 0 10px;
+ overflow: hidden;
+ text-align: center;
+ padding: 12px 16px;
+ color: white;
+ font-size: 20px;
+}
+
+nav.topnav div.outer-title > div.inner-title {
+ width: 100%;
+}
+
+nav.topnav a.left {
+ float: left;
+}
+
+nav.topnav a.right {
+ float: right;
+}
+
+nav.topnav a:hover {
+ color: black;
+}
+
+nav.topnav a.active {
+ background-color: #2196F3;
+ color: white;
+}
+
+nav.topnav span.active {
+ background-color: #2196F3;
+ color: white;
+}
+
+.footnote-reference {
+ font-size: 80%;
+}
+
+.content {
+ text-align: left;
+}
diff --git a/content/css/internship.css b/content/css/internship.css
new file mode 100644
index 0000000..7c80eb6
--- /dev/null
+++ b/content/css/internship.css
@@ -0,0 +1,82 @@
+section#content {
+ padding: 1%;
+ width: 70%;
+ display: table-cell;
+ opacity: 1;
+}
+
+aside#left, aside#right {
+ width: 15%;
+ padding: 0 calc(0.1 * 15%) 0 calc(0.1 * 15%);
+ display: table-cell;
+ min-width: 15%;
+}
+
+.panel {
+ overflow: hidden;
+ display: inline-block;
+ width: 95%;
+ transition: max-height 0.2s ease-out;
+}
+
+a, a:visited, a:hover {
+ cursor: pointer;
+ color: black;
+ text-decoration: none;
+}
+
+section#content > h1 {
+ padding: 0 0 3px 0;
+ margin: 5px 0 20px 0;
+ border-bottom: 2px solid #3f7393;
+ text-align: center;
+}
+
+div.section > h1:after {
+ content: '\2014';
+ color: #496c94;
+ float: right;
+ margin-right: 1%;
+}
+
+div.section > h1.active:after {
+ content: "+";
+}
+
+div.section h1 {
+ cursor: pointer;
+ background-color: #cde2e5;
+ display: table;
+ text-align: left;
+ width: 100%;
+ font-size: 1.17em;
+ padding: 5px 0 5px 10px;
+ box-shadow: 0px 4px 8px 0 rgba(0, 0, 0, 0.2),
+ 0 6px 20px 0 rgba(0, 0, 0, 0.19);
+}
+
+div.section {
+ margin: 0 2% 20px 2%;
+ text-align: center;
+ width: 95%;
+ display: inline-block;
+}
+
+.panel {
+ text-align: left;
+ padding: 15px 0 0 0;
+}
+
+div.boxright, div.boxleft {
+ margin: 0 0 20px 0;
+ background-color: white;
+ box-shadow: 0px 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
+ padding: 30px;
+ text-align: center;
+ opacity: 1;
+}
+
+table {
+ border: transparent;
+ width: 100%
+}
diff --git a/content/imgs/logo.png b/content/imgs/logo.png
new file mode 100644
index 0000000..386bba9
--- /dev/null
+++ b/content/imgs/logo.png
Binary files differ
diff --git a/content/imgs/title.png b/content/imgs/title.png
new file mode 100644
index 0000000..41d7e3d
--- /dev/null
+++ b/content/imgs/title.png
Binary files differ
diff --git a/content/index.html b/content/index.html
new file mode 100644
index 0000000..7ad1887
--- /dev/null
+++ b/content/index.html
@@ -0,0 +1,11 @@
+<% sorted_articles.each do |post| %>
+ <div class='art'>
+ <div style="float: left;">日付: <%= post[:created_at] %></div>
+ <div style="float: right">タグ: <%= post[:tags].join("・") %></div>
+ <div style="clear: both"></div>
+ <h1><%= link_to post[:title], post.path %></h1>
+ <%= get_summary(post.compiled_content) %>
+ <div style="float: right;"><%= link_to "つづき", post.path %></div>
+ </div>
+<% end %>
+
diff --git a/layouts/about.html b/layouts/about.html
new file mode 100644
index 0000000..402ce56
--- /dev/null
+++ b/layouts/about.html
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
+ <link rel="stylesheet" href="../../css/default.css">
+ <link rel="stylesheet" href="../../css/blog.css">
+ <meta charset="UTF-8">
+</head>
+<body>
+
+<nav class="topnav">
+ <%= link_to('ホーム', '/index.html', {class: 'left'}) %>
+ <%= link_to('詳細', '/about.html', {class: 'right active'}) %>
+ <div class="outer-title"><div class="inner-title">水瓶</div></div>
+</nav>
+
+<div id="title"></div>
+<div id="wrapper">
+
+ <aside id="left">
+ </aside>
+
+ <div id="content">
+ <div class="art">
+ <%= yield %>
+ </div>
+ </div>
+ <aside id="right">
+ </aside>
+</div>
+<footer></footer>
+</body>
+</html>
diff --git a/layouts/blog.html b/layouts/blog.html
new file mode 100644
index 0000000..6cbfa14
--- /dev/null
+++ b/layouts/blog.html
@@ -0,0 +1,31 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
+ <link rel="stylesheet" href="../../css/default.css">
+ <link rel="stylesheet" href="../../css/blog.css">
+ <meta charset="UTF-8">
+</head>
+<body>
+
+<nav class="topnav">
+ <%= link_to('ホーム', '/index.html', {class: 'left active'}) %>
+ <%= link_to('詳細', '/about.html', {class: 'right'}) %>
+ <div class="outer-title"><div class="inner-title">水瓶</div></div>
+</nav>
+
+<div id="title"></div>
+<div id="wrapper">
+
+ <aside id="left">
+ </aside>
+
+ <div id="content">
+ <%= yield %>
+ </div>
+ <aside id="right">
+ </aside>
+</div>
+<footer></footer>
+</body>
+</html>
diff --git a/layouts/blog_article.html b/layouts/blog_article.html
new file mode 100644
index 0000000..48a7064
--- /dev/null
+++ b/layouts/blog_article.html
@@ -0,0 +1,81 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
+ <link rel="stylesheet" href="../../css/default.css">
+ <link rel="stylesheet" href="../../css/blog_article.css">
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+ <link rel="icon" type="image/png" href="../../imgs/logo.png" />
+ <title><%= @item[:title] %></title>
+ <meta charset="UTF-8">
+</head>
+<body>
+
+<nav class="topnav">
+ <div class="progress-container">
+ <div class="progress-bar" id="scrollindicator"></div>
+ </div>
+ <div>
+ <%= link_to('ホーム', '/index.html', {class: 'left'}) %>
+ <%= link_to('詳細', '/about.html', {class: 'right'}) %>
+ <div class="outer-title"><div class="inner-title">水瓶 — <%= @item[:title] %></div></div>
+ </div>
+</nav>
+
+
+<div id="wrapper">
+<aside id="left"></aside>
+<div class="art">
+<div id="content">
+ <%= get_content(yield) %>
+</div>
+</div>
+ <div style="clear: both"></div>
+ <div style="float: left;">日付: <%= @item[:created_at] %></div>
+ <div style="float: right">タグ: <%= @item[:tags].join("・") %></div>
+<aside id="right"><%= get_toc(yield) %></aside>
+</div>
+
+<footer></footer>
+<script>
+window.onscroll = function() { scrollUpdate(); sectionUpdate(); };
+
+var section = document.querySelectorAll("div.section a.toc-backref");
+var sectionLinks = document.querySelectorAll("div.contents a.reference");
+var sections = {};
+var i = 0;
+
+Array.prototype.forEach.call(section, function(e) {
+ sections[e.href.split('#')[1]] = e.offsetTop - 0.5 * document.documentElement.clientHeight;
+});
+
+Array.prototype.forEach.call(sectionLinks, function(e) {
+ e.onclick = function () {
+ setTimeout(function(){
+ var scrollPosition = document.documentElement.scrollTop || document.body.scrollTop;
+ window.scrollTo(0, scrollPosition - 48)
+ }, 1);
+ }
+});
+
+document.querySelector("div.contents a.reference").classList.add('active-section');
+
+function scrollUpdate() {
+ var winScroll = document.body.scrollTop || document.documentElement.scrollTop;
+ var height = document.documentElement.scrollHeight - document.documentElement.clientHeight;
+ var scrolled = (winScroll / height) * 100;
+ document.getElementById("scrollindicator").style.width = scrolled + "%";
+}
+
+function sectionUpdate() {
+ var scrollPosition = document.documentElement.scrollTop || document.body.scrollTop;
+ for (i in sections) {
+ if (sections[i] <= scrollPosition) {
+ document.querySelector('.active-section').classList.remove('active-section');
+ document.querySelector('a[id=' + i + ']').classList.add('class', 'active-section');
+ }
+ }
+};
+</script>
+</body>
+</html>
diff --git a/lib/filters/rbstfilter.rb b/lib/filters/rbstfilter.rb
new file mode 100644
index 0000000..8a415d8
--- /dev/null
+++ b/lib/filters/rbstfilter.rb
@@ -0,0 +1,11 @@
+module RbSTFilter
+ class RbST < Nanoc::Filter
+ identifier :rst
+
+ require 'rbst'
+
+ def run(content, params = {})
+ ::RbST.new(content).to_html
+ end
+ end
+end
diff --git a/lib/helpers/RstSemantic.rb b/lib/helpers/RstSemantic.rb
new file mode 100644
index 0000000..ac18f9d
--- /dev/null
+++ b/lib/helpers/RstSemantic.rb
@@ -0,0 +1,18 @@
+require 'nokogiri'
+
+module RstSemantic
+ def get_toc(raw)
+ doc = Nokogiri::HTML(raw)
+ return doc.css("div.contents").to_s.gsub(/<li>.*Summary<\/a><\/li>/, '')
+ end
+
+ def get_content(raw)
+ doc = Nokogiri::HTML(raw)
+ return doc.css("div.document > div.section")[1..-1]
+ end
+
+ def get_summary(raw)
+ doc = Nokogiri::HTML(raw)
+ return doc.css("div.section").first.to_s.gsub(/<h1>.*<\/h1>/, '')
+ end
+end
diff --git a/lib/load_helpers.rb b/lib/load_helpers.rb
new file mode 100644
index 0000000..458fbf4
--- /dev/null
+++ b/lib/load_helpers.rb
@@ -0,0 +1,6 @@
+include Nanoc::Helpers::Blogging
+include Nanoc::Helpers::Tagging
+include Nanoc::Helpers::Rendering
+include Nanoc::Helpers::LinkTo
+
+use_helper RstSemantic
diff --git a/nanoc.yaml b/nanoc.yaml
new file mode 100644
index 0000000..ae2d4bd
--- /dev/null
+++ b/nanoc.yaml
@@ -0,0 +1,90 @@
+# The syntax to use for patterns in the Rules file. Can be either `"glob"`
+# (default) or `"legacy"`. The former will enable glob patterns, which behave
+# like Ruby’s File.fnmatch. The latter will enable Nanoc 3.x-style patterns.
+string_pattern_type: glob
+
+# A list of file extensions that Nanoc will consider to be textual rather than
+# binary. If an item with an extension not in this list is found, the file
+# will be considered as binary.
+text_extensions: [ 'adoc', 'asciidoc', 'atom', 'coffee', 'css', 'erb', 'haml', 'handlebars', 'hb', 'htm', 'html', 'js', 'less', 'markdown', 'md', 'ms', 'mustache', 'php', 'rb', 'rdoc', 'sass', 'scss', 'slim', 'txt', 'xhtml', 'xml', 'rst' ]
+
+# The path to the directory where all generated files will be written to. This
+# can be an absolute path starting with a slash, but it can also be path
+# relative to the site directory.
+output_dir: output
+
+# A list of index filenames, i.e. names of files that will be served by a web
+# server when a directory is requested. Usually, index files are named
+# “index.html”, but depending on the web server, this may be something else,
+# such as “default.htm”. This list is used by Nanoc to generate pretty URLs.
+index_filenames: [ 'index.html' ]
+
+# Whether or not to generate a diff of the compiled content when compiling a
+# site. The diff will contain the differences between the compiled content
+# before and after the last site compilation.
+enable_output_diff: false
+
+prune:
+ # Whether to automatically remove files not managed by Nanoc from the output
+ # directory.
+ auto_prune: true
+
+ # Which files and directories you want to exclude from pruning. If you version
+ # your output directory, you should probably exclude VCS directories such as
+ # .git, .svn etc.
+ exclude: [ '.git', '.hg', '.svn', 'CVS' ]
+
+# The data sources where Nanoc loads its data from. This is an array of
+# hashes; each array element represents a single data source. By default,
+# there is only a single data source that reads data from the “content/” and
+# “layout/” directories in the site directory.
+data_sources:
+ -
+ # The type is the identifier of the data source.
+ type: filesystem
+
+ # The path where items should be mounted (comparable to mount points in
+ # Unix-like systems). This is “/” by default, meaning that items will have
+ # “/” prefixed to their identifiers. If the items root were “/en/”
+ # instead, an item at content/about.html would have an identifier of
+ # “/en/about/” instead of just “/about/”.
+ items_root: /
+
+ # The path where layouts should be mounted. The layouts root behaves the
+ # same as the items root, but applies to layouts rather than items.
+ layouts_root: /
+
+ # The encoding to use for input files. If your input files are not in
+ # UTF-8 (which they should be!), change this.
+ encoding: utf-8
+
+ # The kind of identifier to use for items and layouts. The default is
+ # “full”, meaning that identifiers include file extensions. This can also
+ # be “legacy”, primarily used by older Nanoc sites.
+ identifier_type: full
+
+# Configuration for the “check” command, which run unit tests on the site.
+checks:
+ # Configuration for the “internal_links” checker, which checks whether all
+ # internal links are valid.
+ internal_links:
+ # A list of patterns, specified as regular expressions, to exclude from the check.
+ # If an internal link matches this pattern, the validity check will be skipped.
+ # E.g.:
+ # exclude: ['^/server_status']
+ exclude: []
+
+ # Configuration for the “external_links” checker, which checks whether all
+ # external links are valid.
+ external_links:
+ # A list of patterns, specified as regular expressions, to exclude from the check.
+ # If an external link matches this pattern, the validity check will be skipped.
+ # E.g.:
+ # exclude: ['^http://example.com$']
+ exclude: []
+
+ # A list of file patterns, specified as regular expressions, to exclude from the check.
+ # If a file matches this pattern, the links from this file will not be checked.
+ # E.g.:
+ # exclude_files: ['blog/page']
+ exclude_files: []