Module: ArchUnit::GraphReporting::Rendering::HtmlDocument
- Defined in:
- lib/archunit/graph/rendering/html_document.rb
Overview
Static offline document shell used by the HTML graph renderer.
Constant Summary collapse
- TEMPLATE =
<<~HTML <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <title>%<title>s</title> <style> :root { color-scheme: light; font-family: Inter, Arial, sans-serif; } body { margin: 0; color: #172033; background: #f5f7fb; } header { padding: 28px 36px; color: white; background: #13294b; } header h1 { margin: 0 0 6px; font-size: 28px; } header p { margin: 0; color: #d7e3f4; } main { max-width: 1180px; margin: 0 auto; padding: 28px 36px 48px; } h2 { margin-top: 32px; font-size: 20px; } .summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; } .metric { padding: 16px; border: 1px solid #d8deea; border-radius: 8px; background: white; } .metric strong { display: block; font-size: 26px; color: #13294b; } table { width: 100%%; border-collapse: collapse; background: white; } th, td { padding: 9px 11px; border: 1px solid #d8deea; text-align: left; } th { background: #eaf0f8; } code, pre { font-family: Consolas, "SFMono-Regular", monospace; } pre { overflow: auto; padding: 16px; color: #e7edf7; background: #101827; border-radius: 8px; } details { margin: 12px 0; } summary { cursor: pointer; font-weight: 700; } .empty { padding: 16px; border: 1px solid #d8deea; background: white; } @media (max-width: 760px) { .summary { grid-template-columns: repeat(2, 1fr); } } </style> </head> <body> <header><h1>%<title>s</h1><p>Generated by ArchUnitRuby graph reporting</p></header> <main>%<body>s</main> </body> </html> HTML