redirect to about.html
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
$aboutFile = 'd:\website_sisvietnam_moi\website_sisvietnam.vn\sisvietnamvn\src\main\resources\templates\about.html'
|
||||
$indexFile = 'd:\website_sisvietnam_moi\website_sisvietnam.vn\sisvietnamvn\src\main\resources\templates\index.html'
|
||||
|
||||
$aboutContent = Get-Content -Raw -Path $aboutFile -Encoding UTF8
|
||||
$indexContent = Get-Content -Raw -Path $indexFile -Encoding UTF8
|
||||
|
||||
# Replace Header
|
||||
$aboutContent = $aboutContent -replace '(?s)<header id="l--main-header">.*?</header>', '<header th:replace="~{fragments/header :: header}"></header>'
|
||||
|
||||
# Extract Footer from index.html
|
||||
$indexFooter = [regex]::Match($indexContent, '(?s)<footer id="l--main-footer".*?</footer>').Value
|
||||
|
||||
# Replace Footer in about.html
|
||||
$aboutContent = $aboutContent -replace '(?s)<footer id="l--main-footer".*?</footer>', $indexFooter
|
||||
|
||||
# Apply extra CSS from index.html
|
||||
$cssSnippet = @"
|
||||
<link href="https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,300..800;1,300..800&display=swap" rel="stylesheet">
|
||||
<style>
|
||||
body, h1, h2, h3, h4, h5, h6, p, a, div, li, button, input, textarea, span:not([class*="fa"]):not([class*="icon"]):not([class*="material"]) {
|
||||
font-family: 'Open Sans', Arial, Helvetica, sans-serif !important;
|
||||
}
|
||||
#block-footerbranding img {
|
||||
filter: drop-shadow(0px 0px 10px rgba(255, 255, 255, 0.9)) drop-shadow(0px 0px 20px rgba(255, 255, 255, 0.7));
|
||||
transition: filter 0.3s ease, transform 0.3s ease;
|
||||
}
|
||||
"@
|
||||
$aboutContent = $aboutContent -replace '<style>', ($cssSnippet + "`n <style>")
|
||||
|
||||
Set-Content -Path $aboutFile -Value $aboutContent -Encoding UTF8
|
||||
Reference in New Issue
Block a user