mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
Add in configurable headings/footers
This commit is contained in:
parent
3a15d1c573
commit
e5ca033538
6 changed files with 138 additions and 58 deletions
|
@ -95,6 +95,7 @@ module.exports = (app)->
|
||||||
logger.err "No fingerprint for file: #{path}"
|
logger.err "No fingerprint for file: #{path}"
|
||||||
return ""
|
return ""
|
||||||
next()
|
next()
|
||||||
|
|
||||||
app.use (req, res, next)->
|
app.use (req, res, next)->
|
||||||
res.locals.formatPrice = SubscriptionFormatters.formatPrice
|
res.locals.formatPrice = SubscriptionFormatters.formatPrice
|
||||||
next()
|
next()
|
||||||
|
@ -121,5 +122,7 @@ module.exports = (app)->
|
||||||
res.locals.scribtexPath = req.query.scribtex_path
|
res.locals.scribtexPath = req.query.scribtex_path
|
||||||
next()
|
next()
|
||||||
|
|
||||||
|
app.use (req, res, next) ->
|
||||||
|
res.locals.nav = Settings.nav
|
||||||
|
next()
|
||||||
|
|
||||||
|
|
|
@ -2,29 +2,30 @@ footer
|
||||||
.container
|
.container
|
||||||
.row
|
.row
|
||||||
ul.col-md-6
|
ul.col-md-6
|
||||||
li © 2014 ShareLaTeX
|
each item in nav.left_footer
|
||||||
li
|
li
|
||||||
a(href="/tos") Terms
|
if item.url
|
||||||
li
|
a(href=item.url) !{item.text}
|
||||||
a(href="/privacy_policy") Privacy
|
else
|
||||||
li
|
| !{item.text}
|
||||||
a(href="/security") Security
|
|
||||||
li
|
|
||||||
a.js-tender-widget(href='#') Contact
|
|
||||||
li
|
|
||||||
a(href="/about") About
|
|
||||||
li
|
|
||||||
a(href="/blog") Blog
|
|
||||||
ul.col-md-6
|
ul.col-md-6
|
||||||
li
|
each item in nav.right_footer
|
||||||
a(href="http://www.twitter.com/sharelatex")
|
li
|
||||||
i.fa.fa-twitter-square
|
if item.url
|
||||||
li
|
a(href=item.url) !{item.text}
|
||||||
a(href="http://www.facebook.com/pages/ShareLaTeX/301671376556660")
|
else
|
||||||
i.fa.fa-facebook-square
|
| !{item.text}
|
||||||
li
|
|
||||||
a(href="https://plus.google.com/115074691861228882827", rel="publisher")
|
//- li
|
||||||
i.fa.fa-google-plus-square
|
//- a(href="http://www.twitter.com/sharelatex")
|
||||||
li
|
//- i.fa.fa-twitter-square
|
||||||
a(href="https://github.com/sharelatex/sharelatex")
|
//- li
|
||||||
i.fa.fa-github-square
|
//- a(href="http://www.facebook.com/pages/ShareLaTeX/301671376556660")
|
||||||
|
//- i.fa.fa-facebook-square
|
||||||
|
//- li
|
||||||
|
//- a(href="https://plus.google.com/115074691861228882827", rel="publisher")
|
||||||
|
//- i.fa.fa-google-plus-square
|
||||||
|
//- li
|
||||||
|
//- a(href="https://github.com/sharelatex/sharelatex")
|
||||||
|
//- i.fa.fa-github-square
|
||||||
|
|
|
@ -7,37 +7,57 @@ nav.navbar.navbar-default
|
||||||
|
|
||||||
.navbar-collapse.collapse#navbar-collapse
|
.navbar-collapse.collapse#navbar-collapse
|
||||||
ul.nav.navbar-nav.navbar-right
|
ul.nav.navbar-nav.navbar-right
|
||||||
-if(session && session.user)
|
each item in nav.header
|
||||||
li
|
if ((item.only_when_logged_in && session && session.user) || (item.only_when_logged_out && (!session || !session.user)) || (!item.only_when_logged_out && !item.only_when_logged_in))
|
||||||
a(href='/project') Projects
|
if item.dropdown
|
||||||
|
li.dropdown(class=item.class)
|
||||||
|
a.dropdown-toggle(href)
|
||||||
|
| !{item.text}
|
||||||
|
b.caret
|
||||||
|
ul.dropdown-menu
|
||||||
|
each child in item.dropdown
|
||||||
|
if child.divider
|
||||||
|
li.divider
|
||||||
|
else
|
||||||
|
li
|
||||||
|
if child.url
|
||||||
|
a(href=child.url) !{child.text}
|
||||||
|
else
|
||||||
|
| !{child.text}
|
||||||
|
else
|
||||||
|
li(class=item.class)
|
||||||
|
if item.url
|
||||||
|
a(href=item.url) !{item.text}
|
||||||
|
else
|
||||||
|
| !{item.text}
|
||||||
|
|
||||||
li.dropdown
|
//- li.dropdown
|
||||||
a.dropdown-toggle(href='#',data-toggle="dropdown")
|
//- a.dropdown-toggle(href='#',data-toggle="dropdown")
|
||||||
| Help
|
//- | Help
|
||||||
b.caret
|
//- b.caret
|
||||||
ul.dropdown-menu
|
//- ul.dropdown-menu
|
||||||
li
|
//- li
|
||||||
a(href='/learn') Documentation
|
//- a(href='/learn') Documentation
|
||||||
-if(typeof(tenderUrl) != "undefined")
|
//- -if(typeof(tenderUrl) != "undefined")
|
||||||
li
|
//- li
|
||||||
a.js-tender-widget(href='#') Contact
|
//- a.js-tender-widget(href='#') Contact Support
|
||||||
|
|
||||||
-if(session && session.user)
|
//- -if(session && session.user)
|
||||||
li.dropdown
|
//- li.dropdown
|
||||||
a.dropdown-toggle(href="#",data-toggle="dropdown")
|
//- a.dropdown-toggle(href="#",data-toggle="dropdown")
|
||||||
| Account
|
//- | Account
|
||||||
b.caret
|
//- b.caret
|
||||||
ul.dropdown-menu
|
//- ul.dropdown-menu
|
||||||
li
|
//- li
|
||||||
a(href='/user/settings').userSettingsLink User Settings
|
//- a(href='/user/settings').userSettingsLink Account Settings
|
||||||
- if (settings.enableSubscriptions)
|
//- - if (settings.enableSubscriptions)
|
||||||
li
|
//- li
|
||||||
a(href='/user/subscription').subscriptionLink Subscription
|
//- a(href='/user/subscription').subscriptionLink Subscription
|
||||||
li
|
//- li
|
||||||
a(href='/logout').logoutLink Logout
|
//- a(href='/logout').logoutLink Logout
|
||||||
-else
|
//- -else
|
||||||
li
|
//- li
|
||||||
a(href='/register') Register
|
//- a(href='/register') Register
|
||||||
li
|
//- li
|
||||||
a#loginLink(href='/login'+getRedirAsQueryString()) Login
|
//- a#loginLink(href='/login'+getRedirAsQueryString()) Login
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,7 @@ block content
|
||||||
.col-md-6.col-md-offset-3.col-lg-4.col-lg-offset-4
|
.col-md-6.col-md-offset-3.col-lg-4.col-lg-offset-4
|
||||||
.card
|
.card
|
||||||
.page-header
|
.page-header
|
||||||
h1 Login
|
h1 Log In
|
||||||
form(async-form="login", name="loginForm", action='/login', ng-cloak)
|
form(async-form="login", name="loginForm", action='/login', ng-cloak)
|
||||||
input(name='_csrf', type='hidden', value=csrfToken)
|
input(name='_csrf', type='hidden', value=csrfToken)
|
||||||
input(name='redir', type='hidden', value=redir)
|
input(name='redir', type='hidden', value=redir)
|
||||||
|
|
|
@ -219,3 +219,39 @@ module.exports =
|
||||||
# user: ""
|
# user: ""
|
||||||
# password: ""
|
# password: ""
|
||||||
# projectId: ""
|
# projectId: ""
|
||||||
|
|
||||||
|
nav:
|
||||||
|
left_footer: [{
|
||||||
|
text: "Powered by <a href='https://www.sharelatex.com'>ShareLaTeX</a> © 2014"
|
||||||
|
}]
|
||||||
|
|
||||||
|
right_footer: [{
|
||||||
|
text: "<i class='fa fa-github-square'></i> Contribute on Github"
|
||||||
|
url: "https://github.com/sharelatex/sharelatex"
|
||||||
|
}]
|
||||||
|
|
||||||
|
header: [{
|
||||||
|
text: "Register"
|
||||||
|
url: "/register"
|
||||||
|
only_when_logged_out: true
|
||||||
|
}, {
|
||||||
|
text: "Log In"
|
||||||
|
url: "/login"
|
||||||
|
only_when_logged_out: true
|
||||||
|
}, {
|
||||||
|
text: "Projects"
|
||||||
|
url: "/project"
|
||||||
|
only_when_logged_in: true
|
||||||
|
}, {
|
||||||
|
text: "Account"
|
||||||
|
only_when_logged_in: true
|
||||||
|
dropdown: [{
|
||||||
|
text: "Account Settings"
|
||||||
|
url: "/user/settings"
|
||||||
|
}, {
|
||||||
|
divider: true
|
||||||
|
}, {
|
||||||
|
text: "Log out"
|
||||||
|
url: "/logout"
|
||||||
|
}]
|
||||||
|
}]
|
||||||
|
|
|
@ -416,6 +416,17 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
> li.subdued > a {
|
||||||
|
border: 0;
|
||||||
|
color: @gray;
|
||||||
|
padding: 12px 12px 13px;
|
||||||
|
&:hover,
|
||||||
|
&:focus {
|
||||||
|
color: @gray-dark;
|
||||||
|
background-color: @gray-lightest;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@media (min-width: @grid-float-breakpoint) {
|
@media (min-width: @grid-float-breakpoint) {
|
||||||
> li > a {
|
> li > a {
|
||||||
border-color: @navbar-default-link-color;
|
border-color: @navbar-default-link-color;
|
||||||
|
@ -452,6 +463,15 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
> .open.subdued > a {
|
||||||
|
&,
|
||||||
|
&:hover,
|
||||||
|
&:focus {
|
||||||
|
color: @gray-dark;
|
||||||
|
background-color: @gray-lightest;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@media (max-width: @grid-float-breakpoint-max) {
|
@media (max-width: @grid-float-breakpoint-max) {
|
||||||
// Dropdowns get custom display when collapsed
|
// Dropdowns get custom display when collapsed
|
||||||
.open .dropdown-menu {
|
.open .dropdown-menu {
|
||||||
|
|
Loading…
Reference in a new issue