This repository has been archived on 2025-01-19. You can view files and clone it, but cannot push or open issues or pull requests.
oliverdavies.uk-old-sculpin/source/_layouts/project.html.twig

54 lines
1.6 KiB
Twig

{% extends 'page' %}
{% block content_wrapper %}
<main class="col-md-9">
{{ page.blocks.content_top|raw }}
{{ page.blocks.content|raw }}
{{ page.blocks.content_bottom|raw }}
</main>
{% endblock %}
{% block content_top %}
{{ parent() }}
{% if page.image %}
<div class="project--image">
<img class="img-responsive" src="/assets/images/projects/{{ page.image }}" alt="The {{ page.title }} website.">
</div>
{% endif %}
{% endblock %}
{% block content_bottom %}
{% if page.website %}
<div class="project--website">
<a href="{{ page.website }}" class="btn btn-primary">View the website</a>
</div>
{% endif %}
{% if page.company %}
{% set company = site.companies[page.company] %}
<div class="project--company{% if company.logo %} project--company__has-logo{% endif %}">
{% if page.freelance %}
<h2>Built for</h2>
{% else %}
<h2>Built whilst at</h2>
{% endif %}
{% if company.logo %}
{% set name = '<img src="/assets/images/experience/' ~ company.logo ~ '" alt="' ~ company.title ~ '">' %}
{% else %}
{% set name = company.title %}
{% endif %}
{% if company.website %}
<a href="{{ company.website }}" title="{{ company.title }}">
{{ name|raw }}
</a>
{% else %}
{{ name|raw }}
{% endif %}
</div>
{% endif %}
{% endblock %}