diff --git a/website/src/conf.gleam b/website/src/conf.gleam
index 47905211..07591469 100644
--- a/website/src/conf.gleam
+++ b/website/src/conf.gleam
@@ -1,6 +1,6 @@
-pub const base_url = "https://rosettea.github.io/Hilbish/versions/new-website"
+//pub const base_url = "https://rosettea.github.io/Hilbish/versions/new-website"
-//pub const base_url = "http://localhost:9080"
+pub const base_url = "http://localhost:9080"
pub fn base_url_join(cont: String) -> String {
base_url <> cont
diff --git a/website/src/pages/index.gleam b/website/src/pages/index.gleam
index 752d4da7..2a9bcb19 100644
--- a/website/src/pages/index.gleam
+++ b/website/src/pages/index.gleam
@@ -1,4 +1,5 @@
import conf
+import util
import lustre/attribute
import lustre/element
@@ -38,10 +39,14 @@ pub fn page() -> element.Element(a) {
element.text("Extensible, scriptable, configurable: All in Lua."),
]),
html.div([attribute.class("flex flex-row gap-2 mt-2")], [
- button("Install", "bg-pink-500/30", conf.base_url_join("/install")),
+ button(
+ "Install",
+ "bg-pink-500/30 hover:bg-pink-500/80",
+ conf.base_url_join("/install"),
+ ),
button(
"GitHub",
- "bg-stone-500/30",
+ "bg-stone-500/30 hover:bg-stone-500/80",
"https://github.com/Rosettea/Hilbish",
),
]),
@@ -60,31 +65,6 @@ pub fn page() -> element.Element(a) {
[element.text("Feature Overview")],
),
html.br([]),
- html.h1(
- [
- attribute.class(
- "mt-3 text-5xl gap-2 font-bold inline-flex justify-center items-center",
- ),
- ],
- [
- element.text("What Makes "),
- html.span(
- [
- attribute.class(
- "inline-flex text-pink-500 items-center justify-center h-8",
- ),
- ],
- [
- html.img([
- attribute.class("h-8"),
- attribute.src(conf.base_url_join("/hilbish-flower.png")),
- ]),
- element.text("Hilbish"),
- ],
- ),
- element.text(" Great?"),
- ],
- ),
html.div(
[
attribute.class(
@@ -92,6 +72,31 @@ pub fn page() -> element.Element(a) {
),
],
[
+ html.h1(
+ [
+ attribute.class(
+ "mt-3 text-5xl gap-2 font-bold inline-flex justify-center items-center",
+ ),
+ ],
+ [
+ element.text("What Makes "),
+ html.span(
+ [
+ attribute.class(
+ "inline-flex text-pink-500 items-center justify-center h-8",
+ ),
+ ],
+ [
+ html.img([
+ attribute.class("h-8"),
+ attribute.src(conf.base_url_join("/hilbish-flower.png")),
+ ]),
+ element.text("Hilbish"),
+ ],
+ ),
+ element.text(" Great?"),
+ ],
+ ),
feature_section(
"The Moon-powered shell",
"https://upload.wikimedia.org/wikipedia/commons/thumb/c/cf/Lua-Logo.svg/2048px-Lua-Logo.svg.png",
@@ -128,7 +133,7 @@ pub fn page() -> element.Element(a) {
html.div(
[
attribute.class(
- "text-center bg-neutral-100 dark:bg-neutral-900 -mx-4 p-4",
+ "border-t border-t-zinc-300 text-center bg-neutral-100 dark:bg-neutral-900 -mx-4 p-4",
),
],
[
@@ -151,7 +156,7 @@ pub fn page() -> element.Element(a) {
]),
html.p([], [
element.text(
- "These are binary releases of Hilbish from GitHub. Install instructions are located at an INSTALL.md file.",
+ "These are \"portable\" binary releases of Hilbish from GitHub. All the required files are in the archive. Put it somewhere, add the directory to your $PATH, and use Hilbish.",
),
]),
html.div(
@@ -168,7 +173,11 @@ pub fn page() -> element.Element(a) {
),
attribute.class("h-36"),
]),
- button("Linux (64-bit)", "bg-stone-500/30", ""),
+ button(
+ "Linux (64-bit)",
+ "bg-stone-500/30 hover:bg-stone-500/80",
+ download_link("linux", "amd64"),
+ ),
]),
html.div([attribute.class("flex flex-col gap-2")], [
html.img([
@@ -177,7 +186,11 @@ pub fn page() -> element.Element(a) {
),
attribute.class("h-36"),
]),
- button("Windows (64-bit)", "bg-stone-500/30", ""),
+ button(
+ "Windows (64-bit)",
+ "bg-stone-500/30 hover:bg-stone-500/80",
+ download_link("windows", "amd64"),
+ ),
]),
html.div(
[
@@ -192,7 +205,11 @@ pub fn page() -> element.Element(a) {
),
attribute.class("h-36"),
]),
- button("MacOS (64-bit)", "bg-stone-500/30", ""),
+ button(
+ "MacOS (64-bit)",
+ "bg-stone-500/30 hover:bg-stone-500/80",
+ download_link("darwin", "amd64"),
+ ),
],
),
html.div(
@@ -208,11 +225,16 @@ pub fn page() -> element.Element(a) {
),
attribute.class("h-36"),
]),
- button("MacOS (ARM)", "bg-stone-500/30", ""),
+ button(
+ "MacOS (ARM)",
+ "bg-stone-500/30 hover:bg-stone-500/80",
+ download_link("darwin", "arm64"),
+ ),
],
),
],
),
+ util.link(conf.base_url_join("/install"), "Other Downloads", True),
]),
],
),
@@ -234,7 +256,8 @@ fn feature_section(
html.div(
[
attribute.class(
- "flex flex-col gap-2 md:w-3/6 text-start xl:items-" <> align,
+ "flex flex-col gap-2 md:w-3/6 text-start xl:items-",
+ // <> align,
),
],
[
@@ -242,8 +265,8 @@ fn feature_section(
html.div(
[
attribute.class(
- "flex flex-row flex-wrap xl:flex-nowrap justify-center items-center gap-4 "
- <> reverse,
+ "flex flex-row flex-wrap xl:flex-nowrap justify-center items-center gap-4 ",
+ //<> reverse,
),
],
[html.p([], [element.text(text)])],
@@ -264,3 +287,12 @@ fn button(text: String, color: String, link: String) -> element.Element(a) {
),
])
}
+
+fn download_link(os: String, arch: String) -> String {
+ // TODO: remove version in asset name when 3.0 drops
+ "https://github.com/Rosettea/Hilbish/releases/download/latest/hilbish-v2.3.4-"
+ <> os
+ <> "-"
+ <> arch
+ <> ".tar.gz"
+}
diff --git a/website/src/util.gleam b/website/src/util.gleam
index dbfd3c55..cbc8b8da 100644
--- a/website/src/util.gleam
+++ b/website/src/util.gleam
@@ -2,6 +2,10 @@ import gleam/int
import gleam/option
import gleam/string
+import lustre/attribute
+import lustre/element
+import lustre/element/html
+
import glaml
import post
@@ -27,3 +31,40 @@ pub fn sort_weight(p1: #(String, post.Post), p2: #(String, post.Post)) {
False -> int.compare(p1_weight, p2_weight)
}
}
+
+pub fn link(url: String, text: String, out: Bool) {
+ html.a(
+ [
+ attribute.href(url),
+ case out {
+ False -> attribute.none()
+ True -> attribute.target("_blank")
+ },
+ ],
+ [
+ html.span(
+ [
+ attribute.class(
+ "inline-flex text-light dark:text-pink-300 dark:hover:text-pink-200 text-pink-600 hover:text-pink-500 hover:underline",
+ ),
+ ],
+ [
+ case out {
+ False -> element.none()
+ True ->
+ element.unsafe_raw_html(
+ "",
+ "tag",
+ [],
+ "
+",
+ )
+ },
+ element.text(text),
+ ],
+ ),
+ ],
+ )
+}
diff --git a/website/src/website.gleam b/website/src/website.gleam
index acaea103..be3b2feb 100644
--- a/website/src/website.gleam
+++ b/website/src/website.gleam
@@ -131,23 +131,11 @@ fn nav() -> element.Element(a) {
),
]),
]),
- html.div(
- [attribute.class("flex gap-3 dark:text-pink-300 text-pink-600")],
- [
- html.a([attribute.href(conf.base_url_join("/"))], [
- element.text("Home"),
- ]),
- html.a([attribute.href(conf.base_url_join("/install"))], [
- element.text("Install"),
- ]),
- html.a([attribute.href(conf.base_url_join("/docs"))], [
- element.text("Docs"),
- ]),
- html.a([attribute.href(conf.base_url_join("/blog"))], [
- element.text("Blog"),
- ]),
- ],
- ),
+ html.div([attribute.class("flex gap-3")], [
+ util.link(conf.base_url_join("/install"), "Install", False),
+ util.link(conf.base_url_join("/docs"), "Docs", False),
+ util.link(conf.base_url_join("/blog"), "Blog", False),
+ ]),
],
)
}
@@ -184,7 +172,7 @@ fn footer() -> element.Element(a) {
]),
]),
html.div([attribute.class("flex flex-col")], [
- link("https://github.com/Rosettea/Hilbish", "GitHub"),
+ util.link("https://github.com/Rosettea/Hilbish", "GitHub", True),
]),
],
)
@@ -257,11 +245,3 @@ fn create_page(content: element.Element(a)) -> element.Element(a) {
],
)
}
-
-fn link(url: String, text: String) {
- html.a([attribute.href(url)], [
- html.span([attribute.class("text-pink-300 text-light")], [
- element.text(text),
- ]),
- ])
-}
diff --git a/website/themes/hsh/LICENSE b/website/themes/hsh/LICENSE
deleted file mode 100644
index da3c8c19..00000000
--- a/website/themes/hsh/LICENSE
+++ /dev/null
@@ -1,21 +0,0 @@
-MIT License
-
-Copyright (c) 2022 Rosettea
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.
diff --git a/website/themes/hsh/archetypes/default.md b/website/themes/hsh/archetypes/default.md
deleted file mode 100644
index ac36e062..00000000
--- a/website/themes/hsh/archetypes/default.md
+++ /dev/null
@@ -1,2 +0,0 @@
-+++
-+++
diff --git a/website/themes/hsh/assets/css/syntax.css b/website/themes/hsh/assets/css/syntax.css
deleted file mode 100644
index c4885c03..00000000
--- a/website/themes/hsh/assets/css/syntax.css
+++ /dev/null
@@ -1,89 +0,0 @@
-.chroma {
- display: inline-block;
- padding: 0.5em;
-}
-/* Background */ .bg { background-color: #F7F7F7; }
-/* PreWrapper */ .chroma { background-color: #F7F7F7; }
-/* Other */ .chroma .x { }
-/* Error */ .chroma .err { color: #a61717; background-color: #e3d2d2 }
-/* CodeLine */ .chroma .cl { }
-/* LineTableTD */ .chroma .lntd { vertical-align: top; padding: 0; margin: 0; border: 0; }
-/* LineTable */ .chroma .lntable { border-spacing: 0; padding: 0; margin: 0; border: 0; }
-/* LineHighlight */ .chroma .hl { background-color: #F7F7F7 }
-/* LineNumbersTable */ .chroma .lnt { white-space: pre; user-select: none; margin-right: 0.4em; padding: 0 0.4em 0 0.4em;color: #7f7f7f }
-/* LineNumbers */ .chroma .ln { white-space: pre; user-select: none; margin-right: 0.4em; padding: 0 0.4em 0 0.4em;color: #7f7f7f }
-/* Line */ .chroma .line { display: flex; }
-/* Keyword */ .chroma .k { color: #008800; font-weight: bold }
-/* KeywordConstant */ .chroma .kc { color: #008800; font-weight: bold }
-/* KeywordDeclaration */ .chroma .kd { color: #008800; font-weight: bold }
-/* KeywordNamespace */ .chroma .kn { color: #008800; font-weight: bold }
-/* KeywordPseudo */ .chroma .kp { color: #008800 }
-/* KeywordReserved */ .chroma .kr { color: #008800; font-weight: bold }
-/* KeywordType */ .chroma .kt { color: #888888; font-weight: bold }
-/* Name */ .chroma .n { }
-/* NameAttribute */ .chroma .na { color: #336699 }
-/* NameBuiltin */ .chroma .nb { color: #003388 }
-/* NameBuiltinPseudo */ .chroma .bp { }
-/* NameClass */ .chroma .nc { color: #bb0066; font-weight: bold }
-/* NameConstant */ .chroma .no { color: #003366; font-weight: bold }
-/* NameDecorator */ .chroma .nd { color: #555555 }
-/* NameEntity */ .chroma .ni { }
-/* NameException */ .chroma .ne { color: #bb0066; font-weight: bold }
-/* NameFunction */ .chroma .nf { color: #0066bb; font-weight: bold }
-/* NameFunctionMagic */ .chroma .fm { }
-/* NameLabel */ .chroma .nl { color: #336699; font-style: italic }
-/* NameNamespace */ .chroma .nn { color: #bb0066; font-weight: bold }
-/* NameOther */ .chroma .nx { }
-/* NameProperty */ .chroma .py { color: #336699; font-weight: bold }
-/* NameTag */ .chroma .nt { color: #bb0066; font-weight: bold }
-/* NameVariable */ .chroma .nv { color: #336699 }
-/* NameVariableClass */ .chroma .vc { color: #336699 }
-/* NameVariableGlobal */ .chroma .vg { color: #dd7700 }
-/* NameVariableInstance */ .chroma .vi { color: #3333bb }
-/* NameVariableMagic */ .chroma .vm { }
-/* Literal */ .chroma .l { }
-/* LiteralDate */ .chroma .ld { }
-/* LiteralString */ .chroma .s { color: #dd2200; background-color: #fff0f0 }
-/* LiteralStringAffix */ .chroma .sa { color: #dd2200; background-color: #fff0f0 }
-/* LiteralStringBacktick */ .chroma .sb { color: #dd2200; background-color: #fff0f0 }
-/* LiteralStringChar */ .chroma .sc { color: #dd2200; background-color: #fff0f0 }
-/* LiteralStringDelimiter */ .chroma .dl { color: #dd2200; background-color: #fff0f0 }
-/* LiteralStringDoc */ .chroma .sd { color: #dd2200; background-color: #fff0f0 }
-/* LiteralStringDouble */ .chroma .s2 { color: #dd2200; background-color: #fff0f0 }
-/* LiteralStringEscape */ .chroma .se { color: #0044dd; background-color: #fff0f0 }
-/* LiteralStringHeredoc */ .chroma .sh { color: #dd2200; background-color: #fff0f0 }
-/* LiteralStringInterpol */ .chroma .si { color: #3333bb; background-color: #fff0f0 }
-/* LiteralStringOther */ .chroma .sx { color: #22bb22; background-color: #f0fff0 }
-/* LiteralStringRegex */ .chroma .sr { color: #008800; background-color: #fff0ff }
-/* LiteralStringSingle */ .chroma .s1 { color: #dd2200; background-color: #fff0f0 }
-/* LiteralStringSymbol */ .chroma .ss { color: #aa6600; background-color: #fff0f0 }
-/* LiteralNumber */ .chroma .m { color: #0000dd; font-weight: bold }
-/* LiteralNumberBin */ .chroma .mb { color: #0000dd; font-weight: bold }
-/* LiteralNumberFloat */ .chroma .mf { color: #0000dd; font-weight: bold }
-/* LiteralNumberHex */ .chroma .mh { color: #0000dd; font-weight: bold }
-/* LiteralNumberInteger */ .chroma .mi { color: #0000dd; font-weight: bold }
-/* LiteralNumberIntegerLong */ .chroma .il { color: #0000dd; font-weight: bold }
-/* LiteralNumberOct */ .chroma .mo { color: #0000dd; font-weight: bold }
-/* Operator */ .chroma .o { }
-/* OperatorWord */ .chroma .ow { color: #008800 }
-/* Punctuation */ .chroma .p { }
-/* Comment */ .chroma .c { color: #888888 }
-/* CommentHashbang */ .chroma .ch { color: #888888 }
-/* CommentMultiline */ .chroma .cm { color: #888888 }
-/* CommentSingle */ .chroma .c1 { color: #888888 }
-/* CommentSpecial */ .chroma .cs { color: #cc0000; background-color: #fff0f0; font-weight: bold }
-/* CommentPreproc */ .chroma .cp { color: #cc0000; font-weight: bold }
-/* CommentPreprocFile */ .chroma .cpf { color: #cc0000; font-weight: bold }
-/* Generic */ .chroma .g { }
-/* GenericDeleted */ .chroma .gd { color: #000000; background-color: #ffdddd }
-/* GenericEmph */ .chroma .ge { font-style: italic }
-/* GenericError */ .chroma .gr { color: #aa0000 }
-/* GenericHeading */ .chroma .gh { color: #333333 }
-/* GenericInserted */ .chroma .gi { color: #000000; background-color: #ddffdd }
-/* GenericOutput */ .chroma .go { color: #888888 }
-/* GenericPrompt */ .chroma .gp { color: #555555 }
-/* GenericStrong */ .chroma .gs { font-weight: bold }
-/* GenericSubheading */ .chroma .gu { color: #666666 }
-/* GenericTraceback */ .chroma .gt { color: #aa0000 }
-/* GenericUnderline */ .chroma .gl { text-decoration: underline }
-/* TextWhitespace */ .chroma .w { color: #bbbbbb }
diff --git a/website/themes/hsh/layouts/404.html b/website/themes/hsh/layouts/404.html
deleted file mode 100644
index 06b35613..00000000
--- a/website/themes/hsh/layouts/404.html
+++ /dev/null
@@ -1,7 +0,0 @@
-{{ define "main"}}
- Go Home
-
- {{ $date := .Date.UTC.Format "Jan 2, 2006" }}
- {{ $lastmod := .Lastmod.UTC.Format "Jan 2, 2006" }}
- {{ if and (ne $lastmod $date) (gt .Lastmod .Date) }}
- Last updated {{ $lastmod }}
- {{ end }}
-
- {{ if .Description }}
- {{ .Description }}
- {{ end}}
-
{{if .Description}}{{ .Description }}{{ else }}{{ .Summary }}{{ end }}
-