Compare commits

...

4 Commits

@ -1,3 +1,5 @@
+++
title = "Projekty"
template = "project_list.html"
page_template = "project.html"
+++

@ -0,0 +1,4 @@
+++
title = "Project 0"
description = "Lorem ipsum dolor sit amet, qui minim labore adipisicing minim sint cillum sint consectetur cupidatat."
+++

@ -0,0 +1,3 @@
+++
title = "Project 1"
+++

@ -6,9 +6,10 @@ $width-narrow: $width-wrap*0.75;
$col-accent: #fc0;
$col-dark: #131516;
$col-medium: lighten($col-dark, 4);
$col-light: lighten($col-dark, 18);
$col-medium: lighten($col-dark, 8);
$col-light: lighten($col-dark, 30);
$col-white: #e8e6e3;
$col-offwhite: darken($col-white, 25);
*, *:before, *:after {
@ -155,3 +156,46 @@ body>footer {
padding: 1rem 0;
}
}
.project-list {
display: grid;
grid-template-columns: 1fr;
gap: 1rem;
background: none;
padding: 0;
@media only screen and (min-width: $width-narrow) {
grid-template-columns: 1fr 1fr;
}
&>a {
display: flex;
min-height: 10rem;
background: $col-dark;
color: inherit;
.title {
font-weight: bold;
font-size: 1.5em;
margin-bottom: .5em;
line-height: 1;
}
.description {
padding: 1.5em 1em;
width: 100%;
p {
margin: 0;
line-height: 1.5;
color: $col-offwhite;
}
}
.image {
display: block;
height: 100%;
width: 12rem;
}
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 69 B

@ -1,3 +1,5 @@
{% import "macros.html" as macros %}
<!DOCTYPE html>
<html lang="cs">
<head>

@ -0,0 +1,25 @@
{% macro project_list() %}
{% for project in section.pages %}
<a href="{{ project.permalink }}">
{% set_global image = "/static/img/project_placeholder.png" %}
{% for asset in project.assets %}
{% if asset is matching("[img.](jpg|png)$") %}
{% set_global image = asset %}
{% break %}
{% endif %}
{% endfor %}
{% set image = resize_image(path=image, width=300, height=300, op="fill") %}
<div class="image" style="background-image: url('{{ image.url }}')"></div>
<div class="description">
<div class="title">{{ project.title }}</div>
<p>
{% if project.description %}
{{ project.description }}
{% else %}
&hellip;
{% endif %}
</p>
</div>
</a>
{% endfor %}
{% endmacro %}

@ -0,0 +1,11 @@
{% extends "base.html" %}
{% block content %}
<section>
<h1>{{ page.title }}</h1>
{{ page.content | safe }}
</section>
<section>
&hellip;
</section>
{% endblock content %}

@ -0,0 +1,7 @@
{% extends "base.html" %}
{% block content %}
<section class="project-list">
{{ macros::project_list() }}
</section>
{% endblock content %}
Loading…
Cancel
Save