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() +navheader()
#nav-collapsible.collapse.navbar-collapse #nav-collapsible.collapse.navbar-collapse
ul.nav.navbar-nav ul.nav.navbar-nav
+navdefaultlinks("/account/channels") +navdefaultlinks()
+navloginlogout("/account/channels") +navloginlogout()
section#mainpage section#mainpage
.container .container
if !loggedIn if !loggedIn

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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