@@ -77,9 +77,12 @@ Template function HTML.Default.Layout {
77
77
$JavaScript ,
78
78
79
79
# The name of the palette to use. If set, it will include the 4bitcss link tag.
80
+ # This is a CSS file that sets the foreground and background colors.
81
+ # If palette contains slashes, it will be presumed to be an external palette file.
82
+ # This palette file _should_ follow the same conventions as those found in [4bitcss](https://4bitcss.com).
80
83
[vbn ()]
81
- [Alias (' ColorScheme' , ' ColorPalette' )]
82
- [string ]
84
+ [Alias (' Palette ' , ' ColorScheme' , ' ColorPalette' )]
85
+ [string [] ]
83
86
$PaletteName ,
84
87
85
88
# One or more google fonts to include
@@ -101,7 +104,7 @@ Template function HTML.Default.Layout {
101
104
# The language of the page. If set, it will include the lang attribute.
102
105
[vbn ()]
103
106
[cultureinfo ]
104
- $Language ,
107
+ $Language = [ cultureinfo ]::CurrentUICulture ,
105
108
106
109
# The date the page was published. If set, it will include the article:published_time meta tag.
107
110
[vbn ()]
@@ -229,8 +232,13 @@ Template function HTML.Default.Layout {
229
232
}
230
233
if ($PaletteName ) {
231
234
foreach ($NameOfPalette in $PaletteName ) {
232
- $MachineFriendlyName = $NameOfPalette -replace ' \s' , ' -' -replace ' \p{P}' , ' -' -replace ' -+' , ' -' -replace ' -$'
233
- " <link rel='stylesheet' type='text/css' href='https://cdn.jsdelivr.net/gh/2bitdesigns/4bitcss@latest/css/$MachineFriendlyName .css' id='4bitcss' />"
235
+ if ($PaletteName -match ' [\\/]' ) {
236
+ " <link rel='stylesheet' type='text/css' href='$PaletteName ' id='4bitcss' />"
237
+ } else {
238
+ $MachineFriendlyName = $NameOfPalette -replace ' \s' , ' -' -replace ' \p{P}' , ' -' -replace ' -+' , ' -' -replace ' -$'
239
+ " <link rel='stylesheet' type='text/css' href='https://cdn.jsdelivr.net/gh/2bitdesigns/4bitcss@latest/css/$MachineFriendlyName .css' id='4bitcss' />"
240
+ }
241
+
234
242
}
235
243
$Class += " foreground" , " background"
236
244
}
0 commit comments