Remove unnecessary template mixin vars

This commit is contained in:
Calvin Montgomery 2017-08-22 17:33:29 -07:00
parent 7e6312f9d1
commit 0810591fe3
16 changed files with 37 additions and 51 deletions

View file

@ -10,8 +10,8 @@ html(lang="en")
+navheader()
#nav-collapsible.collapse.navbar-collapse
ul.nav.navbar-nav
+navdefaultlinks("/account/channels")
+navloginlogout("/account/channels")
+navdefaultlinks()
+navloginlogout()
section#mainpage
.container
if !loggedIn

View file

@ -10,8 +10,8 @@ html(lang="en")
+navheader()
#nav-collapsible.collapse.navbar-collapse
ul.nav.navbar-nav
+navdefaultlinks("/account/edit")
+navloginlogout("/account/edit")
+navdefaultlinks()
+navloginlogout()
section#mainpage
.container
if !loggedIn

View file

@ -10,8 +10,8 @@ html(lang="en")
+navheader()
#nav-collapsible.collapse.navbar-collapse
ul.nav.navbar-nav
+navdefaultlinks("/account/passwordrecover/")
+navloginlogout("/account/passwordrecover/")
+navdefaultlinks()
+navloginlogout()
section#mainpage
.container
.col-lg-6.col-lg-offset-3.col-md-6.col-md-offset-3

View file

@ -10,8 +10,8 @@ html(lang="en")
+navheader()
#nav-collapsible.collapse.navbar-collapse
ul.nav.navbar-nav
+navdefaultlinks("/account/passwordreset")
+navloginlogout("/account/passwordreset")
+navdefaultlinks()
+navloginlogout()
section#mainpage
.container
.col-lg-6.col-lg-offset-3.col-md-6.col-md-offset-3

View file

@ -10,8 +10,8 @@ html(lang="en")
+navheader()
#nav-collapsible.collapse.navbar-collapse
ul.nav.navbar-nav
+navdefaultlinks("/account/profile")
+navloginlogout("/account/profile")
+navdefaultlinks()
+navloginlogout()
section#mainpage
.container
if !loggedIn

View file

@ -11,12 +11,12 @@ html(lang="en")
+navheader()
#nav-collapsible.collapse.navbar-collapse
ul.nav.navbar-nav
+navdefaultlinks("/acp")
+navdefaultlinks()
li#nav-acp-section.dropdown
a#nav-acp-dd-toggle.dropdown-toggle(data-toggle="dropdown", href="javascript:void(0)") Menu
span.caret
ul.dropdown-menu
+navloginlogout("/acp")
+navloginlogout()
section#mainpage
.container
.row

View file

@ -12,9 +12,8 @@ html(lang="en")
include nav
+navheader()
#nav-collapsible.collapse.navbar-collapse
- var cname = `/${channelPath}/${channelName}`
ul.nav.navbar-nav
+navdefaultlinks(cname)
+navdefaultlinks()
li: a(href="javascript:void(0)", onclick="javascript:showUserOptions()") Options
li: a#showchansettings(href="javascript:void(0)", onclick="javascript:showChannelSettings()") Channel Settings
li.dropdown
@ -24,7 +23,7 @@ html(lang="en")
li: a(href="#" onclick="javascript:chatOnly()") Chat Only
li: a(href="#" onclick="javascript:removeVideo(event)") Remove Video
+navsuperadmin(true)
+navloginlogout(cname)
+navloginlogout()
section#mainpage
.container
#motdrow.row

View file

@ -13,8 +13,8 @@ html(lang="en")
+navheader()
#nav-collapsible.collapse.navbar-collapse
ul.nav.navbar-nav
+navdefaultlinks("/contact")
+navloginlogout("/contact")
+navdefaultlinks()
+navloginlogout()
section#mainpage
.container
.col-md-8.col-md-offset-2

View file

