Skip to content

Improve landing page #252

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
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
3 changes: 2 additions & 1 deletion assets/stylesheets/_pages.scss
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
@import "pages/landing";
@import "pages/getting-started";
@import "pages/swift-evolution";
@import "pages/swift-evolution";
30 changes: 30 additions & 0 deletions assets/stylesheets/pages/_landing.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
.why-swift-list {
list-style: none;
padding-left: 0;
display: grid;
gap: 1rem;

li {
border: 1px solid var(--color-fill-tertiary);
padding: 1rem;
border-radius: 4px;
display: flex;
flex-direction: column;

h3 {
line-height: 1.4;
font-size: 1.4rem;
padding-top: 0;
}

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

@media (min-width: 1000px) {
grid-template-columns: repeat(3, 1fr);
}
}
33 changes: 23 additions & 10 deletions index.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,30 @@ Swift is a general-purpose programming language built using a modern approach to

## Why Swift?

### Safe
<ul class="why-swift-list">
<li>
<h3>Safe</h3>
<p>
Swift prioritizes safety and clarity, ensuring that code behaves in a safe manner while also promoting clear and concise programming practices.
</p>
</li>
<li>
<h3>Fast</h3>
<p>
Swift aims to replace C-based languages (C, C++, and Objective-C) and match their performance, while maintaining consistency and predictability.
</p>
</li>
<li>
<h3>Expressive</h3>
<p>
Swift builds upon decades of advancements in computer science, providing a modern syntax that is a joy to use.
</p>
</li>
</ul>

The most obvious way to write code should also behave in a safe manner. Undefined behavior is the enemy of safety, and developer mistakes should be caught before software is in production. Opting for safety sometimes means Swift will feel strict, but we believe that clarity saves time in the long run.

### Fast

Swift is intended as a replacement for C-based languages (C, C++, and Objective-C). As such, Swift must be comparable to those languages in performance for most tasks. Performance must also be predictable and consistent, not just fast in short bursts that require clean-up later. There are lots of languages with novel features — being fast is rare.

### Expressive

Swift benefits from decades of advancement in computer science to offer syntax that is a joy to use, with modern features developers expect. But Swift is never done. We will monitor language advancements and embrace what works, continually evolving to make Swift even better.
<div class="links links-list-nostyle" markdown="1">
- [Learn more about Swift](/about)
</div>

## Use cases

Expand Down