Skip to content

Commit

Permalink
Mention the latest project in the end of every post
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasprag committed Jun 7, 2024
1 parent f5b6a0d commit 58eb16a
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 4 deletions.
7 changes: 7 additions & 0 deletions _includes/external.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<svg width="{{include.size}}" height="{{include.size}}" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" class="inline">
<g id="External_Link">
<path id="Vector"
d="M10.0002 5H8.2002C7.08009 5 6.51962 5 6.0918 5.21799C5.71547 5.40973 5.40973 5.71547 5.21799 6.0918C5 6.51962 5 7.08009 5 8.2002V15.8002C5 16.9203 5 17.4801 5.21799 17.9079C5.40973 18.2842 5.71547 18.5905 6.0918 18.7822C6.5192 19 7.07899 19 8.19691 19H15.8031C16.921 19 17.48 19 17.9074 18.7822C18.2837 18.5905 18.5905 18.2839 18.7822 17.9076C19 17.4802 19 16.921 19 15.8031V14M20 9V4M20 4H15M20 4L13 11"
stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" />
</g>
</svg>
2 changes: 1 addition & 1 deletion _includes/intro.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ <h1 class="py-3 px-5 font-semibold text-lg border-gray-200 dark:border-gray-700"
class="flex py-1 px-3 first-of-type:mt-0 my-4 rounded bg-gray-100 hover:bg-gray-300 dark:bg-gray-800 dark:hover:bg-gray-700">
<div class="w-full p-2">
<h2 class="font-semibold text-md">
{{project.name}}
{{project.name}} {% include external.html size="18px" %}
</h2>
<div class="text-sm mt-1">
{{project.description}}
Expand Down
23 changes: 23 additions & 0 deletions _includes/latest_project.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@

<div class="border-t border-gray-700 mt-10 py-7">
<h1 class="py-3 font-semibold text-lg border-gray-200 dark:border-gray-700">
Thanks for reading my blog! Check out my latest project 👇🏼
</h1>


{% assign project = site.data.projects | first %}

<a href="{{project.url}}" target="_blank" rel="noreferrer"
class="flex py-1 px-3 rounded bg-gray-100 hover:bg-gray-300 dark:bg-gray-800 dark:hover:bg-gray-700">

<div class="w-full p-2">
<h2 class="font-semibold text-2xl">
{{project.name}} {% include external.html size="24px" %}
</h2>

<div class="text-lg mt-3">
{{project.description}}
</div>
</div>
</a>
</div>
8 changes: 5 additions & 3 deletions _layouts/post.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ <h1 class="font-semibold text-3xl">
<div>
<time class="font-medium text-sm py-3">
{% if page.last_modified_at %}
Last updated: {{ page.last_modified_at | date: '%B %e, %Y' }}
Last updated: {{ page.last_modified_at | date: '%B %e, %Y' }}
{% else %}
Published: {{ page.date | date: '%B %e, %Y' }}
Published: {{ page.date | date: '%B %e, %Y' }}
{% endif %}
</time>

Expand All @@ -24,4 +24,6 @@ <h1 class="font-semibold text-3xl">

<div class="post-content prose mt-5">
{{ content }}
</div>
</div>

{% include latest_project.html %}

0 comments on commit 58eb16a

Please sign in to comment.