diff --git a/api/utils/respond.go b/api/utils/respond.go new file mode 100644 index 0000000..5150c2a --- /dev/null +++ b/api/utils/respond.go @@ -0,0 +1,20 @@ +package utils + +import ( + "encoding/json" + "github.com/Redume/EveryNASA/utils" + + "github.com/gofiber/fiber/v2" +) + +func Message(status bool, message string) map[string]interface{} { + return map[string]interface{}{"status": status, "message": message} +} + +func Respond(c *fiber.Ctx, data map[string]interface{}) { + c.Set("Content-Type", "application/json") + err := json.NewEncoder(c).Encode(data) + if err != nil { + utils.Log(err.Error()) + } +} diff --git a/interface/page/gallery.html b/interface/page/gallery.html new file mode 100644 index 0000000..f1f4826 --- /dev/null +++ b/interface/page/gallery.html @@ -0,0 +1,99 @@ + + + + + EveryNASA + + + + + + + + + + + +
+
+
+
+ + +
+ + + + + + + + \ No newline at end of file diff --git a/interface/static/assets/placeholder.png b/interface/static/assets/placeholder.png new file mode 100644 index 0000000..bf1d310 Binary files /dev/null and b/interface/static/assets/placeholder.png differ diff --git a/interface/static/styles/gallery.css b/interface/static/styles/gallery.css new file mode 100644 index 0000000..d8fe1f3 --- /dev/null +++ b/interface/static/styles/gallery.css @@ -0,0 +1,90 @@ +.card { + background-color: #131313; + border-radius: 34px; + width: 359px; + height: 237px; + overflow: hidden; +} + +.header-row { + display: grid; + grid-template-columns: repeat(4, 1fr); + grid-template-rows: repeat(1, 1fr); + grid-gap: 40px; + padding: 10px; + margin-left: -100px; +} + +.card-img-top { + min-width: 120%; + min-height: 120%; + +} + +.card-img { + border-radius: 16px; +} + +.modal-content { + background-color: #131313; + color: white; +} + +.shimmer { + display: inline-block; + color: #333333; + -webkit-mask: linear-gradient(-60deg, #000 30%, #0005, #000 70%) right/386% 100%; + background-repeat: no-repeat; + animation: shimmer 2.5s infinite; + filter: blur(50px) +} + +@keyframes shimmer { + 100% {-webkit-mask-position: left} +} + +#show-more { + background-color: #212529; + color: white; + border: none; + border-radius: 16px; + padding: 10px; + margin: 10px; +} + +.modal-body p { + font-family: 'Roboto', sans-serif; + margin-top: 16px; +} + +.navbar { + position: -webkit-sticky; + position: sticky; + z-index: 100; + top: 0; +} + +#favorite { + width: 120px; + height: 120px; + position: absolute; + left: 280px; + top: 89.3%; +} + +#favorite:hover { + cursor: pointer; +} + +#favorite:active { + transform: scale(0.9); +} + +#setWallpaper:disabled { + cursor: unset; + transform: none; +} + +.btn-close{ + background-color: white; +} \ No newline at end of file