4444 < style >
4545 /** ectocore **/
4646 : root {
47- --background-color : # e6eeff ;
48- --header-footer-background : # 5282d9 ;
49- --banks-background : # 94acda ;
50- --highlight-color : # 94acda ;
51- --highlight-color-darker : # 7799d6 ;
52- --highlight-color-darkerer : # 5577c6 ;
53- --hover-color : # 93a6c9 ;
54- --hover-color-light : # c3d1f0 ;
55- --other-color : # 3478ff ;
47+ --background-color : # f0f0f0 ;
48+ --header-footer-background : # 1a1a1a ;
49+ --banks-background : # b0b0b0 ;
50+ --highlight-color : # b0b0b0 ;
51+ --highlight-color-darker : # 808080 ;
52+ --highlight-color-darkerer : # 505050 ;
53+ --hover-color : # 909090 ;
54+ --hover-color-light : # d0d0d0 ;
55+ --other-color : # 000000 ;
56+ --shadow-color : # 00000015 ;
5657 }
5758 </ style >
5859 [[ end ]]
@@ -497,8 +498,9 @@ <h2>Settings</h2>
497498 </ dialog >
498499
499500 < header >
500- < a href =" / "> < img src ="/static/[[ if .IsEctocore]]ecto/[[ end]]apple-icon.png "
501- style ="filter:brightness(100); max-height: 32px; margin-left: -0.25em;float:right; position:relative;padding-right:1em; "> </ a >
501+ < a href =" / " id ="headerIcon "
502+ style ="max-height: 32px; margin-left: -0.25em;float:right; position:relative;padding-right:1em; ">
503+ </ a >
502504 < h1 style ="margin:0; padding:0; font-size:1.5em; "> < a
503505 :href ="window.location.protocol+'//'+window.location.host + title + '/' "> [[ if .IsZeptocore
504506 ]]zeptocore.com[[else]]ectocore.rocks[[end]]{{title}}</ a >
@@ -968,7 +970,7 @@ <h2>Changes to the Cookie Policy</h2>
968970 < input id ="wsfzoom " type ="range " min ="10 " max ="5000 " value ="10 ">
969971 </ p >
970972
971- < p >
973+ < p style =" display:none; " >
972974 < input type ="checkbox " id ="variablesplices " @click ="updateSpliceVariable "
973975 v-model ="banks[selectedBank].files[selectedFile].SpliceVariable ">
974976 < label for ="variablesplices "> Variable: < span
@@ -1086,6 +1088,46 @@ <h2>Changes to the Cookie Policy</h2>
10861088 < script >
10871089 // global constants
10881090 const isZeptocore = [ [ if . IsZeptocore ] ] true [ [ else ] ] false [ [ end ] ] ;
1091+
1092+ // Simple hash function for strings
1093+ function hashCode ( str ) {
1094+ let hash = 0 ;
1095+ for ( let i = 0 ; i < str . length ; i ++ ) {
1096+ const char = str . charCodeAt ( i ) ;
1097+ hash = ( ( hash << 5 ) - hash ) + char ;
1098+ hash = hash & hash ; // Convert to 32bit integer
1099+ }
1100+ return Math . abs ( hash ) ;
1101+ }
1102+
1103+ // Set header icon based on URL hash
1104+ function setHeaderIcon ( ) {
1105+ const url = window . location . pathname ;
1106+ const grimoireIndex = hashCode ( url ) % 7 ; // 7 grimoires (0-6)
1107+
1108+ // Get the grimoire element
1109+ const grimoireElement = document . getElementById ( 'grimoire' + grimoireIndex ) ;
1110+ if ( grimoireElement ) {
1111+ const svgClone = grimoireElement . querySelector ( 'svg' ) . cloneNode ( true ) ;
1112+ svgClone . setAttribute ( 'width' , '32' ) ;
1113+ svgClone . setAttribute ( 'height' , '32' ) ;
1114+ // Change stroke color to white - set on SVG element so inherit works
1115+ svgClone . style . stroke = 'white' ;
1116+
1117+ const headerIcon = document . getElementById ( 'headerIcon' ) ;
1118+ if ( headerIcon ) {
1119+ headerIcon . innerHTML = '' ;
1120+ headerIcon . appendChild ( svgClone ) ;
1121+ }
1122+ }
1123+ }
1124+
1125+ // Set icon when DOM is ready
1126+ if ( document . readyState === 'loading' ) {
1127+ document . addEventListener ( 'DOMContentLoaded' , setHeaderIcon ) ;
1128+ } else {
1129+ setHeaderIcon ( ) ;
1130+ }
10891131 </ script >
10901132 < script src ="/static/app.js "> </ script >
10911133 < script >
@@ -1138,19 +1180,24 @@ <h2>Changes to the Cookie Policy</h2>
11381180
11391181 window . onload = function ( ) {
11401182
1141- // Display the browser banner if not using Chrome
1142- if ( ! isChrome ( ) ) {
1143- document . getElementById ( 'browserBanner' ) . style . display = 'block' ;
1144- }
11451183 let consent = localStorage . getItem ( 'cookieConsent' ) ;
11461184 if ( ! consent ) {
1147- document . getElementById ( 'cookieConsentContainer' ) . style . display = 'block' ;
1185+ const cookieConsentContainer = document . getElementById ( 'cookieConsentContainer' ) ;
1186+ if ( cookieConsentContainer ) {
1187+ cookieConsentContainer . style . display = 'block' ;
1188+ }
11481189 }
11491190
1150- document . getElementById ( 'cookieConsentButton' ) . onclick = function ( ) {
1151- localStorage . setItem ( 'cookieConsent' , 'true' ) ;
1152- document . getElementById ( 'cookieConsentContainer' ) . style . display = 'none' ;
1153- } ;
1191+ const cookieConsentButton = document . getElementById ( 'cookieConsentButton' ) ;
1192+ if ( cookieConsentButton ) {
1193+ cookieConsentButton . onclick = function ( ) {
1194+ localStorage . setItem ( 'cookieConsent' , 'true' ) ;
1195+ const cookieConsentContainer = document . getElementById ( 'cookieConsentContainer' ) ;
1196+ if ( cookieConsentContainer ) {
1197+ cookieConsentContainer . style . display = 'none' ;
1198+ }
1199+ } ;
1200+ }
11541201 document . getElementById ( "show-dialog" ) . addEventListener ( "click" , ( ) => {
11551202 document . getElementById ( "dialog" ) . showModal ( ) ;
11561203 } ) ;
@@ -1199,4 +1246,4 @@ <h2>Changes to the Cookie Policy</h2>
11991246
12001247</ body >
12011248
1202- </ html >
1249+ </ html >
0 commit comments