This commit is contained in:
samaradel
2023-07-13 16:14:21 +03:00
parent 13222e7897
commit dd127ace35
6 changed files with 185 additions and 81 deletions

View File

@@ -1,13 +1,13 @@
{% block content %}
<div class="font-sans text-center px-0 md:w-full md:w-2/3 lg:w-2/3 mx-8 md:mx-12">
<div class="text-center main-title px-0 md:w-2/3 lg:w-2/3 mx-8 md:mx-12">
<h1
class="tracking-tight text-5xl text-left text-2xl sm:text-3xl md:text-4xl lg:text-5xl fw-500 leading-snug font-normal mb-10"
class="tracking-tight text-left text-2xl md:text-4xl lg:text-5xl fw-500 leading-snug font-normal mb-10"
>
{% set path_array = current_path | split(pat="/") %}
{% set taxonomy = path_array[1] %}
{% set category = path_array[2] %}
The Latest from ThreeFold
The Latest from OurPhone
{% if taxonomy == "categories" %} -
{{category | replace(from='-', to=' ' ) | title}}
{% endif %}
@@ -15,9 +15,9 @@
<div>
<div class="mt-12 grid gap-5 max-w-lg mx-auto lg:grid-cols-2 xl:grid-cols-3 lg:max-w-none">
{%- for post in paginator.pages %}
{% if "Engineering" == "Engineering"%}
{% if not post.extra.hidden %}
{% include "partials/postCard.html" %}
{%endif%} {%- endfor %}
{%endif%} {%- endfor %}
</div>
<hr class="mt-6" />
<p class="text-center text-sm mt-2 mb-16">
@@ -67,4 +67,4 @@
</div>
</div>
{% endblock content %}
{% endblock content %}

View File

@@ -1,29 +1,36 @@
<body>
<div class="md:grid md:grid-cols-2 md:gap-8 relative mt-16 lg:mt-16 items-center">
<div class="relative lg:ml-8 my-8 w-full md:w-auto">
<h3 class="text-base not-italic leading-6 text-gray-600">FEATURED POST</h3>
<a href={{featured.permalink}} class="">
<h2 class="mt-8 text-2xl sm:text-3xl md:text-4xl lg:text-5xl fw-500 leading-snug font-normal mb-2 md:mb-4">
{{ featured.title }}
</h2>
</a>
<p class="mb-4 md:mb-10 text-lg lg:pr-4">
{{featured.description}}
</p>
<h4 class="text-sm not-italic font-light leading-6 text-gray-600">
{{ featured.date | date(format="%B %e, %Y", timezone="America/Chicago")}} -
{{ featured.extra.author }}
</h4>
</div>
{% if featured.taxonomies.people %}
{% set people = get_section(path="people/_index.md") %}
{% set pages_str = people.pages | json_encode() | as_str %}
{% if pages_str is containing(featured.taxonomies.people[0]) %}
{% set author_path = 'people/' ~ featured.taxonomies.people[0] ~ '/index.md' %}
{% set author = get_page(path=author_path) %}
{% endif %}
{% endif %}
<body>
<div class="md:grid md:grid-cols-2 md:gap-8 relative mt-16 lg:mt-16 items-center container mx-auto">
<div class="relative lg:ml-8 my-8 w-full md:w-auto">
<h3 class="text-base not-italic leading-6 text-gray-600">FEATURED POST</h3>
<a href={{featured.permalink}} class="">
<h2
class="mt-8 text-2xl main-title sm:text-3xl md:text-4xl lg:text-5xl fw-500 leading-snug font-normal mb-4 md:mb-10 ">
{{ featured.title }}
</h2>
</a>
<h4 class="text-sm not-italic font-light leading-6 text-gray-600">
{{ featured.date | date(format="%B %e, %Y", timezone="America/Chicago")}} -
</h4>
<div class="-mx-4 relative lg:mt-0 max-w-full">
<img class="relative mx-auto w-7/12 md:w-auto md:max-w-full max-h-80" src=/{{featured.extra.imgPath}} alt="" />
</div>
</div>
<div class="mx-4 relative lg:mt-0 max-w-full">
<img class="relative mx-auto md:w-auto rounded md:max-w-full max-h-80" src={{featured.permalink}}{{featured.extra.imgPath}} alt="" />
</div>
</div>
</div>
</body>
<hr class="mt-6">
</div>
</div>
</body>

