修改完成
This commit is contained in:
@@ -0,0 +1,40 @@
|
||||
$ErrorActionPreference = 'Stop'
|
||||
|
||||
$root = Split-Path -Parent $PSScriptRoot
|
||||
$pagePath = Join-Path $root 'pages/genealogy/g05-genealogy-overview.vue'
|
||||
$page = Get-Content -LiteralPath $pagePath -Raw -Encoding utf8
|
||||
$style = [regex]::Match($page, '(?s)<style[^>]*>(.*?)</style>').Groups[1].Value
|
||||
$styleWithoutComments = [regex]::Replace($style, '(?s)/\*.*?\*/', '')
|
||||
$positions = [regex]::Matches($styleWithoutComments, '(?m)\bposition\s*:\s*([^;]+);')
|
||||
|
||||
if ($positions.Count -ne 0) {
|
||||
$values = ($positions | ForEach-Object { $_.Groups[1].Value.Trim() }) -join ', '
|
||||
throw "G05 ordinary overview layout must use document flow; found $($positions.Count) position declarations: $values"
|
||||
}
|
||||
|
||||
foreach ($required in @(
|
||||
'background: url("/static/assets/modules/genealogy/opaque/g05-overview-surface.png")',
|
||||
'background: url("/static/assets/modules/genealogy/transparent/g01-empty-panel-frame.png")',
|
||||
'background: url("/static/assets/foundation/transparent/a01-scroll-primary-v3.png")'
|
||||
)) {
|
||||
if ($page -notmatch [regex]::Escape($required)) {
|
||||
throw "G05 document-flow migration is missing asset-backed surface: $required"
|
||||
}
|
||||
}
|
||||
|
||||
foreach ($obsoleteClass in @('overview-surface__skin', 'overview-state__frame')) {
|
||||
if ($page -match "class=`"$obsoleteClass`"") {
|
||||
throw "G05 must not retain decorative image layer .$obsoleteClass"
|
||||
}
|
||||
}
|
||||
|
||||
foreach ($selector in @('overview-ready', 'overview-public')) {
|
||||
if ($style -match "(?s)\.$selector\s*\{[^}]*(?:height\s*:\s*100%|grid-template-rows\s*:[^;}]+)") {
|
||||
throw "G05 .$selector must let overview content define row heights"
|
||||
}
|
||||
}
|
||||
if ($style -match '(?s)\.overview-public__details\s*\{[^}]*grid-template-rows\s*:') {
|
||||
throw 'G05 public details must grow from their data instead of fixed rows'
|
||||
}
|
||||
|
||||
Write-Output 'G05-DOCUMENT-FLOW-CONTRACT PASS'
|
||||
Reference in New Issue
Block a user