Move experience,socials and timeline to components

This commit is contained in:
TheThomaas 2024-02-08 22:44:55 +01:00
parent 66707df320
commit 67a872f281
11 changed files with 34 additions and 50 deletions

View file

@ -3,6 +3,6 @@
<h1 class="hero-title">{% if subpage.data.displayedTitle %}{{ subpage.data.displayedTitle }}{% else %}{{ subpage.data.title }}{% endif %}</h1> <h1 class="hero-title">{% if subpage.data.displayedTitle %}{{ subpage.data.displayedTitle }}{% else %}{{ subpage.data.title }}{% endif %}</h1>
<p>{{subpage.data.description}}</p> <p>{{subpage.data.description}}</p>
{{ subpage.templateContent }} {{ subpage.templateContent }}
{% include "partials/socials-label.liquid" %} {% render 'partials/components/socials.liquid', socials: author.socials, mail: author.mail, showLabel: true %}
</div> </div>
</section> </section>

View file

@ -6,9 +6,4 @@
<h2>{{ subpage.data.title }}</h2> <h2>{{ subpage.data.title }}</h2>
{% endif %} {% endif %}
{{ subpage.templateContent }} {{ subpage.templateContent }}
{% if subpage.data.socials %}
{% if subpage.data.socials.github %}
{% include "partials/icons/github.html" %}
{% endif %}
{% endif %}
</section> </section>

View file

@ -0,0 +1,10 @@
<ul class="list-inline socials-list {% if showLabel == true %}socials-list--label{% endif %}">
{% if socials %}
{% for social in socials %}
<li><a href="{{ social.link }}" class="{{ social.icon }} {% if showLabel == true %}{{ position | default: "icon--left" }}{% endif %}" title="{{ social.title }}" target="_blank">{% if showLabel == true %}{{ social.title }}{% endif %}</a></li>
{% endfor %}
{% if mail %}
<li><a href="mailto:{{ mail }}" class="icon-mail {% if showLabel == true %}{{ position | default: "icon--left" }}{% endif %}" title="Send me an e-mail" target="_blank">{% if showLabel == true %}Send me an e-mail{% endif %}</a></li>
{% endif %}
{% endif %}
</ul>

View file

@ -0,0 +1,8 @@
<li>
<h3><time datetime="{{ start }}">{{ start }}</time><span>-</span><time datetime="{{ end }}">{{ end }}</time></h3>
<p>
<strong>{% if link %}<a href="{{ link }}">{% endif %}{{ title }}{% if link %}</a>{% endif %}</strong>,
{{ location }}
</p>
<p>{{ description }}</p>
</li>

View file

@ -0,0 +1,12 @@
<ol class="timeline">
{%- for elements in timeline -%}
{% assign data = elements.data %}
{% render 'partials/components/timeline-item',
start: data.startDate,
end: data.endDate,
link: data.link,
title: data.title,
location: data.location,
description: data.description %}
{%- endfor -%}
</ol>

View file

@ -1,12 +0,0 @@
<ol class="timeline">
{%- for experience in experiences -%}
<li>
<h3><time datetime="{{ experience.data.startDate }}">{{ experience.data.startDate }}</time><span>-</span><time datetime="{{ experience.data.endDate }}">{{ experience.data.endDate }}</time></h3>
<p>
<strong>{% if experience.data.link %}<a href="{{experience.data.link}}">{% endif %}{{ experience.data.title }}{% if experience.data.link %}</a>{% endif %}</strong>,
{{ experience.data.location }}
</p>
<p>{{ experience.data.description }}</p>
</li>
{%- endfor -%}
</ol>

View file

@ -6,7 +6,7 @@
<li>Source on <a href="{{site.repository}}" target="_blank" rel="nofollow">{{site.repoSrc}}</a></li> <li>Source on <a href="{{site.repository}}" target="_blank" rel="nofollow">{{site.repoSrc}}</a></li>
{% endif %} {% endif %}
</ul> </ul>
{% include "partials/socials.liquid" %} {% render 'partials/components/socials.liquid', socials: author.socials, mail: author.mail, showLabel: false %}
</div> </div>
</footer> </footer>

View file

@ -1,9 +0,0 @@
<section class="projects">
<ol reversed class="postlist">
{%- for posts in postslist -%}
<li>
<h2>{{ posts.data.title }}</h2>
</li>
{%- endfor -%}
</ol>
</section>

View file

@ -1,10 +0,0 @@
<ul class="list-inline socials-list socials-list--label">
{% if author.socials %}
{% for social in author.socials %}
<li><a href="{{ social.link }}" class="icon--left {{ social.icon }}" target="_blank">{{ social.title }}</a></li>
{% endfor %}
{% if author.mail %}
<li><a href="mailto:{{ author.mail }}" class="icon--left icon-mail" target="_blank">Send me an e-mail</a></li>
{% endif %}
{% endif %}
</ul>

View file

@ -1,10 +0,0 @@
<ul class="list-inline socials-list">
{% if author.socials %}
{% for social in author.socials %}
<li><a href="{{ social.link }}" class="{{ social.icon }}" title="{{ social.title }}" target="_blank"></a></li>
{% endfor %}
{% if author.mail %}
<li><a href="mailto:{{ author.mail }}" class="icon-mail" title="Send me an e-mail" target="_blank"></a></li>
{% endif %}
{% endif %}
</ul>

View file

@ -5,4 +5,4 @@ classes: 'experiences-section'
--- ---
{% assign experiences = collections.experiences %} {% assign experiences = collections.experiences %}
{% include 'partials/experience.liquid' %} {% render 'partials/components/timeline', timeline: experiences %}