Page banner
A dark full-width banner for inner pages: page title, one sentence and a button over a gradient (or a photo). Left-aligned by default, centred with a modifier. Use it at the top of inner pages such as About, Services or a single article. It is quieter than the home page hero and keeps the title as the page's h1.
<section class="blk-section blk-dark blk-banner" aria-labelledby="blk-banner-title">
<div class="blk-container">
<div class="blk-banner__inner">
<h1 id="blk-banner-title">About our practice</h1>
<p>Who we are, how we work and what you can expect when you get in touch.</p>
<div class="blk-btn-row">
<a class="blk-btn blk-btn--primary" href="#">Book a consultation</a>
<a class="blk-btn blk-btn--outline" href="#">See our services</a>
</div>
</div>
</div>
</section>.blk-banner { position: relative; isolation: isolate; overflow: hidden; padding: clamp(64px, 11vw, 120px) 0; background: radial-gradient(120% 140% at 10% 0%, var(--blk-panel-1), var(--blk-deep)); color: var(--blk-on-dark); }
.blk-banner > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.blk-banner::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(8,13,19,.82) 10%, rgba(8,13,19,.35) 90%); }
.blk-banner__inner { max-width: 640px; }
.blk-banner h1 { font-size: clamp(2.2rem, 5.2vw, 3.6rem); margin-bottom: .35em; }
.blk-banner p { font-family: var(--blk-font-heading); font-size: clamp(1.05rem, 1.7vw, 1.28rem); line-height: 1.5; color: var(--blk-on-dark-muted); margin-bottom: 1.6em; }
.blk-banner--centred .blk-banner__inner { max-width: var(--blk-container-narrow); margin-inline: auto; text-align: center; }
.blk-banner--centred .blk-btn-row { justify-content: center; }How to customise it
- Use one h1 per page and keep it short. If this block is on a page that already has an h1, change the tag to an h2.
- For a photo, add
<img src="..." alt="">as the first child of the section. The CSS covers the banner with it and darkens it so the title stays readable. - Add the class
blk-banner--centredto the section to centre the title and text. - The gradient runs from
--blk-panel-1into--blk-deep. Switch to--blk-panel-2for a cooler banner.
Tokens it reads
--blk-deep--blk-dark--blk-panel-1--blk-panel-2--blk-on-dark--blk-on-dark-muted--blk-font-heading--blk-container-narrowAdd the "Page banner" block from Product Scope Blocks (https://resources.productscope.uk/blocks/blocks/page-banner) to my page. Link https://resources.productscope.uk/blocks/blocks/kit/blocks.css once. Paste the HTML from https://resources.productscope.uk/blocks/blocks/kit/blocks/page-banner.html and replace the placeholder text with my real content. Do not change the class names, add inline styles or add scripts. To change colours or fonts, override the --blk- variables in my own CSS. Do not invent facts, clients or numbers.