File tree Expand file tree Collapse file tree 3 files changed +30
-5
lines changed
Expand file tree Collapse file tree 3 files changed +30
-5
lines changed Original file line number Diff line number Diff line change @@ -168,6 +168,16 @@ const conf = convict({
168168 default : 'https://send.firefox.com' ,
169169 env : 'BASE_URL'
170170 } ,
171+ custom_title : {
172+ format : String ,
173+ default : 'Send' ,
174+ env : 'CUSTOM_TITLE'
175+ } ,
176+ custom_description : {
177+ format : String ,
178+ default : 'Encrypt and send files with a link that automatically expires to ensure your important documents don’t stay online forever.' ,
179+ env : 'CUSTOM_DESCRIPTION'
180+ } ,
171181 detect_base_url : {
172182 format : Boolean ,
173183 default : false ,
@@ -303,7 +313,12 @@ const conf = convict({
303313 format : String ,
304314 default : '' ,
305315 env : 'UI_CUSTOM_ASSETS_WORDMARK'
306- }
316+ } ,
317+ custom_css : {
318+ format : String ,
319+ default : '' ,
320+ env : 'UI_CUSTOM_CSS'
321+ }
307322 }
308323} ) ;
309324
Original file line number Diff line number Diff line change @@ -40,6 +40,16 @@ module.exports = function(state, body = '') {
4040 type ="text/css "
4141 href ="${ assets . get ( 'app.css' ) } "
4242 />
43+ < script >
44+ var custom_css_file = '${ state . ui . assets . custom_css } ' ;
45+ if ( custom_css_file != "undefined" ) {
46+ var custom_css_enabled = document . createElement ( 'link' ) ;
47+ custom_css_enabled . rel = 'stylesheet' ;
48+ custom_css_enabled . type = 'text/css' ;
49+ custom_css_enabled . href = '${ state . ui . assets . custom_css } ' ;
50+ document . head . appendChild ( custom_css_enabled ) ;
51+ }
52+ </ script >
4353 < link
4454 rel ="apple-touch-icon "
4555 sizes ="180x180 "
Original file line number Diff line number Diff line change @@ -34,7 +34,8 @@ module.exports = async function(req) {
3434 safari_pinned_tab : assets . get ( 'safari-pinned-tab.svg' ) ,
3535 facebook : baseUrl + '/' + assets . get ( 'send-fb.jpg' ) ,
3636 twitter : baseUrl + '/' + assets . get ( 'send-twitter.jpg' ) ,
37- wordmark : assets . get ( 'wordmark.svg' ) + '#logo'
37+ wordmark : assets . get ( 'wordmark.svg' ) + '#logo' ,
38+ custom_css : assets . get ( 'undefined' )
3839 } ;
3940 Object . keys ( uiAssets ) . forEach ( index => {
4041 if ( config . ui_custom_assets [ index ] !== '' )
@@ -47,9 +48,8 @@ module.exports = async function(req) {
4748 locale,
4849 capabilities : { account : false } ,
4950 translate : getTranslator ( locale ) ,
50- title : 'Send' ,
51- description :
52- 'Encrypt and send files with a link that automatically expires to ensure your important documents don’t stay online forever.' ,
51+ title : config . custom_title ,
52+ description : config . custom_description ,
5353 baseUrl,
5454 ui : {
5555 colors : {
You can’t perform that action at this time.
0 commit comments