feat: redesign single entry page — hero image, display typography, rule separator
This commit is contained in:
@@ -7,33 +7,47 @@
|
||||
'Snow': '❄️', 'Thunderstorm': '⛈️'
|
||||
} %}
|
||||
|
||||
{% set hero = null %}
|
||||
{% if page.header.hero_image and page.media[page.header.hero_image] is defined %}
|
||||
{% set hero = page.media[page.header.hero_image] %}
|
||||
{% elseif page.media.images|length > 0 %}
|
||||
{% set hero = page.media.images|first %}
|
||||
{% endif %}
|
||||
|
||||
<article class="entry">
|
||||
{% if hero %}
|
||||
<div class="entry-hero">
|
||||
<img src="{{ hero.cropResize(1440, 720).url }}" alt="{{ page.title }}" loading="eager">
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<header class="entry-header">
|
||||
<time class="entry-date" datetime="{{ page.date|date('Y-m-d') }}">
|
||||
{{ page.date|date('l, d F Y') }}
|
||||
</time>
|
||||
|
||||
{% if page.header.location_city or page.header.location_country %}
|
||||
<p class="entry-location">
|
||||
📍
|
||||
{% if page.header.location_city %}{{ page.header.location_city }}{% endif %}
|
||||
{% if page.header.location_city and page.header.location_country %}, {% endif %}
|
||||
{% if page.header.location_country %}{{ page.header.location_country }}{% endif %}
|
||||
</p>
|
||||
{% endif %}
|
||||
|
||||
{% if page.header.weather_desc or page.header.weather_temp_c %}
|
||||
<p class="entry-weather">
|
||||
{% if page.header.weather_desc %}
|
||||
{{ weather_icons[page.header.weather_desc] ?? '🌡️' }} {{ page.header.weather_desc }}
|
||||
<div class="entry-header-meta">
|
||||
<time class="entry-date" datetime="{{ page.date|date('Y-m-d') }}">
|
||||
{{ page.date|date('l, d F Y') }}
|
||||
</time>
|
||||
{% if page.header.location_city or page.header.location_country %}
|
||||
<p class="entry-location">
|
||||
📍
|
||||
{% if page.header.location_city %}{{ page.header.location_city }}{% endif %}
|
||||
{% if page.header.location_city and page.header.location_country %}, {% endif %}
|
||||
{% if page.header.location_country %}{{ page.header.location_country }}{% endif %}
|
||||
</p>
|
||||
{% endif %}
|
||||
{% if page.header.weather_temp_c %}
|
||||
· {{ page.header.weather_temp_c|round }}°C
|
||||
{% if page.header.weather_desc or page.header.weather_temp_c %}
|
||||
<p class="entry-weather">
|
||||
{% if page.header.weather_desc %}
|
||||
{{ weather_icons[page.header.weather_desc] ?? '🌡️' }} {{ page.header.weather_desc }}
|
||||
{% endif %}
|
||||
{% if page.header.weather_temp_c %}
|
||||
· {{ page.header.weather_temp_c|round }}°C
|
||||
{% endif %}
|
||||
</p>
|
||||
{% endif %}
|
||||
</p>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<h1 class="entry-title">{{ page.title }}</h1>
|
||||
<div class="entry-title-rule"></div>
|
||||
</header>
|
||||
|
||||
<div class="entry-body">
|
||||
|
||||
Reference in New Issue
Block a user