-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
20 changed files
with
329 additions
and
64 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
// | ||
// File 2.swift | ||
// | ||
// | ||
// Created by Tibor Bodecs on 10/05/2024. | ||
// | ||
|
||
struct MetadataContext { | ||
let permalink: String | ||
let title: String | ||
let description: String | ||
let imageUrl: String? | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
// | ||
// File 2.swift | ||
// | ||
// | ||
// Created by Tibor Bodecs on 10/05/2024. | ||
// | ||
|
||
struct PageContext<T> { | ||
let site: SiteContext | ||
let metadata: MetadataContext | ||
let content: T | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
// | ||
// File 2.swift | ||
// | ||
// | ||
// Created by Tibor Bodecs on 10/05/2024. | ||
// | ||
|
||
struct SiteContext { | ||
let baseUrl: String | ||
let name: String | ||
let tagline: String | ||
let imageUrl: String? | ||
let language: String? | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
// | ||
// File 2.swift | ||
// | ||
// | ||
// Created by Tibor Bodecs on 10/05/2024. | ||
// | ||
|
||
struct FigureContext { | ||
let src: String | ||
let darkSrc: String? | ||
let alt: String? | ||
let title: String? | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
// | ||
// File 2.swift | ||
// | ||
// | ||
// Created by Tibor Bodecs on 10/05/2024. | ||
// | ||
|
||
struct PostContext { | ||
let title: String | ||
let exceprt: String | ||
let date: String | ||
let figure: FigureContext? | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
// | ||
// File 2.swift | ||
// | ||
// | ||
// Created by Tibor Bodecs on 10/05/2024. | ||
// | ||
|
||
struct TagContext { | ||
let permalink: String | ||
let name: String | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
// | ||
// File 2.swift | ||
// | ||
// | ||
// Created by Tibor Bodecs on 10/05/2024. | ||
// | ||
|
||
import Foundation |
15 changes: 15 additions & 0 deletions
15
Sources/Toucan/Contexts/page/single/SinglePostContext.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
// | ||
// File 2.swift | ||
// | ||
// | ||
// Created by Tibor Bodecs on 10/05/2024. | ||
// | ||
|
||
struct SinglePostContext { | ||
let title: String | ||
let exceprt: String | ||
let date: String | ||
let figure: FigureContext? | ||
let tags: [TagContext] | ||
let body: String | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
<a href="{link}">{tag}</a> | ||
<a href="{{permalink}}">{{name}}</a> |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{{<index}} | ||
|
||
{{$main}} | ||
<div id="posts" class="wrapper"> | ||
<header> | ||
<h1>{{site.name}}</h1> | ||
<p>{{site.tagline}}</p> | ||
<br> | ||
<a href="mailto:[email protected]">Contact us</a> | ||
</header> | ||
|
||
<div class="grid"> | ||
{{#content}} | ||
{{> _partials.post}} | ||
{{/content}} | ||
</div> | ||
</div> | ||
{{/main}} | ||
|
||
{{/index}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{{<index}} | ||
|
||
{{$main}} | ||
<div id="posts" class="wrapper"> | ||
<header> | ||
<h1>{{site.name}}</h1> | ||
<p>{{site.tagline}}</p> | ||
<br> | ||
<a href="mailto:[email protected]">Contact us</a> | ||
</header> | ||
|
||
<div class="grid"> | ||
{{#content}} | ||
{{> _partials.post}} | ||
{{/content}} | ||
</div> | ||
</div> | ||
{{/main}} | ||
|
||
{{/index}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{{<index}} | ||
|
||
{{$main}} | ||
<div class="author content-wrapper"> | ||
{{& content}} | ||
</div> | ||
{{/main}} | ||
|
||
{{/index}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{{<index}} | ||
|
||
{{$main}} | ||
<div class="page content-wrapper"> | ||
{{& content}} | ||
</div> | ||
{{/main}} | ||
|
||
{{/index}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
{{<index}} | ||
|
||
{{$main}} | ||
{{#content}} | ||
<article> | ||
<header> | ||
<section id="post-header" class="content-wrapper"> | ||
<time datetime="{{date}}">{{date}}</time> | ||
<h1 class="title">{{title}}</h1> | ||
<p class="excerpt">{{excerpt}}</p> | ||
{{#tags}} | ||
<div class="meta"> | ||
{{> _partials.tag}} | ||
</div> | ||
{{/tags}} | ||
</section> | ||
|
||
{{> _partials.figure}} | ||
|
||
</header> | ||
|
||
<section id="contents" class="content-wrapper"> | ||
|
||
{{& body}} | ||
|
||
</section> | ||
|
||
</article> | ||
{{/content}} | ||
{{/main}} | ||
|
||
{{/index}} | ||
|
Oops, something went wrong.