Skip to content

Commit c792f1b

Browse files
authored
Add introduction sections (#1497)
1 parent ba699dd commit c792f1b

File tree

11 files changed

+149
-26
lines changed

11 files changed

+149
-26
lines changed

_sass/2017/components/h3-section.scss

Lines changed: 53 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -130,10 +130,7 @@
130130
}
131131

132132
/* Description paragraphs */
133-
& > pre ~ p,
134-
& > ul ~ p,
135-
& > iframe ~ p,
136-
& > table ~ p {
133+
& p {
137134
background: $gray-bg;
138135
color: $gray-text;
139136

@@ -212,3 +209,55 @@ ul.-also-see.-also-see.-also-see {
212209
display: block;
213210
}
214211
}
212+
213+
.h3-section.-intro {
214+
& > .body > p {
215+
@include font-size(1);
216+
}
217+
218+
& > .body > ul > li {
219+
padding-left: 16px;
220+
position: relative;
221+
}
222+
223+
& > .body > ul > li::before {
224+
display: none;
225+
}
226+
227+
// & > .body > ul > li:hover {
228+
// background: rgba($base-b3, 0.1);
229+
// }
230+
231+
& > .body > ul > li > a {
232+
@include font-size(1);
233+
display: block;
234+
font-weight: bold;
235+
}
236+
237+
// Cover the full card
238+
& > .body > ul > li > a::before {
239+
content: '';
240+
@include ion-md-arrow-forward(24px, $base-a3);
241+
position: absolute;
242+
right: 16px;
243+
top: 50%;
244+
margin-top: -12px;
245+
}
246+
& > .body > ul > li:hover > a::before {
247+
@include ion-md-arrow-forward(24px, $base-a);
248+
}
249+
250+
& > .body > ul > li > a::after {
251+
content: '';
252+
position: absolute;
253+
display: block;
254+
top: 0;
255+
left: 0;
256+
bottom: 0;
257+
right: 0;
258+
}
259+
260+
& > .body > ul > li em {
261+
color: $base-mute;
262+
}
263+
}

_sass/2017/components/main-heading.scss

Lines changed: 23 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,18 +16,13 @@
1616
font-weight: 200;
1717
font-family: $body-font;
1818
margin: 0;
19+
text-align: center;
1920
}
2021

2122
& > h1 > em {
2223
font-style: normal;
2324
color: lighten($gray-text, 20%);
2425
}
25-
}
26-
27-
.main-heading.-center {
28-
& > h1 {
29-
text-align: center;
30-
}
3126

3227
& > .pubbox {
3328
margin-top: 16px;
@@ -42,6 +37,28 @@
4237
}
4338
}
4439

40+
.UseCompactHeader .main-heading {
41+
@media (min-width: 769px) {
42+
& {
43+
display: flex;
44+
align-items: flex-end;
45+
margin-bottom: 32px;
46+
}
47+
48+
& > h1 {
49+
flex: 1 0 auto;
50+
text-align: left;
51+
padding-right: 32px;
52+
}
53+
54+
& > .pubbox {
55+
flex: 0 0 auto;
56+
margin-top: 0;
57+
margin-bottom: 0;
58+
}
59+
}
60+
}
61+
4562
/**
4663
* Add some space in preview mode
4764
*/

bash.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,14 @@ Getting started
1818
---------------
1919
{: .-three-column}
2020

