mirror of https://github.com/supernets/LibreY.git
add theme to query parameter
This commit is contained in:
parent
1b898c6614
commit
14cdccb83f
|
@ -8,5 +8,6 @@
|
|||
<link rel="stylesheet" type="text/css" href="static/css/styles.css"/>
|
||||
<link title="LibreY search" type="application/opensearchdescription+xml" href="opensearch.xml?method=POST" rel="search"/>
|
||||
<link rel="stylesheet" type="text/css" href="<?php
|
||||
echo "static/css/" . htmlspecialchars($_COOKIE["theme"] ?? "dark") . ".css";
|
||||
$theme = $_REQUEST["theme"] ?? trim(htmlspecialchars($_COOKIE["theme"] ?? "dark"));
|
||||
echo "static/css/" . $theme . ".css";
|
||||
?>"/>
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
$opts->page = (int) ($_REQUEST["p"] ?? 0);
|
||||
$opts->do_fallback = (int) ($_REQUEST["nfb"] ?? 0) == 0;
|
||||
|
||||
$opts->theme = trim(htmlspecialchars($_COOKIE["theme"] ?? "dark"));
|
||||
$opts->theme = $_REQUEST["theme"] ?? trim(htmlspecialchars($_COOKIE["theme"] ?? "dark"));
|
||||
|
||||
$opts->safe_search = (int) ($_REQUEST["safe"] ?? 0) == 1 || isset($_COOKIE["safe_search"]);
|
||||
|
||||
|
|
Loading…
Reference in New Issue