feat: animations, responsive design
Animations - added opacity animation for experience page - added stagger animation for navbar items on mobile - added animation for landing page for years and language indications Pages - About Page mockup Redesign - Navbar to include icons on desktop
This commit is contained in:
13
main.go
13
main.go
@@ -15,11 +15,7 @@ import (
|
||||
)
|
||||
|
||||
func templHandlerWithOptions(component templ.Component) http.Handler {
|
||||
t := templ.Handler(component, templ.WithStatus(200), templ.WithContentType("text/html"))
|
||||
|
||||
log.Println("templHandlerWithOptions: ", t.Status)
|
||||
|
||||
return t
|
||||
return templ.Handler(component, templ.WithStatus(200), templ.WithContentType("text/html"))
|
||||
}
|
||||
|
||||
func rootHandler(handler http.Handler) http.Handler {
|
||||
@@ -37,7 +33,7 @@ func SafeFileServer(root http.FileSystem) http.Handler {
|
||||
w.Header().Set("X-Frame-Options", "DENY")
|
||||
w.Header().Set("X-XSS-Protection", "1; mode=block")
|
||||
|
||||
log.Println("path", r.URL.Path)
|
||||
log.Println("assets handler", r.URL.Path)
|
||||
|
||||
// Only allow specific file extensions
|
||||
if allowed := func(path string) bool {
|
||||
@@ -45,6 +41,7 @@ func SafeFileServer(root http.FileSystem) http.Handler {
|
||||
".js": true,
|
||||
".css": true,
|
||||
".png": true,
|
||||
".webp": true,
|
||||
".jpg": true,
|
||||
".jpeg": true,
|
||||
".svg": true,
|
||||
@@ -75,7 +72,7 @@ func main() {
|
||||
server := http.NewServeMux()
|
||||
|
||||
// Serve static files with restrictions
|
||||
staticFS := http.Dir("static")
|
||||
staticFS := http.Dir("assets")
|
||||
server.Handle("GET /assets/", http.StripPrefix("/assets/", SafeFileServer(staticFS)))
|
||||
|
||||
server.Handle("GET /about", templHandlerWithOptions(components.AboutPage()))
|
||||
@@ -98,7 +95,7 @@ func main() {
|
||||
server.Handle("GET /{$}", templHandlerWithOptions(components.LandingPage()))
|
||||
|
||||
// 404 fallback page
|
||||
server.Handle("GET /", templHandlerWithOptions(components.NotFound()))
|
||||
server.Handle("GET /", templ.Handler(components.NotFound(), templ.WithStatus(404), templ.WithContentType("text/html")))
|
||||
|
||||
// TODO: add Blogs to my portfolio website
|
||||
// server.Handle("GET /blogs", templHandlerWithOptions(components.AboutPage()))
|
||||
|
||||
Reference in New Issue
Block a user