This commit is contained in:
Ehab Hassan 2023-01-02 12:28:48 +02:00
parent ce5d4b806f
commit f1bdcce183
10 changed files with 73 additions and 62 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 80 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 80 KiB

View File

@ -8,7 +8,7 @@ taxonomies:
extra: extra:
subtitle: "Together with our global community, we're realizing the initial promise of an open-source, peer-to-peer Internet owned by the people." subtitle: "Together with our global community, we're realizing the initial promise of an open-source, peer-to-peer Internet owned by the people."
author: "Sacha Obeegadoo" author: "Sacha Obeegadoo"
imgPath: blog2.png imgPath: realizing_the_promise.png
isFeatured: "true" isFeatured: "true"
--- ---

Binary file not shown.

View File

@ -3,9 +3,10 @@
<!-- Default page template for blog posts and basic informative markdown files --> <!-- Default page template for blog posts and basic informative markdown files -->
<main> <main>
<div class="container mx-auto mt-24">
<div class="sm:w-5/6 md:w-4/5 mr-auto ml-auto px-6 lg:px-16 xl:w-11/12"> <div class="sm:w-5/6 md:w-4/5 mr-auto ml-auto mt-16 px-6 lg:px-16 xl:w-11/12">
<img class="max-h-60 sm:max-h-60 md:max-h-80 lg:max-h-96 mx-auto" src={{"/" ~ page.extra.imgPath}} alt=""> <img class="max-h-60 sm:max-h-60 md:max-h-80 lg:max-h-96 mx-auto" src="{{page.extra.imgPath}}" alt="">
<div> <div>
<article class="article lg:w-5/6 mx-auto"> <article class="article lg:w-5/6 mx-auto">
<h2 class="tracking-tight pt-8 lg:pt-8 2xl:pt-24 text-left fw-500 leading-snug font-normal mb-10"> <h2 class="tracking-tight pt-8 lg:pt-8 2xl:pt-24 text-left fw-500 leading-snug font-normal mb-10">
@ -18,6 +19,7 @@
</article> </article>
</div> </div>
</div> </div>
</div>
</main> </main>
{% endblock content %} {% endblock content %}

View File

@ -8,7 +8,7 @@ and a side nav for category and featured post navigation
{% block content %} {% block content %}
<main> <main class="container mx-auto">
<!--sets global featured variable as the most recent post with the isFeatured tag--> <!--sets global featured variable as the most recent post with the isFeatured tag-->
{%- set section = get_section(path="blog/_index.md") %} {%- set section = get_section(path="blog/_index.md") %}
@ -17,14 +17,18 @@ and a side nav for category and featured post navigation
{%- set_global featured = page %} {%- set_global featured = page %}
{% break %} {% break %}
{% endif %} {% endif %}
{% if not featured %}
{%- set_global featured = section.pages[0] %}
{% endif %}
{% endfor %} {% endfor %}
{% include "partials/featuredBlog.html" %} {% include "partials/featuredBlog.html" %}
<div class="flex flex-col md:flex-row"> <div class="flex flex-col md:flex-row container mx-auto">
{% include "partials/blogPosts.html" %} {% include "partials/blogPosts.html" %}
{% include "partials/blogSidebar.html" %} {% include "partials/blogSidebar.html" %}
</div> </div>
</div>
</main> </main>
{% endblock content %} {% endblock content %}

View File

@ -1,13 +1,13 @@
{% block content %} {% 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="font-sans text-center px-0 md:w-full lg:w-2/3 mx-8 md:mx-12">
<h1 <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 sm:text-3xl md:text-4xl lg:text-5xl fw-500 leading-snug font-normal mb-10"
> >
{% set path_array = current_path | split(pat="/") %} {% set path_array = current_path | split(pat="/") %}
{% set taxonomy = path_array[1] %} {% set taxonomy = path_array[1] %}
{% set category = path_array[2] %} {% set category = path_array[2] %}
The Latest from ThreeFold The Latest from GoldFlow
{% if taxonomy == "categories" %} - {% if taxonomy == "categories" %} -
{{category | replace(from='-', to=' ' ) | title}} {{category | replace(from='-', to=' ' ) | title}}
{% endif %} {% endif %}

View File

@ -1,6 +1,6 @@
<div class="mx-8 md:mx-4 flex flex-col"> <div class="mx-8 md:mx-4 flex flex-col">
<div class="flex flex-col mb-12 mr-8 lg:mr-24"> <div class="flex flex-col mb-12 mr-8 lg:mr-24 mt-10">
<h4 class="text-base not-italic font-medium leading-6 text-gray-600 mb-6"> FILTER POSTS BY</h4> <h4 class="text-base not-italic font-medium leading-6 text-gray-600 mb-6"> FILTER POSTS BY</h4>
<a id="all" class="mb-3 text-black font-normal" href="/blog">All</a> <a id="all" class="mb-3 text-black font-normal" href="/blog">All</a>
{% set taxonomy = get_taxonomy(kind="categories") %} {% set taxonomy = get_taxonomy(kind="categories") %}

View File

@ -1,6 +1,6 @@
<body> <body>
<div class="container px-4 mx-auto my-10">
<div class="md:grid md:grid-cols-2 md:gap-8 relative mt-16 lg:mt-16 items-center"> <div class="md:grid md:grid-cols-2 md:gap-8 relative mt-10 lg:mt-16 items-center">
<div class="relative lg:ml-8 my-8 w-full md:w-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> <h3 class="text-base not-italic leading-6 text-gray-600">FEATURED POST</h3>
<a href={{featured.permalink}} class=""> <a href={{featured.permalink}} class="">
@ -19,11 +19,14 @@
</div> </div>
<div class="-mx-4 relative lg:mt-0 max-w-full"> <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="" /> {% set img_url = get_url(path='/' ~ featured.relative_path | replace(from='_', to='-') | replace(from='index.md',
</div> to=featured.extra.imgPath)) %}
</div> <img class="relative mx-auto md:w-auto md:max-w-full max-h-80" src="{{img_url}}" alt="" />
</div> </div>
</div> </div>
<hr class="mt-6">
</div>
</div>
</div>
</body> </body>

View File

@ -1,6 +1,8 @@
<div class="flex flex-col rounded-lg shadow-lg overflow-hidden"> <div class="flex flex-col rounded-lg shadow-lg overflow-hidden">
<div class="flex-shrink-0"> <div class="flex-shrink-0">
<img class="h-48 w-full mx-auto object-cover" src=/{{post.extra.imgPath}} alt="" /> {% set img_url = get_url(path='/' ~ post.relative_path | replace(from='_', to='-') | replace(from='index.md',
to=post.extra.imgPath)) %}
<img class="h-48 w-full mx-auto object-cover" src="{{img_url}}" alt="" />
</div> </div>
<div class="flex-1 bg-white p-6 flex flex-col justify-between"> <div class="flex-1 bg-white p-6 flex flex-col justify-between">
<div class="flex-1"> <div class="flex-1">
@ -34,4 +36,4 @@
</div> </div>
</div> </div>
</div> </div>
</div> </div>