Terminal Hero
BlockHero
Heroes & Blocks 14 options JavaScript
Two-column hero with a status line, headline, stats and an animated terminal that types out commands.
Published · by Christopher Alberto
Live demo
Open full screenAt a glance
- Component
BlockHero- Category
- Heroes & Blocks
- Used as
- Page block — “Block: Hero”
- Options
- 14 editable fields
- Built with
- PHP, Twig, SCSS, JavaScript
- Platform
- WordPress · Flynt theme · Timber/Twig · ACF Pro
About this component
The homepage hero: copy on the left (status line, headline, intro, stats and two calls to action) and a faux terminal on the right that types its lines out with a human-like per-character delay.
Highlights
- Terminal lines are editable rows with a type (command, output or final line), so the “script” is content, not code.
- Typing runs once the terminal is in view, ported from the original chrisalberto.site animation without GSAP.
- Stacks the terminal under the copy on narrow screens; stats stay a compact row.
- Primary and secondary CTAs pick up the site-wide button hover effect.
Under the hood
Components/BlockHero/
-
_style.scssStyles (SCSS) 202 lines -
functions.phpFields & data (PHP) 160 lines -
index.twigMarkup (Twig) 52 lines -
script.jsBehaviour (JavaScript) 78 lines