Skip to content

Commit a578c05

Browse files
committed
initial
0 parents  commit a578c05

File tree

35 files changed

+1249
-0
lines changed

35 files changed

+1249
-0
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
.DS_Store
2+
dist/

.vscode/settings.json

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
{
2+
"cSpell.words": [
3+
"associatedtype",
4+
"Bödecs",
5+
"deinit",
6+
"Deinitialization",
7+
"discardable",
8+
"Existentials",
9+
"failable",
10+
"fclose",
11+
"fileprivate",
12+
"fopen",
13+
"fputs",
14+
"initalizer",
15+
"initalizers",
16+
"inout",
17+
"Kitti",
18+
"memberwise",
19+
"Subrange",
20+
"Takács",
21+
"Tibi",
22+
"typealias",
23+
"variadics"
24+
],
25+
"mcp": {
26+
"inputs": [],
27+
"servers": {
28+
29+
}
30+
}
31+
}

Makefile

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
SHELL=/bin/bash
2+
3+
# brew install optipng jpegoptim
4+
5+
dev:
6+
toucan generate
7+
8+
dist:
9+
toucan generate --target live
10+
11+
watch:
12+
toucan watch -s 3
13+
14+
serve:
15+
toucan serve -p 3000
16+
17+
png:
18+
find ./* -type f -name '*.png' -exec optipng -o7 {} \;
19+
20+
jpg:
21+
find ./* -type f -name '*.jpg' | xargs jpegoptim --all-progressive '*.jpg'

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Learn Swift By Examples
2+
3+
[Learn Swift By Examples](https://learn-swift.com/)

blocks/column.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
name: column
2+
parameters:
3+
- label: class
4+
default: ""
5+
requiresParentDirective: grid
6+
7+
tag: div
8+
attributes:
9+
- name: class
10+
value: "column {{class}}"

blocks/grid.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: grid
2+
parameters:
3+
- label: desktop
4+
default: "2"
5+
- label: tablet
6+
default: "2"
7+
- label: mobile
8+
default: "1"
9+
- label: class
10+
default: ""
11+
#requiresParentDirective: faq
12+
#output: "<div>{{contents}} - {{desktop}}</div>"
13+
tag: div
14+
attributes:
15+
- name: class
16+
value: "grid grid-{{desktop}}{{tablet}}{{mobile}} {{class}}"

contents/404/index.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
title: "Not found"
3+
description: "Page not found"
4+
type: not-found
5+
---
6+
7+
# Not found
8+
9+
This page does not exists.
10+
11+
[Back to home](/)

contents/[01]hello-world/index.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
---
2+
title: "Hello, World!"
3+
description: ""
4+
order: 1
5+
---
6+
7+
The print function displays text or values on the screen. In the simplest form it means we can display messages on the command line. Create a new file named `main.swift` and place the following Swift code inside the file:
8+
9+
```swift
10+
print("Hello, world!")
11+
```
12+
13+
Run the program via the `swift main.swift` command, it will display the `Hello, World!` message.
14+
15+
---
16+
17+
```sh
18+
# run the swift file
19+
swift main.swift
20+
# Hello, world!
21+
22+
# build the program
23+
swiftc -o app main.swift
24+
# run the program
25+
./app
26+
# Hello, world!
27+
```
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
title: "Standard types"
3+
description: ""
4+
order: 2
5+
---
6+
7+
foo
8+
9+
```swift
10+
func main() {}
11+
```
12+
13+
bar
14+
15+
```sh
16+
swift main.swift
17+
```
18+
19+
baz

contents/[03]values/index.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
title: "Values"
3+
description: ""
4+
order: 3
5+
---
6+
7+
8+
foo
9+
10+
```swift
11+
func main() {}
12+
```
13+
14+
bar
15+
16+
```sh
17+
swift main.swift
18+
```
19+
20+
baz

0 commit comments

Comments
 (0)