Fix jade mixin syntax

This commit is contained in:
calzoneman 2013-12-25 22:15:51 -05:00
parent bb531be7ca
commit b5812081b8
12 changed files with 94 additions and 94 deletions

View File

@ -2,16 +2,16 @@ doctype html
html(lang="en") html(lang="en")
head head
include head include head
+head() mixin head()
body body
#wrap #wrap
nav.navbar.navbar-inverse.navbar-fixed-top(role="navigation") nav.navbar.navbar-inverse.navbar-fixed-top(role="navigation")
include nav include nav
+navheader() mixin navheader()
#nav-collapsible.collapse.navbar-collapse #nav-collapsible.collapse.navbar-collapse
ul.nav.navbar-nav ul.nav.navbar-nav
+navdefaultlinks("/account/channels") mixin navdefaultlinks("/account/channels")
+navloginlogout("/account/channels") mixin navloginlogout("/account/channels")
section#mainpage section#mainpage
.container .container
if !loggedIn if !loggedIn
@ -57,4 +57,4 @@ html(lang="en")
button.btn.btn-primary.btn-block(type="submit") Register button.btn.btn-primary.btn-block(type="submit") Register
include footer include footer
+footer() mixin footer()

View File

@ -2,16 +2,16 @@ doctype html
html(lang="en") html(lang="en")
head head
include head include head
+head() mixin head()
body body
#wrap #wrap
nav.navbar.navbar-inverse.navbar-fixed-top(role="navigation") nav.navbar.navbar-inverse.navbar-fixed-top(role="navigation")
include nav include nav
+navheader() mixin navheader()
#nav-collapsible.collapse.navbar-collapse #nav-collapsible.collapse.navbar-collapse
ul.nav.navbar-nav ul.nav.navbar-nav
+navdefaultlinks("/account/edit") mixin navdefaultlinks("/account/edit")
+navloginlogout("/account/edit") mixin navloginlogout("/account/edit")
section#mainpage section#mainpage
.container .container
if !loggedIn if !loggedIn
@ -58,7 +58,7 @@ html(lang="en")
input#email.form-control(type="email", name="email") input#email.form-control(type="email", name="email")
button#changeemailbtn.btn.btn-danger.btn-block(type="submit") Change Email button#changeemailbtn.btn.btn-danger.btn-block(type="submit") Change Email
include footer include footer
+footer() mixin footer()
script(type="text/javascript"). script(type="text/javascript").
function validatePasswordChange() { function validatePasswordChange() {
var pw = $("#newpassword").val(); var pw = $("#newpassword").val();

View File

@ -2,18 +2,18 @@ doctype html
html(lang="en") html(lang="en")
head head
include head include head
+head() mixin head()
body body
#wrap #wrap
nav.navbar.navbar-inverse.navbar-fixed-top(role="navigation") nav.navbar.navbar-inverse.navbar-fixed-top(role="navigation")
include nav include nav
+navheader() mixin navheader()
#nav-collapsible.collapse.navbar-collapse #nav-collapsible.collapse.navbar-collapse
- var cname = "/r/" + channelName - var cname = "/r/" + channelName
ul.nav.navbar-nav ul.nav.navbar-nav
+navdefaultlinks(cname) mixin navdefaultlinks(cname)
li: a(href="javascript:showUserOptions()") Options li: a(href="javascript:showUserOptions()") Options
+navloginlogout(cname) mixin navloginlogout(cname)
section#mainpage section#mainpage
.container .container
#motdwrap.col-lg-12.col-md-12 #motdwrap.col-lg-12.col-md-12
@ -100,7 +100,7 @@ html(lang="en")
gfsnjgfjsnjkg gfsnjgfjsnjkg
input#chatline.form-control.input-block-level(type="text") input#chatline.form-control.input-block-level(type="text")
include footer include footer
+footer() mixin footer()
script(src="#{ioUrl}/socket.io/socket.io.js") script(src="#{ioUrl}/socket.io/socket.io.js")
script(type="text/javascript"). script(type="text/javascript").
var IOSERVER = "#{ioUrl}"; var IOSERVER = "#{ioUrl}";

View File

@ -2,20 +2,20 @@ doctype html
html(lang="en") html(lang="en")
head head
include head include head
+head() mixin head()
link(href="//code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css", rel="stylesheet") link(href="//code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css", rel="stylesheet")
body body
#wrap #wrap
nav.navbar.navbar-inverse.navbar-fixed-top(role="navigation") nav.navbar.navbar-inverse.navbar-fixed-top(role="navigation")
include nav include nav
+navheader() mixin navheader()
#nav-collapsible.collapse.navbar-collapse #nav-collapsible.collapse.navbar-collapse
- var cname = "/r/" + channelName - var cname = "/r/" + channelName
ul.nav.navbar-nav ul.nav.navbar-nav
+navdefaultlinks(cname) mixin navdefaultlinks(cname)
li: a(href="#", onclick="javascript:showUserOptions()") Options li: a(href="#", onclick="javascript:showUserOptions()") Options
li: a(href="#", onclick="javascript:$('#channeloptions').modal()") Channel Settings li: a(href="#", onclick="javascript:$('#channeloptions').modal()") Channel Settings
+navloginlogout(cname) mixin navloginlogout(cname)
section#mainpage section#mainpage
.container .container
#motdrow.row #motdrow.row
@ -56,12 +56,12 @@ html(lang="en")
li(role="presentation") li(role="presentation")
a(id="#{id}", role="menuitem", href="javascript:void(0)") #{text} a(id="#{id}", role="menuitem", href="javascript:void(0)") #{text}
ul.dropdown-menu(role="menu", aria-labelledby="qdrop") ul.dropdown-menu(role="menu", aria-labelledby="qdrop")
+quality_item("quality_auto", "Quality: Auto") mixin quality_item("quality_auto", "Quality: Auto")
+quality_item("quality_240p", "240p") mixin quality_item("quality_240p", "240p")
+quality_item("quality_360p", "360p") mixin quality_item("quality_360p", "360p")
+quality_item("quality_480p", "480p") mixin quality_item("quality_480p", "480p")
+quality_item("quality_720p", "720p") mixin quality_item("quality_720p", "720p")
+quality_item("quality_1080p", "1080p") mixin quality_item("quality_1080p", "1080p")
button#mediarefresh.btn.btn-sm.btn-default Refresh Media button#mediarefresh.btn.btn-sm.btn-default Refresh Media
#playlistrow.row #playlistrow.row
@ -144,10 +144,10 @@ html(lang="en")
.modal-body .modal-body
.tab-content .tab-content
include useroptions include useroptions
+us-general() mixin us-general()
+us-playback() mixin us-playback()
+us-chat() mixin us-chat()
+us-mod() mixin us-mod()
.modal-footer .modal-footer
button.btn.btn-primary(type="button", data-dismiss="modal", onclick="javascript:saveUserOptions()") Save button.btn.btn-primary(type="button", data-dismiss="modal", onclick="javascript:saveUserOptions()") Save
button.btn.btn-default(type="button", data-dismiss="modal") Close button.btn.btn-default(type="button", data-dismiss="modal") Close
@ -172,18 +172,18 @@ html(lang="en")
.modal-body .modal-body
.tab-content .tab-content
include channeloptions include channeloptions
+miscoptions() mixin miscoptions()
+adminoptions() mixin adminoptions()
+motdeditor() mixin motdeditor()
+csseditor() mixin csseditor()
+jseditor() mixin jseditor()
+banlist() mixin banlist()
+recentjoins() mixin recentjoins()
+chanranks() mixin chanranks()
.modal-footer .modal-footer
button.btn.btn-default(type="button", data-dismiss="modal") Close button.btn.btn-default(type="button", data-dismiss="modal") Close
include footer include footer
+footer() mixin footer()
script(src="//code.jquery.com/ui/1.10.3/jquery-ui.js") script(src="//code.jquery.com/ui/1.10.3/jquery-ui.js")
script(src="/assets/js/iourl.js") script(src="/assets/js/iourl.js")
//script(src="#{ioUrl}/socket.io/socket.io.js") //script(src="#{ioUrl}/socket.io/socket.io.js")

View File

@ -25,11 +25,11 @@ mixin miscoptions
#cs-miscoptions.tab-pane #cs-miscoptions.tab-pane
h4 General Settings h4 General Settings
form.form-horizontal(action="javascript:void(0)") form.form-horizontal(action="javascript:void(0)")
+rcheckbox("opt_enable_link_regex", "Convert URLs in chat to links") mixin rcheckbox("opt_enable_link_regex", "Convert URLs in chat to links")
+rcheckbox("opt_allow_voteskip", "Allow voteskip") mixin rcheckbox("opt_allow_voteskip", "Allow voteskip")
+textbox("opt_voteskip_ratio", "Voteskip ratio", "0.5") mixin textbox("opt_voteskip_ratio", "Voteskip ratio", "0.5")
+textbox("opt_maxlength", "Max video length", "HH:MM:SS") mixin textbox("opt_maxlength", "Max video length", "HH:MM:SS")
+textbox("opt_afktimeout", "Auto-AFK Delay", "0 (disabled)") mixin textbox("opt_afktimeout", "Auto-AFK Delay", "0 (disabled)")
.form-group .form-group
.col-sm-8.col-sm-offset-4 .col-sm-8.col-sm-offset-4
button.btn.btn-default#cs-miscoptionssubmit Save button.btn.btn-default#cs-miscoptionssubmit Save
@ -39,11 +39,11 @@ mixin adminoptions
h4 Admin-Only Settings h4 Admin-Only Settings
form.form-horizontal(action="javascript:void(0)") form.form-horizontal(action="javascript:void(0)")
- var defname = "CyTube - /r/" + channelName - var defname = "CyTube - /r/" + channelName
+textbox("opt_pagetitle", "Page title", defname) mixin textbox("opt_pagetitle", "Page title", defname)
+textbox("opt_password", "Password", "leave blank to disable") mixin textbox("opt_password", "Password", "leave blank to disable")
+textbox("opt_externalcss", "External CSS", "Stylesheet URL") mixin textbox("opt_externalcss", "External CSS", "Stylesheet URL")
+textbox("opt_externaljs", "External Javascript", "Script URL") mixin textbox("opt_externaljs", "External Javascript", "Script URL")
+rcheckbox("opt_show_public", "List channel publicly") mixin rcheckbox("opt_show_public", "List channel publicly")
.form-group .form-group
.col-sm-8.col-sm-offset-4 .col-sm-8.col-sm-offset-4
button.btn.btn-default#cs-adminoptionssubmit Save button.btn.btn-default#cs-adminoptionssubmit Save

View File

@ -2,15 +2,15 @@ doctype html
html(lang="en") html(lang="en")
head head
include head include head
+head() mixin head()
body body
#wrap #wrap
nav.navbar.navbar-inverse.navbar-fixed-top(role="navigation") nav.navbar.navbar-inverse.navbar-fixed-top(role="navigation")
include nav include nav
+navheader() mixin navheader()
#nav-collapsible.collapse.navbar-collapse #nav-collapsible.collapse.navbar-collapse
ul.nav.navbar-nav ul.nav.navbar-nav
+navdefaultlinks("/") mixin navdefaultlinks("/")
+navloginlogout("/") mixin navloginlogout("/")
include footer include footer
+footer() mixin footer()

View File

@ -2,17 +2,17 @@ doctype html
html(lang="en") html(lang="en")
head head
include head include head
+head() mixin head()
body body
#wrap #wrap
nav.navbar.navbar-inverse.navbar-fixed-top(role="navigation") nav.navbar.navbar-inverse.navbar-fixed-top(role="navigation")
include nav include nav
+navheader() mixin navheader()
#nav-collapsible.collapse.navbar-collapse #nav-collapsible.collapse.navbar-collapse
ul.nav.navbar-nav ul.nav.navbar-nav
+navdefaultlinks("/login") mixin navdefaultlinks("/login")
if loggedIn if loggedIn
+navlogoutform("/login") mixin navlogoutform("/login")
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
@ -43,4 +43,4 @@ html(lang="en")
br br
a(href=redirect) Return to previous page a(href=redirect) Return to previous page
include footer include footer
+footer() mixin footer()

View File

@ -2,16 +2,16 @@ doctype html
html(lang="en") html(lang="en")
head head
include head include head
+head() mixin head()
body body
#wrap #wrap
nav.navbar.navbar-inverse.navbar-fixed-top(role="navigation") nav.navbar.navbar-inverse.navbar-fixed-top(role="navigation")
include nav include nav
+navheader() mixin navheader()
#nav-collapsible.collapse.navbar-collapse #nav-collapsible.collapse.navbar-collapse
ul.nav.navbar-nav ul.nav.navbar-nav
+navdefaultlinks("/logout") mixin navdefaultlinks("/logout")
+navloginform() mixin 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
.alert.alert-info.center.messagebox .alert.alert-info.center.messagebox
@ -20,4 +20,4 @@ html(lang="en")
if redirect if redirect
a(href=redirect) Return to previous page a(href=redirect) Return to previous page
include footer include footer
+footer() mixin footer()

View File

@ -19,9 +19,9 @@ mixin navheader()
mixin navdefaultlinks(page) mixin navdefaultlinks(page)
each t, p in links each t, p in links
if p == page if p == page
+navlink(p, t, true) mixin navlink(p, t, true)
else else
+navlink(p, t, false) mixin 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
@ -39,9 +39,9 @@ mixin navdefaultlinks(page)
mixin navloginlogout(redirect) mixin navloginlogout(redirect)
if loggedIn if loggedIn
+navlogoutform(redirect) mixin navlogoutform(redirect)
else else
+navloginform(redirect) mixin navloginform(redirect)
mixin navloginform(redirect) mixin navloginform(redirect)
.visible-md.visible-lg .visible-md.visible-lg

View File

@ -2,17 +2,17 @@ doctype html
html(lang="en") html(lang="en")
head head
include head include head
+head() mixin head()
body body
#wrap #wrap
nav.navbar.navbar-inverse.navbar-fixed-top(role="navigation") nav.navbar.navbar-inverse.navbar-fixed-top(role="navigation")
include nav include nav
+navheader() mixin navheader()
#nav-collapsible.collapse.navbar-collapse #nav-collapsible.collapse.navbar-collapse
ul.nav.navbar-nav ul.nav.navbar-nav
+navdefaultlinks("/register") mixin navdefaultlinks("/register")
if loggedIn if loggedIn
+navlogoutform("/register") mixin navlogoutform("/register")
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
@ -49,7 +49,7 @@ html(lang="en")
strong Registration Successful strong Registration Successful
p Thanks for registering, #{registerName}! Now you can <a href="/login">Login</a> to use your account. p Thanks for registering, #{registerName}! Now you can <a href="/login">Login</a> to use your account.
include footer include footer
+footer() mixin footer()
script(src="/js/jquery.js") script(src="/js/jquery.js")
script(type="text/javascript"). script(type="text/javascript").
function verify() { function verify() {

View File

@ -2,16 +2,16 @@ doctype html
html(lang="en") html(lang="en")
head head
include head include head
+head() mixin head()
body body
#wrap #wrap
nav.navbar.navbar-inverse.navbar-fixed-top(role="navigation") nav.navbar.navbar-inverse.navbar-fixed-top(role="navigation")
include nav include nav
+navheader() mixin navheader()
#nav-collapsible.collapse.navbar-collapse #nav-collapsible.collapse.navbar-collapse
ul.nav.navbar-nav ul.nav.navbar-nav
+navdefaultlinks("/test") mixin navdefaultlinks("/test")
+navloginform("/test") mixin navloginform("/test")
include footer include footer
+footer() mixin footer()

View File

@ -42,41 +42,41 @@ mixin us-general
.col-sm-4 .col-sm-4
.col-sm-8 .col-sm-8
p.text-danger Changing layouts may require refreshing to take effect. p.text-danger Changing layouts may require refreshing to take effect.
+rcheckbox("us-no-channelcss", "Ignore Channel CSS") mixin rcheckbox("us-no-channelcss", "Ignore Channel CSS")
+rcheckbox("us-no-channeljs", "Ignore Channel Javascript") mixin rcheckbox("us-no-channeljs", "Ignore Channel Javascript")
+rcheckbox("us-ssl", "Encrypt connection with SSL") mixin rcheckbox("us-ssl", "Encrypt connection with SSL")
mixin us-playback mixin us-playback
#us-playback.tab-pane #us-playback.tab-pane
h4 Playback Preferences h4 Playback Preferences
form.form-horizontal(action="javascript:void(0)") form.form-horizontal(action="javascript:void(0)")
+rcheckbox("us-synch", "Synchronize video playback") mixin rcheckbox("us-synch", "Synchronize video playback")
+textbox("us-synch-accuracy", "Synch threshold (seconds)", "2") mixin textbox("us-synch-accuracy", "Synch threshold (seconds)", "2")
+rcheckbox("us-wmode-transparent", "Set wmode=transparent") mixin rcheckbox("us-wmode-transparent", "Set wmode=transparent")
.col-sm-4 .col-sm-4
.col-sm-8 .col-sm-8
p.text-info Setting <code>wmode=transparent</code> allows objects to be displayed above the video player, but may cause performance issues on some systems. p.text-info Setting <code>wmode=transparent</code> allows objects to be displayed above the video player, but may cause performance issues on some systems.
+rcheckbox("us-hidevideo", "Remove the video player") mixin rcheckbox("us-hidevideo", "Remove the video player")
+rcheckbox("us-playlistbuttons", "Hide playlist buttons by default") mixin rcheckbox("us-playlistbuttons", "Hide playlist buttons by default")
+rcheckbox("us-oldbtns", "Old style playlist buttons") mixin rcheckbox("us-oldbtns", "Old style playlist buttons")
mixin us-chat mixin us-chat
#us-chat.tab-pane #us-chat.tab-pane
h4 Chat Preferences h4 Chat Preferences
form.form-horizontal(action="javascript:void(0)") form.form-horizontal(action="javascript:void(0)")
+rcheckbox("us-chat-timestamp", "Show timestamps in chat") mixin rcheckbox("us-chat-timestamp", "Show timestamps in chat")
+rcheckbox("us-sort-rank", "Sort userlist by rank") mixin rcheckbox("us-sort-rank", "Sort userlist by rank")
+rcheckbox("us-sort-afk", "Sort AFKers to bottom") mixin rcheckbox("us-sort-afk", "Sort AFKers to bottom")
+rcheckbox("us-chat-notice", "Ping on all new messages") mixin rcheckbox("us-chat-notice", "Ping on all new messages")
.col-sm-4 .col-sm-4
.col-sm-8 .col-sm-8
p.text-info When unchecked, you will only be pinged if your name is mentioned p.text-info When unchecked, you will only be pinged if your name is mentioned
+rcheckbox("us-boop", "Play a sound when pinged") mixin rcheckbox("us-boop", "Play a sound when pinged")
+rcheckbox("us-sendbtn", "Add a send button to chat") mixin rcheckbox("us-sendbtn", "Add a send button to chat")
mixin us-mod mixin us-mod
#us-mod.tab-pane #us-mod.tab-pane
h4 Moderator Preferences h4 Moderator Preferences
form.form-horizontal(action="javascript:void(0)") form.form-horizontal(action="javascript:void(0)")
+rcheckbox("us-modflair", "Show name color") mixin rcheckbox("us-modflair", "Show name color")
+rcheckbox("us-joinmessage", "Show join messages") mixin rcheckbox("us-joinmessage", "Show join messages")