Skip to content

Commit 36ad2af

Browse files
committed
Adds ordering and updated docs
1 parent 932602c commit 36ad2af

14 files changed

+40
-5
lines changed

README.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ Dates are formatted with [date-fns](https://date-fns.org/), due to some wonkines
4242
{{ post.data.published_datetime | formatDateTime: "MMMM d, yyyy" }}
4343
```
4444

45-
# Social Media Images
45+
## Social Media Images
4646

4747
1. Presenter images are created at `/presenters/{{ slug }}/`
4848
2. Session images are created at `/{{ talks,tutorials }}/{{ slug }}/social/`
@@ -52,3 +52,14 @@ Dates are formatted with [date-fns](https://date-fns.org/), due to some wonkines
5252
1. When adding images, if they are below the "fold", consider adding a `loading="lazy"` attribute to the image tag.
5353
2. When adding images, consider adding an `alt` attribute to the image tag.
5454
3. Keep copy short and to the point. The site is most likely scanned, not read.
55+
4. Make sure to keep the styleguide up-to-date with any new components or styles.
56+
57+
## Styleguide
58+
59+
The styleguide lives at `/styleguide/` (respectively `styleguide.html`). The guide is built from content within `src/_content/styleguide/`. Each HTML page represents a section. Sections can be ordered with `order`. Each section can have a `description`.
60+
61+
When using code samples, be sure to use `{% capture code %}` to capture sample and pass it to the `code-snippet.html` include like so:
62+
63+
```liquid
64+
{% include "code-snippet.html", code:code, lang:'html' %}
65+
```

lib/collections.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ module.exports = function(config) {
3636
});
3737

3838
config.addCollection("guides", function(collectionApi) {
39-
return collectionApi.getFilteredByGlob("src/_content/styleguide/*.html");
39+
return collectionApi.getFilteredByGlob("src/_content/styleguide/*.html").sort((a, b) => a.data.order - b.data.order);
4040
});
4141

4242
config.addCollection("sponsorsByLevel", function(collectionApi) {

src/_content/styleguide/alerts.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
---
22
title: Alerts
3+
4+
order: 60
35
---
46
{%- capture code -%}<section class="p-4 bg-orange-100 rounded">
57
<h3 class="mb-4 text-lg font-bold font-heading lg:text-2xl">Attention!</h3>

src/_content/styleguide/badges.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
---
22
title: Badges
3+
4+
order: 50
5+
36
description: |
47
Badges are used to indicate status, denote a count, or to draw attention to an element. Badges are created by applying `.badge` to an element. Colors may be changed by applying a background color utility class, e.g. `bg-blue` to create a blue badge.
58
---

src/_content/styleguide/blocks-grids.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
---
22
title: "Blocks & Grids"
33

4+
order: 80
5+
46
description: |
57
Blocks and grids are the building blocks of the website. They help to organize content and create a visual hierarchy.
68

src/_content/styleguide/buttons.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
---
22
title: Buttons
3+
4+
order: 40
5+
36
description: |
47
Buttons are created by applying `.button` to an element. The button class is a utility class that applies padding, border, and background color.
58

src/_content/styleguide/cards.html

Lines changed: 0 additions & 3 deletions
This file was deleted.

src/_content/styleguide/colors.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
---
22
title: Colors
3+
4+
order: 20
5+
36
description: |
47
The full color palette is configured in `tailwind.config.js`. The following is a full list of all defined colors and their shades. Note that Tailwind does not provide all of these classes unless used in _source_ files (not compiled output).
58
---

src/_content/styleguide/forms.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
---
22
title: Forms
3+
4+
order: 70
35
---
46

57
{%- capture code -%}<form class="max-w-2xl p-4 mx-auto bg-white rounded lg:p-12" method="POST">

src/_content/styleguide/icons.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
---
22
title: Icons
33

4+
order: 30
5+
46
description: |
57
Icons are used to visually communicate an action or idea. The `.icon` class can be applied to give them a consistent width and height. Additional height and width classes can be applied to change their sizing, e.g. `w-12 h-12`.
68

src/_content/styleguide/logo-files.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
---
22
title: Logo files
33

4+
order: 0
5+
46
description: |
57
Logos are stored on GitHub in the [resources repository](https://github.com/djangocon/resources).
68

src/_content/styleguide/social-links.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
---
22
title: Social links
33

4+
order: 90
5+
46
description: |
57
Social links are used to direct users to your social media profiles. They are typically displayed in the footer of the website or with contact information for individuals.
68

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
---
22
title: Sponsor list
3+
4+
order: 100
35
---
46

57
{% include "sponsor-listing.html" %}

src/_content/styleguide/typography.html

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
---
22
title: Typography
3+
4+
order: 10
5+
6+
37
description: |
48
The default font stack is defined in `tailwind.config.js`. Long form text uses `prose`, and all other sizing is done with utility classes, specific to its use case. There are a few key sizing helper classes.
59

0 commit comments

Comments
 (0)