Skip to content

Commit 69f3601

Browse files
committed
Update getting started page layout
1 parent 6b79fce commit 69f3601

File tree

4 files changed

+56
-48
lines changed

4 files changed

+56
-48
lines changed

_data/go_further.yml

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
11
- title: "Go Further: Concurrency"
22
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."
3-
content-type: video
4-
content-url: https://developer.apple.com/videos/play/wwdc2021/10132/
5-
thumbnail-url: #TBD
6-
release-date: 2021-06-08
3+
content_type: video
4+
content_url: https://developer.apple.com/videos/play/wwdc2021/10132/
5+
thumbnail_url: #TBD
6+
release_date: 2021-06-08
77
- title: "Go Further: Swift Generics"
88
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."
9-
content-type: video
10-
content-url: https://developer.apple.com/videos/play/wwdc2021/10132/
11-
thumbnail-url: #TBD
12-
release-date: 2021-06-09
9+
content_type: video
10+
content_url: https://developer.apple.com/videos/play/wwdc2021/10132/
11+
thumbnail_url: #TBD
12+
release_date: 2021-06-09
1313
- title: "Go Further: Regular Expressions"
1414
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."
15-
content-type: video
16-
content-url: https://developer.apple.com/videos/play/wwdc2022/110357/
17-
thumbnail-url: #TBD
18-
release-date: 2022-06-07
15+
content_type: video
16+
content_url: https://developer.apple.com/videos/play/wwdc2022/110357/
17+
thumbnail_url: #TBD
18+
release_date: 2022-06-07
1919
- title: "Go Further: Swift Strings Under The Hood"
2020
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."
21-
content-type: article
22-
content-url: https://www.swift.org/blog/utf8-string/
23-
thumbnail-url: #TBD
24-
release-date: 2019-03-20
21+
content_type: article
22+
content_url: https://www.swift.org/blog/utf8-string/
23+
thumbnail_url: #TBD
24+
release_date: 2019-03-20

assets/stylesheets/pages/_getting-started.scss

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,26 @@
11

2-
.guide-list {
2+
.go-further-list{
33
list-style: none;
44
padding-left: 0;
5+
display: grid;
6+
gap: 1rem;
7+
8+
.resource {
9+
border: 1px solid var(--color-fill-gray);
10+
padding: 0 1rem;
11+
border-radius: 4px;
12+
display: flex;
13+
flex-direction: column;
14+
15+
p {
16+
flex-grow: 1;
17+
color: var(--color-secondary-label);
18+
}
19+
}
20+
21+
@media (min-width: 1000px) {
22+
grid-template-columns: repeat(2, 1fr);
23+
}
524
}
625

726
.use-case-list {
@@ -29,7 +48,7 @@
2948
}
3049

3150
@media (min-width: 1000px) {
32-
grid-template-columns: repeat(3, 1fr);
51+
grid-template-columns: repeat(2, 1fr);
3352
}
3453
}
3554

getting-started/_go-further.html

Lines changed: 18 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -2,34 +2,23 @@
22

33
Ready to dive deeper? Here are some hand-picked resources covering about various Swift features and use.
44

5-
<ul class="guide-list">
6-
<li class="guide">
7-
<h3>Concurrency</h3>
8-
<p class="description">
9-
When you have code that needs to run at the same time as other code, it's important to choose the right tool for the job.
10-
</p>
11-
12-
<p class="description">
13-
We'll take you through the different kinds of concurrent tasks you can create in Swift, show you how to create groups of tasks, and find out how to cancel tasks in progress. We'll also provide guidance on when you may want to use unstructured tasks.
14-
</p>
15-
16-
<div class="links links-list-nostyle">
17-
<a href="/">Read guide</a>
18-
</div>
19-
</li>
20-
21-
<li class="guide">
22-
<h3>Testing</h3>
23-
<p class="description">
24-
Unit testing is an essential tool to consistently verify your code works correctly. Learn about the built-in testing features in Xcode, using XCTest.
25-
</p>
26-
27-
<p class="description">
28-
Find out how to organize your tests and run them under different configurations using test plans, and discover how to automate testing and efficiently work with the results.
29-
</p>
30-
31-
<div class="links links-list-nostyle">
32-
<a href="/">Read guide</a>
33-
</div>
5+
<ul class="go-further-list">
6+
{% for resource in site.data.go_further %}
7+
<li class="resource">
8+
<h3>{{ resource.title }}</h3>
9+
<p class="description">
10+
{{ resource.description }}
11+
</p>
12+
13+
<a href="{{ resource.content_url }}" class="cta-secondary">
14+
{% if resource.content_type == "video" %}
15+
Watch video
16+
{% elsif resource.content_type == "article" %}
17+
Read article
18+
{% else %}
19+
View resource
20+
{% endif %}
21+
</a>
3422
</li>
23+
{% endfor %}
3524
</ul>

getting-started/_use-cases.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,6 @@ <h3>App for Apple platforms</h3>
3939
Requires macOS 12 and Xcode 14.
4040
</p>
4141

42-
<a href="/" class="cta-secondary">Start tutorial</a>
42+
<a href="/getting-started/swiftui" class="cta-secondary">Start tutorial</a>
4343
</li>
4444
</ul>

0 commit comments

Comments
 (0)