Skip to content

Commit d857121

Browse files
Remove tailwind
1 parent 63dd7e6 commit d857121

File tree

13 files changed

+256
-1037
lines changed

13 files changed

+256
-1037
lines changed

.github/workflows/publish.yml

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -20,18 +20,9 @@ jobs:
2020
gleam-version: "1.13.0"
2121
rebar3-version: "3"
2222

23-
- name: setup node
24-
uses: actions/setup-node@v3
25-
with:
26-
node-version: 20
27-
28-
- name: install js dependencies
29-
run: npm install tailwindcss
30-
3123
- name: build
3224
run: |
33-
gleam run -m build
34-
npx tailwindcss -i ./static/main.css -o ./priv/style.css
25+
gleam run
3526
echo "gearsco.de" > ./priv/CNAME
3627
3728
- name: Deploy

build.sh

Lines changed: 0 additions & 2 deletions
This file was deleted.

package.json

Lines changed: 0 additions & 5 deletions
This file was deleted.

pnpm-lock.yaml

Lines changed: 0 additions & 836 deletions
This file was deleted.
File renamed without changes.

src/website/component.gleam

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ pub fn head(page: String) -> Element(_) {
1212
html.head([], [
1313
html.meta([attribute("charset", "UTF-8")]),
1414
html.title([], page <> " | Gears"),
15-
html.link([attribute.href("/style.css"), attribute.rel("stylesheet")]),
15+
html.link([attribute.href("/main.css"), attribute.rel("stylesheet")]),
1616
html.link([attribute.href("https://rsms.me/"), attribute.rel("preconnect")]),
1717
html.link([
1818
attribute.href("https://rsms.me/inter/inter.css"),
@@ -44,26 +44,18 @@ pub type Section(a) {
4444
pub fn page(name: String, sections: List(Section(a))) -> Element(_) {
4545
html.html([attribute("lang", "en")], [
4646
head(name),
47-
html.body([attribute.class("min-h-screen bg-slate-800 text-white")], [
47+
html.body([], [
4848
header.view(),
49-
html.main(
50-
[attribute.class("py-2")],
51-
list.flat_map(sections, fn(section) { section.content }),
52-
),
49+
html.main([], list.flat_map(sections, fn(section) { section.content })),
5350
footer.view(),
5451
]),
5552
])
5653
}
5754

5855
pub fn text_page(header: String, content: List(Element(a))) -> Section(a) {
5956
Section([
60-
html.div([attribute.class("mx-auto max-w-3xl")], [
61-
html.h1(
62-
[attribute.class("text-3xl font-bold leading-tight text-center")],
63-
[html.text(header)],
64-
),
65-
]),
66-
html.div([attribute.class("mx-auto max-w-4xl py-8 leading-8")], content),
57+
html.h1([], [html.text(header)]),
58+
html.div([], content),
6759
])
6860
}
6961

src/website/component/footer.gleam

Lines changed: 35 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -3,47 +3,39 @@ import lustre/element.{type Element}
33
import lustre/element/html
44

55
pub fn view() -> Element(_) {
6-
html.footer(
7-
[
8-
attribute.class("right-5 bottom-4 fixed"),
9-
],
10-
[
11-
element.text("Made with "),
12-
html.a(
13-
[
14-
attribute.href("https://lustre.build"),
15-
attribute.target("_blank"),
16-
attribute.class("underline"),
17-
],
18-
[
19-
element.text("Lustre"),
20-
],
21-
),
22-
element.text(" and "),
23-
html.a(
24-
[
25-
attribute.href("https://gleam.run"),
26-
attribute.target("_blank"),
27-
attribute.class("underline"),
28-
],
29-
[
30-
element.text("Gleam"),
31-
],
32-
),
33-
html.br([]),
34-
element.text("Source: "),
35-
html.a(
36-
[
37-
attribute.href(
38-
"https://github.com/GearsDatapacks/GearsDatapacks.github.io",
39-
),
40-
attribute.target("_blank"),
41-
attribute.class("underline"),
42-
],
43-
[
44-
element.text("GitHub"),
45-
],
46-
),
47-
],
48-
)
6+
html.footer([], [
7+
element.text("Made with "),
8+
html.a(
9+
[
10+
attribute.href("https://lustre.build"),
11+
attribute.target("_blank"),
12+
],
13+
[
14+
element.text("Lustre"),
15+
],
16+
),
17+
element.text(" and "),
18+
html.a(
19+
[
20+
attribute.href("https://gleam.run"),
21+
attribute.target("_blank"),
22+
],
23+
[
24+
element.text("Gleam"),
25+
],
26+
),
27+
html.br([]),
28+
element.text("Source: "),
29+
html.a(
30+
[
31+
attribute.href(
32+
"https://github.com/GearsDatapacks/GearsDatapacks.github.io",
33+
),
34+
attribute.target("_blank"),
35+
],
36+
[
37+
element.text("GitHub"),
38+
],
39+
),
40+
])
4941
}

src/website/component/header.gleam

Lines changed: 28 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -4,56 +4,38 @@ import lustre/element/html
44
import lustre/element/svg
55

66
pub fn view() -> Element(_) {
7-
html.header([attribute.class("bg-purple-700 flex w-full select-none")], [
8-
html.nav(
9-
[
10-
attribute.class(
11-
"flex h-16 grow items-center justify-between gap-4 px-4 text-white overflow-hidden",
12-
),
13-
],
14-
[
15-
html.a([attribute.class("heading"), attribute.href("/")], [
16-
html.figure(
17-
[attribute.class("flex flex-shrink-0 items-center space-x-1")],
18-
[
19-
html.img([
7+
html.header([], [
8+
html.nav([], [
9+
html.a([attribute.href("/")], [
10+
html.figure([], [
11+
html.img([
12+
attribute.styles([
13+
#("image-rendering", "optimizeSpeed"),
14+
#("image-rendering", "pixelated"),
15+
]),
16+
attribute.width(64),
17+
attribute.height(64),
18+
attribute.src("/images/logo.svg"),
19+
attribute.alt("Gears logo"),
20+
]),
21+
html.figcaption([], [
22+
svg.svg([], [
23+
svg.path([
24+
attribute("d", logo_svg),
25+
attribute.class("write"),
2026
attribute.styles([
21-
#("image-rendering", "optimizeSpeed"),
22-
#("image-rendering", "pixelated"),
27+
#("fill", "none"),
28+
#("stroke", "#ffffff"),
29+
#("stroke-width", "1px"),
30+
#("stroke-dasharray", "330"),
31+
#("stroke-dashoffset", "330"),
2332
]),
24-
attribute.width(64),
25-
attribute.height(64),
26-
attribute.src("/images/logo.svg"),
27-
attribute.alt("Gears logo"),
28-
attribute.class("w-16"),
2933
]),
30-
html.figcaption(
31-
[
32-
attribute.class(
33-
"text-4xl font-bold font-celandine hidden md:block",
34-
),
35-
],
36-
[
37-
svg.svg([], [
38-
svg.path([
39-
attribute("d", logo_svg),
40-
attribute.class("animate-write"),
41-
attribute.styles([
42-
#("fill", "none"),
43-
#("stroke", "#ffffff"),
44-
#("stroke-width", "1px"),
45-
#("stroke-dasharray", "330"),
46-
#("stroke-dashoffset", "330"),
47-
]),
48-
]),
49-
]),
50-
],
51-
),
52-
],
53-
),
34+
]),
35+
]),
5436
]),
55-
],
56-
),
37+
]),
38+
]),
5739
])
5840
}
5941

src/website/markdown.gleam

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ fn render_inline(inline: document.Inline) -> Element(a) {
114114
document.SoftBreak -> html.text("\n")
115115
document.Strikethrough(inlines) ->
116116
html.span(
117-
[attribute.class("line-through")],
117+
[attribute.class("strikethrough")],
118118
list.map(inlines, render_inline),
119119
)
120120
document.Strong(inlines) ->
@@ -134,7 +134,6 @@ fn anchor(children: List(Element(a)), href: String) -> Element(a) {
134134
[
135135
attribute.href(href),
136136
attribute.target(target),
137-
attribute.class("underline"),
138137
],
139138
children,
140139
)

src/website/page/blog_post.gleam

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import website/data/blog
77
pub fn view(post: blog.Post(a)) -> element.Element(a) {
88
component.page(post.title, [
99
component.text_page(post.title, [
10-
html.h2([attribute.class("text-xl font-bold text-center m-0")], [
10+
html.h2([attribute.class("date")], [
1111
element.text(post.date),
1212
]),
1313
..post.contents

0 commit comments

Comments
 (0)