Skip to content

Commit

Permalink
Add page-wide layout
Browse files Browse the repository at this point in the history
  • Loading branch information
federicobucchi committed Feb 12, 2024
1 parent bbc3118 commit ccf11a9
Show file tree
Hide file tree
Showing 58 changed files with 86 additions and 76 deletions.
15 changes: 10 additions & 5 deletions _layouts/article.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
---
layout: post
layout: default
---
{{ content }}
<hr>
<p>Contributed by</p>
{% include authors.html authors=page.author %}
<article class="post">
<header>
<h1>{{ page.title }}</h1>
</header>
{{ content }}
<hr>
<p>Contributed by</p>
{% include authors.html authors=page.author %}
</article>
4 changes: 1 addition & 3 deletions _layouts/default.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@
---

<main role="main">
<article class="page">
{{ content }}
</article>
{{ content }}
</main>

{% include footer.html %}
11 changes: 0 additions & 11 deletions _layouts/list.html

This file was deleted.

12 changes: 12 additions & 0 deletions _layouts/page-wide.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
layout: default
---

<article class="page-wide">
{% if page.title %}
<header>
<h1>{{ page.title }}</h1>
</header>
{% endif %}
{{ content }}
</article>
5 changes: 3 additions & 2 deletions _layouts/page.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
---
layout: default
---

<article class="page">
<header>
<h1>{{ page.title }}</h1>
</header>
{{ content }}
{{ content }}
</article>
2 changes: 1 addition & 1 deletion _plugins/package-categories.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ def generate(site)
category_page = PageWithoutAFile.new(site, site.source, "packages", "#{category['slug']}.md")
category_page.data = {
# Front matter
'layout' => 'page',
'layout' => 'page-wide',
'title' => category['name']
}
category_page.content = "{% include_relative _package-list.html category_slug=\"#{category['slug']}\" %}"
Expand Down
2 changes: 1 addition & 1 deletion about/index.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
layout: list
layout: page
title: About Swift
---

Expand Down
11 changes: 8 additions & 3 deletions assets/stylesheets/_screen.scss
Original file line number Diff line number Diff line change
Expand Up @@ -382,11 +382,16 @@ cite {
}

