Skip to content

Commit

Permalink
Add task collection, layout, include and font
Browse files Browse the repository at this point in the history
  • Loading branch information
davepinch committed May 31, 2022
1 parent 208fa84 commit 8cc3450
Show file tree
Hide file tree
Showing 11 changed files with 95 additions and 2 deletions.
10 changes: 10 additions & 0 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,9 @@ collections:
recipes:
output: true
permalink: /:collection/:title/
tasks:
output: true
permalink: /:title/
topics:
output: true
permalink: /:title/
Expand Down Expand Up @@ -203,6 +206,13 @@ defaults:
values:
layout: single
author_profile: false
# _tasks
- scope:
path: "_tasks"
type: "tasks"
values:
layout: "task"
author_profile: false
# _topics
- scope:
path: "_topics"
Expand Down
3 changes: 3 additions & 0 deletions _includes/linked-card.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@
{% when "quote" %}
{% assign quote=p.quote | default: p.title %}
{% include quote.html quote=quote attribution=p.attribution %}
{% when "task" %}
{% assign task = p.task | default: p.title %}
{% include task.html task=task %}
{% endcase %}
</a>
</article>
Expand Down
3 changes: 3 additions & 0 deletions _includes/task.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<article class="task">
<section class="text">{{ include.task }}</section>
</article>
3 changes: 2 additions & 1 deletion _layouts/poster.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
<head>
<meta charset="utf-8" />
<title>{{ page.title }}</title>
<link rel="stylesheet" href="{{ '/assets/css/poster.css' | relative_url }}" />
<link rel="stylesheet" href="{{ '/assets/css/poster.css' | relative_url }}" />
<link rel="stylesheet" media="screen" href="{{ '/assets/fonts/DanaLibraryHand/DanaLibraryHand.css' | relative_url }}" type="text/css"/>
</head>

<body>
Expand Down
14 changes: 14 additions & 0 deletions _layouts/task.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
layout: poster
---
<section class="poster">
{% assign task = page.task | default: page.title %}
{% include task.html task=task %}
</section>

{{ content }}

<p>
<a href="http://margoburns.com/fonts/DanaLibraryHand/">Dana Library Hand</a> font by Margo Burns.
</p>

58 changes: 57 additions & 1 deletion assets/css/poster.scss
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,33 @@ body {
display: none;
}

.card .task {
height: 100%;
display: flex;
align-items: center;
justify-content: center;
width: 100%;
}

.card .task .text {
box-shadow: 3px 3px 10px 2px rgba(0,0,0,0.3);
color: #333;
font-family: 'DanaLibraryHand-Regular', cursive;
font-size: 18px;
height: 160px;
padding: 20px;
width: 160px;
}

.card .task .text {
background: #eae672;
transform: rotate(3deg);
-webkit-transform: rotate(3deg);
-moz-transform: rotate(3deg);
-o-transform: rotate(3deg);
-ms-transform: rotate(3deg);
}

.linked-list {
display: flex;
}
Expand Down Expand Up @@ -164,4 +191,33 @@ body {
padding-bottom: 32pt;
padding-top: 32pt;
text-align: center;
}
}

/* Adapted from http://creative-punch.net/2014/02/create-css3-post-it-note/ */

.poster .task {
height: 100%;
display: flex;
align-items: center;
justify-content: center;
width: 100%;
}

.poster .task .text {
box-shadow: 3px 3px 10px 2px rgba(0,0,0,0.3);
color: #333;
font-family: 'DanaLibraryHand-Regular', cursive;
font-size: 30px;
height: 300px;
padding: 20px;
width: 300px;
}

.poster .task .text {
background: #eae672;
transform: rotate(3deg);
-webkit-transform: rotate(3deg);
-moz-transform: rotate(3deg);
-o-transform: rotate(3deg);
-ms-transform: rotate(3deg);
}
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
6 changes: 6 additions & 0 deletions assets/fonts/DanaLibraryHand/DanaLibraryHand.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
@font-face {
font-family: 'DanaLibraryHand-Regular';
src: url('/assets/fonts/DanaLibraryHand/DanaLibraryHand-Regular.otf') format('opentype');
font-weight: normal;
font-style: normal;
}

0 comments on commit 8cc3450

Please sign in to comment.