diff --git a/customize.dist/pages.js b/customize.dist/pages.js index e448a0739..7c1548119 100644 --- a/customize.dist/pages.js +++ b/customize.dist/pages.js @@ -94,7 +94,7 @@ define([ }; Pages['/about.html'] = function () { - return h('div#cp-main.cp-page-about', [ + return h('div#cp-main', [ infopageTopbar(), h('div.container.cp-container', [ h('center', [ @@ -143,7 +143,7 @@ define([ }; Pages['/privacy.html'] = function () { - return h('div#cp-main.cp-page-privacy', [ + return h('div#cp-main', [ infopageTopbar(), h('div.container.cp-container', [ h('center', h('h1', Msg.policy_title)), @@ -172,7 +172,7 @@ define([ }; Pages['/terms.html'] = function () { - return h('div#cp-main.cp-page-terms', [ + return h('div#cp-main', [ infopageTopbar(), h('div.container.cp-container', [ h('center', h('h1', Msg.tos_title)), @@ -187,7 +187,7 @@ define([ }; Pages['/contact.html'] = function () { - return h('div#cp-main.cp-page-contact', [ + return h('div#cp-main', [ infopageTopbar(), h('div.container.cp-container', [ h('center', h('h1', Msg.contact)), @@ -198,7 +198,7 @@ define([ }; Pages['/what-is-cryptpad.html'] = function () { - return h('div#cp-main.cp-page-what-is-cryptpad', [ + return h('div#cp-main', [ infopageTopbar(), h('div.container.cp-container', [ h('center', h('h1', Msg.whatis_title)), @@ -234,7 +234,7 @@ define([ Pages['/'] = Pages['/index.html'] = function () { var showingMore = false; return [ - h('div#cp-main.cp-page-index', [ + h('div#cp-main', [ infopageTopbar(), h('div.container.cp-container', [ h('div.row', [ @@ -274,11 +274,9 @@ define([ if (showingMore) { $('.cp-more, .cp-callout-more-lessmsg').addClass('cp-hidden'); $('.cp-callout-more-moremsg').removeClass('cp-hidden'); - if ( $( window ).width() >991 ) { $('.navbar').css('margin-top','-1em'); } } else { $('.cp-more, .cp-callout-more-lessmsg').removeClass('cp-hidden'); $('.cp-callout-more-moremsg').addClass('cp-hidden'); - $('.navbar').css('margin-top','0'); } showingMore = !showingMore; } @@ -310,7 +308,7 @@ define([ }; Pages['/register/'] = Pages['/register/index.html'] = function () { - return [h('div#cp-main.cp-page-register', [ + return [h('div#cp-main', [ infopageTopbar(), h('div.container.cp-container', [ h('div.row.align-items-center', [ @@ -362,7 +360,7 @@ define([ }; Pages['/login/'] = Pages['/login/index.html'] = function () { - return [h('div#cp-main.cp-page-login', [ + return [h('div#cp-main', [ infopageTopbar(), h('div.container.cp-container', [ h('div.row.align-items-center', [ diff --git a/customize.dist/src/less2/include/infopages.less b/customize.dist/src/less2/include/infopages.less index dfc4108ba..73b68b40a 100644 --- a/customize.dist/src/less2/include/infopages.less +++ b/customize.dist/src/less2/include/infopages.less @@ -21,12 +21,11 @@ padding: 0; margin: 0; - font-size: 14px; + font-size: 16pxt:; font-family: 'Open Sans', 'Helvetica Neue', sans-serif; .cp-container { font-size: 16px; - margin-top: @infopages_infobar-height; padding-top: @infopages_padding; padding-bottom: @infopages_padding; min-height: 75vh; diff --git a/customize.dist/src/less2/main.less b/customize.dist/src/less2/main.less index 068db5c7e..ecbe75cf2 100644 --- a/customize.dist/src/less2/main.less +++ b/customize.dist/src/less2/main.less @@ -2,11 +2,11 @@ font-family: Neuropolitical; src: url(./customize/fonts/neuropolitical.ttf) } -div#cp-main.cp-page-index { @import "./pages/page-index.less"; } -div#cp-main.cp-page-contact { @import "./pages/page-contact.less"; } -div#cp-main.cp-page-login { @import "./pages/page-login.less"; } -div#cp-main.cp-page-register { @import "./pages/page-register.less"; } -div#cp-main.cp-page-what-is-cryptpad { @import "./pages/page-what-is-cryptpad.less"; } -div#cp-main.cp-page-about { @import "./pages/page-about.less"; } -div#cp-main.cp-page-privacy { @import "./pages/page-privacy.less"; } -div#cp-main.cp-page-terms { @import "./pages/page-terms.less"; } +body.cp-page-index { @import "./pages/page-index.less"; } +body.cp-page-contact { @import "./pages/page-contact.less"; } +body.cp-page-login { @import "./pages/page-login.less"; } +body.cp-page-register { @import "./pages/page-register.less"; } +body.cp-page-what-is-cryptpad { @import "./pages/page-what-is-cryptpad.less"; } +body.cp-page-about { @import "./pages/page-about.less"; } +body.cp-page-privacy { @import "./pages/page-privacy.less"; } +body.cp-page-terms { @import "./pages/page-terms.less"; } diff --git a/customize.dist/src/less2/pages/page-index.less b/customize.dist/src/less2/pages/page-index.less index 1a62f0060..962a174f1 100644 --- a/customize.dist/src/less2/pages/page-index.less +++ b/customize.dist/src/less2/pages/page-index.less @@ -9,14 +9,14 @@ @background_lighter: rgba(0,0,0,0.1); @background_darker: rgba(0,0,0,0.4); -&#cp-main { +#cp-main { color: #FFF; background: linear-gradient( @background_darker, @background_lighter ), url('/customize/bg14.jpg'); background-size: cover; min-height: 100vh; display: flex; flex-direction: column; - justify-content: space-around; + justify-content: space-between; align-items: center; .container { @media only screen and (max-device-width : 576px) { @@ -64,7 +64,6 @@ } .navbar { width: 100%; - margin-top: -1em; @media only screen and (max-device-width: 991px) { margin-top: 0; } diff --git a/customize.dist/template.js b/customize.dist/template.js index e8d7db2fe..a9067f35f 100644 --- a/customize.dist/template.js +++ b/customize.dist/template.js @@ -78,6 +78,16 @@ $(function () { return; } + } else { + // add class on info-pages + var css = location.pathname.replace(/(index)?\.html$/gi, "") // .html + .replace(/[^a-zA-Z]+/gi, '-') // any non-alpha character + .replace(/^-|-$/g, ''); // starting/trailing dashes + if (css === '') + { + css = 'index'; + } + $('body').addClass('cp-page-' + css); } require([