first commit
This commit is contained in:
5
views/templates/404.twig
Normal file
5
views/templates/404.twig
Normal file
@ -0,0 +1,5 @@
|
||||
{% extends 'layouts/base.twig' %}
|
||||
|
||||
{% block content %}
|
||||
Sorry, we couldn't find what you're looking for.
|
||||
{% endblock %}
|
15
views/templates/archive.twig
Normal file
15
views/templates/archive.twig
Normal file
@ -0,0 +1,15 @@
|
||||
{% extends 'layouts/base.twig' %}
|
||||
|
||||
{% block content %}
|
||||
{% for post in posts %}
|
||||
{% include ['partials/tease-' ~ post.type ~ '.twig', 'partials/tease.twig'] %}
|
||||
{% endfor %}
|
||||
|
||||
{% include 'partials/pagination.twig' with {
|
||||
pagination: posts.pagination({
|
||||
show_all: false,
|
||||
mid_size: 3,
|
||||
end_size: 2
|
||||
})
|
||||
} %}
|
||||
{% endblock %}
|
7
views/templates/author.twig
Normal file
7
views/templates/author.twig
Normal file
@ -0,0 +1,7 @@
|
||||
{% extends 'layouts/base.twig' %}
|
||||
|
||||
{% block content %}
|
||||
{% for post in posts %}
|
||||
{% include ['partials/tease-' ~ post.type ~ '.twig', 'partials/tease.twig'] %}
|
||||
{% endfor %}
|
||||
{% endblock %}
|
16
views/templates/index.twig
Normal file
16
views/templates/index.twig
Normal file
@ -0,0 +1,16 @@
|
||||
{% extends 'layouts/base.twig' %}
|
||||
|
||||
{% block content %}
|
||||
<h2>{{ foo }}</h2>
|
||||
{% for post in posts %}
|
||||
{% include ['partials/tease-' ~ post.type ~ '.twig', 'partials/tease.twig'] %}
|
||||
{% endfor %}
|
||||
|
||||
{% include 'partials/pagination.twig' with {
|
||||
pagination: posts.pagination({
|
||||
show_all: false,
|
||||
mid_size: 3,
|
||||
end_size: 2
|
||||
})
|
||||
} %}
|
||||
{% endblock %}
|
12
views/templates/page.twig
Normal file
12
views/templates/page.twig
Normal file
@ -0,0 +1,12 @@
|
||||
{% extends 'layouts/base.twig' %}
|
||||
|
||||
{% block content %}
|
||||
<div class="content-wrapper">
|
||||
<article class="post-type-{{ post.type }}" id="post-{{ post.id }}">
|
||||
<section class="article-content">
|
||||
<h1 class="article-h1">{{ post.title }}</h1>
|
||||
<div class="article-body">{{ post.content }}</div>
|
||||
</section>
|
||||
</article>
|
||||
</div>
|
||||
{% endblock %}
|
18
views/templates/search.twig
Normal file
18
views/templates/search.twig
Normal file
@ -0,0 +1,18 @@
|
||||
{# see `templates/archive.twig` for an alternative strategy of extending templates #}
|
||||
{% extends 'layouts/base.twig' %}
|
||||
|
||||
{% block content %}
|
||||
<div class="content-wrapper">
|
||||
{% for post in posts %}
|
||||
{% include ['partials/tease-' ~ post.type ~ '.twig', 'partials/tease.twig'] %}
|
||||
{% endfor %}
|
||||
|
||||
{% include 'partials/pagination.twig' with {
|
||||
pagination: posts.pagination({
|
||||
show_all: false,
|
||||
mid_size: 3,
|
||||
end_size: 2
|
||||
})
|
||||
} %}
|
||||
</div>
|
||||
{% endblock %}
|
17
views/templates/single-password.twig
Normal file
17
views/templates/single-password.twig
Normal file
@ -0,0 +1,17 @@
|
||||
{% extends 'layouts/base.twig' %}
|
||||
|
||||
{% block content %}
|
||||
<form class="password-form"
|
||||
action="{{ site.link }}/wp-login.php?action=postpass"
|
||||
method="post">
|
||||
<label for="pwbox-{{ post.id }}">Password:</label>
|
||||
<input class="password-box"
|
||||
name="post_password"
|
||||
id="pwbox-{{ post.id }}"
|
||||
type="password"
|
||||
placeholder="Password"
|
||||
size="20"
|
||||
maxlength="20" />
|
||||
<input class="password-btn" type="submit" name="Submit" value="Submit" />
|
||||
</form>
|
||||
{% endblock %}
|
37
views/templates/single.twig
Normal file
37
views/templates/single.twig
Normal file
@ -0,0 +1,37 @@
|
||||
{% extends 'layouts/base.twig' %}
|
||||
|
||||
{% block content %}
|
||||
<div class="content-wrapper">
|
||||
<article class="post-type-{{ post.type }}" id="post-{{ post.id }}">
|
||||
<img src="{{ post.thumbnail.src|resize(1200, 300) }}" />
|
||||
<section class="article-content">
|
||||
<h1 class="article-h1">{{ post.title }}</h1>
|
||||
<p class="blog-author">
|
||||
<span>By</span>
|
||||
<a href="{{ post.author.path }}">{{ post.author.name }}</a>
|
||||
<span>•</span>
|
||||
<time datetime="{{ post.date|date('Y-m-d H:i:s') }}">{{ post.date }}</time>
|
||||
</p>
|
||||
<div class="article-body">{{ post.content }}</div>
|
||||
</section>
|
||||
<section class="comment-box">
|
||||
<div class="comments">
|
||||
{% if post.comments %}
|
||||
<h3>comments</h3>
|
||||
{% for cmt in post.comments %}
|
||||
{% include 'partials/comment.twig' with {
|
||||
comment: cmt
|
||||
} %}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
{% if post.comment_status == 'closed' %}
|
||||
<p>comments for this post are closed</p>
|
||||
{% else %}
|
||||
{% include 'partials/comment-form.twig' %}
|
||||
{% endif %}
|
||||
</section>
|
||||
</article>
|
||||
</div>
|
||||
{% endblock %}
|
Reference in New Issue
Block a user