Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 54 additions & 5 deletions _redirects
Original file line number Diff line number Diff line change
@@ -1,5 +1,54 @@
/devices /alpakka
/devices/* /:splat
/alpakka/manual /alpakka/manual/mouse
/contribute /contribute/open_source
/db /db/stats
/devices /alpakka 301
/devices/* /:splat 301
/alpakka/manual /alpakka/manual/mouse 301
/contribute /contribute/open_source 301

/db /mixed-input/db 301
/db/stats /mixed-input/db 301
/db/glossary /mixed-input/tiers 301

/db/apex_legends /mixed-input/db?game=apex-legends
/db/battlebit_remastered /mixed-input/db?game=battlebit-remastered
/db/battlefield_4 /mixed-input/db?game=battlefield-4
/db/borderlands_3 /mixed-input/db?game=borderlands-3
/db/bullets_per_minute /mixed-input/db?game=bullets-per-minute
/db/control /mixed-input/db?game=control
/db/counter_strike_2 /mixed-input/db?game=counter-strike-2
/db/days_gone /mixed-input/db?game=days-gone
/db/deep_rock_galactic /mixed-input/db?game=deep-rock-galactic
/db/dishonored_2 /mixed-input/db?game=dishonored-2
/db/doom_2016 /mixed-input/db?game=doom-2016
/db/elden_ring /mixed-input/db?game=elden-ring
/db/everspace_2 /mixed-input/db?game=everspace-2
/db/far_cry_5 /mixed-input/db?game=far-cry-5
/db/fortnite /mixed-input/db?game=fortnite
/db/ghostrunner /mixed-input/db?game=ghostrunner
/db/glossary /mixed-input/db?game=glossary
/db/gta_v /mixed-input/db?game=gta-v
/db/half_life_2 /mixed-input/db?game=half-life-2
/db/horizon_zero_dawn /mixed-input/db?game=horizon-zero-dawn
/db/hunt_showdown /mixed-input/db?game=hunt-showdown
/db/insurgency_sandstorm /mixed-input/db?game=insurgency-sandstorm
/db/ion_fury /mixed-input/db?game=ion-fury
/db/minecraft_bedrock /mixed-input/db?game=minecraft-bedrock
/db/mirrors_edge /mixed-input/db?game=mirrors-edge
/db/necromunda /mixed-input/db?game=necromunda
/db/neon_white /mixed-input/db?game=neon-white
/db/no_mans_sky /mixed-input/db?game=no-mans-sky
/db/noita /mixed-input/db?game=noita
/db/portal_2 /mixed-input/db?game=portal-2
/db/prodeus /mixed-input/db?game=prodeus
/db/pubg /mixed-input/db?game=pubg
/db/quake_2_2023 /mixed-input/db?game=quake-ii-2023
/db/rainbow_six_siege /mixed-input/db?game=rainbow-six-siege
/db/returnal /mixed-input/db?game=returnal
/db/risk_of_rain_2 /mixed-input/db?game=risk-of-rain-2
/db/skyrim /mixed-input/db?game=skyrim
/db/stats /mixed-input/db?game=stats
/db/superhot_mcd /mixed-input/db?game=superhot-mind-control-delete
/db/teardown /mixed-input/db?game=teardown
/db/the_witcher_3 /mixed-input/db?game=the-witcher-3
/db/titanfall_2 /mixed-input/db?game=titanfall-2
/db/warframe /mixed-input/db?game=warframe
/db/warzone_2 /mixed-input/db?game=warzone-2

6 changes: 4 additions & 2 deletions src/pug/_mixins.pug → src/pug/_common.pug
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
const SECTION_3 = PATH.split('/')[3]
const PAGE = Path.basename(PATH)

const db = YAML.parse(FS.readFileSync('src/pug/db/_data.yaml', 'utf8'))
const MIDB = YAML.parse(FS.readFileSync('src/pug/mixed-input/_midb.yaml', 'utf8'))

const org = {
repo: 'https://github.com/inputlabs/',
Expand All @@ -29,7 +29,7 @@
}

const redirect = {
db: '/db/stats',
db: '/mixed-input/db',
contribute: '/contribute/open_source',
devices: '/alpakka',
alpakkaManual: '/alpakka/manual/ctrl_app',
Expand All @@ -41,6 +41,8 @@
'placeholder'
].includes(PAGE)

const loadMIDB = SECTION == 'mixed-input'

mixin wikilink(href, external=false)
- const active = (href==PAGE)
- const cls = (active ? 'active' : '')
Expand Down
2 changes: 1 addition & 1 deletion src/pug/_header.pug
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ mixin nav
div.tab
div.title Community
div.link(class=active('open_source')): +a('/contribute/open_source') Open Source
div.link(class=active('db')): +a(redirect.db) Accessibility DB
div.link(class=active('mixed-input')): +a(redirect.db) Mixed Input DB
div.link(class=active('discord')): +ax(org.discord) Discord ↗
div.link(class=active('youtube')): +ax(org.youtube) Youtube ↗
div.tab
Expand Down
7 changes: 6 additions & 1 deletion src/pug/_template.pug
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
block variables

html
include _mixins.pug
include _common.pug

head
//- Search engines.
Expand Down Expand Up @@ -39,13 +39,18 @@ html
data-domain=(ENV=='prod' ? 'inputlabs.io' : 'dev.inputlabs.io')
src='https://plausible.io/js/plausible.outbound-links.file-downloads.js'
)
//- Math formulas visualizer.
if loadMathJax
script(
type='text/javascript'
id='MathJax-script'
async
src='/static/tex-svg.js' /* From: https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-svg.js */
)
//- Mixed input database.
if loadMIDB
link(rel='stylesheet' href='/static/midb.css?v=1')
script(type='text/javascript' src='/static/midb.js?v=1' defer)

body
//- div.banner
Expand Down
Loading
Loading