-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Added TailwindCSS to Urchin. - Updated Makefile to download TailwindCSS (currently only Linux is supported) - Refactored templates to share similar logic between templates. - Redesigned UI for Urchin. - Added layout page shared between all sub pages. - Added dark mode support. - Added new `renderHtml` method to reduce duplicate code in go. - Added self-designed minimalistic 'sea urchin' favicon. :D - Added missing sites `about` and `services`. - Added `Not Found` handling if a resource is requested that is not present, displaying an error message while keeping the layout page. - Restructured `static` folder to include stylesheets, scripts and assets. --------- Co-authored-by: matheusgomes28 <matheusgarcia28@gmail.com>
- Loading branch information
1 parent
a927e08
commit d915e1c
Showing
43 changed files
with
403 additions
and
309 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
package app | ||
|
||
import ( | ||
"github.com/gin-gonic/gin" | ||
"github.com/matheusgomes28/urchin/common" | ||
"github.com/matheusgomes28/urchin/database" | ||
"github.com/matheusgomes28/urchin/views" | ||
) | ||
|
||
func aboutHandler(c *gin.Context, app_settings common.AppSettings, db database.Database) ([]byte, error) { | ||
return renderHtml(c, views.MakeAboutPage(app_settings.AppNavbar.Links)) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
package app | ||
|
||
import ( | ||
"github.com/gin-gonic/gin" | ||
"github.com/matheusgomes28/urchin/common" | ||
"github.com/matheusgomes28/urchin/database" | ||
"github.com/matheusgomes28/urchin/views" | ||
) | ||
|
||
func servicesHandler(c *gin.Context, app_settings common.AppSettings, db database.Database) ([]byte, error) { | ||
return renderHtml(c, views.MakeServicesPage(app_settings.AppNavbar.Links)) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
File renamed without changes
File renamed without changes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
/* Loading tailwind builtins. All custom rules have to be added in here. */ | ||
@tailwind base; | ||
@tailwind components; | ||
@tailwind utilities; | ||
|
||
|
||
body { | ||
background: #E5E5E5; | ||
} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
document.getElementById('menu-toggle').addEventListener('click', function () { | ||
const menu = document.getElementById('mobile-menu'); | ||
menu.classList.toggle('hidden') | ||
}); | ||
|
||
const themeToggle = document.getElementById('theme-toggle'); | ||
const lightIcon = document.getElementById('light-icon'); | ||
const darkIcon = document.getElementById('dark-icon'); | ||
|
||
const html = document.documentElement; | ||
|
||
if (localStorage.getItem('color-theme') === 'dark') { | ||
html.classList.add('dark'); | ||
} else { | ||
html.classList.remove('dark'); | ||
} | ||
|
||
themeToggle.addEventListener('click', function () { | ||
// Toggle dark class on HTML element | ||
html.classList.toggle('dark'); | ||
|
||
if (html.classList.contains('dark')) { | ||
localStorage.setItem('color-theme', 'dark'); | ||
} else { | ||
localStorage.setItem('color-theme', 'light'); | ||
} | ||
}); | ||
|
||
document.getElementById('demo-form').addEventListener('submit', function() { | ||
const event = new Event('verified'); | ||
const elem = document.querySelector("#demo-form"); | ||
elem.dispatchEvent(event); | ||
}) |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
/** @type {import('tailwindcss').Config} */ | ||
export const content = [ | ||
"./views/*.templ", | ||
] | ||
|
||
export const theme = { | ||
container: { | ||
center: true, | ||
padding: { | ||
DEFAULT: "1rem", | ||
mobile: "1rem", | ||
tablet: "1rem", | ||
desktop: "1rem", | ||
}, | ||
}, | ||
extend: { | ||
colors: { | ||
pastel: { | ||
blue: '#AEC6CF', | ||
purple: '#CBAACB', | ||
pink: '#FFB6C1', | ||
orange: '#FFDAB9', | ||
green: '#C4E17F', | ||
yellow: '#FFDD94', | ||
gray: '#E5E5E5' | ||
} | ||
} | ||
} | ||
} | ||
|
||
export const darkMode = 'selector' | ||
|
||
export const plugins = [require("@tailwindcss/forms"), require("@tailwindcss/typography")] |
Oops, something went wrong.