mirror of
https://github.com/godotengine/godot-website.git
synced 2025-12-31 09:48:43 +03:00
Removing the blogPost and blogPosts component, replace with template equivalent
This commit is contained in:
@@ -11,9 +11,34 @@ categoryPage = "article"
|
||||
<div class="container">
|
||||
<h1 class="intro-title"></h1>
|
||||
<div class="row news-section">
|
||||
{% component 'blogPost' %}
|
||||
</div>
|
||||
<div class="col-md-3 text-center">
|
||||
<span class="date-big">{{ post.published_at|date('d') }}</span><br/>
|
||||
<span class="date-small">{{ post.published_at|date('M Y') }}</span>
|
||||
<br/><br/>
|
||||
<p><img src="{{ post.user.avatar.path }}" width="100px"/>
|
||||
<br/>{{ post.user.full_name }}</p>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<h1>{{ post.title }}</h1>
|
||||
{% if post.featured_images.count %}
|
||||
<div class="featured-images text-center">
|
||||
{% for image in post.featured_images %}
|
||||
<p>
|
||||
<img
|
||||
data-src="{{ image.filename }}"
|
||||
src="{{ image.path }}"
|
||||
alt="{{ image.description }}"
|
||||
style="width:100%" />
|
||||
</p>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endif %}
|
||||
{{ post.content_html|raw }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3"> </div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
{% partial "footer" %}
|
||||
</html>
|
||||
</html>
|
||||
|
||||
@@ -13,6 +13,7 @@ postPage = "{{ :slug }}"
|
||||
<html>
|
||||
{% partial "head" %}
|
||||
{% partial "header" %}
|
||||
{% set posts = blogPosts.posts %}
|
||||
<div class="jumbotron-filter"></div>
|
||||
<div class="jumbotron">
|
||||
<div class="container">
|
||||
@@ -32,7 +33,14 @@ postPage = "{{ :slug }}"
|
||||
</div>
|
||||
<div class="col-md-6 news-list">
|
||||
<h2>Latest news</h2>
|
||||
{% component 'blogPosts' %}
|
||||
{% for post in posts %}
|
||||
<article class="news">
|
||||
<div class="news-date"> {{ post.updated_at|date("M d, Y") }} </div>
|
||||
<div class="news-title">
|
||||
<a href="{{ 'article'|page({ slug: post.slug }) }}">{{ post.title }}</a>
|
||||
</div>
|
||||
</article>
|
||||
{% endfor %}
|
||||
<a class="more-news" href="/news">More news »</a>
|
||||
</div>
|
||||
</div>
|
||||
@@ -138,4 +146,4 @@ postPage = "{{ :slug }}"
|
||||
</div>
|
||||
</div>
|
||||
{% partial "footer" %}
|
||||
</html>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user