diff --git a/assets/css/style.css b/assets/css/style.css index 1ef1442..96d5216 100644 --- a/assets/css/style.css +++ b/assets/css/style.css @@ -4,6 +4,7 @@ body { margin: 0; padding: 0; font-size: 16px; + font-family: "Helvetica Neue", Helvetica, serif; } .header { @@ -142,4 +143,17 @@ body { font-size: 1.15em; color: #495057; line-height: 1.6; +} + +.footer { + background-color: #457B9D; /* Muted blue */ + color: #FFFFFF; /* White text */ + text-align: center; + padding: 15px 10px; +} + +.footer a { + color: #A3C1AD; /* Muted green */ + text-decoration: none; + font-weight: bold; } \ No newline at end of file diff --git a/main.go b/main.go index 0fbdd20..48e677c 100644 --- a/main.go +++ b/main.go @@ -37,6 +37,8 @@ func main() { // pages routes r.GET("/", pages.Home) r.GET("/login", pages.Login) + r.GET("/welcome", pages.Welcome) + r.GET("/wishlist", pages.Wishlist) runErr := r.Run(":8080") diff --git a/pages/home.go b/pages/home.go index 452d515..ec60a85 100644 --- a/pages/home.go +++ b/pages/home.go @@ -6,9 +6,7 @@ import ( "github.com/joho/godotenv" "log" "net/http" - "os" "sponsorahacker/db" - "sponsorahacker/twitch" "sponsorahacker/utils" ) @@ -21,19 +19,11 @@ func Home(c *gin.Context) { isLoggedIn := utils.CheckIfLoggedIn(c) fmt.Println("isLoggedIn:", isLoggedIn) - _, err := db.NewDbClient("libsql://sponsorahacker-stephanie-gredell.turso.io") + _, err := db.NewDbClient() if err != nil { log.Fatal(err) } - client, twitchErr := twitch.NewTwitchClient(os.Getenv("TWITCH_CLIENT_ID"), os.Getenv("TWITCH_CLIENT_SECRET")) - - if twitchErr != nil { - log.Fatal(twitchErr) - } - - client.GetUser() - c.HTML(http.StatusOK, "index.html", gin.H{ "title": "Sponsor a Hacker", "isLoggedIn": isLoggedIn, diff --git a/pages/welcome.go b/pages/welcome.go new file mode 100644 index 0000000..88b1fc2 --- /dev/null +++ b/pages/welcome.go @@ -0,0 +1,12 @@ +package pages + +import ( + "github.com/gin-gonic/gin" + "net/http" +) + +func Welcome(c *gin.Context) { + c.HTML(http.StatusOK, "welcome.html", gin.H{ + "title": "Sponsor A Hacker", + }) +} diff --git a/pages/wishlist.go b/pages/wishlist.go new file mode 100644 index 0000000..95a9392 --- /dev/null +++ b/pages/wishlist.go @@ -0,0 +1,12 @@ +package pages + +import ( + "github.com/gin-gonic/gin" + "net/http" +) + +func Wishlist(c *gin.Context) { + c.HTML(http.StatusOK, "wishlist.html", gin.H{ + "title": "Sponsor A Hacker", + }) +} diff --git a/templates/apply.html b/templates/apply.html deleted file mode 100644 index 81ab73f..0000000 --- a/templates/apply.html +++ /dev/null @@ -1,12 +0,0 @@ - - - - - -

- {{ .title }} -

- - - - \ No newline at end of file diff --git a/templates/footer.html b/templates/footer.html new file mode 100644 index 0000000..555b2c6 --- /dev/null +++ b/templates/footer.html @@ -0,0 +1,5 @@ +{{define "footer"}} + +{{end}} \ No newline at end of file diff --git a/templates/header.html b/templates/header.html new file mode 100644 index 0000000..6277266 --- /dev/null +++ b/templates/header.html @@ -0,0 +1,15 @@ +{{define "pageheader"}} +
+ +

+ Sponsor A Hacker +

+ + {{if eq .isLoggedIn false}} + Login + {{ else }} + Logout + {{ end }} + +
+{{end}} \ No newline at end of file diff --git a/templates/logout-button.html b/templates/logout-button.html deleted file mode 100644 index b2650c3..0000000 --- a/templates/logout-button.html +++ /dev/null @@ -1,7 +0,0 @@ -{{ define "logoutButton" }} - - - -{{ end }} \ No newline at end of file diff --git a/templates/welcome.html b/templates/welcome.html new file mode 100644 index 0000000..5460322 --- /dev/null +++ b/templates/welcome.html @@ -0,0 +1,161 @@ + + + + + + + Dashboard + + + +
+ +

+ {{ .title }} +

+ + {{if eq .isLoggedIn false}} + Login + {{ else }} + Logout + {{ end }} + +
+
+
+
+

Welcome, Codegirl007!

+

Find your path, fund futures, or inspire a community today.

+
+ +
+

Build Your Tech Future

+
+
+

Your Wishlist

+

Track your certifications and courses. Update or add goals to keep your community engaged.

+ +
+
+

Community Opportunities

+

Join upcoming hackathons or community events to grow your skills and network.

+ +
+
+

Learning Resources

+

Access curated tutorials, guides, and practice challenges to enhance your skills.

+ +
+
+

Connect with Mentors

+

Get advice and guidance from experienced professionals to boost your learning journey.

+ +
+
+
+ +
+

Help Make Dreams Happen

+
+
+

Fund a Goal

+

Choose a learner’s wishlist item and contribute to their education journey.

+ +
+
+

Host or Sponsor a Hackathon

+

Support innovation by organizing or sponsoring a hackathon for the community.

+ +
+
+

Support a Streamer

+

Boost streamers who are funding education for members of their community.

+ +
+
+

Track Your Impact

+

See the difference your contributions are making through real-time progress updates.

+ +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/templates/wishlist.html b/templates/wishlist.html new file mode 100644 index 0000000..41e0631 --- /dev/null +++ b/templates/wishlist.html @@ -0,0 +1,203 @@ + + + + + + + Wishlist + + + +{{template "pageheader"}} +
+
+

Manage Your Wishlist

+

Add new goals or track progress on your current items.

+
+ +
+

Add a New Goal

+
+
+ + +
+
+ + +
+ +
+
+ +
+

Your Current Wishlist

+
+
+
+

Full-Stack Development Certification

+

Progress: 75% funded

+
+ +
+
+
+

Data Science Course

+

Progress: 40% funded

+
+ +
+
+
+ + +
+{{template "footer"}} + + \ No newline at end of file