Added switcher for main content
This commit is contained in:
parent
18672fcd55
commit
5ad1389583
3 changed files with 14 additions and 2 deletions
|
@ -10,6 +10,10 @@ const app = express()
|
||||||
const port = process.env.PORT || 3000
|
const port = process.env.PORT || 3000
|
||||||
const engine = 'ejs'
|
const engine = 'ejs'
|
||||||
|
|
||||||
|
const customMainTagThemes = [
|
||||||
|
'89'
|
||||||
|
]
|
||||||
|
|
||||||
app.set('view engine', engine)
|
app.set('view engine', engine)
|
||||||
app.set('views', './src/views')
|
app.set('views', './src/views')
|
||||||
app.use(express.static('src/dist'))
|
app.use(express.static('src/dist'))
|
||||||
|
@ -24,7 +28,8 @@ app.get('/', (req, res) => {
|
||||||
links: config.links,
|
links: config.links,
|
||||||
smallLinks: config.smallLinks,
|
smallLinks: config.smallLinks,
|
||||||
theme: config.theme,
|
theme: config.theme,
|
||||||
roundPB: config.roundPB
|
roundPB: config.roundPB,
|
||||||
|
customMainTagThemes
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,8 @@
|
||||||
<%- include('partials/head') %>
|
<%- include('partials/head') %>
|
||||||
<%- include('partials/header') %>
|
<%- include('partials/header') %>
|
||||||
<%- include('partials/defaultMain') %>
|
<% if(customMainTagThemes.includes(theme)) { %>
|
||||||
|
<%- include(`partials/${theme}_main`) %>
|
||||||
|
<% } else { %>
|
||||||
|
<%- include('partials/defaultMain') %>
|
||||||
|
<% } %>
|
||||||
<%- include('partials/footer') %>
|
<%- include('partials/footer') %>
|
||||||
|
|
|
@ -4,6 +4,9 @@
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/fork-awesome@1.2.0/css/fork-awesome.min.css" integrity="sha256-XoaMnoYC5TH6/+ihMEnospgm0J1PM/nioxbOUdnM8HY=" crossorigin="anonymous">
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/fork-awesome@1.2.0/css/fork-awesome.min.css" integrity="sha256-XoaMnoYC5TH6/+ihMEnospgm0J1PM/nioxbOUdnM8HY=" crossorigin="anonymous">
|
||||||
<link rel="stylesheet" href="style/<%= theme %>.css">
|
<link rel="stylesheet" href="style/<%= theme %>.css">
|
||||||
|
<% if(theme === '98') { %>
|
||||||
|
<link rel="stylesheet" href="https://unpkg.com/98.css">
|
||||||
|
<% } %>
|
||||||
<% if(roundPB) { %>
|
<% if(roundPB) { %>
|
||||||
<link rel="stylesheet" href="style/round-pb.css">
|
<link rel="stylesheet" href="style/round-pb.css">
|
||||||
<% } %>
|
<% } %>
|
||||||
|
|
Loading…
Reference in a new issue