main {
max-width: var(--content-mobile-breakpoint);
padding: 4rem 0 0;
padding: 4rem 30px 0;
margin: auto;

.post, .list {
.page-wide {
max-width: var(--content-mobile-breakpoint);
padding: 0;
margin: auto;
}

.post, .page {
max-width: 50em;
margin: 0 auto;
padding: 0 30px;
Expand Down
2 changes: 1 addition & 1 deletion blog/index.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
layout: list
layout: page
title: Blog
atom: true
---
Expand Down
2 changes: 1 addition & 1 deletion code-of-conduct/index.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
layout: list
layout: page
title: Code of Conduct
---

Expand Down
2 changes: 1 addition & 1 deletion contributing/index.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
layout: list
layout: page
title: Contributing
---

Expand Down
2 changes: 1 addition & 1 deletion contributor-experience-workgroup/index.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
layout: list
layout: page
title: Contributor Experience Workgroup
---

Expand Down
2 changes: 1 addition & 1 deletion cxx-interop-workgroup/index.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
layout: list
layout: page
title: C++ Interoperability Workgroup
---

Expand Down
2 changes: 1 addition & 1 deletion diversity/index.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
layout: list
layout: page
title: Diversity in Swift
---

Expand Down
2 changes: 1 addition & 1 deletion documentation-workgroup/index.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
layout: list
layout: page
title: Swift Documentation Workgroup
---

Expand Down
2 changes: 1 addition & 1 deletion documentation/api-design-guidelines/index.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
layout: list
layout: page
title: API Design Guidelines
official_url: https://swift.org/documentation/api-design-guidelines/
redirect_from: /documentation/api-design-guidelines.html
Expand Down
2 changes: 1 addition & 1 deletion documentation/continuous-integration/index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
redirect_from: "/continuous-integration/"
layout: list
layout: page
title: Swift Continuous Integration
---

Expand Down
2 changes: 1 addition & 1 deletion documentation/core-libraries/index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
redirect_from: "/core-libraries/"
layout: list
layout: page
title: Swift Core Libraries
---

Expand Down
2 changes: 1 addition & 1 deletion documentation/cxx-interop/index.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
layout: list
layout: page
title: Mixing Swift and C++
official_url: https://swift.org/documentation/cxx-interop/
redirect_from:
Expand Down
2 changes: 1 addition & 1 deletion documentation/index.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
layout: list
layout: page
title: Documentation
---

Expand Down
2 changes: 1 addition & 1 deletion documentation/lldb/index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
redirect_from: "/lldb/"
layout: list
layout: page
title: REPL and Debugger
---

Expand Down
2 changes: 1 addition & 1 deletion documentation/package-manager/index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
redirect_from: "/package-manager/"
layout: list
layout: page
title: Package Manager
---

Expand Down
2 changes: 1 addition & 1 deletion documentation/server/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ redirect_from:
- "/server/"
- "server/guides/"
- "/server-apis/"
layout: list
layout: page
title: Swift on Server
---

Expand Down
2 changes: 1 addition & 1 deletion documentation/source-code/index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
redirect_from: "/source-code/"
layout: list
layout: page
title: Source Code
---

Expand Down
2 changes: 1 addition & 1 deletion documentation/source-compatibility/index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
redirect_from: "/source-compatibility/"
layout: list
layout: page
title: Swift Source Compatibility
---

Expand Down
2 changes: 1 addition & 1 deletion documentation/standard-library/index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
redirect_from: "/standard-library/"
layout: list
layout: page
title: Standard Library
---

Expand Down
2 changes: 1 addition & 1 deletion documentation/swift-compiler/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
redirect_from:
- "/swift-compiler/"
- "/compiler-stdlib/"
layout: list
layout: page
title: Swift Compiler
---

Expand Down
2 changes: 1 addition & 1 deletion documentation/tspl/index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
redirect_from: "/tspl/"
layout: list
layout: page
title: Language reference
---

Expand Down
2 changes: 1 addition & 1 deletion download/index.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
layout: list
layout: page
title: Download Swift
---

Expand Down
2 changes: 1 addition & 1 deletion getting-started/cli-swiftpm/index.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
layout: list
layout: page
title: Build a Command-line Tool
---

Expand Down
2 changes: 1 addition & 1 deletion getting-started/library-swiftpm/index.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
layout: list
layout: page
title: Build a library
---

Expand Down
2 changes: 1 addition & 1 deletion getting-started/swiftui/index.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
layout: list
layout: page
title: Build an iOS app with SwiftUI
---

Expand Down
2 changes: 1 addition & 1 deletion getting-started/vapor-web-server/index.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
layout: list
layout: page
title: Build a Web Service with Vapor
---

Expand Down
2 changes: 1 addition & 1 deletion gsoc2019/index.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
layout: list
layout: page
title: Project Ideas for GSoC 2019
---

Expand Down
2 changes: 1 addition & 1 deletion gsoc2020/index.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
layout: list
layout: page
title: Project Ideas for GSoC 2020
---

Expand Down
2 changes: 1 addition & 1 deletion gsoc2021/index.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
layout: list
layout: page
title: Project Ideas for GSoC 2021
---

Expand Down
2 changes: 1 addition & 1 deletion gsoc2022/index.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
layout: list
layout: page
title: Project Ideas for GSoC 2022
---

Expand Down
2 changes: 1 addition & 1 deletion gsoc2023/index.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
layout: list
layout: page
title: Project Ideas for GSoC 2023
---

Expand Down
2 changes: 1 addition & 1 deletion install/index.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
layout: list
layout: page
title: Install Swift
---

Expand Down
2 changes: 1 addition & 1 deletion install/linux/index.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
layout: list
layout: page
title: Linux Installation Options
---

Expand Down
2 changes: 1 addition & 1 deletion install/macos/index.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
layout: list
layout: page
title: macOS Installation Options
---

Expand Down
2 changes: 1 addition & 1 deletion install/windows/index.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
layout: list
layout: page
title: Windows Installation Options
---

Expand Down
2 changes: 1 addition & 1 deletion language-steering-group/index.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
layout: list
layout: page
title: Language Steering Group
---

Expand Down
2 changes: 1 addition & 1 deletion legal/license.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
layout: list
layout: page
title: License
---

Expand Down
2 changes: 1 addition & 1 deletion mentorship-interest-survey/index.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
layout: list
layout: page
title: Swift Mentorship Program Interest Survey
---

Expand Down
2 changes: 1 addition & 1 deletion mentorship-tos/index.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
layout: list
layout: page
title: Swift Mentorship Program Terms & Conditions
---

Expand Down
2 changes: 1 addition & 1 deletion mentorship/index.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
layout: list
layout: page
title: Swift Mentorship Program
---

Expand Down
2 changes: 1 addition & 1 deletion migration-guide-swift3/index.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
layout: list
layout: page
title: Migrating to Swift 3
---

Expand Down
Loading

0 comments on commit ccf11a9

Please sign in to comment.