From 93c0511a82dbadeb229fd1181f7cbe42f715b4b4 Mon Sep 17 00:00:00 2001 From: "Jill \"oatmealine\" Monoids" Date: Tue, 3 Jan 2023 21:28:38 +0300 Subject: [PATCH] make a simple index homepage --- README.md | 2 +- public/style.css | 42 ++++++++++++++++++++++++++--- public/template/index.ecr | 48 +++++++++++++++++++++++++++++++++ src/template_endpoints/index.cr | 7 +++++ 4 files changed, 95 insertions(+), 4 deletions(-) create mode 100644 public/template/index.ecr create mode 100644 src/template_endpoints/index.cr diff --git a/README.md b/README.md index 75d5683..0dc7cf2 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -

+

crystal-gauntlet
diff --git a/public/style.css b/public/style.css index b8af831..1578744 100644 --- a/public/style.css +++ b/public/style.css @@ -1,3 +1,7 @@ +*, ::before, ::after { + box-sizing: border-box; +} + :root { font-size: 16px; line-height: 1; @@ -15,8 +19,8 @@ font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; - --accent-color: rgb(243, 159, 215); - --accent-color-bri: rgb(241, 181, 221); + --accent-color: rgb(245, 141, 210); + --accent-color-bri: rgb(255, 191, 234); accent-color: var(--accent-color); } @@ -31,15 +35,47 @@ body { a { color: var(--accent-color); - transition: 0.2s color; + transition: 0.1s color; } a:hover { color: var(--accent-color-bri); } +.dim { + color: #444; +} + @media (prefers-color-scheme: dark) { :root { background-color: #111; color: #fff; } + + .dim { + color: #aaa; + } +} + +.spinny:hover { + animation: 2s spin linear infinite; +} + +@keyframes spin { + from { + transform: rotate(0deg); + } + to { + transform: rotate(360deg); + } +} + +.block { + max-width: 600px; + line-height: 1.3; + text-align: justify; +} + +pre { + display: inline; + font-family: monospace; } \ No newline at end of file diff --git a/public/template/index.ecr b/public/template/index.ecr new file mode 100644 index 0000000..dfd8f3c --- /dev/null +++ b/public/template/index.ecr @@ -0,0 +1,48 @@ + + + + + + + + crystal-gauntlet + + +

+ crystal-gauntlet +

+
<%= + strings = [ + "did yoy know? 50 Kilometers Remaining", + "Fun Basil Fact: If you start running now, you may be fast enough", + "Made in Yugoslavia", + "There might be moths here", + "< 6 security vulnerabilities (for 2 of which a CVE is pending!)", + "Overengineered Hellspawn", + "Home of The Intrinsic", + "home of ㏒", + "wake up, take a shit, novosibirsk", + "The catalyst of ball itching", + "XKCD 927's biggest fan" + ] + strings[Random.rand(strings.size)] + %>
+
+

+ crystal-gauntlet is a work-in-progress Geometry Dash + private server written in Crystal, focusing on performance and 1:1 accuracy of GD feature recreations. +

+

+ But you probably already knew that. You may be looking for:
+ +

  • The Git repository
  • +
  • Song reuploading
  • +
  • Completely legal executable download
  • + +

    +
    +
    + Crystal <%= Crystal::VERSION %>
    <%= Crystal::BUILD_COMMIT %>
    running on
    <%= System.hostname %>
    +
    + + diff --git a/src/template_endpoints/index.cr b/src/template_endpoints/index.cr new file mode 100644 index 0000000..932f667 --- /dev/null +++ b/src/template_endpoints/index.cr @@ -0,0 +1,7 @@ +require "ecr" + +include CrystalGauntlet + +CrystalGauntlet.template_endpoints[""] = ->(context : HTTP::Server::Context): String { + ECR.render("./public/template/index.ecr") +}