21+
### Introduction
22+
{: .-intro}
23+
24+
This is a quick reference to getting started with Bash scripting.
25+
26+
- [Learn bash in y minutes](https://learnxinyminutes.com/docs/bash/) _(learnxinyminutes.com)_
27+
- [Bash Guide](http://mywiki.wooledge.org/BashGuide) _(mywiki.wooledge.org)_
28+
2129
### Example
2230

2331
```bash

enzyme.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,16 @@ keywords:
1111
- wrap.setProps()
1212
- "wrap.find().simulate('click')"
1313
- "wrap.contains(<div/>)"
14-
intro: |
15-
[Enzyme](http://airbnb.io/enzyme) lets you write unit tests for React components. This guide covers Enzyme 3.x.
1614
---
1715

1816
## Getting started
1917

18+
### Introduction
19+
20+
[Enzyme](http://airbnb.io/enzyme) lets you write unit tests for React components. This guide covers Enzyme 3.x.
21+
22+
- [Enzyme website](https://enzymejs.github.io/enzyme/) _(enzymejs.github.io)_
23+
2024
### Mounting
2125
{: .-prime}
2226

[email protected]

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,16 @@ layout: 2017/sheet
55
updated: 2017-10-12
66
weight: -1
77
deprecated_by: /enzyme
8-
intro: |
9-
[Enzyme](http://airbnb.io/enzyme) lets you write unit tests for React components. This guide covers Enzyme 2.x.
108
---
119

1210
## Getting started
1311
{: .-three-column}
1412

13+
### Introduction
14+
{: .-intro}
15+
16+
**(Deprecated)** [Enzyme](http://airbnb.io/enzyme) lets you write unit tests for React components. This guide covers a previous version (v2.x).
17+
1518
### Mounting
1619
{: .-prime}
1720

factory_bot.md

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,27 @@ title: Factory Bot
33
category: Ruby libraries
44
layout: 2017/sheet
55
weight: -3
6-
updated: 2020-06-24
6+
updated: 2020-07-06
77
keywords:
88
- "FactoryBot.define do"
99
- "factory :user"
1010
- "first_name 'John'"
1111
- "sequence(:username) { |n| \"user#{n}\" }"
1212
tags: [Featurable]
13-
intro: |
14-
[Factory Bot](http://www.rubydoc.info/gems/factory_bot/) is a helper for writing factories for Ruby tests.
15-
It was previously known as Factory Girl. For older versions, use `FactoryGirl` instead of `FactoryBot`.
1613
---
1714

1815
## Factories
1916
{: .-three-column}
2017

18+
### Introduction
19+
{: .-intro}
20+
21+
[Factory Bot](http://www.rubydoc.info/gems/factory_bot/) is a helper for writing factories for Ruby tests. It was previously known as Factory Girl. For older versions, use `FactoryGirl` instead of `FactoryBot`.
22+
23+
- [Factory Bot documentation](http://www.rubydoc.info/gems/factory_bot/) _(rubydoc.info)_
24+
- [Getting started](https://github.com/thoughtbot/factory_bot/blob/master/GETTING_STARTED.md) _(github.com)_
25+
- [Source code](https://github.com/thoughtbot/factory_bot) _(github.com)_
26+
2127
### Defining factories
2228

2329
```ruby

fastify.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,18 @@ title: Fastify
33
category: JavaScript libraries
44
layout: 2017/sheet
55
updated: 2017-09-23
6-
intro: |
7-
[Fastify](https://github.com/fastify/fastify) lets you create HTTP servers in Node.js with good performance. This guide targets fastify v0.28.x.
86
---
97

108
## Getting started
119

10+
### Introduction
11+
{: .-intro}
12+
13+
[Fastify](https://github.com/fastify/fastify) lets you create HTTP servers in Node.js with good performance. This guide targets fastify v0.28.x.
14+
15+
- [Fastify source code](https://github.com/fastify/fastify) _(github.com)_
16+
- [Documentation](https://github.com/fastify/fastify#documentation) _(github.com)_
17+
1218
### Hello world
1319
{: .-prime}
1420

go.md

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,13 @@ updated: 2020-06-21
1111
## Getting started
1212
{: .-three-column}
1313

14+
### Introduction
15+
{: .-intro}
16+
17+
- [A tour of Go](https://tour.golang.org/welcome/1) _(tour.golang.org)_
18+
- [Go repl](https://repl.it/languages/go) _(repl.it)_
19+
- [Golang wiki](https://github.com/golang/go/wiki/) _(github.com)_
20+
1421
### Hello world
1522
{: .-prime}
1623

@@ -576,10 +583,17 @@ See: [Pointer receivers](https://tour.golang.org/methods/4)
576583

577584
## References
578585

586+
### Official resources
587+
{: .-intro}
588+
579589
- [A tour of Go](https://tour.golang.org/welcome/1) _(tour.golang.org)_
580590
- [Golang wiki](https://github.com/golang/go/wiki/) _(github.com)_
581-
- [Awesome Go](https://awesome-go.com/) _(awesome-go.com)_
582-
- [Go by Example](https://gobyexample.com/) _(gobyexample.com)_
583591
- [Effective Go](https://golang.org/doc/effective_go.html) _(golang.org)_
592+
593+
### Other links
594+
{: .-intro}
595+
596+
- [Go by Example](https://gobyexample.com/) _(gobyexample.com)_
597+
- [Awesome Go](https://awesome-go.com/) _(awesome-go.com)_
584598
- [JustForFunc Youtube](https://www.youtube.com/channel/UC_BzFbxG2za3bp5NRRRXJSw) _(youtube.com)_
585599
- [Style Guide](https://github.com/golang/go/wiki/CodeReviewComments) _(github.com)_

httpie.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,17 @@ weight: -3
66
updated: 2020-07-05
77
description: |
88
$ http POST http://example.com name="John" Host:example.com — JSON, cookies, files, auth, and other httpie examples.
9-
intro: |
10-
[HTTPie](https://httpie.org/) is a command-line HTTP client.
119
---
1210

11+
### Intorduction
12+
{: .-intro}
13+
14+
[HTTPie](https://httpie.org/) is a command-line HTTP client.
15+
16+
- [HTTPie website](https://httpie.org/) _(httpie.org)_
17+
- [HTTPie documentation](https://httpie.org/docs) _(httpie.org)_
18+
- [Try it online](https://httpie.org/run) _(httpie.org)_
19+
1320
### Parameters
1421

1522
```bash

sass.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,13 @@ keywords:
1818
## Basics
1919
{: .-three-column}
2020

21+
### Introduction
22+
{: .-intro}
23+
24+
This is a quick reference to [Sass stylesheets](https://sass-lang.com).
25+
26+
- [Sass documentation](https://sass-lang.com/documentation) _(sass-lang.com)_
27+
2128
### Variables
2229

2330
```scss

0 commit comments

Comments
 (0)