File tree Expand file tree Collapse file tree 5 files changed +13
-5
lines changed Expand file tree Collapse file tree 5 files changed +13
-5
lines changed Original file line number Diff line number Diff line change @@ -136,7 +136,11 @@ export const SITE_CONFIG: NoteHostSiteConfig = {
136136 // Google Font name, you can choose from https://fonts.google.com
137137 googleFont: ' Roboto' ,
138138
139- // Custom JS for head and body of a Notion page
139+ // Custom CSS/JS for head and body of a Notion page
140+ customHeadCSS: `
141+ .notion-topbar {
142+ background: lightblue
143+ } ` ,
140144 customHeadJS: googleTag (GOOGLE_TAG_ID ),
141145 customBodyJS: PAGE_SCRIPT_JS_STRING ,
142146}
Original file line number Diff line number Diff line change 11{
22 "name" : " notehost" ,
3- "version" : " 1.0.29 " ,
3+ "version" : " 1.0.30 " ,
44 "description" : " NoteHost is a free and powerful Notion hosting service." ,
55 "repository" : " https://github.com/velsa/notehost" ,
66 "homepage" : " https://github.com/velsa/notehost" ,
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ export class HeadRewriter {
99 }
1010
1111 element ( element : Element ) {
12- const { googleFont, customHeadJS } = this . siteConfig
12+ const { googleFont, customHeadJS, customHeadCSS } = this . siteConfig
1313
1414 if ( googleFont ) {
1515 element . append (
@@ -37,7 +37,9 @@ export class HeadRewriter {
3737 div.notion-topbar-mobile > div:nth-child(4) { display: none !important; }
3838 div.notion-topbar-mobile > div:nth-child(7) { display: none !important; }
3939 div.notion-topbar-mobile > div:nth-child(1n).toggle-mode { display: block !important; }
40- </style>${ customHeadJS ?? '' } ` ,
40+ ${ customHeadCSS ?? '' }
41+ </style>
42+ ${ customHeadJS ?? '' } ` ,
4143 {
4244 html : true ,
4345 } ,
Original file line number Diff line number Diff line change @@ -38,7 +38,8 @@ export interface NoteHostSiteConfigFull {
3838 // Google Font name, you can choose from https://fonts.google.com
3939 googleFont ?: string
4040
41- // Custom JS to be injected in <head> and <body>
41+ // Custom CSS/JS to be injected in <head> and <body>
42+ customHeadCSS ?: string
4243 customHeadJS ?: string
4344 customBodyJS ?: string
4445
Original file line number Diff line number Diff line change @@ -49,6 +49,7 @@ export const SITE_CONFIG: NoteHostSiteConfig = {
4949 googleFont : 'Roboto' ,
5050
5151 // Custom JS for head and body of a Notion page
52+ customHeadCSS : `` ,
5253 customHeadJS : googleTag ( GOOGLE_TAG_ID ) ,
5354 customBodyJS : PAGE_SCRIPT_JS_STRING ,
5455}
You can’t perform that action at this time.
0 commit comments