@ -10,8 +10,8 @@ html(lang="en")
+navheader()
#nav-collapsible.collapse.navbar-collapse
ul.nav.navbar-nav
+navdefaultlinks(path)
+navloginlogout(path)
+navdefaultlinks()
+navloginlogout()
section#mainpage.container
.col-md-12

View file

@ -10,8 +10,8 @@ html(lang="en")
+navheader()
#nav-collapsible.collapse.navbar-collapse
ul.nav.navbar-nav
+navdefaultlinks("/google_drive_userscript")
+navloginlogout("/google_drive_userscript")
+navdefaultlinks()
+navloginlogout()
section#mainpage
.container
.col-md-8.col-md-offset-2

View file

@ -21,8 +21,8 @@ html(lang="en")
+navheader()
#nav-collapsible.collapse.navbar-collapse
ul.nav.navbar-nav
+navdefaultlinks(path)
+navloginlogout(path)
+navdefaultlinks()
+navloginlogout()
section#mainpage.container
.col-md-12

View file

@ -10,9 +10,9 @@ html(lang="en")
+navheader()
#nav-collapsible.collapse.navbar-collapse
ul.nav.navbar-nav
+navdefaultlinks("/")
+navdefaultlinks()
+navsuperadmin(false)
+navloginlogout("/")
+navloginlogout()
section#mainpage
.container
.col-lg-9.col-md-9

View file

@ -10,9 +10,9 @@ html(lang="en")
+navheader()
#nav-collapsible.collapse.navbar-collapse
ul.nav.navbar-nav
+navdefaultlinks("/login")
+navdefaultlinks()
if loggedIn
+navlogoutform("/")
+navlogoutform()
section#mainpage.container
if wasAlreadyLoggedIn
.col-lg-6.col-lg-offset-3.col-md-6.col-md-offset-3

View file

@ -10,7 +10,7 @@ html(lang="en")
+navheader()
#nav-collapsible.collapse.navbar-collapse
ul.nav.navbar-nav
+navdefaultlinks("/logout")
+navdefaultlinks()
+navloginform("/")
section#mainpage.container
.col-lg-6.col-lg-offset-3.col-md-6.col-md-offset-3

View file

@ -1,13 +1,3 @@
- var links = { "/": "Home" };
mixin navlink(page, title, active)
if active
li.active
a(href=page)= title
else
li
a(href=page)= title
mixin navheader()
.navbar-header
button.navbar-toggle(type="button", data-toggle="collapse", data-target="#nav-collapsible")
@ -16,12 +6,9 @@ mixin navheader()
span.icon-bar
a.navbar-brand(href="/")= siteTitle
mixin navdefaultlinks(page)
each t, p in links
if p == page
+navlink(p, t, true)
else
+navlink(p, t, false)
mixin navdefaultlinks()
li
a(href="/") Home
li.dropdown
a.dropdown-toggle(href="#", data-toggle="dropdown") Account
b.caret
@ -43,13 +30,13 @@ mixin navsuperadmin(newTab)
else
li: a(href="/acp") ACP
mixin navloginlogout(redirect)
mixin navloginlogout()
if loggedIn
+navlogoutform(redirect)
+navlogoutform()
else
+navloginform(redirect)
+navloginform()
mixin navloginform(redirect)
mixin navloginform()
if loginDomain == null
- loginDomain = ""
.visible-lg
@ -72,7 +59,7 @@ mixin navloginform(redirect)
a#register.navbar-link(href="/register") Register
mixin navlogoutform(redirect)
mixin navlogoutform()
form#logoutform.navbar-text.pull-right(action="/logout", method="post")
input(type="hidden", name="_csrf", value=csrfToken)
span#welcome Welcome, #{loginName}

View file

@ -10,9 +10,9 @@ html(lang="en")
+navheader()
#nav-collapsible.collapse.navbar-collapse
ul.nav.navbar-nav
+navdefaultlinks("/register")
+navdefaultlinks()
if loggedIn
+navlogoutform("/register")
+navlogoutform()
section#mainpage.container
if loggedIn
.col-lg-6.col-lg-offset-3.col-md-6.col-md-offset-3