Skip to content

Commit

Permalink
✨ Created a website with Ignite (#56)
Browse files Browse the repository at this point in the history
* ✨ Created a website with Ignite

* ♻️ Removed the duplicate .swiftpm directory

* ♻️ Removed the duplicate Package.resolve file
  • Loading branch information
AkkeyLab authored Sep 18, 2024
1 parent 31e9f88 commit 4952b92
Show file tree
Hide file tree
Showing 9 changed files with 272 additions and 0 deletions.
7 changes: 7 additions & 0 deletions Website/trySwiftTokyo.xcworkspace/contents.xcworkspacedata

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IDEDidComputeMac32BitWarning</key>
<true/>
</dict>
</plist>
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{
"pins" : [
{
"identity" : "ignite",
"kind" : "remoteSourceControl",
"location" : "https://github.com/twostraws/Ignite",
"state" : {
"branch" : "main",
"revision" : "5941faccd2e4d662b417c85097f27a7ae3cf93ba"
}
},
{
"identity" : "swift-argument-parser",
"kind" : "remoteSourceControl",
"location" : "https://github.com/apple/swift-argument-parser.git",
"state" : {
"revision" : "41982a3656a71c768319979febd796c6fd111d5c",
"version" : "1.5.0"
}
},
{
"identity" : "swift-cmark",
"kind" : "remoteSourceControl",
"location" : "https://github.com/swiftlang/swift-cmark.git",
"state" : {
"branch" : "gfm",
"revision" : "b022b08312decdc46585e0b3440d97f6f22ef703"
}
},
{
"identity" : "swift-markdown",
"kind" : "remoteSourceControl",
"location" : "https://github.com/swiftlang/swift-markdown.git",
"state" : {
"branch" : "main",
"revision" : "2c126ce9fa33fc8b48258ee27ab51b33989161a3"
}
}
],
"version" : 2
}
117 changes: 117 additions & 0 deletions Website/trySwiftTokyo/Assets/images/riko_tokyo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 18 additions & 0 deletions Website/trySwiftTokyo/Package.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
// swift-tools-version: 5.9
// The swift-tools-version declares the minimum version of Swift required to build this package.

import PackageDescription

let package = Package(
name: "trySwiftTokyo",
platforms: [.macOS(.v13)],
dependencies: [
.package(url: "https://github.com/twostraws/Ignite", branch: "main")
],
targets: [
.executableTarget(
name: "trySwiftTokyo",
dependencies: ["Ignite"]
),
]
)
22 changes: 22 additions & 0 deletions Website/trySwiftTokyo/Sources/Component/MainFooter.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import Foundation
import Ignite

struct MainFooter: Component {
func body(context: PublishingContext) -> [any PageElement] {
Column {
Text {
Link("行動規範", target: URL("https://tryswift.jp/code-of-conduct"))
.margin(.trailing, .small)
Link("プライバシーポリシー", target: URL("https://tryswift.jp/privacy-policy"))
}
.font(.body)
.fontWeight(.semibold)
.horizontalAlignment(.center)

Text("© 2016 try! Swift Tokyo")
.font(.body)
.fontWeight(.light)
.horizontalAlignment(.center)
}
}
}
23 changes: 23 additions & 0 deletions Website/trySwiftTokyo/Sources/ConferenceWebsite.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import Foundation
import Ignite

@main
struct ConferenceWebsite {
static func main() async {
let site = ConferenceSite2025()

do {
try await site.publish()
} catch {
print(error.localizedDescription)
}
}
}

struct ConferenceSite2025: Site {
var name = "try! Swift Tokyo"
var url = URL("https://tryswift.jp")

var homePage = Home()
var theme = MainTheme()
}
20 changes: 20 additions & 0 deletions Website/trySwiftTokyo/Sources/Pages/Home.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import Foundation
import Ignite

struct Home: StaticPage {
var title = "try! Swift Tokyo 2025"

func body(context: PublishingContext) -> [BlockElement] {
Text(title)
.font(.title1)

Section {
Image("/images/riko_tokyo.svg", description: "Riko at Tokyo")
.resizable()
.frame(maxWidth: 250)
.padding()
}
.horizontalAlignment(.center)
.margin(.bottom, .extraLarge)
}
}
16 changes: 16 additions & 0 deletions Website/trySwiftTokyo/Sources/Themes/MainTheme.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import Foundation
import Ignite

struct MainTheme: Theme {
func render(page: Page, context: PublishingContext) -> HTML {
HTML {
Head(for: page, in: context)

Body {
page.body

MainFooter()
}
}
}
}

0 comments on commit 4952b92

Please sign in to comment.