Move some partial contents into templates
This commit is contained in:
parent
2b0594e8d6
commit
c0f56cb904
|
@ -6,7 +6,7 @@ Feature: Home
|
|||
Scenario:
|
||||
Given I am on the homepage
|
||||
Then the response status code should be 200
|
||||
And I should see "I’m a Web Developer and System Administrator based in Wales, UK."
|
||||
And I should see "a Web Developer and System Administrator based in Wales, UK."
|
||||
And the active menu link should be "About"
|
||||
And the page title should be "Web Developer, System Administrator - PHP, Drupal, Symfony, Linux | Oliver Davies"
|
||||
And the page title should not be "About | Oliver Davies"
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
<div class="availability panel panel-default">
|
||||
<div class="panel-heading">
|
||||
Availability
|
||||
</div>
|
||||
<div class="panel-heading">Availability</div>
|
||||
|
||||
<div class="panel-body">
|
||||
{% for key, availability in site.availability %}
|
||||
|
|
|
@ -1,5 +0,0 @@
|
|||
{% if experience.description %}
|
||||
<div class="experience-item-description">
|
||||
{{ experience.description|markdown }}
|
||||
</div>
|
||||
{% endif %}
|
|
@ -1,16 +0,0 @@
|
|||
{% set classes = [
|
||||
'experience-item',
|
||||
company.logo ? 'has-logo',
|
||||
] %}
|
||||
|
||||
<div class="{{ classes|join(' ')|trim }}">
|
||||
{{ include('experience/logo') }}
|
||||
|
||||
<div class="experience-item-inner">
|
||||
<h2>{{ company.name }}</h2>
|
||||
|
||||
{{ include('experience/website') }}
|
||||
{{ include('experience/role') }}
|
||||
{{ include('experience/description') }}
|
||||
</div>{# /.inner #}
|
||||
</div>
|
|
@ -1,5 +0,0 @@
|
|||
{% if company.logo %}
|
||||
<div class="experience-item-logo">
|
||||
<img src="{{ site.images_url }}/assets/images/experience/{{ company.logo }}" alt="{{ company.name }} logo">
|
||||
</div>
|
||||
{% endif %}
|
|
@ -1,4 +0,0 @@
|
|||
<div class="experience-item-role">
|
||||
{{- experience.role ~ ' from ' ~ experience.start ~ ' to ' ~ experience.end|default('Present') -}}
|
||||
{%- if experience.location %} ({{ experience.location }}){% endif %}.
|
||||
</div>
|
|
@ -1,5 +0,0 @@
|
|||
{% if company.url -%}
|
||||
<a class="experience-item-website" href="{{ company.url }}">
|
||||
{{- company.url -}}
|
||||
</a>
|
||||
{%- endif %}
|
|
@ -1,13 +0,0 @@
|
|||
<footer class="container">
|
||||
<p class="copyright">
|
||||
© 2010-{{ 'now'|date('Y') }} {{ site.title }}. Built with <a href="https://sculpin.io">Sculpin</a>.
|
||||
</p>
|
||||
|
||||
{% include 'meetups' %}
|
||||
</footer>
|
||||
|
||||
<script src="{{ site.url }}/assets/js/site.js"></script>
|
||||
|
||||
{% if site.google_analytics_tracking_id %}
|
||||
<script>(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) })(window,document,'script','//www.google-analytics.com/analytics.js','ga'); ga('create', '{{ site.google_analytics_tracking_id }}', 'auto'); ga('send', 'pageview');</script>
|
||||
{% endif %}
|
|
@ -1,9 +0,0 @@
|
|||
{% block sidebar_wrapper %}
|
||||
<div class="col-md-3">
|
||||
{% block sidebar %}
|
||||
{% include 'badges' %}
|
||||
{% include 'availability' %}
|
||||
{% include 'posts/latest' %}
|
||||
{% endblock %}
|
||||
</div>
|
||||
{% endblock %}
|
|
@ -1,11 +0,0 @@
|
|||
<div class="talk-events">
|
||||
<h2>Events</h2>
|
||||
|
||||
{% set events = [] %}
|
||||
{% for event in page.events %}
|
||||
{% set event = event|merge({ talk: page })|merge(site.events[event.id]) %}
|
||||
{% set events = events|merge([event]) %}
|
||||
{% endfor %}
|
||||
|
||||
{% include "talks-table" with { events: events, hide_talk: true } %}
|
||||
</div>
|
|
@ -1,8 +0,0 @@
|
|||
{% if page.slides.embed %}
|
||||
<div class="talk-slides">
|
||||
<h2>Slides</h2>
|
||||
<div class="presentation">
|
||||
{{ page.slides.embed|raw }}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
|
@ -1,8 +0,0 @@
|
|||
{% if page.video.embed %}
|
||||
<div class="talk-video">
|
||||
<h2>Video</h2>
|
||||
<div class="embed-container">
|
||||
{{ page.video.embed|raw }}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
|
@ -1,7 +0,0 @@
|
|||
<title>{% spaceless %}
|
||||
{% if page.url == '/.' %}
|
||||
{{ site.subtitle }} | {{ site.title }}
|
||||
{% else %}
|
||||
{{ page.title }} | {{ site.title }}
|
||||
{% endif %}
|
||||
{% endspaceless %}</title>
|
|
@ -1,7 +1,29 @@
|
|||
<!DOCTYPE html>
|
||||
<html class="no-js" lang="en-GB">
|
||||
{% include 'head' %}
|
||||
<head>
|
||||
<title>{% if page.url == '/.' %}{{ site.subtitle }} | {{ site.title }}{% else %}{{ page.title }} | {{ site.title }}{% endif %}</title>
|
||||
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
|
||||
{% if page.meta.description %}
|
||||
<meta name="description" content="{{ page.meta.description|e('html') }}">
|
||||
{% endif %}
|
||||
|
||||
{% include 'og' with { og: page.meta.og } %}
|
||||
|
||||
<link rel="stylesheet" href="{{ site.url }}/assets/css/site.css">
|
||||
{% block styles %}{% endblock %}
|
||||
|
||||
{% for size in site.apple_touch_icon_sizes %}
|
||||
<link rel="apple-touch-icon" href="{{ site.avatar.url }}?s={{ size }}" sizes="{{ size }}x{{ size }}">
|
||||
{% endfor %}
|
||||
|
||||
{% for size in site.favicon_sizes %}
|
||||
<link rel="icon" href="{{ site.avatar.url }}?s={{ size }}" sizes="{{ size }}x{{ size }}">
|
||||
{% endfor %}
|
||||
</head>
|
||||
<body class="{{ page.blocks.body_classes }}">
|
||||
{% include 'nav' %}
|
||||
|
||||
|
@ -9,17 +31,36 @@
|
|||
<div class="row">
|
||||
<main class="col-md-9">
|
||||
{% block content_top %}{% endblock %}
|
||||
{% block content_wrapper %}
|
||||
{% block content %}{% endblock %}
|
||||
{% endblock %}
|
||||
{% block content_wrapper %}{% block content %}{% endblock %}{% endblock %}
|
||||
{% block content_bottom %}{% endblock %}
|
||||
</main>
|
||||
|
||||
{% include 'sidebar' %}
|
||||
{% block sidebar_wrapper %}
|
||||
<div class="col-md-3">
|
||||
{% block sidebar %}
|
||||
{% include 'badges' %}
|
||||
{% include 'availability' %}
|
||||
{% include 'posts/latest' %}
|
||||
{% endblock %}
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
</div>{# .row #}
|
||||
</div>{# .container #}
|
||||
|
||||
{% include 'footer' %}
|
||||
<footer class="container">
|
||||
<p class="copyright">
|
||||
© 2010-{{ 'now'|date('Y') }} {{ site.title }}. Built with <a href="https://sculpin.io">Sculpin</a>.
|
||||
</p>
|
||||
|
||||
{% include 'meetups' %}
|
||||
</footer>
|
||||
|
||||
<script src="{{ site.url }}/assets/js/site.js"></script>
|
||||
|
||||
{% if site.google_analytics_tracking_id %}
|
||||
<script>(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) })(window,document,'script','//www.google-analytics.com/analytics.js','ga'); ga('create', '{{ site.google_analytics_tracking_id }}', 'auto'); ga('send', 'pageview');</script>
|
||||
{% endif %}
|
||||
|
||||
{% block scripts %}{% endblock %}
|
||||
</body>
|
||||
|
|
|
@ -11,7 +11,33 @@
|
|||
{% block content %}{% endblock %}
|
||||
</div>
|
||||
|
||||
{% include 'talk/slides' %}
|
||||
{% include 'talk/video' %}
|
||||
{% include 'talk/events' %}
|
||||
{% if page.slides.embed %}
|
||||
<div class="talk-slides">
|
||||
<h2>Slides</h2>
|
||||
<div class="presentation">
|
||||
{{ page.slides.embed|raw }}
|
||||
</div>{# .presentation #}
|
||||
</div>{# .talk-slides #}
|
||||
{% endif %}
|
||||
|
||||
{% if page.video.embed %}
|
||||
<div class="talk-video">
|
||||
<h2>Video</h2>
|
||||
<div class="embed-container">
|
||||
{{ page.video.embed|raw }}
|
||||
</div>
|
||||
</div>{# .talk-video #}
|
||||
{% endif %}
|
||||
|
||||
<div class="talk-events">
|
||||
<h2>Events</h2>
|
||||
|
||||
{% set events = [] %}
|
||||
{% for event in page.events %}
|
||||
{% set event = event|merge({ talk: page })|merge(site.events[event.id]) %}
|
||||
{% set events = events|merge([event]) %}
|
||||
{% endfor %}
|
||||
|
||||
{% include "talks-table" with { events: events, hide_talk: true } %}
|
||||
</div>{# .talk-events #}
|
||||
{% endblock %}
|
||||
|
|
|
@ -102,8 +102,35 @@ use: [posts]
|
|||
<h1>Experience</h1>
|
||||
|
||||
{% for experience in page.experiences %}
|
||||
{% include "experience/item" with {
|
||||
experience: experience,
|
||||
company: site.companies[experience.company]
|
||||
} %}
|
||||
{% set company = site.companies[experience.company] %}
|
||||
|
||||
<div class="experience-item{% if company.logo %} has-logo{% endif %}">
|
||||
{% if company.logo %}
|
||||
<div class="experience-item-logo">
|
||||
<img src="{{ site.images_url }}/assets/images/experience/{{ company.logo }}" alt="{{ company.name }} logo">
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<div class="experience-item-inner">
|
||||
<h2>{{ company.name }}</h2>
|
||||
|
||||
{% if company.url -%}
|
||||
<a class="experience-item-website" href="{{ company.url }}">
|
||||
{{- company.url -}}
|
||||
</a>
|
||||
{%- endif %}
|
||||
|
||||
<div class="experience-item-role">
|
||||
{{- experience.role }} from {{ experience.start }} to {{ experience.end|default('Present') -}}
|
||||
{%- if experience.location %} ({{ experience.location }}){% endif %}.
|
||||
</div>
|
||||
|
||||
{% if experience.description %}
|
||||
<div class="experience-item-description">
|
||||
{{ experience.description|markdown }}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
</div>{# /.inner #}
|
||||
</div>
|
||||
{% endfor %}
|
||||
|
|
Reference in a new issue