mirror of
https://codeberg.org/ashley/poke.git
synced 2024-11-28 01:18:51 +01:00
use discover.ejs :3
This commit is contained in:
parent
d618ca057e
commit
7799ef903b
1 changed files with 2 additions and 3 deletions
|
@ -56,7 +56,7 @@ module.exports = function (app, config, renderTemplate) {
|
||||||
j = getJson(modules.toJson(text));
|
j = getJson(modules.toJson(text));
|
||||||
}
|
}
|
||||||
|
|
||||||
renderTemplate(res, req, "main.ejs", {
|
renderTemplate(res, req, "discover.ejs", {
|
||||||
tab: req.query.tab,
|
tab: req.query.tab,
|
||||||
isMobile: req.useragent.isMobile,
|
isMobile: req.useragent.isMobile,
|
||||||
mobilesearch: req.query.mobilesearch,
|
mobilesearch: req.query.mobilesearch,
|
||||||
|
@ -70,8 +70,7 @@ module.exports = function (app, config, renderTemplate) {
|
||||||
app.get("/:v*?", async function (req, res) {
|
app.get("/:v*?", async function (req, res) {
|
||||||
const uaos = req.useragent.os;
|
const uaos = req.useragent.os;
|
||||||
const browser = req.useragent.browser;
|
const browser = req.useragent.browser;
|
||||||
const isOldWindows =
|
const isOldWindows = (uaos === "Windows 7" || uaos === "Windows 8") && browser === "Firefox";
|
||||||
(uaos === "Windows 7" || uaos === "Windows 8") && browser === "Firefox";
|
|
||||||
|
|
||||||
const rendermainpage = () => {
|
const rendermainpage = () => {
|
||||||
if (req.useragent.isMobile) {
|
if (req.useragent.isMobile) {
|
||||||
|
|
Loading…
Reference in a new issue