OMG FEATURE PARITY WITH REACT
... almost. It looks identical, just some minor things to fix up. Yes! the templates exist now and work!! Add `clean` back to `make all` and use `-c` in `gsutil rsync`, which will ignore mtime and use checksums when comparing files instead, meaning we don't have to re-upload all of /media/ every time! (^_^) Also fix a broken link to the kegerator project page
This commit is contained in:
parent
3d4e86c462
commit
7308419301
8 changed files with 304 additions and 3 deletions
92
templates/base.html
Normal file
92
templates/base.html
Normal file
|
|
@ -0,0 +1,92 @@
|
|||
<!DOCTYPE html>
|
||||
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>{{ site.title }} - {% block page_title %}{% endblock %}</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
|
||||
<link href="https://fonts.googleapis.com/css?family=Raleway:400,300,600" rel="stylesheet" type="text/css" />
|
||||
<link href="https://fonts.googleapis.com/css?family=Quicksand" rel="stylesheet" type="text/css" />
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/github-gist.min.css">
|
||||
|
||||
<link rel="stylesheet" href="{{ "css/normalize.css" | media_url }}" />
|
||||
<link rel="stylesheet" href="{{ "css/skeleton.css" | media_url }}" />
|
||||
<link rel="stylesheet" href="{{ "css/font-awesome.css" | media_url }}" />
|
||||
|
||||
<link rel="stylesheet" href="{{ "css/index.css" | media_url }}" />
|
||||
</head>
|
||||
<body>
|
||||
<div class="page-header">
|
||||
<div class="container">
|
||||
<a href="{{ site.base_url }}">
|
||||
<h1>{{ site.title }}</h1>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="container">
|
||||
<div id="main" class="row">
|
||||
<div class="two columns nav">
|
||||
<div class="row">
|
||||
<ul>
|
||||
<li>
|
||||
<a href="{{ site.base_url }}">
|
||||
Home
|
||||
</a>
|
||||
</li>
|
||||
{% for page in site.pages %}
|
||||
{% if page.parent == None %}
|
||||
<li>
|
||||
<a href="{{ page.url() }}">
|
||||
{{ page.title }}
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
<li>
|
||||
<a href="/rss.xml">
|
||||
<i class="fa fa-rss-square"></i>
|
||||
RSS
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<h5 class="nav-header">Top Tags</h5>
|
||||
<ul>
|
||||
{% for tag in site.tags[:5] %}
|
||||
<li>
|
||||
<a href="/tag/{{ tag }}/">
|
||||
<i class="fa fa-tag"></i>
|
||||
{{ tag }}
|
||||
</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="eight columns">
|
||||
{% block content %}
|
||||
{% endblock %}
|
||||
</div>
|
||||
</div>
|
||||
<!-- end main -->
|
||||
|
||||
</div>
|
||||
|
||||
<div class="page-footer">
|
||||
<div class="container">
|
||||
<i class="fa fa-copyright"></i> 2009 - 2018 Nick Pegg
|
||||
</div>
|
||||
<div>
|
||||
Powered by <a href="https://github.com/nickpegg/posty">Posty</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js"></script>
|
||||
|
||||
<script>hljs.initHighlightingOnLoad();</script>
|
||||
</body>
|
||||
</html>
|
||||
14
templates/page.html
Normal file
14
templates/page.html
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
{% extends "base.html" %}
|
||||
|
||||
{% block page_title %}{{ page.title }}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<article>
|
||||
<header>
|
||||
<h1>{{ page.title }}</h1>
|
||||
</header>
|
||||
<section>
|
||||
{{ page.body | markdown }}
|
||||
</section>
|
||||
</article>
|
||||
{% endblock %}
|
||||
9
templates/post.html
Normal file
9
templates/post.html
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
{% extends "base.html" %}
|
||||
|
||||
{% block page_title %}{{ post.title }}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{% with post_content = post.body|markdown %}
|
||||
{% include "post_base.html" %}
|
||||
{% endwith %}
|
||||
{% endblock %}
|
||||
26
templates/post_base.html
Normal file
26
templates/post_base.html
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
<article>
|
||||
<header>
|
||||
<a class="post-title" href="{{ post.url() }}">
|
||||
<h1>{{ post.title }}</h1>
|
||||
</a>
|
||||
<div class="post-meta">
|
||||
<time>Posted {{ post.date }}</time>
|
||||
<div class="post-tags">
|
||||
<i class="fa fa-tags"></i>
|
||||
<ul>
|
||||
{% for tag in post.tags %}
|
||||
<li><a href="/tag/{{tag}}/">{{ tag }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
<section>
|
||||
<div>
|
||||
{{ post_content }}
|
||||
</div>
|
||||
{% if read_more %}
|
||||
<a href="{{ post.url() }}">read more</a>
|
||||
{% endif %}
|
||||
</section>
|
||||
</article>
|
||||
28
templates/posts.html
Normal file
28
templates/posts.html
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
{% extends "base.html" %}
|
||||
|
||||
{% block page_title %}Posts{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{% set read_more = True %}
|
||||
|
||||
{% for post in posts %}
|
||||
{% with post_content = post.blurb|markdown %}
|
||||
{% include "post_base.html" %}
|
||||
{% endwith %}
|
||||
{% endfor %}
|
||||
|
||||
<div class="row">
|
||||
{% if prev_page_url %}
|
||||
<a href="{{ prev_page_url }}">
|
||||
<i class="fa fa-arrow-left"></i>
|
||||
newer posts
|
||||
</a>
|
||||
{% endif %}
|
||||
{% if next_page_url %}
|
||||
<a class="u-pull-right" href="{{ next_page_url }}">
|
||||
older posts
|
||||
<i class="fa fa-arrow-right"></i>
|
||||
</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endblock %}
|
||||
Loading…
Add table
Add a link
Reference in a new issue