first commit

This commit is contained in:
2025-07-14 07:33:32 +00:00
commit 64f6de30fb
41 changed files with 958 additions and 0 deletions

5
views/templates/404.twig Normal file
View File

@ -0,0 +1,5 @@
{% extends 'layouts/base.twig' %}
{% block content %}
Sorry, we couldn't find what you're looking for.
{% endblock %}

View 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 %}

View 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 %}

View 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
View 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 %}

View 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 %}

View 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 %}

View 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>&bull;</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 %}