From 4046c480f36a5c4814c130a35994c9ab00dc4181 Mon Sep 17 00:00:00 2001 From: topi314 Date: Tue, 28 Nov 2023 10:56:39 +0100 Subject: [PATCH] add gruvbox dark hard & windows 95 base16 theme --- gobin/routes.go | 3 ++- styles/gruvbox-dark-hard.yaml | 19 +++++++++++++++++++ styles/windows-95.yaml | 19 +++++++++++++++++++ 3 files changed, 40 insertions(+), 1 deletion(-) create mode 100644 styles/gruvbox-dark-hard.yaml create mode 100644 styles/windows-95.yaml diff --git a/gobin/routes.go b/gobin/routes.go index fc85dab..eaab83f 100644 --- a/gobin/routes.go +++ b/gobin/routes.go @@ -8,6 +8,7 @@ import ( "io" "log/slog" "net/http" + "net/url" "strconv" "strings" @@ -242,7 +243,7 @@ func (s *Server) styleCSS(style *chroma.Style) string { func getStyle(r *http.Request) *chroma.Style { var styleName string if styleCookie, err := r.Cookie("style"); err == nil { - styleName = styleCookie.Value + styleName, _ = url.QueryUnescape(styleCookie.Value) } queryStyle := r.URL.Query().Get("style") if queryStyle != "" { diff --git a/styles/gruvbox-dark-hard.yaml b/styles/gruvbox-dark-hard.yaml new file mode 100644 index 0000000..f79198b --- /dev/null +++ b/styles/gruvbox-dark-hard.yaml @@ -0,0 +1,19 @@ +scheme: "gruvbox-dark-hard" +author: "Dawid Kurek (dawikur@gmail.com), morhetz (https://github.com/morhetz/gruvbox)" +theme: "dark" +base00: "1d2021" # ---- +base01: "3c3836" # --- +base02: "504945" # -- +base03: "665c54" # - +base04: "bdae93" # + +base05: "d5c4a1" # ++ +base06: "ebdbb2" # +++ +base07: "fbf1c7" # ++++ +base08: "fb4934" # red +base09: "fe8019" # orange +base0A: "fabd2f" # yellow +base0B: "b8bb26" # green +base0C: "8ec07c" # aqua/cyan +base0D: "83a598" # blue +base0E: "d3869b" # purple +base0F: "d65d0e" # brown \ No newline at end of file diff --git a/styles/windows-95.yaml b/styles/windows-95.yaml new file mode 100644 index 0000000..e8909b7 --- /dev/null +++ b/styles/windows-95.yaml @@ -0,0 +1,19 @@ +scheme: "windows-95" +author: "Fergus Collins (https://github.com/C-Fergus)" +theme: "dark" +base00: "000000" # black +base01: "1C1C1C" # darkish black +base02: "383838" # brightish black +base03: "545454" # bright black +base04: "7e7e7e" # darker white +base05: "a8a8a8" # white +base06: "d2d2d2" # middle white +base07: "fcfcfc" # bright white +base08: "fc5454" # bright red +base09: "a85400" # yellow +base0A: "fcfc54" # bright yellow +base0B: "54fc54" # bright green +base0C: "54fcfc" # bright cyan +base0D: "5454fc" # bright blue +base0E: "fc54fc" # bright magenta +base0F: "00a800" # green \ No newline at end of file