better sections
This commit is contained in:
parent
9f90a44f46
commit
dbb135a12e
3 changed files with 26 additions and 8 deletions
|
@ -13,34 +13,45 @@
|
|||
{{ paginator }}
|
||||
{% set pages = paginator.pages %}
|
||||
{% else %}
|
||||
{% set pages = section.subsections %}
|
||||
{% if section.subsections %}
|
||||
{% set pages = section.subsections %}
|
||||
{% set subs = section.subsections %}
|
||||
{% else %}
|
||||
{% set pages = section.pages %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
{% for page in pages %}
|
||||
|
||||
{% if page %}
|
||||
{% if subs %}
|
||||
{% set page = get_section(path=page) %}
|
||||
{% endif %}
|
||||
|
||||
|
||||
{% if page.extra.image %}
|
||||
{% set image = page.path ~ page.extra.image %}
|
||||
{% endif %}
|
||||
{% if image %}
|
||||
{% set resized = resize_image(path="/content" ~ image, width=200, height=200, op="fit_height") %}
|
||||
{% else %}
|
||||
{% set resized = "" %}
|
||||
{% endif %}
|
||||
<div class="flex flex-wrap space-x-4 border border-2 border-gray-200 dark:border-black rounded-xl p-5 shadow-2xl transform transition duration-500 hover:scale-105 bg-gray-200 dark:bg-gray-800">
|
||||
<div class="flex flex-wrap space-x-4 border border-2 border-gray-200 dark:border-black rounded-xl p-5 shadow-xl transform transition duration-500 hover:scale-105 bg-gray-200 dark:bg-gray-800 cursor-pointer" onclick='location.href="{{ page.permalink }}";'>
|
||||
|
||||
<!-- Image -->
|
||||
<div class="flex-1 rounded-lg">
|
||||
<img src="{{ resized.url }}"/>
|
||||
{% if resized %}
|
||||
<div class="flex-1 rounded-lg content-center">
|
||||
<img class="rounded-lg" src="{{ resized.url }}"/>
|
||||
</div>
|
||||
{% else %}
|
||||
{% endif %}
|
||||
|
||||
<div class="flex flex-col flex-3">
|
||||
<h2 class="text-2xl text-bold"><a href='{{ page.permalink }}'>{{ page.title }}</a></h2>
|
||||
<p class="text-bold text-ellipsis max-h-12">{{ page.description }}</p>
|
||||
<p class="text-bold text-ellipsis">{{ page.description }}</p>
|
||||
|
||||
<!-- Summary -->
|
||||
<div class="text-bold mt-2">
|
||||
<div class="text-bold mt-8">
|
||||
<a class="flex py-2" href='{{ page.permalink }}'>
|
||||
Read More
|
||||
<svg class="w-6 h-6 ml-1" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue