💄 Updating the UI and style files.
This commit is contained in:
@@ -2,72 +2,24 @@
|
||||
layout: default
|
||||
home: true
|
||||
---
|
||||
<div class="home">
|
||||
{% if site.projects %}
|
||||
<h4 class="home-title"><span role="img" aria-label="icon-rocket">🚀</span>my works <span class="project-nav"><button id="prevProject" aria-label="arrow left">⟵</button><button id="nextProject" aria-label="arrow right">⟶</button></span></h4>
|
||||
<div class="content">
|
||||
<div class="projects">
|
||||
<div class="projects-container" id="projectsContainer">
|
||||
{% for project in site.data.projects %}
|
||||
<div class="project-item">
|
||||
<h4 class="project-item-title"><a target="_blank" href="{{ project.url }}" rel="noreferrer">{{ project.title | downcase }}</a></h4>
|
||||
<p class="project-item-description">{{ project.description | downcase }}</p>
|
||||
<p class="project-action">{{ project.action }}</p>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
<script>
|
||||
const projects = document.getElementById('projectsContainer'),
|
||||
prev = document.getElementById('prevProject'),
|
||||
next = document.getElementById('nextProject');
|
||||
|
||||
next.addEventListener('mousedown', () => projects.scrollLeft += 245);
|
||||
prev.addEventListener('mousedown', () => projects.scrollLeft -= 245);
|
||||
</script>
|
||||
|
||||
<h4 class="home-title"><span role="img" aria-label="icon-book">📘</span>blog posts</h4>
|
||||
<div class="content">
|
||||
{% for post in site.categories.blog limit:3 %}
|
||||
<article class="list-post blog">
|
||||
<header class="list-post-header">
|
||||
<h4 class="list-post-title">
|
||||
<a href="{{ post.url | absolute_url }}">{{ post.title | escape }}.</a>
|
||||
</h4>
|
||||
</header>
|
||||
<section class="list-post-excerpt">
|
||||
<p class="list-post-excerpt"> — {{ post.excerpt | strip_html | downcase | normalize_whitespace | truncatewords: 15, '...' }} </p>
|
||||
</section>
|
||||
</article>
|
||||
{% endfor %}
|
||||
<nav class="see-all-container">
|
||||
<a class="button" href="{{ site.url | absolute_url }}/blog">See All</a>
|
||||
</nav>
|
||||
</div>
|
||||
|
||||
<h4 class="home-title"><span role="img" aria-label="icon-coffee">☕️</span>programming tips</h4>
|
||||
<div class="content">
|
||||
{% for post in site.categories.tips reversed limit: 3 %}
|
||||
<article class="list-post tips">
|
||||
<header class="list-post-header tips">
|
||||
<h4 class="list-post-title">
|
||||
<a href="{{ post.url | absolute_url }}">{{ post.title | escape }}</a>
|
||||
</h4>
|
||||
</header>
|
||||
<small class="list-meta">
|
||||
{% if post.tags != empty %}
|
||||
{% assign tags = post.tags %}
|
||||
{% for tag in tags %}
|
||||
<a class="tag" href="{{site.url}}/tags/#{{tag | downcase | slugify}}">{{tag | downcase }}</a>{% unless forloop.last %},{% endunless %}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
</small>
|
||||
</article>
|
||||
{% endfor %}
|
||||
<nav class="see-all-container">
|
||||
<a class="button" href="{{ site.url | absolute_url }}/tips">See All</a>
|
||||
</nav>
|
||||
</div>
|
||||
</div>
|
||||
{% for post in site.posts %}
|
||||
{% capture current_year %}
|
||||
{{post.date | date: "%Y"}}
|
||||
{% endcapture %}
|
||||
{% if current_year != previous_year %}
|
||||
{% assign previous_year = current_year %}
|
||||
<h4 class="post-header">
|
||||
<span role="img" aria-label="icon-book" aria-hidden="true">🎉</span>
|
||||
{{ current_year }}
|
||||
</h4>
|
||||
{% endif %}
|
||||
<article class="posts">
|
||||
<span class="posts-date">{{ post.date | date: "%b %d" }}</span>
|
||||
<header class="posts-header">
|
||||
<h4 class="posts-title">
|
||||
<a href="{{ post.url }}">{{ post.title | escape }}</a>
|
||||
</h4>
|
||||
</header>
|
||||
</article>
|
||||
{% endfor %}
|
||||
|
||||
Reference in New Issue
Block a user