diff --git a/go.mod b/go.mod index 9022477..4382ee2 100644 --- a/go.mod +++ b/go.mod @@ -5,7 +5,7 @@ go 1.23.0 require ( github.com/a-h/templ v0.2.747 github.com/go-chi/chi/v5 v5.1.0 - github.com/gorilla/sessions v1.4.0 + github.com/gorilla/sessions v1.1.1 github.com/joho/godotenv v1.5.1 github.com/markbates/goth v1.80.0 github.com/tursodatabase/libsql-client-go v0.0.0-20240812094001-348a4e45b535 diff --git a/go.sum b/go.sum index e271b61..b5fb5fd 100644 --- a/go.sum +++ b/go.sum @@ -27,10 +27,11 @@ github.com/gorilla/context v1.1.1 h1:AWwleXJkX/nhcU9bZSnZoi3h/qGYqQAGhq6zZe/aQW8 github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= github.com/gorilla/mux v1.6.2 h1:Pgr17XVTNXAk3q/r4CpKzC5xBM/qW1uVLV+IhRZpIIk= github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= +github.com/gorilla/securecookie v1.1.1/go.mod h1:ra0sb63/xPlUeL+yeDciTfxMRAA+MP+HVt/4epWDjd4= github.com/gorilla/securecookie v1.1.2 h1:YCIWL56dvtr73r6715mJs5ZvhtnY73hBvEF8kXD8ePA= github.com/gorilla/securecookie v1.1.2/go.mod h1:NfCASbcHqRSY+3a8tlWJwsQap2VX5pwzwo4h3eOamfo= -github.com/gorilla/sessions v1.4.0 h1:kpIYOp/oi6MG/p5PgxApU8srsSw9tuFbt46Lt7auzqQ= -github.com/gorilla/sessions v1.4.0/go.mod h1:FLWm50oby91+hl7p/wRxDth9bWSuk0qVL2emc7lT5ik= +github.com/gorilla/sessions v1.1.1 h1:YMDmfaK68mUixINzY/XjscuJ47uXFWSSHzFbBQM0PrE= +github.com/gorilla/sessions v1.1.1/go.mod h1:8KCfur6+4Mqcc6S0FEfKuN15Vl5MgXW92AE8ovaJD0w= github.com/hashicorp/golang-lru/v2 v2.0.7 h1:a+bsQ5rvGLjzHuww6tVxozPZFVghXaHOwFs4luLUK2k= github.com/hashicorp/golang-lru/v2 v2.0.7/go.mod h1:QeFd9opnmA6QUJc5vARoKUSoFhyfM2/ZepoAG6RGpeM= github.com/joho/godotenv v1.5.1 h1:7eLL/+HRGLY0ldzfGMeQkb7vMd0as4CfYvUVzLqw0N0= diff --git a/public/css/modal.css b/public/css/modal.css deleted file mode 100644 index 134b939..0000000 --- a/public/css/modal.css +++ /dev/null @@ -1,150 +0,0 @@ -#modal { - /* Underlay covers entire screen. */ - position: fixed; - top: 0px; - bottom: 0px; - left: 0px; - right: 0px; - background-color: rgba(0, 0, 0, 0.5); - z-index: 1000; - - /* Flexbox centers the .modal-content vertically and horizontally */ - display: flex; - flex-direction: column; - align-items: center; - - /* Animate when opening */ - animation-name: fadeIn; - animation-duration: 150ms; - animation-timing-function: ease; -} - -#modal > .modal-underlay { - /* underlay takes up the entire viewport. This is only - required if you want to click to dismiss the popup */ - position: absolute; - z-index: -1; - top: 0px; - bottom: 0px; - left: 0px; - right: 0px; -} - -#modal > .modal-content { - /* Position visible dialog near the top of the window */ - margin-top: 10vh; - - /* Sizing for visible dialog */ - width: 80%; - max-width: 600px; - - /* Display properties for visible dialog*/ - border-radius: 8px; - box-shadow: 0px 0px 20px 0px rgba(33, 33, 33, 0.5); - background-color: #323130; - padding: 20px; - - /* Animate when opening */ - animation-name: zoomIn; - animation-duration: 150ms; - animation-timing-function: ease; -} - -#modal h2 { - margin-bottom: 20px; - font-size: 1.5rem; -} - -#modal.closing { - /* Animate when closing */ - animation-name: fadeOut; - animation-duration: 150ms; - animation-timing-function: ease; -} - -#modal.closing > .modal-content { - /* Animate when closing */ - animation-name: zoomOut; - animation-duration: 150ms; - animation-timing-function: ease; -} - -#modal table { - width: 100%; - table-layout: fixed; - margin-bottom: 20px; -} - -#modal table th { - border-bottom: 1px solid #fff; - text-align: left; -} - -#modal table td { - overflow: hidden; - white-space: nowrap; - text-overflow: ellipsis; -} - -#modal button { - padding: 5px 10px; - background-color: #555; - color: #fff; - border: none; - border-radius: 5px; - cursor: pointer; -} - -#modal input { - padding: 5px; - width: 100%; - border-radius: 5px; - background-color: #444; - outline: none; - border: none; - color: #fff; -} - -.table-actions { - white-space: nowrap; -} - -#modal .action-buttons { - margin-top: 20px; -} - -@keyframes fadeIn { - 0% { - opacity: 0; - } - 100% { - opacity: 1; - } -} - -@keyframes fadeOut { - 0% { - opacity: 1; - } - 100% { - opacity: 0; - } -} - -@keyframes zoomIn { - 0% { - transform: scale(0.9); - } - 100% { - transform: scale(1); - } -} - -@keyframes zoomOut { - 0% { - transform: scale(1); - } - 100% { - transform: scale(0.9); - } -} diff --git a/public/css/nav.css b/public/css/nav.css deleted file mode 100644 index d3b9f4b..0000000 --- a/public/css/nav.css +++ /dev/null @@ -1,54 +0,0 @@ -nav { - position: fixed; - top: 0; - right: 0; - z-index: 1000; - width: 38px; - height: 36px; - overflow: hidden; - transition: all 0.2s ease-in-out; - border-radius: 0 0 3px 0; -} - -nav a, -nav ul { - margin: 0; - padding: 0; -} - -nav:hover { - width: 38px; - height: 160px; - transition: all 0.4s ease-in-out; -} - -nav ul { - list-style-type: none; - margin: 0 0 0 0; - transition: all 0.2s ease-in-out; -} - -nav ul li { - transition: all 0.2s ease-in-out; -} - -.navicon { - padding: 12px 0; - width: 40px; -} - -.navicon:before { - padding: 12px; -} - -.fa:before { - font-size: 16px; -} - -.caret-rotate { - transition: all 0.2s ease-in-out; -} - -nav:hover .caret-rotate { - transform: rotate(-90deg); -} diff --git a/public/css/reset.css b/public/css/reset.css deleted file mode 100644 index 4c1febe..0000000 --- a/public/css/reset.css +++ /dev/null @@ -1,39 +0,0 @@ -*, -*::before, -*::after { - box-sizing: border-box; -} -* { - margin: 0; -} -body { - line-height: 1.5; - -webkit-font-smoothing: antialiased; -} -img, -picture, -video, -canvas, -svg { - display: block; - max-width: 100%; -} -input, -button, -textarea, -select { - font: inherit; -} -p, -h1, -h2, -h3, -h4, -h5, -h6 { - overflow-wrap: break-word; -} -#root, -#__next { - isolation: isolate; -} diff --git a/public/css/styles.css b/public/css/styles.css index e54b655..5b2ab6a 100644 --- a/public/css/styles.css +++ b/public/css/styles.css @@ -1,6 +1,17 @@ -@import "./reset.css"; -@import "./modal.css"; -@import "./nav.css"; +*, +*::before, +*::after { + box-sizing: border-box; +} + +* { + margin: 0; +} + +input, +button { + font: inherit; +} body { font-family: "Noto Sans", sans-serif; @@ -81,3 +92,211 @@ a { #search:focus { opacity: 1; } + +/*nav styles*/ +nav { + position: fixed; + top: 0; + right: 0; + z-index: 1000; + width: 38px; + height: 36px; + overflow: hidden; + transition: all 0.2s ease-in-out; + border-radius: 0 0 3px 0; +} + +nav a, +nav ul { + margin: 0; + padding: 0; +} + +nav:hover { + width: 38px; + height: 160px; + transition: all 0.4s ease-in-out; +} + +nav ul { + list-style-type: none; + margin: 0 0 0 0; + transition: all 0.2s ease-in-out; +} + +nav ul li { + transition: all 0.2s ease-in-out; +} + +.navicon { + padding: 12px 0; + width: 40px; +} + +.navicon:before { + padding: 12px; +} + +.fa:before { + font-size: 16px; +} + +.caret-rotate { + transition: all 0.2s ease-in-out; +} + +nav:hover .caret-rotate { + transform: rotate(-90deg); +} + +/*modal styles*/ +#modal { + /* Underlay covers entire screen. */ + position: fixed; + top: 0px; + bottom: 0px; + left: 0px; + right: 0px; + background-color: rgba(0, 0, 0, 0.5); + z-index: 1000; + + /* Flexbox centers the .modal-content vertically and horizontally */ + display: flex; + flex-direction: column; + align-items: center; + + /* Animate when opening */ + animation-name: fadeIn; + animation-duration: 150ms; + animation-timing-function: ease; +} + +#modal > .modal-underlay { + /* underlay takes up the entire viewport. This is only + required if you want to click to dismiss the popup */ + position: absolute; + z-index: -1; + top: 0px; + bottom: 0px; + left: 0px; + right: 0px; +} + +#modal > .modal-content { + /* Position visible dialog near the top of the window */ + margin-top: 10vh; + + /* Sizing for visible dialog */ + width: 80%; + max-width: 600px; + + /* Display properties for visible dialog*/ + border-radius: 8px; + box-shadow: 0px 0px 20px 0px rgba(33, 33, 33, 0.5); + background-color: #323130; + padding: 20px; + + /* Animate when opening */ + animation-name: zoomIn; + animation-duration: 150ms; + animation-timing-function: ease; +} + +#modal h2 { + margin-bottom: 20px; + font-size: 1.5rem; +} + +#modal.closing { + /* Animate when closing */ + animation-name: fadeOut; + animation-duration: 150ms; + animation-timing-function: ease; +} + +#modal.closing > .modal-content { + /* Animate when closing */ + animation-name: zoomOut; + animation-duration: 150ms; + animation-timing-function: ease; +} + +#modal table { + width: 100%; + table-layout: fixed; + margin-bottom: 20px; +} + +#modal table th { + border-bottom: 1px solid #fff; + text-align: left; +} + +#modal table td { + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; +} + +#modal button { + padding: 5px 10px; + background-color: #555; + color: #fff; + border: none; + border-radius: 5px; + cursor: pointer; +} + +#modal input { + padding: 5px; + width: 100%; + border-radius: 5px; + background-color: #444; + outline: none; + border: none; + color: #fff; +} + +.table-actions { + white-space: nowrap; +} + +#modal .action-buttons { + margin-top: 20px; +} + +@keyframes fadeIn { + 0% { + opacity: 0; + } + 100% { + opacity: 1; + } +} + +@keyframes fadeOut { + 0% { + opacity: 1; + } + 100% { + opacity: 0; + } +} + +@keyframes zoomIn { + 0% { + transform: scale(0.9); + } + 100% { + transform: scale(1); + } +} + +@keyframes zoomOut { + 0% { + transform: scale(1); + } + 100% { + transform: scale(0.9); + } +}