Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Part Two #40

Merged
merged 125 commits into from
Mar 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
125 commits
Select commit Hold shift + click to select a range
239fd40
Update NVMRC to LTS 20
Mar 13, 2024
44a2b63
Install USWDS & Compile
Mar 13, 2024
f01c191
Create initial gulpfile & import assets
Mar 13, 2024
ab24dbe
Add USWDS assets
Mar 13, 2024
ffab39b
Create initial page with alias
Mar 13, 2024
83f4b41
Templatize hero
Mar 14, 2024
e7c3688
Add banner and identifier markup
mahoneycm Mar 15, 2024
d7c378d
Step 7: Convert project styles to scss and include in compile
mahoneycm Mar 15, 2024
b95383d
Step 7: Implement color and font tokens
mahoneycm Mar 15, 2024
b7f9a7d
Step 8: Add theme settings and remove unnecessary styles
mahoneycm Mar 15, 2024
8540d00
Swap main child combinator for descendant selector
mahoneycm Mar 18, 2024
2345faa
Create original tutorial end section with link to part 2
mahoneycm Mar 18, 2024
7576929
Convert css to scss; adjust previous styles to allow for two column l…
mahoneycm Mar 18, 2024
80441b4
Begin building out part 2 instructions
mahoneycm Mar 18, 2024
f1c42aa
Merge pull request #27 from uswds/jm-mc-setup--complete-starting-point
Mar 19, 2024
0af102c
Update hero + step one link
mahoneycm Mar 19, 2024
907889e
Begin part two instructions
mahoneycm Mar 19, 2024
4d688cd
Update uswds package imports
mahoneycm Mar 19, 2024
249d420
Update uswds theme settings; add ut-card styles
mahoneycm Mar 19, 2024
454acb8
Merge branch 'jm-mc-setup' into jm-mc-setup--create-instructions
mahoneycm Mar 19, 2024
ecc0f36
Create part-three.html
mahoneycm Mar 19, 2024
a11cabb
Merge branch 'jm-mc-setup--create-instructions' of github.com:uswds/u…
mahoneycm Mar 19, 2024
2329412
Use partials for footer and banner on index pages
mahoneycm Mar 19, 2024
f7b9287
Update banner && footer partials img asset paths
mahoneycm Mar 19, 2024
8ebafe4
Merge pull request #29 from uswds/jm-mc-setup--create-instructions
Mar 19, 2024
775a89a
Separate sticky classes & use default markup
Mar 19, 2024
92f3211
Comment out customizations
Mar 19, 2024
c33a88a
Fix indents in card body.
Mar 19, 2024
12ff31a
Update quotes
Mar 19, 2024
4f86ef0
Merge pull request #30 from uswds/jm-mc-exercise-01
Mar 19, 2024
f22ffcb
Create and use testimonial component partial
mahoneycm Mar 19, 2024
ff84bf9
Create and forward ut-testimonial styles
mahoneycm Mar 19, 2024
84c6c51
Merge branch 'jm-mc-setup' of github.com:uswds/uswds-tutorial into cm…
mahoneycm Mar 19, 2024
6fdc5f2
Update testimonial header font, size, and weight
mahoneycm Mar 19, 2024
1b4c780
Update all testimonial styles with USWDS functions or mixins
mahoneycm Mar 19, 2024
5c284e7
Remove sticky and margin utility classes from card/ut-testimonial div
mahoneycm Mar 19, 2024
7d11931
Merge pull request #31 from uswds/cm-mc-part-3
Mar 19, 2024
938aee0
Update permalink to `extend`
Mar 19, 2024
3a4672b
Removes all references from usa-card classes from ut-testimonial
mahoneycm Mar 20, 2024
4b1b3a5
Text align center
mahoneycm Mar 20, 2024
1164c5b
Update testimonial body class name; add new lines
mahoneycm Mar 20, 2024
7dfd648
Update extend url in first tutorial
Mar 20, 2024
b23264d
Fix hero links, update `extend` working branch
Mar 20, 2024
f310420
Update extend hero body
Mar 20, 2024
18247b9
Merge pull request #33 from uswds/jm-hero-text
Mar 20, 2024
ebfe5cf
Migrate mixins to available css properties
mahoneycm Mar 20, 2024
a68f520
Support asdf with a tool-versions file
thisisdano Mar 20, 2024
b91188c
Remove redundant flex styles
mahoneycm Mar 20, 2024
e264b0a
Testimonial add semicolon to margin-left
Mar 20, 2024
410d390
Merge pull request #32 from uswds/cm-mc-setup-new-testimonial
Mar 20, 2024
f8fa3b7
Improve size and color of demo column
thisisdano Mar 20, 2024
4f043bb
Improve code readability / remove wrap
thisisdano Mar 20, 2024
3fbb666
Simplify custom card
thisisdano Mar 20, 2024
beb2818
Merge branch 'cm-mc-setup-new-testimonial' into jm-mc-setup
thisisdano Mar 20, 2024
844f29e
Update step one instructions
mahoneycm Mar 20, 2024
c4198ef
Update step two instructions
mahoneycm Mar 20, 2024
4a68759
Create step 3 instructions
mahoneycm Mar 20, 2024
51a92a6
Add necessary components for Part Two
thisisdano Mar 20, 2024
6d2ac7c
Merge branch 'jm-mc-setup' into cm-mc-setup-instruction-layout
mahoneycm Mar 20, 2024
9a2ccd5
Remove hero in Part Two
thisisdano Mar 20, 2024
0157f7d
Start on card customization section
thisisdano Mar 20, 2024
1f6c79f
Improve clarity around "use"ing uswds-core
thisisdano Mar 20, 2024
1ae2b83
Use a less extreme border radius
thisisdano Mar 20, 2024
b92e8de
Merge branch 'jm-mc-setup' into cm-mc-setup-instruction-layout
thisisdano Mar 20, 2024
9a5eae2
Merge pull request #36 from uswds/cm-mc-setup-instruction-layout
thisisdano Mar 20, 2024
b37be06
Update 11ty to catch and load Sass changes
thisisdano Mar 20, 2024
1904143
Use scrolling for terminal displayes
thisisdano Mar 20, 2024
03b54fa
Simplify includes structure
thisisdano Mar 20, 2024
b67a03f
Fix typos
Mar 21, 2024
d8fd508
Additional
Mar 21, 2024
5df4713
Update href to intro links
Mar 21, 2024
0c254e7
Merge pull request #37 from uswds/jm-typos
Mar 21, 2024
b5c61b7
Merge branch 'jm-mc-setup' of github.com:uswds/uswds-tutorial into jm…
Mar 21, 2024
7cbda3e
Change `you will → you'll` for consistency
Mar 21, 2024
de0c621
Shorten initial paragraph
Mar 21, 2024
44087ad
Consistent header punctuation
Mar 21, 2024
d29e438
Part one: edits and grammar fixes
Mar 21, 2024
421ac80
Consistent `let's`
Mar 21, 2024
12b986b
Step three edits
Mar 21, 2024
758983f
Instruction refinement
mahoneycm Mar 21, 2024
892d253
Replace ut- references with my-
mahoneycm Mar 21, 2024
c4be99b
Merge branch 'jm-mc-setup' of github.com:uswds/uswds-tutorial into cm…
mahoneycm Mar 21, 2024
5221d70
Merge pull request #39 from uswds/cm-mc-instruction-refinement
thisisdano Mar 21, 2024
19a4017
Use my- instead of ut-
thisisdano Mar 21, 2024
267f304
Always include testimonial
thisisdano Mar 21, 2024
4ba006c
Tighten space between banner and Part Two H1
thisisdano Mar 21, 2024
f0681d0
Merge branch 'jm-mc-setup' of https://github.com/uswds/uswds-tutorial…
thisisdano Mar 21, 2024
86a8181
Add testimonial refinements
thisisdano Mar 21, 2024
3f4c7ca
Update and refine testimonial steps
thisisdano Mar 21, 2024
3db2ed7
Even out padding in demo column
thisisdano Mar 21, 2024
6ad5248
Revert to clean Part Two
thisisdano Mar 21, 2024
5f61242
Revert back to base
thisisdano Mar 21, 2024
4fa83aa
Merge branch 'jm-mc-setup' into jm-copy-edits
thisisdano Mar 21, 2024
c18c86f
Merge pull request #38 from uswds/jm-copy-edits
thisisdano Mar 21, 2024
c3c5ede
Merge branch 'jm-mc-setup' into mc-start-at-part-two
thisisdano Mar 21, 2024
750979f
Use consistent periods in heds
thisisdano Mar 21, 2024
3f9bec2
Merge branch 'mc-start-at-part-two' into dw-add-part-two
thisisdano Mar 21, 2024
39f7d60
Fix `terminal` typo
Mar 21, 2024
0872ff0
Spacing fix
Mar 21, 2024
8fa0c29
Spacing and use SCSS partial instead of CSS for accuracy
Mar 21, 2024
0b555ec
Spacing
Mar 21, 2024
d38ab13
Remove repetitive stylesheet
Mar 21, 2024
67170fd
Spacing fixes
Mar 21, 2024
413f86e
Fix component path
Mar 21, 2024
9e3a114
Spacing fix
Mar 21, 2024
b8f463a
Update _includes/sxs/02-extending/part-three.html
Mar 21, 2024
cb462fe
Update _includes/sxs/02-extending/part-two.html
Mar 21, 2024
7014003
Merge pull request #41 from uswds/jm-more-edits
Mar 21, 2024
6bc7207
Merge branch 'mc-start-at-part-two' of github.com:uswds/uswds-tutoria…
Mar 21, 2024
c0177f5
Step 3 instructions: Add svg class, width, and height instrucitons
mahoneycm Mar 21, 2024
a1e19d8
Update touch instructions file path
mahoneycm Mar 21, 2024
1995a44
Clarify `$theme-border-radius-lg` is global border setting
Mar 21, 2024
d73deb8
Merge pull request #42 from uswds/cm-mc-additional-refinement
Mar 21, 2024
76828d7
Update components dir references in theme-custom-styles instructions
mahoneycm Mar 21, 2024
39b86de
Fix my-testimonial__profile indentation
mahoneycm Mar 21, 2024
60bb486
Update intro h1
Mar 21, 2024
9af7f3a
Update references to _theme/components in file names
mahoneycm Mar 21, 2024
59b23e4
Adjust add/blur styles on testimonial quote addition
mahoneycm Mar 21, 2024
80d9577
Merge branch 'jm-mc-setup' of github.com:uswds/uswds-tutorial into jm…
Mar 21, 2024
ddfb23a
Add missing semi-colon
mahoneycm Mar 21, 2024
bb8564d
Merge pull request #43 from uswds/jm-runthru-edits
thisisdano Mar 21, 2024
1f52a44
Merge pull request #25 from uswds/jm-mc-setup
thisisdano Mar 21, 2024
795d7fd
Merge branch 'dw-add-part-two' into dw-temp-thing
thisisdano Mar 21, 2024
93904d0
Merge pull request #45 from uswds/dw-temp-thing
thisisdano Mar 21, 2024
ce1fed0
Remove uswds deps
thisisdano Mar 21, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .eleventy.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
module.exports = function (eleventyConfig) {
eleventyConfig.addPassthroughCopy("assets");
eleventyConfig.addWatchTarget("./_theme/");
eleventyConfig.setWatchThrottleWaitTime(2000); // in milliseconds
let pathPrefix = "/";

if (process.env.BASEURL) {
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
18
20
1 change: 1 addition & 0 deletions .tool-versions
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
nodejs 20.9.0
15 changes: 15 additions & 0 deletions _includes/card.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<div class="usa-card">
<div class="usa-card__container">
<div class="usa-card__header">
<h2 class="usa-card__heading">Card component</h2>
</div>
<div class="usa-card__body">
<p>
Lorem ipsum dolor sit amet consectetur adipisicing elit. Facilis earum tenetur quo cupiditate, eaque qui officia recusandae.
</p>
</div>
<div class="usa-card__footer">
<a href="#" class="usa-button">Visit Florida Keys</a>
</div>
</div>
</div>
14 changes: 0 additions & 14 deletions _includes/hero.html

This file was deleted.

File renamed without changes.
File renamed without changes.
27 changes: 27 additions & 0 deletions _includes/site/hero.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<section class="hero">
<h1 class="hero-message">
<span>{{ hero.heading_alt }}</span>
<span>{{ hero.heading }}</span>
</h1>
<p class="under-hero">
{{ hero.body }}
</p>
{% if hero.button_group %}
<div class="button-list">

{% for button in hero.button_group %}
<a
class="button primary {% if secondary %}secondary{% endif %}"
href="{{ button.href }}">
{{ button.label }}
<span
class="material-icons right"
aria-hidden="true">arrow_forward</span>
</a>
{% endfor %}
</div>
{% endif %}
</section>
<picture class="promo-art">
<img src="https://doodleipsum.com/700x700/outline" height="800" width="800" alt="a random doodle">
</picture>
30 changes: 30 additions & 0 deletions _includes/sxs/02-extending/part-intro.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<section class="part intro">
<h1>Part Two</h1>
<h2>Theming, customizing, extending</h2>
<p class="subhed">Take USWDS and make it your own.</p>
<p class="subhed">In this section of the tutorial, you'll expand on theming components. Then you'll learn creating custom project styles for our components. Finally, you'll extend a component to create a custom component!</p>
<h3>Contents</h3>
<ul class="contents">
<li>
<a class="contents-item" href="#part-one">
<span class="contents-part">1</span>
<span class="contents-title">Theming USWDS components</span>
<span class="material-icons right" aria-hidden="true">arrow_forward</span>
</a>
</li>
<li>
<a class="contents-item" href="#part-two">
<span class="contents-part">2</span>
<span class="contents-title">Writing custom styles</span>
<span class="material-icons right" aria-hidden="true">arrow_forward</span>
</a>
</li>
<li>
<a class="contents-item" href="#part-three">
<span class="contents-part">3</span>
<span class="contents-title">Extending USWDS components</span>
<span class="material-icons right" aria-hidden="true">arrow_forward</span>
</a>
</li>
</ul>
</section>
98 changes: 98 additions & 0 deletions _includes/sxs/02-extending/part-one.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
<section class="part one" id="part-one">
<div class="alert margin-y-3">
<p><strong>Heads up!</strong> If you haven't completed part one of this tutorial you'll be unable to complete certain steps throughout this section! Please complete the original tutorial before moving on to Extending USWDS.</p>
<div class="button-list">
<a class="button primary" href="/">Return to Learn how to use USWDS<span class="material-icons right" aria-hidden="true">arrow_forward</span></a>
</div>
</div>
<h2><span>Part one</span> Customize a card with theme settings</h2>
<p>
On the opposite side of the screen you'll see a USWDS Card component. Let's customize this card with theme settings.
</p>
<h3 class="step">View available theme settings.</h3>
<p class="step-description">
Visit the <a href="https://designsystem.digital.gov/components/card/#component-settings-card">USWDS Card component settings table</a> to see a list of available settings. Settings allow you to apply styles globally without writing custom CSS. Today we're going to give our card a light golden look.
</p>
<h3 class="step">Customize border settings.</h3>
<p class="step-description">
Let's start with the card border. We'll remove the border and make the card rounder by increasing the border radius.
</p>
<p class="step-description">
We want to give our card a border radius of 2 units. To do that we'll set the value of the global border radius to <strong>lg</strong> then set the value of the large border radius to 2.
</p>
<div class="editor">
<h4 class="filename"><span class="material-icons" aria-hidden="true">description</span> _theme/_uswds-theme.scss</h4>
<pre class="blur">@use "uswds-core" with (
...
</pre><pre class="add"> $theme-border-radius-lg: 2,
$theme-card-border-radius: "lg",
$theme-card-border-width: 0,
</pre>
<pre class="blur">);</pre>
</div>

<h3 class="step">Customize type settings.</h3>
<p class="step-description">
Next, let's update the typesetting of our header to use a <strong>sans</strong> font, increase the size ("xl"), and use a tight line height (2).
</p>
<div class="editor">
<h4 class="filename"><span class="material-icons" aria-hidden="true">description</span> _theme/_uswds-theme.scss</h4>
<pre class="blur">@use "uswds-core" with (
...
$theme-border-radius-lg: 2,
$theme-card-border-radius: "lg",
$theme-card-border-width: 0,</pre>
<pre class="add"> $theme-card-header-typeset: ("sans", "xl", 2),
</pre><pre class="blur">);</pre>
</div>
<p class="step-description">
Save, wait for the Sass to compile, and reload. You'll see the updated border and font settings shape the card component! All without having to write any custom CSS.
</p>

<h3 class="step">Customize perimeter padding settings</h3>
<p class="step-description">
And while we're add it, let's add a bit more padding to help the component feel a little more comfortable and less cramped.
</p>
<div class="editor">
<h4 class="filename"><span class="material-icons" aria-hidden="true">description</span> _theme/_uswds-theme.scss</h4>
<pre class="blur">@use "uswds-core" with (
...
$theme-border-radius-lg: 2,
$theme-card-border-radius: "lg",
$theme-card-border-width: 0,
$theme-card-header-typeset: ("sans", "xl", 2),
</pre><pre class="add"> $theme-card-padding-perimeter: 4,</pre>
</div>
<p class="step-description">
Save and reload. Ah, that's nicer.
</p>


<h3 class="step">Customize primary color settings</h3>
<p class="step-description">
Finally, let's update our project's primary color, from blue to indigo.
</p>
<div class="editor">
<h4 class="filename"><span class="material-icons" aria-hidden="true">description</span> _theme/_uswds-theme.scss</h4>
<pre class="blur">@use "uswds-core" with (
...
$theme-border-radius-lg: 2,
$theme-card-border-radius: "lg",
$theme-card-border-width: 0,
$theme-card-header-typeset: ("sans", "xl", 2),
$theme-card-padding-perimeter: 4,

</pre><pre class="add"> $theme-color-primary-lighter: "indigo-20v",
$theme-color-primary-light: "indigo-40v",
$theme-color-primary: "indigo-60v",
$theme-color-primary-dark: "indigo-70v",
$theme-color-primary-darker: "indigo-80v",</pre><pre class="blur">);</pre>
</div>
<p class="step-description">
Save and reload. You'll see the card's button has gotten a bit purple-er.
</p>

<p class="step-description">
But maybe there are additional changes your team would like to make that aren't available in theme settings. In the next section we'll take a look at adding custom styles.
</p>
</section>
Loading
Loading