Refactor: move src to folder (#63)

* move all source code to src/

* replace express response patch with middleware

* fix readdir not looking in src

* fix stray redirect

* add base to manifest

* remove secret.txt from src/config/secret

* add src/config/secret/secret.txt to gitignore
This commit is contained in:
Wingy 2022-12-10 12:04:07 -05:00 committed by GitHub
parent 363146c331
commit 0d7d73744c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
1569 changed files with 25 additions and 1159 deletions

View file

@ -1,39 +0,0 @@
mixin navBarLink(href, title)
if href === req.path
a.is-active.navbar-item(href=href)= title
else
a.navbar-item(href=href)= title
nav.navbar.is-fixed-top(role='navigation', aria-label='main navigation',style='box-shadow: 0px 0px 7px rgb(14, 15, 17);')
.navbar-brand
if _CC.config.base === req.path
a.is-active.navbar-item(href=_CC.config.base)
img(src=`${_CC.config.base}img/logo.png`, alt='')
span #{config.siteTitle}
else
a.navbar-item(href=_CC.config.base)
img(src=`${_CC.config.base}img/logo.png`, alt='')
span #{config.siteTitle}
a.navbar-burger#navBarBurger(role='button', aria-label='menu', aria-expanded='false')
span(aria-hidden='true')
span(aria-hidden='true')
span(aria-hidden='true')
.navbar-menu#navBarMenu
.navbar-start
if req.isAuthenticated()
if req.user._id === '_CCUNKNOWN'
.navbar-item
a.button.is-primary(href='/login')= lang('NAVBAR_LOGIN')
else
.navbar-item.has-dropdown.is-hoverable
a.navbar-link= req.user._id
.navbar-dropdown
+navBarLink(`${_CC.config.base}wishlist/${req.user._id}`, lang('NAVBAR_WISHLIST'))
+navBarLink(`${_CC.config.base}profile`, lang('NAVBAR_PROFILE'))
if req.user.admin
+navBarLink(`${_CC.config.base}admin-settings`, lang('NAVBAR_ADMIN'))
hr.navbar-divider
.navbar-item
form#logoutForm(action=`${_CC.config.base}logout`, method='POST')
button.button.is-warning(type='submit')= lang('NAVBAR_LOGOUT')
script(src=`${_CC.config.base}js/nav.js`)