From 35a4047a6ca5fa9bedcd76ca77ac7979fec2dc2d Mon Sep 17 00:00:00 2001 From: "Gustavo \"Guz\" L. de Mello" Date: Fri, 7 Jun 2024 15:42:30 -0300 Subject: [PATCH] feat: scroll snap on desktop --- layouts/page.templ | 8 ++++++- pages/homepage.templ | 54 ++++++++++++++++++++------------------------ 2 files changed, 32 insertions(+), 30 deletions(-) diff --git a/layouts/page.templ b/layouts/page.templ index fb11ab9..cb09970 100644 --- a/layouts/page.templ +++ b/layouts/page.templ @@ -2,7 +2,7 @@ package layouts templ Page(title string) { - + { title } + { children... } + } diff --git a/pages/homepage.templ b/pages/homepage.templ index c54e788..fde0987 100644 --- a/pages/homepage.templ +++ b/pages/homepage.templ @@ -60,20 +60,16 @@ var mockProjects = []components.Project{ templ Homepage() { @layouts.Page("013") { - - @components.Nav([]components.Link{ - {Text: "about", Link: templ.SafeURL("#about")}, - {Text: "projects", Link: templ.SafeURL("#projects")}, - {Text: "gallery", Link: templ.SafeURL("#gallery")}, - {Text: "blog", Link: templ.SafeURL("#blog")}, - {Text: "contact", Link: templ.SafeURL("#contact")}, - }) + @components.Nav([]components.Link{ + {Text: "about", Link: templ.SafeURL("#about")}, + {Text: "projects", Link: templ.SafeURL("#projects")}, + {Text: "gallery", Link: templ.SafeURL("#gallery")}, + {Text: "blog", Link: templ.SafeURL("#blog")}, + {Text: "contact", Link: templ.SafeURL("#contact")}, + }) +
@@ -95,9 +91,9 @@ templ Homepage() {
-
+

About

Lorem ipsum dolor sit amet, officia excepteur ex fugiat @@ -130,9 +126,9 @@ templ Homepage() {

-
+

Projects.

@@ -169,9 +165,9 @@ templ Homepage() {

-
+
+ - + >
+
+ } }