Skip to content

Commit

Permalink
Add a bunch of patterns and stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasjbradley committed Jan 17, 2019
1 parent d399a53 commit e87d22f
Show file tree
Hide file tree
Showing 22 changed files with 145 additions and 11 deletions.
1 change: 1 addition & 0 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ patternbot:
background: "--color-secondary-light"
patterns:
brand.logos: "--color-primary-light"
icons.icons.micropachycephalosaurus: "--color-primary-dark"
rationales:
colors.primary: |
The primary colours represent herbivores & plants & greenery. They should be used for text and in foregrounds.
Expand Down
14 changes: 14 additions & 0 deletions _data/dinos.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
- title: "Hadrosaur"
details: "Rescue this wonderful dino"
button_text: "Save a Hadrosaur"
image: "hadrosaur.jpg"

- title: "Diplodocus"
details: "Save all the Diplodocuses!"
button_text: "Rescue a Diplo"
image: "diplodocus.jpg"

- title: "Iguanodon"
details: "Wonderful, kinda Iguanodon"
button_text: "Preserve an Iguanodon"
image: "iguanodon.jpg"
18 changes: 18 additions & 0 deletions _layouts/default.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<!DOCTYPE html>
<html lang="en-ca">
<head>
<meta charset="utf-8">
<title>Yay!</title>
<meta name="viewport" content="width=device-width,initial-scale=1">
<link href="/css/main.css" rel="stylesheet">
</head>
<body>

{% pattern header/header %}

<main>
{{content}}
</main>

</body>
</html>
1 change: 1 addition & 0 deletions _patterns/buttons/basic.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<a class="btn" href="#">{{include.text | default:'Rescue a dino'}}</a>
19 changes: 19 additions & 0 deletions _patterns/buttons/buttons.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
.btn {
background-color: var(--color-primary-dark);
border-color: var(--color-primary-dark);
color: var(--color-secondary-light);
}

.btn:hover {
background-color: var(--color-primary);
border-color: var(--color-primary);
}

.btn-ghost {
background-color: transparent;
color: var(--color-primary-dark);
}

.btn-ghost:hover {
color: var(--color-secondary-light);
}
17 changes: 17 additions & 0 deletions _patterns/buttons/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
title: "Buttons, buttons—oh my!"
description: |
Lots of different buttons styles, each for different reasons.
patterns:
basic:
title: "Super basic button"
description: |
The basic button should be used in almost all situations.
fields:
- name: text
type: string
example: "Rescue a Diplodocus"
ghost:
description: |
The Ghost Button should only be used on banners, and in situations where the background is a photo.
width: 320
1 change: 1 addition & 0 deletions _patterns/buttons/ghost.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<a class="btn btn-ghost">Adopt a Dino</a>
4 changes: 4 additions & 0 deletions _patterns/cards/cards.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.card {
border: 4px solid var(--color-primary-light);
border-radius: var(--border-radius);
}
8 changes: 8 additions & 0 deletions _patterns/cards/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
patterns:
image:
width: 400
fields:
- name: data
data:
source: site.data.dinos[2]
type: "Dino"
8 changes: 8 additions & 0 deletions _patterns/cards/image.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<div class="card chop">
<img class="img-flex" src="/images/dinos/{{include.data.image}}" alt="">
<div class="island-1-2">
<h2>{{include.data.title}}</h2>
<p>{{include.data.details}}</p>
{% pattern buttons/basic text=include.data.button_text %}
</div>
</div>
Empty file added _patterns/header/header.css
Empty file.
9 changes: 9 additions & 0 deletions _patterns/header/header.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<header class="masthead section-light">
<h1><img src="/images/logo.svg" alt="Dino Rescue"></h1>
<nav>
<ul>
<li><a href="/">Home</a></li>
<li><a href="/dinos/">Dinos</a></li>
</ul>
</nav>
</header>
8 changes: 8 additions & 0 deletions css/main.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
---

{% include_relative modules.css %}
{% include_relative grid.css %}
{% include_relative type.css %}
{% include_relative theme.css %}
{% pattern_css %}
2 changes: 2 additions & 0 deletions css/theme.css
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@

--font-primary: Georgia, serif;
--font-secondary: "PT Sans Narrow", sans-serif;

--border-radius: 8px;
}

/* @utility Apply the secondary typeface */
Expand Down
13 changes: 13 additions & 0 deletions dinos.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
layout: default
---

<h2>Dinos</h2>

<div class="grid">
{% for dino in site.data.dinos %}
<div class="unit xs-1 s-1 m-1-3">
{% pattern cards/image data=dino %}
</div>
{% endfor %}
</div>
Binary file added images/dinos/diplodocus.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/dinos/hadrosaur.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/dinos/iguanodon.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/dinos/stegosaurus.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions images/icons.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
19 changes: 8 additions & 11 deletions index.html
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
<!DOCTYPE html>
<html lang="en-ca">
<head>
<meta charset="utf-8">
<title>Yay!</title>
</head>
<body>
---
layout: default
---

<h1>It works!</h1>

</body>
</html>
<div class="grid">
<div class="unit xs-1 s-1 m-1-3 gutter-1-2">
{% pattern cards/image title="Iguanodon" details="Save a Iguanodon from utter destruction." image="iguanodon.jpg" button_text="Rescue and Iguanodon" %}
</div>
</div>
13 changes: 13 additions & 0 deletions sample-pages/dinos.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
layout: default
---

<h2>Dinos</h2>

<div class="grid">
{% for dino in site.data.dinos %}
<div class="unit xs-1 s-1 m-1-3">
{% pattern cards/image data=dino %}
</div>
{% endfor %}
</div>

0 comments on commit e87d22f

Please sign in to comment.