Skip to content

Commit cb3e51c

Browse files
authored
Add TSPL Go Further section and resource thumbnails (#227)
1 parent 7b821bc commit cb3e51c

File tree

7 files changed

+53
-16
lines changed

7 files changed

+53
-16
lines changed

_data/go_further.yml

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,36 @@
1+
- title: "A Swift Tour"
2+
description: "_The Swift Programming Language_, the authoritative reference for Swift, begins with a tour of the language. The tour gives you an introduction to the fundamental features, concepts, and syntax of Swift. The remainder of the book explains each topic in greater detail."
3+
content_type: book
4+
content_url: https://docs.swift.org/swift-book/GuidedTour/GuidedTour.html
5+
thumbnail_url: #TBD
6+
release_date: 2014-08-18
7+
featured: true
8+
external: true
19
- title: "Concurrency"
210
description: "Swift has concurrency features built into the language making it easier to write concurrent code with the assistance of the compiler. This video introduces the async/await mechanism, a key part of Swift Concurrency."
311
content_type: video
412
content_url: https://developer.apple.com/videos/play/wwdc2021/10132/
5-
thumbnail_url: #TBD
13+
thumbnail_url: /assets/images/getting-started/meet-async-await-thumbnail.jpg
614
release_date: 2021-06-08
15+
external: true
716
- title: "Generics"
817
description: "In Swift, generics are a fundamental way to write abstract code. This video walks through the basics of Swift Generics and introducing generics into your code."
918
content_type: video
10-
content_url: https://developer.apple.com/videos/play/wwdc2021/10132/
11-
thumbnail_url: #TBD
19+
content_url: https://developer.apple.com/videos/play/wwdc2022/110352/
20+
thumbnail_url: /assets/images/getting-started/swift-generics-thumbnail.jpg
1221
release_date: 2021-06-09
22+
external: true
1323
- title: "Regular Expressions"
1424
description: "Swift provides first-class regular expression support, commonly known as regex, for effective string processing. This video gives an overview of the power and flexibility of Swift Regex."
1525
content_type: video
1626
content_url: https://developer.apple.com/videos/play/wwdc2022/110357/
17-
thumbnail_url: #TBD
27+
thumbnail_url: /assets/images/getting-started/regular-expression-thumbnail.jpg
1828
release_date: 2022-06-07
29+
external: true
1930
- title: "Strings Under The Hood"
2031
description: "Swift strings provide a fast, Unicode-compliant way to work with text. This article provides more detail on how strings are implemented in Swift using UTF-8 and the reasons behind that choice."
2132
content_type: article
2233
content_url: /blog/utf8-string/
2334
thumbnail_url: #TBD
2435
release_date: 2019-03-20
36+
external: false
Loading
Loading
Loading
Loading

assets/stylesheets/pages/_getting-started.scss

Lines changed: 25 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,42 @@
11

2-
.go-further-list{
2+
.go-further-list {
3+
$grid-breakpoint: 1000px;
34
list-style: none;
45
padding-left: 0;
56
display: grid;
67
gap: 1rem;
78

89
.resource {
9-
border: 1px solid var(--color-fill-gray);
10-
padding: 0 1rem;
10+
border: 1px solid var(--color-fill-tertiary);
11+
padding: 1rem;
1112
border-radius: 4px;
1213
display: flex;
1314
flex-direction: column;
15+
16+
@media (min-width: $grid-breakpoint) {
17+
&.featured {
18+
grid-column-start: 1;
19+
grid-column-end: 3;
20+
}
21+
}
1422

23+
h3 {
24+
padding-top: 0;
25+
}
26+
1527
p {
1628
flex-grow: 1;
1729
color: var(--color-secondary-label);
1830
}
31+
32+
.thumbnail {
33+
border-radius: 8px;
34+
border: 1px solid var(--color-fill-gray);
35+
margin-bottom: 1rem;
36+
}
1937
}
2038

21-
@media (min-width: 1000px) {
39+
@media (min-width: $grid-breakpoint) {
2240
grid-template-columns: repeat(2, 1fr);
2341
}
2442
}
@@ -30,8 +48,8 @@
3048
gap: 1rem;
3149

3250
.use-case {
33-
border: 1px solid var(--color-fill-gray);
34-
padding: 0 1rem;
51+
border: 1px solid var(--color-fill-tertiary);
52+
padding: 1rem;
3553
border-radius: 4px;
3654
display: flex;
3755
flex-direction: column;
@@ -57,7 +75,6 @@ a.cta-secondary {
5775
border: 1px solid var(--color-text);
5876
color: var(--color-text);
5977
display: block;
60-
margin: 1rem 0;
6178
padding: .5rem 0;
6279
text-align: center;
6380

@@ -70,4 +87,4 @@ a.cta-secondary {
7087
&.external:after {
7188
content: ""
7289
}
73-
}
90+
}

getting-started/_go-further.md

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,25 @@ Ready to dive deeper? Here are some hand-picked resources covering about various
44

55
<ul class="go-further-list">
66
{% for resource in site.data.go_further %}
7-
<li class="resource">
7+
<li class="resource{% if resource.featured %} featured{% endif %}">
8+
{% if resource.thumbnail_url %}
9+
<img class="thumbnail" src="{{ resource.thumbnail_url }}"/>
10+
{% elsif resource.content_type == "article" %}
11+
<img class="thumbnail" src="/assets/images/getting-started/article-thumbnail.jpg"/>
12+
{% endif %}
13+
814
<h3>{{ resource.title }}</h3>
915
<p class="description">
10-
{{ resource.description }}
16+
{{ resource.description | markdownify }}
1117
</p>
1218
13-
<a href="{{ resource.content_url }}" class="cta-secondary external" target="_blank">
19+
<a href="{{ resource.content_url }}" class="cta-secondary{% if resource.external %} external" target="_blank"{% else %}"{% endif %}>
1420
{% if resource.content_type == "video" %}
1521
Watch video
1622
{% elsif resource.content_type == "article" %}
17-
Read article
23+
Read article
24+
{% elsif resource.content_type == "book" %}
25+
Read book
1826
{% else %}
1927
View resource
2028
{% endif %}

0 commit comments

Comments
 (0)