Skip to content

Commit 756445e

Browse files
adjust layout
1 parent ba0567e commit 756445e

File tree

4 files changed

+30
-14
lines changed

4 files changed

+30
-14
lines changed

.github/workflows/deployment.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Deploy to Cloudflare Pages
22

33
on:
44
push:
5-
branches: [ main ]
5+
# branches: [ main ]
66
pull_request:
77

88
jobs:

priv/static/images/avatar.jpeg

-138 KB
Loading

priv/static/images/favicon.png

1.09 KB
Loading

src/linktri.gleam

+29-13
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import gleam/list
22
import gleam/option.{type Option, None, Some}
3+
import gleam/string
34
import lustre
45
import lustre/attribute
56
import lustre/element.{type Element}
@@ -18,7 +19,15 @@ const flamingo = "#F4B9B9"
1819

1920
const peach = "#F2C94C"
2021

21-
const description = "Software Engineer </> Ruby & Elixir Enthusiast </> Metalhead </> Wannabe Pixel Artist"
22+
fn description() -> String {
23+
string.join(
24+
[
25+
"Software Engineer", "Tech Enthusiast", "Metalhead",
26+
"Wannabe Pixel Artist",
27+
],
28+
with: " </> ",
29+
)
30+
}
2231

2332
const full_name = "Julio Cabrera"
2433

@@ -77,40 +86,44 @@ fn update(model: #(Model, Nil), msg: Msg) -> #(Model, Nil) {
7786

7887
// VIEW
7988

80-
fn body_styles() -> List(#(String, String)) {
89+
fn root_styles() -> List(#(String, String)) {
8190
[
82-
#("margin", "0"),
8391
#("padding", "0"),
92+
#("margin", "0"),
8493
#("min-height", "100vh"),
8594
#("width", "100%"),
8695
#("background", background_gradient()),
96+
#("background-attachment", "fixed"),
97+
#("background-size", "cover"),
8798
#("color", rosewater),
8899
#("display", "flex"),
89-
#("justify-content", "center"),
100+
#("flex-direction", "column"),
90101
#("align-items", "center"),
91102
#("font-family", "'Inter', system-ui, -apple-system, sans-serif"),
92103
#("box-sizing", "border-box"),
93-
#("min-width", "100vw"),
94-
#("overflow", "hidden"),
95-
#("position", "fixed"),
96-
#("top", "0"),
104+
#("-webkit-font-smoothing", "antialiased"),
105+
#("position", "absolute"),
97106
#("left", "0"),
107+
#("top", "0"),
98108
#("right", "0"),
99109
#("bottom", "0"),
110+
#("overflow-y", "auto"),
111+
#("-webkit-overflow-scrolling", "touch"),
100112
]
101113
}
102114

103115
fn container_styles() -> List(#(String, String)) {
104116
[
105117
#("max-width", "680px"),
106118
#("width", "90%"),
107-
#("min-height", "100vh"),
108-
#("padding", "40px 20px"),
109119
#("display", "flex"),
110120
#("flex-direction", "column"),
111121
#("align-items", "center"),
112122
#("justify-content", "space-between"),
113-
#("box-sizing", "border-box"),
123+
#("padding", "40px 20px"),
124+
#("height", "100%"),
125+
#("margin", "0 auto"),
126+
#("background", "transparent"),
114127
]
115128
}
116129

@@ -161,6 +174,8 @@ fn main_content_styles() -> List(#(String, String)) {
161174
#("align-items", "center"),
162175
#("gap", "16px"),
163176
#("width", "100%"),
177+
#("flex", "1"),
178+
#("margin-bottom", "40px"),
164179
]
165180
}
166181

@@ -203,6 +218,7 @@ fn footer_styles() -> List(#(String, String)) {
203218
#("font-size", "14px"),
204219
#("font-weight", "500"),
205220
#("width", "100%"),
221+
#("background", "transparent"),
206222
#("margin-top", "auto"),
207223
]
208224
}
@@ -218,7 +234,7 @@ fn view(model_tuple: #(Model, Nil)) -> Element(Msg) {
218234
attribute.style(avatar_styles()),
219235
]),
220236
html.h1([attribute.style(name_styles())], [html.text(full_name)]),
221-
html.p([attribute.style(bio_styles())], [html.text(description)]),
237+
html.p([attribute.style(bio_styles())], [html.text(description())]),
222238
])
223239

224240
let link_elements =
@@ -244,7 +260,7 @@ fn view(model_tuple: #(Model, Nil)) -> Element(Msg) {
244260
let footer =
245261
html.footer([attribute.style(footer_styles())], [html.text(footer_content)])
246262

247-
html.div([attribute.style(body_styles())], [
263+
html.div([attribute.style(root_styles())], [
248264
html.div([attribute.style(container_styles())], [
249265
profile,
250266
html.div([attribute.style(main_content_styles())], link_elements),

0 commit comments

Comments
 (0)