mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-29 20:23:45 -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}"
|
||||
return ""
|
||||
next()
|
||||
|
||||
app.use (req, res, next)->
|
||||
res.locals.formatPrice = SubscriptionFormatters.formatPrice
|
||||
next()
|
||||
|
@ -121,5 +122,7 @@ module.exports = (app)->
|
|||
res.locals.scribtexPath = req.query.scribtex_path
|
||||
next()
|
||||
|
||||
|
||||
app.use (req, res, next) ->
|
||||
res.locals.nav = Settings.nav
|
||||
next()
|
||||
|
||||
|
|
|
@ -2,29 +2,30 @@ footer
|
|||
.container
|
||||
.row
|
||||
ul.col-md-6
|
||||
li © 2014 ShareLaTeX
|
||||
each item in nav.left_footer
|
||||
li
|
||||
a(href="/tos") Terms
|
||||
li
|
||||
a(href="/privacy_policy") Privacy
|
||||
li
|
||||
a(href="/security") Security
|
||||
li
|
||||
a.js-tender-widget(href='#') Contact
|
||||
li
|
||||
a(href="/about") About
|
||||
li
|
||||
a(href="/blog") Blog
|
||||
if item.url
|
||||
a(href=item.url) !{item.text}
|
||||
else
|
||||
| !{item.text}
|
||||
|
||||
ul.col-md-6
|
||||
each item in nav.right_footer
|
||||
li
|
||||
a(href="http://www.twitter.com/sharelatex")
|
||||
i.fa.fa-twitter-square
|
||||
li
|
||||
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
|
||||
if item.url
|
||||
a(href=item.url) !{item.text}
|
||||
else
|
||||
| !{item.text}
|
||||
|
||||
//- li
|
||||
//- a(href="http://www.twitter.com/sharelatex")
|
||||
//- i.fa.fa-twitter-square
|
||||
//- li
|
||||
//- 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
|
||||
ul.nav.navbar-nav.navbar-right
|
||||
-if(session && session.user)
|
||||
li
|
||||
a(href='/project') Projects
|
||||
|
||||
li.dropdown
|
||||
a.dropdown-toggle(href='#',data-toggle="dropdown")
|
||||
| Help
|
||||
each item in nav.header
|
||||
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))
|
||||
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
|
||||
a(href='/learn') Documentation
|
||||
-if(typeof(tenderUrl) != "undefined")
|
||||
li
|
||||
a.js-tender-widget(href='#') Contact
|
||||
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}
|
||||
|
||||
-if(session && session.user)
|
||||
li.dropdown
|
||||
a.dropdown-toggle(href="#",data-toggle="dropdown")
|
||||
| Account
|
||||
b.caret
|
||||
ul.dropdown-menu
|
||||
li
|
||||
a(href='/user/settings').userSettingsLink User Settings
|
||||
- if (settings.enableSubscriptions)
|
||||
li
|
||||
a(href='/user/subscription').subscriptionLink Subscription
|
||||
li
|
||||
a(href='/logout').logoutLink Logout
|
||||
-else
|
||||
li
|
||||
a(href='/register') Register
|
||||
li
|
||||
a#loginLink(href='/login'+getRedirAsQueryString()) Login
|
||||
//- li.dropdown
|
||||
//- a.dropdown-toggle(href='#',data-toggle="dropdown")
|
||||
//- | Help
|
||||
//- b.caret
|
||||
//- ul.dropdown-menu
|
||||
//- li
|
||||
//- a(href='/learn') Documentation
|
||||
//- -if(typeof(tenderUrl) != "undefined")
|
||||
//- li
|
||||
//- a.js-tender-widget(href='#') Contact Support
|
||||
|
||||
//- -if(session && session.user)
|
||||
//- li.dropdown
|
||||
//- a.dropdown-toggle(href="#",data-toggle="dropdown")
|
||||
//- | Account
|
||||
//- b.caret
|
||||
//- ul.dropdown-menu
|
||||
//- li
|
||||
//- a(href='/user/settings').userSettingsLink Account Settings
|
||||
//- - if (settings.enableSubscriptions)
|
||||
//- li
|
||||
//- a(href='/user/subscription').subscriptionLink Subscription
|
||||
//- li
|
||||
//- a(href='/logout').logoutLink Logout
|
||||
//- -else
|
||||
//- li
|
||||
//- a(href='/register') Register
|
||||
//- li
|
||||
//- 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
|
||||
.card
|
||||
.page-header
|
||||
h1 Login
|
||||
h1 Log In
|
||||
form(async-form="login", name="loginForm", action='/login', ng-cloak)
|
||||
input(name='_csrf', type='hidden', value=csrfToken)
|
||||
input(name='redir', type='hidden', value=redir)
|
||||
|
|
|
@ -219,3 +219,39 @@ module.exports =
|
|||
# user: ""
|
||||
# password: ""
|
||||
# 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) {
|
||||
> li > a {
|
||||
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) {
|
||||
// Dropdowns get custom display when collapsed
|
||||
.open .dropdown-menu {
|
||||
|
|
Loading…
Reference in a new issue