diff --git a/breezewiki.rkt b/breezewiki.rkt index dfb405e..aeaaa89 100644 --- a/breezewiki.rkt +++ b/breezewiki.rkt @@ -10,7 +10,6 @@ (make-reloadable-entry-point (quote varname) filename)))) (require-reloadable "src/page-category.rkt" page-category) -(require-reloadable "src/page-global-search.rkt" page-global-search) (require-reloadable "src/page-home.rkt" page-home) (require-reloadable "src/page-not-found.rkt" page-not-found) (require-reloadable "src/page-proxy.rkt" page-proxy) @@ -32,7 +31,6 @@ (dispatcher-tree ; order of these does not matter page-category - page-global-search page-home page-not-found page-proxy diff --git a/dist.rkt b/dist.rkt index a626695..596a1b9 100644 --- a/dist.rkt +++ b/dist.rkt @@ -4,7 +4,6 @@ "src/dispatcher-tree.rkt") (require (only-in "src/page-category.rkt" page-category)) -(require (only-in "src/page-global-search.rkt" page-global-search)) (require (only-in "src/page-home.rkt" page-home)) (require (only-in "src/page-not-found.rkt" page-not-found)) (require (only-in "src/page-proxy.rkt" page-proxy)) @@ -21,7 +20,6 @@ (dispatcher-tree ; order of these does not matter page-category - page-global-search page-home page-not-found page-proxy diff --git a/src/dispatcher-tree.rkt b/src/dispatcher-tree.rkt index 16f6c71..5800876 100644 --- a/src/dispatcher-tree.rkt +++ b/src/dispatcher-tree.rkt @@ -42,7 +42,6 @@ (sequencer:make (pathprocedure:make "/" (hash-ref ds 'page-home)) (pathprocedure:make "/proxy" (hash-ref ds 'page-proxy)) - (pathprocedure:make "/search" (hash-ref ds 'page-global-search)) (filter:make #rx"^/[a-z-]+/wiki/Category:.+$" (lift:make (hash-ref ds 'page-category))) (filter:make #rx"^/[a-z-]+/wiki/.+$" (lift:make (hash-ref ds 'page-wiki))) (filter:make #rx"^/[a-z-]+/search$" (lift:make (hash-ref ds 'page-search))) diff --git a/src/page-global-search.rkt b/src/page-global-search.rkt deleted file mode 100644 index 4364dea..0000000 --- a/src/page-global-search.rkt +++ /dev/null @@ -1,25 +0,0 @@ -#lang racket/base -(require racket/dict - ; web server libs - net/url - web-server/http - "application-globals.rkt" - "url-utils.rkt" - "xexpr-utils.rkt") - -(provide - page-global-search) - -(define (page-global-search req) - (define wikiname (dict-ref (url-query (request-uri req)) 'wikiname #f)) - (define q (dict-ref (url-query (request-uri req)) 'q #f)) - (response-handler - (if (not (and wikiname q)) - (response/output - #:code 400 - #:mime-type "text/plain" - (λ (out) - (displayln "Requires wikiname and q parameters." out))) - (generate-redirect (format "/~a/search?~a" - wikiname - (params->query `(("q" . ,q)))))))) diff --git a/src/page-home.rkt b/src/page-home.rkt index 7c7aaa1..3c84511 100644 --- a/src/page-home.rkt +++ b/src/page-home.rkt @@ -27,20 +27,11 @@ (p "It removes ads, videos, and suggested content, leaving you with a clean page that doesn't slow down your device or use up your data.") (p "BreezeWiki can also be called an \"alternative frontend for Fandom\".") (p ,(format "To use BreezeWiki, just replace \"fandom.com\" with \"~a\", and you'll instantly be teleported to a better world." - (if (config-true? 'canonical_origin) - (url-host (string->url (config-get 'canonical_origin))) - "breezewiki.com"))) + (if (config-true? 'canonical_origin) + (url-host (string->url (config-get 'canonical_origin))) + "breezewiki.com"))) (p "If you'd like to be automatically sent to BreezeWiki every time in the future, " (a (@ (href "https://docs.breezewiki.com/Automatic_Redirection.html")) "check out the tutorial in the manual.")) - (h2 "Find a page") - (form (@ (action "/search")) - (label (@ (class "paired__label")) - "Wiki name" - (input (@ (name "wikiname") (class "paired__input") (type "text") (placeholder "pokemon") (required)))) - (label (@ (class "paired__label")) - "Search query" - (input (@ (name "q") (class "paired__input") (type "text") (placeholder "Eevee") (required)))) - (button "Search")) (h2 "Example pages") (ul ,@(map (λ (x) diff --git a/static/main.css b/static/main.css index ba0eaad..7ef51a1 100644 --- a/static/main.css +++ b/static/main.css @@ -26,9 +26,6 @@ sup { sub { vertical-align: sub; } -.page table { - color: var(--theme-page-text-color); /* no idea why this needs to be specified, it should inherit from .page */ -} /* general page appearance */ body.skin-fandomdesktop, button, input, textarea, .wikitable, .va-table { @@ -61,15 +58,6 @@ p { margin-top: 0; } -/* home page search form */ -.paired__label { - display: grid; -} -.paired__input { - width: auto; - max-width: 240px; -} - /* custom footer with source and license info */ .custom-footer { clear: both; @@ -144,6 +132,20 @@ img { overflow: auto; } +/* table overrides for dark theme pages */ +/* these colours look good in all wikis I tried. colours that don't look good: + --theme-page-background-color--secondary is bad for fallout + --theme-page-accent-mix-color is bad for minecraft */ +.wikitable > tr > th, .wikitable > * > tr > th, .va-table th { + background-color: var(--theme-page-dynamic-color-1--inverted); +} +.wikitable td, .va-table td { + background-color: var(--theme-page-text-mix-color-95); +} +.page table { + color: var(--theme-page-text-color); /* no idea why this needs to be specified, it should inherit from .page */ +} + /* float right. reorganised from their sheet */ .tright { clear: right;