diff --git a/main.go b/main.go index 0fd487c..346a705 100644 --- a/main.go +++ b/main.go @@ -21,6 +21,7 @@ type Index struct { GalleryPhoto *GalleryItems VideoContent *VideoItems Nav bool + PageName string } type GalleryItems struct { @@ -113,6 +114,7 @@ func renderTemplate(w http.ResponseWriter, tmpl string, data *Index, nav bool) { func galleryContentHandler(w http.ResponseWriter, req *http.Request) { parts := strings.Split(req.URL.Path, "/") + data.PageName = "gallery" if len(parts) == 3 && parts[1] == "gallery" { idStr := parts[2] id, err := strconv.Atoi(idStr) @@ -143,6 +145,7 @@ func galleryContentHandler(w http.ResponseWriter, req *http.Request) { func videoContentHandler(w http.ResponseWriter, req *http.Request) { parts := strings.Split(req.URL.Path, "/") + data.PageName = "videos" if len(parts) == 3 && parts[1] == "videos" { idStr := parts[2] id, err := strconv.Atoi(idStr) @@ -171,14 +174,17 @@ func videoContentHandler(w http.ResponseWriter, req *http.Request) { } func videoHandler(w http.ResponseWriter, req *http.Request) { + data.PageName = "videos" renderTemplate(w, "video", data, true) } func socialsHandler(w http.ResponseWriter, req *http.Request) { + data.PageName = "socials" renderTemplate(w, "socials", data, true) } func galleryHandler(w http.ResponseWriter, req *http.Request) { + data.PageName = "gallery" renderTemplate(w, "gallery", data, true) } @@ -188,6 +194,7 @@ func indexHandler(w http.ResponseWriter, req *http.Request) { return } + data.PageName = "home" renderTemplate(w, "home", data, true) } diff --git a/src/assets/profile/header.jpg:Zone.Identifier b/src/assets/profile/header.jpg:Zone.Identifier deleted file mode 100644 index e69de29..0000000 diff --git a/src/assets/profile/profile.jpg:Zone.Identifier b/src/assets/profile/profile.jpg:Zone.Identifier deleted file mode 100644 index e69de29..0000000 diff --git a/src/components/navbar.tmpl b/src/components/navbar.tmpl index f6a10fd..e0bbf19 100644 --- a/src/components/navbar.tmpl +++ b/src/components/navbar.tmpl @@ -2,21 +2,31 @@ {{ end }} diff --git a/src/index.tmpl b/src/index.tmpl index a5bff89..9606cfd 100644 --- a/src/index.tmpl +++ b/src/index.tmpl @@ -12,7 +12,7 @@ {{ .WebpageTitle }} - + diff --git a/src/pages/404.tmpl b/src/pages/404.tmpl index caae3d0..c8edad4 100644 --- a/src/pages/404.tmpl +++ b/src/pages/404.tmpl @@ -1,6 +1,6 @@ {{ define "head" }} - + {{ end }} diff --git a/src/pages/gallery.tmpl b/src/pages/gallery.tmpl index 3e7a203..69c9e22 100644 --- a/src/pages/gallery.tmpl +++ b/src/pages/gallery.tmpl @@ -1,6 +1,6 @@ {{ define "head" }} - + {{ end }} diff --git a/src/pages/gallery_content.tmpl b/src/pages/gallery_content.tmpl index 95fe853..ec544f2 100644 --- a/src/pages/gallery_content.tmpl +++ b/src/pages/gallery_content.tmpl @@ -1,6 +1,6 @@ {{ define "head" }} - + {{ end }} diff --git a/src/pages/home.tmpl b/src/pages/home.tmpl index 2f51e41..1529ecb 100644 --- a/src/pages/home.tmpl +++ b/src/pages/home.tmpl @@ -1,6 +1,6 @@ {{ define "head" }} - + {{ end }} @@ -8,9 +8,9 @@ {{ define "body" }}
-
+ -
+ diff --git a/src/pages/socials.tmpl b/src/pages/socials.tmpl index 7ac45ea..7de7629 100644 --- a/src/pages/socials.tmpl +++ b/src/pages/socials.tmpl @@ -1,6 +1,6 @@ {{ define "head" }} - + {{ end }} diff --git a/src/pages/video.tmpl b/src/pages/video.tmpl index 1211038..ec4f021 100644 --- a/src/pages/video.tmpl +++ b/src/pages/video.tmpl @@ -1,6 +1,6 @@ {{ define "head" }} - + {{ end }} diff --git a/src/pages/video_content.tmpl b/src/pages/video_content.tmpl index 649fe54..83f9fad 100644 --- a/src/pages/video_content.tmpl +++ b/src/pages/video_content.tmpl @@ -1,6 +1,6 @@ {{ define "head" }} - + {{ end }} diff --git a/src/styles/home.css b/src/styles/home.css index 39d3bfa..abc146f 100644 --- a/src/styles/home.css +++ b/src/styles/home.css @@ -10,21 +10,23 @@ header { flex-direction: column; margin-top: 20px; background-color: var(--bg-alt-color); - height: 430px; + height: 420px; width: 100%; border-radius: 10px; font-family: 'Rubik', sans-serif; - + padding-bottom: 15px; + box-sizing: content-box; + h1 { color: white; font-size: 3rem; margin-left: 20px; + line-height: 1.2; } p { color: white; font-size: 1.5rem; margin-left: 20px; - margin-bottom: 20px; } } diff --git a/src/styles/main.css b/src/styles/main.css index 6ba3b32..4c303a6 100644 --- a/src/styles/main.css +++ b/src/styles/main.css @@ -10,7 +10,6 @@ body { background-color: var(--bg-color); - min-height: 100vh; } @@ -43,25 +42,38 @@ nav { align-items: center; justify-content: space-between; color: white; + height: 50px; font-family: 'Rubik', sans-serif; font-weight: 500; + background-color: var(--bg-alt-color); + border-radius: 10px; h1 { width: fit-content; z-index: 10; + margin-left: 13px; } ul { list-style: none; float: right; + display: flex; + margin-left: 10px; } ul li{ - display: inline; + display: flex; cursor: pointer; - margin-left: 10px; font-weight: 400; transition: color 0.3s; + align-items: center; + height: 50px; + padding: 0 13px; + transition: 0.3s background-color; + } + + ul li:hover { + background-color: #2269d4; } ul a { @@ -69,10 +81,6 @@ nav { color: inherit; } - ul li:hover{ - color: #8ee8fc; - } - i { float: right; font-size: 35px; @@ -84,6 +92,15 @@ nav { i:hover { color: #74d2f1; } + + .lastIcon { + border-top-right-radius: 10%; + border-bottom-right-radius: 10%; + } + + .active { + background-color: #2269d4 !important; + } } @media screen and (max-width: 430px) {