Move experience,socials and timeline to components
This commit is contained in:
parent
66707df320
commit
67a872f281
|
|
@ -3,6 +3,6 @@
|
|||
<h1 class="hero-title">{% if subpage.data.displayedTitle %}{{ subpage.data.displayedTitle }}{% else %}{{ subpage.data.title }}{% endif %}</h1>
|
||||
<p>{{subpage.data.description}}</p>
|
||||
{{ subpage.templateContent }}
|
||||
{% include "partials/socials-label.liquid" %}
|
||||
{% render 'partials/components/socials.liquid', socials: author.socials, mail: author.mail, showLabel: true %}
|
||||
</div>
|
||||
</section>
|
||||
|
|
@ -6,9 +6,4 @@
|
|||
<h2>{{ subpage.data.title }}</h2>
|
||||
{% endif %}
|
||||
{{ subpage.templateContent }}
|
||||
{% if subpage.data.socials %}
|
||||
{% if subpage.data.socials.github %}
|
||||
{% include "partials/icons/github.html" %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</section>
|
||||
10
src/_includes/partials/components/socials.liquid
Normal file
10
src/_includes/partials/components/socials.liquid
Normal 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>
|
||||
8
src/_includes/partials/components/timeline-item.liquid
Normal file
8
src/_includes/partials/components/timeline-item.liquid
Normal 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>
|
||||
12
src/_includes/partials/components/timeline.liquid
Normal file
12
src/_includes/partials/components/timeline.liquid
Normal 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>
|
||||
|
|
@ -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>
|
||||
|
|
@ -7,6 +7,6 @@
|
|||
{% endif %}
|
||||
</ul>
|
||||
|
||||
{% include "partials/socials.liquid" %}
|
||||
{% render 'partials/components/socials.liquid', socials: author.socials, mail: author.mail, showLabel: false %}
|
||||
</div>
|
||||
</footer>
|
||||
|
|
@ -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>
|
||||
|
|
@ -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>
|
||||
|
|
@ -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>
|
||||
|
|
@ -5,4 +5,4 @@ classes: 'experiences-section'
|
|||
---
|
||||
|
||||
{% assign experiences = collections.experiences %}
|
||||
{% include 'partials/experience.liquid' %}
|
||||
{% render 'partials/components/timeline', timeline: experiences %}
|
||||
Loading…
Reference in a new issue