Updated Doormile website
This commit is contained in:
28
scratch/fix_css_paths.ps1
Normal file
28
scratch/fix_css_paths.ps1
Normal file
@@ -0,0 +1,28 @@
|
||||
$dirs = "assets/css/vendor", "assets/css/sections", "assets/css/widgets"
|
||||
foreach ($dir in $dirs) {
|
||||
if (Test-Path $dir) {
|
||||
$files = Get-ChildItem -Path $dir -Filter *.css -Recurse
|
||||
foreach ($file in $files) {
|
||||
$content = Get-Content $file.FullName -Raw
|
||||
$changed = $false
|
||||
|
||||
if ($content -like '*../fonts/*') {
|
||||
$content = $content.Replace('../fonts/', '../../fonts/')
|
||||
$changed = $true
|
||||
}
|
||||
if ($content -like '*assets/images/*') {
|
||||
$content = $content.Replace('assets/images/', '../../images/')
|
||||
$changed = $true
|
||||
}
|
||||
if ($content -like '*assets/fonts/*') {
|
||||
$content = $content.Replace('assets/fonts/', '../../fonts/')
|
||||
$changed = $true
|
||||
}
|
||||
|
||||
if ($changed) {
|
||||
$content | Set-Content $file.FullName
|
||||
Write-Host "Updated $($file.FullName)"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user