View File

@@ -1,37 +1,75 @@
{% if post.date %}
{% if post.taxonomies.people %}
{% set people = get_section(path="people/_index.md") %}
{% set pages_str = people.pages | json_encode() | as_str %}
{% if pages_str is containing(post.taxonomies.people[0]) %}
{% set author_path = 'people/' ~ post.taxonomies.people[0] ~ '/index.md' %}
{% set author = get_page(path=author_path) %}
{% set content = get_page(path=author_path) %}
{% endif %}
{% endif %}
<div class="flex flex-col rounded-lg shadow-lg overflow-hidden">
<div class="flex-shrink-0">
<img class="h-48 w-full mx-auto object-cover" src=/{{post.extra.imgPath}} alt="" />
</div>
<div class="flex-1 bg-white p-6 flex flex-col justify-between">
<div class="flex-1">
<a href={{ post.permalink }} class="block">
<h3 class="mt-2 text-xl leading-7 font-medium text-gray-900 text-left not-italic">
{{ post.title }}
</h3>
{% if post.description %}
<p class="mt-3 text-sm font-normal leading-6 text-gray-500 text-left">
{{ post.description }}
<div class="flex-1 border-b">
<a href="{{ post.permalink }}" class="block">
{% if post.extra.imgPath %}
{% set img_url = get_url(path='/' ~ post.relative_path | replace(from='_', to='-') | replace(from='index.md',
to=post.extra.imgPath)) %}
<div class="flex-shrink-0">
<img class="h-48 w-full mx-auto object-cover" src={{img_url}} alt="{{post.title ~ ' Picture'}}" />
</div>
{%endif%}
<div class="flex-1 bg-white p-6 flex flex-col justify-between">
<h3 class="mt-2 text-xl leading-6 font-medium text-gray-900 text-left not-italic">
{{ post.title }}
</h3>
{% if post.description %}
<p class="mt-3 text-sm font-normal text-gray-500 text-left">
{{ post.description }}
</p>
{% endif %}
</a>
</div>
<div class="mt-6 flex items-center">
<div>
<p class="text-sm leading-5 font-medium text-gray-900 text-left">
{{ post.extra.author }}
</p>
<div class="flex text-sm leading-5 text-gray-500 text-left">
<time datetime="2020-03-16">
{{ post.date | date(format="%B %e, %Y", timezone="America/Chicago") }}
</time>
<span class="mx-1">
&#xB7;
</span>
<span>
6 min read
</span>
<div class="article hidden">{{ post.content | safe }}</div>
<div class="w-full post-card-meta py-3">
<div class="avatars">
<div class="flex">
<div class="flex">
<ul class="list-none flex author-list mr-2 pl-0">
{% if author %}
{% set author_img = get_url(path='/' ~ author.relative_path | replace(from='_', to='-') |
replace(from='index.md', to=author.extra.imgPath)) %}
<li class="author-list-item"><img alt="{{author.title}}" src="{{author_img}}"
class="w-8 h-8 rounded-full bg-gray-200 border-2 border-white"></li>
{% endif %}
</ul>
</div>
<div class="flex flex-col text-left leading-none uppercase">
{% if author %}
<p class="text-gray-700 text-xs">{{ author.title }}</p>
{% endif %}
<p class="text-gray-700 text-xs">
<time datetime="{{post.date}}">
{{ post.date | date(format="%B %e, %Y", timezone="America/Chicago") }}
</time>
</p>
<p class="flex justify-between lowercase my-2 items-center text-gray-700 text-xs"><span id="time"
class="time"></span>
</p>
</div>
<br />
</div>
</div>
</div>
</div>
</div>
</a>
</div>
</div>
</div>
<style>
.border-b {
border-bottom-width: 1px !important;
}
</style>
{% endif %}