Skip to content

Commit 3e8e8bf

Browse files
committedAug 24, 2019
Cool new number flags for getting started page
1 parent bc0663f commit 3e8e8bf

File tree

3 files changed

+60
-6
lines changed

3 files changed

+60
-6
lines changed
 

‎_includes/components/lists.css

+33-1
Original file line numberDiff line numberDiff line change
@@ -183,4 +183,36 @@ main p a.buzzword {
183183
display: inline-block;
184184
white-space: nowrap;
185185
}
186-
}
186+
}
187+
188+
.numberflag {
189+
display: inline-flex;
190+
align-items: center;
191+
justify-content: center;
192+
background-color: #dff7ff;
193+
border-radius: 50%;
194+
width: 1.75em;
195+
height: 1.75em;
196+
font-weight: 600;
197+
}
198+
h1 .numberflag,
199+
h2 .numberflag,
200+
h3 .numberflag,
201+
h4 .numberflag,
202+
h5 .numberflag {
203+
width: 1.25em;
204+
height: 1.25em;
205+
}
206+
h2 .numberflag {
207+
position: relative;
208+
margin-right: 0.25em; /* 10px /40 */
209+
}
210+
h2 .numberflag:after {
211+
content: " ";
212+
position: absolute;
213+
bottom: -1px;
214+
left: 0;
215+
height: 1px;
216+
background-color: #fff;
217+
width: calc(100% + 0.4em); /* 16px /40 */
218+
}

‎docs/getting-started.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Eleventy is [available on npm](https://www.npmjs.com/package/@11ty/eleventy) and
1717

1818
_Don’t include `~ $` or `~/eleventy-sample $` when you run these commands (you can’t copy and paste that text anyway)._
1919

20-
## Step 1: Make a Project Directory
20+
## <span class="numberflag"><span class="sr-only">Step</span> 1</span> Make a Project Directory
2121

2222
Make a directory with your project in it.
2323

@@ -32,7 +32,7 @@ cd eleventy-sample
3232

3333
You’re now in your new project’s directory.
3434

35-
## Step 2: Install Eleventy
35+
## <span class="numberflag"><span class="sr-only">Step</span> 2</span> Install Eleventy
3636

3737
### Create a package.json
3838

@@ -60,7 +60,7 @@ npm install --save-dev @11ty/eleventy
6060

6161
Installing locally is preferred to [global installation](/docs/global-installation/).
6262

63-
## Step 3: Run Eleventy
63+
## <span class="numberflag"><span class="sr-only">Step</span> 3</span> Run Eleventy
6464

6565
We can use npx to run our local project version’s version of Eleventy. Let’s make sure our installation went okay and check what version we’re using:
6666

@@ -86,7 +86,7 @@ Processed 0 files in 0.02 seconds
8686

8787
This makes sense—we have an empty folder with no templates inside.
8888

89-
## Step 4: Create some templates
89+
## <span class="numberflag"><span class="sr-only">Step</span> 4</span> Create some templates
9090

9191
Let’s run two commands to create two new template files.
9292

@@ -114,7 +114,7 @@ Processed 2 files in 0.10 seconds
114114

115115
This will compile any content templates in the current directory or subdirectories into the output folder (defaults to `_site`).
116116

117-
## Step 5: Look at your templates
117+
## <span class="numberflag"><span class="sr-only">Step</span> 5</span> Gaze upon your templates
118118

119119
Use `--serve` to start up a hot-reloading local web server.
120120

‎styleguide.njk

+22
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,28 @@ layout: layouts/docs.njk
4545
</ul>
4646
</div>
4747

48+
<h3>Number Flags</h3>
49+
50+
<div class="elv-sg-component">
51+
<span class="numberflag">1</span>
52+
<span class="numberflag">2</span>
53+
<span class="numberflag">3</span>
54+
<span class="numberflag">4</span>
55+
<span class="numberflag">5</span>
56+
<span class="numberflag">6</span>
57+
<span class="numberflag">7</span>
58+
<span class="numberflag">8</span>
59+
<span class="numberflag">9</span>
60+
</div>
61+
62+
<h4>Number Flags in Headings</h4>
63+
<div class="elv-sg-component">
64+
<h2><span class="numberflag"><span class="sr-only">Step</span> 1</span> Notice how the border disappears under the flag</h2>
65+
<h3><span class="numberflag"><span class="sr-only">Step</span> 2</span> Do a thing</h3>
66+
<h4><span class="numberflag"><span class="sr-only">Step</span> 3</span> Do a thing</h4>
67+
<h5><span class="numberflag"><span class="sr-only">Step</span> 4</span> Do a thing</h5>
68+
</div>
69+
4870
<h2>Blockquotes</h2>
4971

5072
<div class="elv-sg-component">

0 commit comments

Comments
 (0)