Skip to content

Update getting started page layout #204

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

Merged
merged 2 commits into from
Jan 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
40 changes: 20 additions & 20 deletions _data/go_further.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
- title: "Go Further: Concurrency"
- title: "Concurrency"
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."
content-type: video
content-url: https://developer.apple.com/videos/play/wwdc2021/10132/
thumbnail-url: #TBD
release-date: 2021-06-08
- title: "Go Further: Swift Generics"
content_type: video
content_url: https://developer.apple.com/videos/play/wwdc2021/10132/
thumbnail_url: #TBD
release_date: 2021-06-08
- title: "Swift Generics"
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."
content-type: video
content-url: https://developer.apple.com/videos/play/wwdc2021/10132/
thumbnail-url: #TBD
release-date: 2021-06-09
- title: "Go Further: Regular Expressions"
content_type: video
content_url: https://developer.apple.com/videos/play/wwdc2021/10132/
thumbnail_url: #TBD
release_date: 2021-06-09
- title: "Regular Expressions"
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."
content-type: video
content-url: https://developer.apple.com/videos/play/wwdc2022/110357/
thumbnail-url: #TBD
release-date: 2022-06-07
- title: "Go Further: Swift Strings Under The Hood"
content_type: video
content_url: https://developer.apple.com/videos/play/wwdc2022/110357/
thumbnail_url: #TBD
release_date: 2022-06-07
- title: "Swift Strings Under The Hood"
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."
content-type: article
content-url: https://www.swift.org/blog/utf8-string/
thumbnail-url: #TBD
release-date: 2019-03-20
content_type: article
content_url: https://www.swift.org/blog/utf8-string/
thumbnail_url: #TBD
release_date: 2019-03-20
27 changes: 25 additions & 2 deletions assets/stylesheets/pages/_getting-started.scss
Original file line number Diff line number Diff line change
@@ -1,7 +1,26 @@

.guide-list {
.go-further-list{
list-style: none;
padding-left: 0;
display: grid;
gap: 1rem;

.resource {
border: 1px solid var(--color-fill-gray);
padding: 0 1rem;
border-radius: 4px;
display: flex;
flex-direction: column;

p {
flex-grow: 1;
color: var(--color-secondary-label);
}
}

@media (min-width: 1000px) {
grid-template-columns: repeat(2, 1fr);
}
}

.use-case-list {
Expand Down Expand Up @@ -29,7 +48,7 @@
}

@media (min-width: 1000px) {
grid-template-columns: repeat(3, 1fr);
grid-template-columns: repeat(2, 1fr);
}
}

Expand All @@ -47,4 +66,8 @@ a.cta-secondary {
color: var(--color-fill);
text-decoration: none;
}

&.external:after {
content: " ↗"
}
}
49 changes: 19 additions & 30 deletions getting-started/_go-further.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,34 +2,23 @@

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

<ul class="guide-list">
<li class="guide">
<h3>Concurrency</h3>
<p class="description">
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.
</p>

<p class="description">
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.
</p>

<div class="links links-list-nostyle">
<a href="/">Read guide</a>
</div>
</li>

<li class="guide">
<h3>Testing</h3>
<p class="description">
Unit testing is an essential tool to consistently verify your code works correctly. Learn about the built-in testing features in Xcode, using XCTest.
</p>

<p class="description">
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.
</p>

<div class="links links-list-nostyle">
<a href="/">Read guide</a>
</div>
<ul class="go-further-list">
{% for resource in site.data.go_further %}
<li class="resource">
<h3>{{ resource.title }}</h3>
<p class="description">
{{ resource.description }}
</p>

<a href="{{ resource.content_url }}" class="cta-secondary external" target="_blank">
{% if resource.content_type == "video" %}
Watch video
{% elsif resource.content_type == "article" %}
Read article
{% else %}
View resource
{% endif %}
</a>
</li>
</ul>
{% endfor %}
</ul>
2 changes: 1 addition & 1 deletion getting-started/_use-cases.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,6 @@ If you want to get started with a language reference, [The Swift Programming Lan
Requires macOS 12 and Xcode 14.
</p>

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