Compare commits

..

No commits in common. "711a8225fb04415f925805e5395c0c34c4307e15" and "a9acfc34a255226c745d106cf028ac651ad6f1f6" have entirely different histories.

6 changed files with 17 additions and 54 deletions

View file

@ -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

View file

@ -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

View file

@ -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)))

View file

@ -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))))))))

View file

@ -32,15 +32,6 @@
"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)

View file

@ -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;