diff options
Diffstat (limited to 'templates')
| -rw-r--r-- | templates/base.html | 18 | ||||
| -rw-r--r-- | templates/blog.html | 17 | ||||
| -rw-r--r-- | templates/index.html | 59 | ||||
| -rw-r--r-- | templates/orphan.html | 5 | ||||
| -rw-r--r-- | templates/page.html | 27 | ||||
| -rw-r--r-- | templates/section.html | 10 |
6 files changed, 69 insertions, 67 deletions
diff --git a/templates/base.html b/templates/base.html index 75d108c..b903da3 100644 --- a/templates/base.html +++ b/templates/base.html @@ -5,16 +5,32 @@ <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no" /> <link rel="canonical" href="{{- current_url|safe -}}" /> <link rel="stylesheet" href="/css/custom.css" /> + <link rel="stylesheet" href="/css/carousel.css" /> <meta name="author" content="{{- config.author -}}" /> <meta name="description" content="{%- block description -%}{{- config.description -}}{%- endblock description -%}" /> <link rel="alternate" type="application/atom+xml" title="Blog posts" href="{{ get_url(path="/feed.xml", trailing_slash=false) }}" /> + <script src="/js/carousel.js"></script> <title>{% block title %}{{- config.title -}}{% endblock title %}</title> </head> <body> - {% block content %}{% endblock content %} + <div class="container"> + <nav class="menu"> + <ul> + <li><a href="/">Home</a></li> + <li><a href="/blog">Blog</a></li> + <li><a href="/notes">Notes</a></li> + <li><a href="/about">About</a></li> + <li><a href="https://git.fcuny.net">Code</a></li> + </ul> + </nav> + + <div class="content"> + {% block content %}{% endblock content %} + </div> + </div> </body> </html> diff --git a/templates/blog.html b/templates/blog.html index 0e3c2bf..cfdd8c2 100644 --- a/templates/blog.html +++ b/templates/blog.html @@ -1,20 +1,19 @@ {% extends "section.html" %} {%- block content -%} -<h1>{{ section.title }}</h1> -{%- for year, posts in section.pages | group_by(attribute="year") -%} -<section class="times"> -<h2>{{ year }}</h2> -<ul> +{%- for year, posts in section.pages | group_by(attribute="year") -%} +<section> +<ul class="post-list"> {%- for post in posts %} - <li> - <h3><a href="{{- post.path|safe -}}">{{- post.title -}}</a></h3> - <time datetime="{{ post.date | date(format="%+")}}">{{ post.date | date(format="%d %h %Y")}}</time> - </li> +<li> + <a href="{{- post.path|safe -}}">{{- post.title -}}</a> + <span class="post-date">{{ post.date | date(format="%d %h %Y")}}</span> +</li> {%- endfor %} </ul> </section> {%- endfor %} + {%- endblock content -%} diff --git a/templates/index.html b/templates/index.html index 5c11ab3..cf3e4b3 100644 --- a/templates/index.html +++ b/templates/index.html @@ -1,38 +1,33 @@ {% extends "base.html" %} {%- block content -%} -<section id="blog" class="times"> -{% if section.content %} -<section id="introduction"> - {{ section.content | safe }} -</section> -{% endif %} - -<h2>articles ⇢</h2> -{%- set blog = get_section(path="blog/_index.md") -%} -{%- set post_count = blog.pages | length -%} -{%- for post in blog.pages %} -<article> - <h3><a href="{{- post.path|safe -}}">{{- post.title -}}</a></h3> - <time datetime="{{ post.date | date(format="%+")}}">{{ post.date | date(format="%B %m, %Y")}}</time> -</article> -{%- endfor %} - -<h2>notes ⇢</h2> -{%- set notes = get_section(path="notes/_index.md") -%} -{%- set post_count = notes.pages | length -%} -{%- for post in notes.pages %} -<article> - <h3><a href="{{- post.path|safe -}}">{{- post.title -}}</a></h3> - <time datetime="{{ post.date | date(format="%+")}}">{{ post.date | date(format="%B %m, %Y")}}</time> -</article> -{%- endfor %} - -<h2>contact</h2> - -Email: <a href="mailto:franck@fcuny.net">franck@fcuny.net</a> - -</section> +<div class="content"> + <div id="blog" class="section times"> + <b>articles ⇢</b> + {%- set blog = get_section(path="blog/_index.md") -%} + {%- set post_count = blog.pages | length -%} + <ul class="post-list"> + {%- for post in blog.pages %} + <li> + <a href="{{ post.path | safe }}">{{ post.title }}</a> + <span class="post-date">{{ post.date | date(format="%B %d, %Y")}}</span> + </li> + {%- endfor %} + </ul> + + <b>notes ⇢</b> + {%- set notes = get_section(path="notes/_index.md") -%} + {%- set post_count = notes.pages | length -%} + <ul class="post-list"> + {%- for post in notes.pages %} + <li> + <a href="{{ post.path | safe }}">{{ post.title }}</a> + <span class="post-date">{{ post.date | date(format="%B %d, %Y")}}</span> + </li> + {%- endfor %} + </ul> + </div> +</div> {%- endblock content -%} diff --git a/templates/orphan.html b/templates/orphan.html index 2469ecf..020c8a6 100644 --- a/templates/orphan.html +++ b/templates/orphan.html @@ -4,7 +4,8 @@ {% block content -%} <main> -<h1>{{- page.title -}}</h1> -{{ page.content | safe -}} + <h1>{{- page.title -}}</h1> + + {{ page.content | safe -}} </main> {%- endblock content -%} diff --git a/templates/page.html b/templates/page.html index 1026cd0..53a7be3 100644 --- a/templates/page.html +++ b/templates/page.html @@ -4,25 +4,16 @@ {% block content -%} <main> -<h1>{{ page.title }}</h1> -<p class="date"> - <time datetime="{{ page.date | date(format="%+") }}"> - {{- page.date | date(format="%B %m, %Y") -}} - </time> - {%- if page.updated %} - • - updated <time datetime="{{ page.updated | date(format="%+") }}"> - {{- page.updated | date(format="%B %m, %Y") -}} - </time> - {%- endif %} -</p> + <h1>{{ page.title }}</h1> -{{ page.content | safe -}} -</main> + {{ page.content | safe -}} + + <p class="date"> + <time datetime="{{ page.date | date(format="%+") }}"> + {{- page.date | date(format="%B %m, %Y") -}} + </time> + </p> -<hr> -<p> -<b><a href="/">↑ back home</a></b> -</p> +</main> {%- endblock content %} diff --git a/templates/section.html b/templates/section.html index 7130c84..e6b6694 100644 --- a/templates/section.html +++ b/templates/section.html @@ -6,11 +6,11 @@ <h1>{{ section.title }}</h1> <ul> {% for post in section.pages %} - <li> - <a href="{{ post.permalink }}">{{ post.title }}</a> - <br> - <small>{{ post.date | date(format="%d %h %Y") }}</small> - </li> +<li> + <a href="{{ post.permalink }}">{{ post.title }}</a> + <br> + <small>{{ post.date | date(format="%d %h %Y") }}</small> +</li> {% endfor %} </ul> {% endblock content %} |
