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

View File

@ -0,0 +1,32 @@
<div class="comment-form">
<h3>Add comment</h3>
<form class="comment-form" method="post" action="{{ site.link ~ '/wp-comments-post.php' }}">
{% if user %}
<input type="hidden" name="email" value="{{ user.email }}" />
<input type="hidden" name="author" value="{{ user.name }}" />
<input type="hidden" name="url" value="{{ user.link }}" />
{% else %}
<label>
Email<br />
<input required name="email" type="email" id="email" />
</label>
<label>
Name<br />
<input required name="author" type="text" />
</label>
<label>
Website<br />
<input name="url" type="url" />
</label>
{% endif %}
<label>
Comment<br />
<textarea placeholder="Leave a comment..." name="comment" cols="60" rows="3"></textarea>
</label>
<input name="comment_post_ID" value="{{ post.id }}" type="hidden" />
<input name="comment_parent" value="{{ comment.id|default('0') }}" type="hidden" />
<button type="submit" name="Submit" class="btn">Send</button>
<button type="reset">Cancel</button>
<p>Your comment will be revised by the site if needed.</p>
</form>
</div>

View File

@ -0,0 +1,19 @@
<div class="blog-comment" id="blog-comment-{{ comment.id }}">
<h5 class="comment-author">{{ comment.author.name }} says</h5>
<div class="comment-content">{{ comment.content|wpautop }}</div>
<section class="comment-box">
{% include 'partials/comment-form.twig' %}
{% if post.comments %}
<h4>replies</h4>
<div class="comments">
{% for cmt in comment.children %}
{% include 'partials/comment.twig' with {
comment: cmt
} %}
{% endfor %}
</div>
{% endif %}
</section>
</div>

View File

@ -0,0 +1 @@
<footer id="footer">Copyright {{ 'now'|date('Y') }}</footer>

9
views/partials/head.twig Normal file
View File

@ -0,0 +1,9 @@
<head>
<meta charset="{{ site.charset }}" />
<link rel="stylesheet" href="{{ site.theme.link }}/style.css" type="text/css" media="screen" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="author" href="{{ site.theme.link }}/humans.txt" />
<link rel="profile" href="http://gmpg.org/xfn/11" />
{% do action('get_header') %}
{{ function('wp_head') }}
</head>

12
views/partials/menu.twig Normal file
View File

@ -0,0 +1,12 @@
{% if menu %}
<ul>
{% for item in items %}
<li class="{{ item.classes|join(' ') }}">
<a target="{{ item.target }}" href="{{ item.link }}">{{ item.title }}</a>
{% include 'partials/menu.twig' with {
items: item.children
} %}
</li>
{% endfor %}
</ul>
{% endif %}

View File

@ -0,0 +1,44 @@
{% if posts.pagination.pages is not empty %}
<nav class="pagination-block">
<ul class="pagination">
{# First #}
{% if (posts.pagination.pages|first) and posts.pagination.pages|first.current != true %}
<li class="first btn">
<a href="{{ posts.pagination.pages|first.link }}">First</a>
</li>
{% else %}
<li class="first btn disabled"><button disabled>First</button></li>
{% endif %}
{# Previous #}
{% if posts.pagination.prev %}
<li class="prev btn"><a href="{{ posts.pagination.prev.link }}">Previous</a></li>
{% else %}
<li class="prev btn disabled"><button disabled>Previous</button></li>
{% endif %}
{# Pages #}
{% for page in posts.pagination.pages %}
{% if page.link %}
<li><a href="{{ page.link }}" class="{{ page.class }}">{{ page.title }}</a></li>
{% else %}
<li class="current"><span class="{{ page.class }}">{{ page.title }}</span></li>
{% endif %}
{% endfor %}
{# Next #}
{% if posts.pagination.next %}
<li class="next btn"><a href="{{ posts.pagination.next.link }}">Next</a></li>
{% else %}
<li class="next btn disabled"><button disabled>Next</button></li>
{% endif %}
{# Last #}
{% if (posts.pagination.pages|last) and posts.pagination.pages|last.current != true %}
<li class="last btn"><a href="{{ posts.pagination.pages|last.link }}">Last</a></li>
{% else %}
<li class="last btn disabled"><button disabled>Last</button></li>
{% endif %}
</ul>
</nav>
{% endif %}

View File

@ -0,0 +1,16 @@
{% extends 'partials/tease.twig' %}
{% block content %}
<h2 class="h2"><a href="{{ post.link }}">{{ post.title }}</a></h2>
<p>
{{
post.excerpt({
words: 5,
read_more: 'Keep reading'
})
}}
</p>
{% if post.thumbnail.src %}
<img src="{{ post.thumbnail.src }}" />
{% endif %}
{% endblock %}

View File

@ -0,0 +1,9 @@
<article class="tease tease-{{ post.type }}" id="tease-{{ post.id }}">
{% block content %}
<h2 class="h2"><a href="{{ post.link }}">{{ post.title }}</a></h2>
<p>{{ post.excerpt }}</p>
{% if post.thumbnail %}
<img src="{{ post.thumbnail.src }}" />
{% endif %}
{% endblock %}
</article>