diff --git a/.github/workflows/wordpress-verify.yml b/.github/workflows/wordpress-verify.yml new file mode 100644 index 0000000..c44f182 --- /dev/null +++ b/.github/workflows/wordpress-verify.yml @@ -0,0 +1,41 @@ +name: WordPress Verify + +on: + pull_request: + paths: + - 'plugins/staark-core/**' + - 'themes/staark/**' + - '.github/workflows/wordpress-verify.yml' + workflow_dispatch: + +permissions: + contents: read + +jobs: + verify: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: PHP syntax and package metadata + shell: bash + run: | + set -euo pipefail + php -v + while IFS= read -r -d '' file; do + php -l "$file" >/dev/null + done < <(find plugins/staark-core themes/staark -type f -name '*.php' -print0) + python3 - <<'PY' + import json + from pathlib import Path + for file in Path('themes/staark').rglob('*.json'): + json.loads(file.read_text(encoding='utf-8')) + plugin = Path('plugins/staark-core/staark-core.php').read_text() + header = next(line.split('Version: ', 1)[1] for line in plugin.splitlines() if line.startswith(' * Version: ')) + assert f"const STAARK_HUB_VERSION = '{header}';" in plugin + for file in ('includes/first-install.php', 'admin/first-install-page.php'): + assert f"require_once STAARK_HUB_PLUGIN_DIR . '{file}';" in plugin + theme = Path('themes/staark/functions.php').read_text() + assert "require_once $staark_local_business_pack;" in theme + assert Path('themes/staark/presets/local-business.json').exists() + print('PHP, JSON, versions, and feature loaders OK') + PY diff --git a/S-HUB-LIGHT.md b/S-HUB-LIGHT.md new file mode 100644 index 0000000..9a37b98 --- /dev/null +++ b/S-HUB-LIGHT.md @@ -0,0 +1,27 @@ +# S-Hub Light + +S-Hub Light is the display name of the existing `themes/staark` block theme. The directory slug stays `staark` so the Staark Hub update channel, release workflow and existing managed installations can still identify it. The 0.6.5 theme package updates the existing theme; it does not install alongside it. + +## Stack + +- **Theme:** layouts, block patterns, design tokens, images, frontend rendering and Scandinavian preset. +- **Staark Hub plugin:** site branding (`[staark_brand]` and `[staark_brand_copyright]`), native form and local submissions, SEO, security, performance, support, updates, managed mode and the signed Hub connector. +- **Hub connection:** configured through the plugin's Connect screen. The theme never stores secrets or makes connector requests itself. + +The homepage Contact pattern uses `[staark_contact_form form_id="staark-home"]` when Staark Hub is active. It links to `contact@staarkinc.com` either way. Submissions are stored and notifications are delivered according to **Staark Hub → Forms** settings; the theme does not send mail. Configure the recipient and SMTP transport there. Existing saved forms settings are intentionally preserved. On older Hub builds the theme loads the plugin's form stylesheet itself; newer Hub builds detect template forms through a filter. + +The pattern is conditionally registered with the form when the shortcode is present. If the plugin is deactivated, the form is omitted and the mail link remains. Site Editor customizations stored in the database override the files in a new theme package; reset the affected template/part in Site Editor if an earlier saved copy hides the new contact section. + +## Install and edit + +1. Install and activate the Staark Hub plugin from `plugins/staark-core`. +2. Install S-Hub Light from the theme ZIP (root folder `staark`) and activate it. An installed `Staark` theme in the same folder will be upgraded. +3. Set the site name and branding in Staark Hub → Branding. Review Forms recipient and mail delivery; pair the site under Connect if managed. +4. Edit the home template and patterns under Appearance → Editor. Set real content and images before publishing. Add the same shortcode to a dedicated Contact page if needed. +5. Use Staark Hub's SEO, Security, Performance and Updates screens to configure each module. No parallel implementation is bundled in the theme. + +Requires WordPress 6.6+, PHP 8.1+ and the supported Staark Hub build for integrated features. The theme renders without the plugin but its branding shortcodes and form require Staark Hub. + +## Verification + +The theme ZIP must contain `staark/style.css`, `staark/theme.json`, templates, patterns and assets. Run `bash scripts/rc-smoke.sh` and visual checks at 1440, 1024, 782, 600 and 390 px in a Docker-backed wp-env before a production release. Confirm the form submission is stored locally and its configured notification arrives before accepting client traffic. diff --git a/plugins/staark-core/includes/forms.php b/plugins/staark-core/includes/forms.php index f679909..0bc8aac 100644 --- a/plugins/staark-core/includes/forms.php +++ b/plugins/staark-core/includes/forms.php @@ -419,8 +419,12 @@ function staark_hub_forms_should_enqueue_assets(): bool $post = get_post(); - return $post instanceof WP_Post + $in_post = $post instanceof WP_Post && has_shortcode((string) $post->post_content, STAARK_HUB_FORM_SHORTCODE); + + // A block theme can place the form inside a template pattern rather than + // the post body. Let that theme request the existing form stylesheet. + return (bool) apply_filters('staark_hub_forms_should_enqueue_assets', $in_post); } add_action('wp_enqueue_scripts', static function (): void { @@ -537,6 +541,18 @@ function staark_hub_forms_shortcode(array $atts = []): string add_shortcode(STAARK_HUB_FORM_SHORTCODE, 'staark_hub_forms_shortcode'); +// Shortcode blocks in patterns and template parts can render before the usual +// post-content shortcode pass. Resolve the Hub shortcodes in either location. +add_filter('render_block_core/shortcode', static function (string $content): string { + foreach ([STAARK_HUB_FORM_SHORTCODE, 'staark_brand', 'staark_brand_tagline', 'staark_brand_copyright', 'staark_theme_page_links'] as $shortcode) { + if (has_shortcode($content, $shortcode)) { + return do_shortcode(shortcode_unautop($content)); + } + } + + return $content; +}); + /** * @return array */ diff --git a/plugins/staark-core/staark-core.php b/plugins/staark-core/staark-core.php index b0c5241..78909e9 100644 --- a/plugins/staark-core/staark-core.php +++ b/plugins/staark-core/staark-core.php @@ -3,7 +3,7 @@ * Plugin Name: Staark Hub * Plugin URI: https://staarkinc.com * Description: Website management layer for sites built and maintained by Staark Inc. - * Version: 0.6.4.2 + * Version: 0.6.4.4 * Author: Staark Inc. * Author URI: https://staarkinc.com * Text Domain: staark-core @@ -21,7 +21,7 @@ } define('STAARK_HUB_RUNTIME_LOADED', true); -const STAARK_HUB_VERSION = '0.6.4.2'; +const STAARK_HUB_VERSION = '0.6.4.4'; const STAARK_HUB_SLUG = 'staark-hub'; define('STAARK_HUB_PLUGIN_FILE', __FILE__); define('STAARK_HUB_PLUGIN_DIR', __DIR__ . '/'); @@ -1129,7 +1129,7 @@ function staark_hub_frontend_copyright_shortcode(): string update_post_meta($ticket_id, '_staark_ticket_channel', 'local'); update_post_meta($ticket_id, '_staark_ticket_sync_state', 'pending'); - $recipient = (string) apply_filters('staark_hub_support_email', 'hello@staarkinc.com'); + $recipient = (string) apply_filters('staark_hub_support_email', 'contact@staarkinc.com'); $ticket_label = staark_hub_support_ticket_label((int) $ticket_id); $mail_subject = sprintf('[%s] %s · %s', $ticket_label, $priorities[$priority], $subject); $mail_body = implode( @@ -2395,7 +2395,7 @@ function staark_hub_render_support(): void

Prefer email?

You can still contact Staark Inc. directly. The in-Hub form is preferred because it attaches site context automatically.

- hello@staarkinc.com + contact@staarkinc.com Contact page ↗
diff --git a/themes/staark/assets/css/critical.css b/themes/staark/assets/css/critical.css index d87c8a7..8e63061 100644 --- a/themes/staark/assets/css/critical.css +++ b/themes/staark/assets/css/critical.css @@ -29,6 +29,14 @@ body { -webkit-font-smoothing: antialiased; } +.wp-site-blocks > * { + margin-block-start: 0; +} + +.staark-home > .wp-block-post-content > :is(.alignfull, .alignwide) { + margin-block-start: 0; +} + .staark-brand { display: inline-flex; align-items: center; diff --git a/themes/staark/assets/css/presets/local-business.css b/themes/staark/assets/css/presets/local-business.css new file mode 100644 index 0000000..50fc038 --- /dev/null +++ b/themes/staark/assets/css/presets/local-business.css @@ -0,0 +1,580 @@ +/* + * Staark Local Business design pack. + * Loaded inline only while the local-business preset is active. + */ + +.staark-preset-local-business { + background: var(--staark-system-paper); + color: var(--staark-system-ink); +} + +.staark-preset-local-business :where(h1,h2,h3,h4,h5,h6) { + font-family: var(--wp--preset--font-family--display, Georgia, "Times New Roman", serif); + letter-spacing: -.035em; +} + +.staark-preset-local-business .staark-site-header { + padding-block: 10px; + border-bottom: 1px solid rgba(23, 33, 43, .09); + background: rgba(248, 247, 242, .97); + backdrop-filter: none; + -webkit-backdrop-filter: none; + box-shadow: 0 8px 30px rgba(23, 33, 43, .035); +} + +.staark-preset-local-business .staark-brand { + letter-spacing: -.035em; +} + +.staark-preset-local-business .staark-site-header .wp-block-navigation-item__content { + color: var(--staark-system-ink); + font-weight: 700; +} + +/* Let the installed pages use the same full-width sections as Home. */ +.staark-preset-local-business.page:not(.home) .staark-page-shell { + padding: 0 !important; +} + +.staark-preset-local-business.page:not(.home) .staark-page-shell > .wp-block-post-content { + width: 100%; + max-width: none; +} + +.staark-preset-local-business.page:not(.home) .staark-page-shell > .wp-block-post-title { + width: min(calc(100% - 40px), var(--staark-system-wrap)); + max-width: none; + margin: 0 auto; + padding-top: clamp(44px, 5vw, 78px); + color: var(--staark-system-ink); +} + +.staark-preset-local-business.page:not(.home) .staark-page-shell > .wp-block-post-content > .staark-privacy { + width: min(calc(100% - 40px), 760px); + max-width: none; + margin-inline: auto; + padding-block: clamp(48px, 6vw, 88px); +} + +.staark-preset-local-business :is(.staark-local-hero, .staark-local-proof, .staark-local-section, .staark-local-cta) { + margin-block: 0; +} + +.staark-preset-local-business .staark-site-footer .staark-brand-tagline { + max-width: 620px; + margin-top: 18px; + color: rgba(255, 255, 255, .76) !important; + line-height: 1.65; +} + +.staark-preset-local-business .wp-block-button:not(.is-style-outline) .wp-block-button__link, +.staark-preset-local-business .staark-header-cta .wp-block-button__link { + border-radius: var(--staark-system-radius-button); + background: var(--staark-system-primary) !important; + color: #fff !important; + box-shadow: 0 10px 28px rgba(198, 78, 44, .18); +} + +.staark-preset-local-business .wp-block-button.is-style-outline .wp-block-button__link { + border-color: rgba(23, 33, 43, .17); + border-radius: var(--staark-system-radius-button); + background: #fff; + color: var(--staark-system-ink); +} + +/* Existing Showcase blocks also inherit a visible preset identity. */ +.staark-preset-local-business .staark-showcase-hero { + background: + radial-gradient(circle at 82% 12%, rgba(198,78,44,.11), transparent 30%), + var(--staark-system-paper); +} + +.staark-preset-local-business .staark-showcase-display, +.staark-preset-local-business .staark-showcase-title { + font-family: var(--wp--preset--font-family--display, Georgia, "Times New Roman", serif); + letter-spacing: -.045em; +} + +.staark-preset-local-business .staark-showcase-eyebrow { + color: var(--staark-system-primary); +} + +.staark-preset-local-business .staark-showcase-card, +.staark-preset-local-business .staark-showcase-project, +.staark-preset-local-business .staark-showcase-quote-card { + border-radius: var(--staark-system-radius-md); + box-shadow: none; +} + +.staark-preset-local-business .staark-showcase-projects, +.staark-preset-local-business .staark-showcase-why, +.staark-preset-local-business .staark-site-footer { + background: var(--showcase-forest-deep) !important; +} + +/* Local Business pack */ +.staark-local-shell { + width: min(calc(100% - 40px), var(--staark-system-wrap)); + margin-inline: auto; +} + +.staark-local-kicker { + display: inline-flex; + align-items: center; + gap: 9px; + margin: 0 0 18px; + color: var(--staark-system-primary); + font-size: .75rem; + font-weight: 800; + letter-spacing: .11em; + line-height: 1; + text-transform: uppercase; +} + +.staark-local-kicker::before { + content: ""; + width: 9px; + height: 9px; + border-radius: 50%; + background: currentColor; +} + +.staark-local-hero { + overflow: hidden; + padding: clamp(52px, 7vw, 104px) 0 0; + background: + radial-gradient(circle at 90% 8%, rgba(198,78,44,.13), transparent 30%), + linear-gradient(180deg, #fbfaf6 0%, var(--staark-system-paper) 100%); +} + +.staark-local-hero-grid { + display: grid; + grid-template-columns: minmax(0, 1.1fr) minmax(340px, .9fr); + gap: clamp(36px, 7vw, 110px); + align-items: center; +} + +.staark-local-hero-copy { + padding-bottom: clamp(54px, 7vw, 96px); +} + +.staark-local-hero h1 { + max-width: 760px; + margin: 0; + color: var(--staark-system-ink); + font-family: var(--wp--preset--font-family--display, Georgia, "Times New Roman", serif); + font-size: clamp(3.25rem, 7vw, 6.9rem); + line-height: .92; + letter-spacing: -.055em; +} + +.staark-local-hero-copy > p:not(.staark-local-kicker) { + max-width: 650px; + margin: 26px 0 0; + color: var(--staark-system-muted); + font-size: clamp(1rem, 1.35vw, 1.2rem); + line-height: 1.7; +} + +.staark-local-actions { + display: flex; + flex-wrap: wrap; + gap: 12px; + margin-top: 30px; +} + +.staark-local-actions .wp-block-button__link { + min-height: 52px; + padding: 15px 24px !important; +} + +.staark-local-trustline { + display: flex; + flex-wrap: wrap; + gap: 12px 24px; + margin-top: 28px; + color: var(--staark-system-muted); + font-size: .86rem; + font-weight: 700; +} + +.staark-local-trustline span::before { + content: "✓"; + margin-right: 7px; + color: var(--staark-system-success); + font-weight: 900; +} + +.staark-local-hero-card { + position: relative; + overflow: hidden; + min-height: 510px; + padding: clamp(30px, 4vw, 48px); + border-radius: 28px 28px 0 0; + background: var(--showcase-forest-deep); + color: #fff; + box-shadow: 0 30px 80px rgba(16,39,34,.16); +} + +.staark-local-hero-card::after { + content: ""; + position: absolute; + right: -90px; + bottom: -105px; + width: 330px; + height: 330px; + border: 1px solid rgba(255,255,255,.16); + border-radius: 50%; + box-shadow: 0 0 0 58px rgba(255,255,255,.035), 0 0 0 116px rgba(255,255,255,.025); +} + +.staark-local-hero-card > * { + position: relative; + z-index: 1; +} + +.staark-local-hero-card-label { + margin: 0 0 74px; + color: rgba(255,255,255,.65); + font-size: .75rem; + font-weight: 800; + letter-spacing: .1em; + text-transform: uppercase; +} + +.staark-local-hero-card h2 { + max-width: 440px; + margin: 0; + color: #fff; + font-size: clamp(2.15rem, 4vw, 4rem); + line-height: .98; +} + +.staark-local-hero-card p { + max-width: 430px; + margin: 18px 0 0; + color: rgba(255,255,255,.72); + line-height: 1.65; +} + +.staark-local-phone { + display: inline-flex; + align-items: center; + gap: 10px; + margin-top: 28px; + color: #fff; + font-size: 1.05rem; + font-weight: 800; + text-decoration: none; +} + +.staark-local-phone::before { + content: "↗"; + display: grid; + place-items: center; + width: 36px; + height: 36px; + border: 1px solid rgba(255,255,255,.22); + border-radius: 50%; +} + +.staark-local-proof { + border-block: 1px solid var(--staark-system-line); + background: #fff; +} + +.staark-local-proof-grid { + display: grid; + grid-template-columns: repeat(4,minmax(0,1fr)); +} + +.staark-local-proof-item { + min-height: 112px; + padding: 24px 28px; + border-right: 1px solid var(--staark-system-line); +} + +.staark-local-proof-item:last-child { + border-right: 0; +} + +.staark-local-proof-item strong, +.staark-local-proof-item span { + display: block; +} + +.staark-local-proof-item strong { + color: var(--staark-system-ink); + font-size: 1rem; +} + +.staark-local-proof-item span { + margin-top: 6px; + color: var(--staark-system-muted); + font-size: .82rem; + line-height: 1.45; +} + +.staark-local-section { + padding-block: clamp(76px, 9vw, 132px); +} + +.staark-local-heading { + display: grid; + grid-template-columns: minmax(0, 1fr) minmax(280px, .62fr); + gap: clamp(30px, 8vw, 120px); + align-items: end; + margin-bottom: clamp(36px, 5vw, 64px); +} + +.staark-local-heading h2 { + max-width: 760px; + margin: 0; + font-size: clamp(2.45rem, 5vw, 5.15rem); + line-height: .96; +} + +.staark-local-heading p { + margin: 0; + color: var(--staark-system-muted); + line-height: 1.7; +} + +.staark-local-services { + background: var(--staark-system-paper); +} + +.staark-local-service-grid { + display: grid; + grid-template-columns: repeat(3,minmax(0,1fr)); + border-top: 1px solid var(--staark-system-line); + border-left: 1px solid var(--staark-system-line); +} + +.staark-local-service { + min-height: 310px; + padding: clamp(28px, 4vw, 42px); + border-right: 1px solid var(--staark-system-line); + border-bottom: 1px solid var(--staark-system-line); + background: #fff; +} + +.staark-local-service-number { + margin: 0 0 62px; + color: var(--staark-system-primary); + font-size: .78rem; + font-weight: 850; + letter-spacing: .09em; +} + +.staark-local-service h3 { + margin: 0; + color: var(--staark-system-ink); + font-size: clamp(1.55rem, 2vw, 2rem); + line-height: 1; +} + +.staark-local-service p { + margin: 16px 0 0; + color: var(--staark-system-muted); + font-size: .92rem; + line-height: 1.65; +} + +.staark-local-reviews { + background: var(--showcase-forest-deep); + color: #fff; +} + +.staark-local-reviews .staark-local-kicker { + color: #f1b79f; +} + +.staark-local-reviews .staark-local-heading h2 { + color: #fff; +} + +.staark-local-reviews .staark-local-heading p { + color: rgba(255,255,255,.68); +} + +.staark-local-review-grid { + display: grid; + grid-template-columns: repeat(3,minmax(0,1fr)); + gap: 14px; +} + +.staark-local-review { + min-height: 280px; + padding: 28px; + border: 1px solid rgba(255,255,255,.13); + border-radius: var(--staark-system-radius-md); + background: rgba(255,255,255,.045); +} + +.staark-local-review-stars { + margin: 0 0 24px; + color: #f0bd63; + letter-spacing: .12em; +} + +.staark-local-review blockquote { + margin: 0; + color: rgba(255,255,255,.9); + font-family: var(--wp--preset--font-family--display, Georgia, "Times New Roman", serif); + font-size: 1.2rem; + line-height: 1.45; +} + +.staark-local-review cite { + display: block; + margin-top: 28px; + color: rgba(255,255,255,.58); + font-size: .82rem; + font-style: normal; +} + +.staark-local-contact { + background: + radial-gradient(circle at 92% 0%, rgba(198,78,44,.10), transparent 29%), + #fff; +} + +.staark-local-contact-grid { + display: grid; + grid-template-columns: minmax(0,.8fr) minmax(360px,1.2fr); + gap: clamp(38px, 8vw, 120px); + align-items: start; +} + +.staark-local-contact-copy h2 { + margin: 0; + font-size: clamp(2.55rem, 5vw, 5rem); + line-height: .96; +} + +.staark-local-contact-copy > p { + margin: 22px 0 0; + color: var(--staark-system-muted); + line-height: 1.7; +} + +.staark-local-contact-facts { + display: grid; + gap: 0; + margin-top: 34px; + border-top: 1px solid var(--staark-system-line); +} + +.staark-local-contact-fact { + padding: 17px 0; + border-bottom: 1px solid var(--staark-system-line); +} + +.staark-local-contact-fact strong, +.staark-local-contact-fact span { + display: block; +} + +.staark-local-contact-fact span { + margin-top: 4px; + color: var(--staark-system-muted); + font-size: .86rem; +} + +.staark-local-form-card { + padding: clamp(24px, 4vw, 42px); + border: 1px solid var(--staark-system-line); + border-radius: var(--staark-system-radius-lg); + background: var(--staark-system-paper); + box-shadow: 0 24px 60px rgba(23,33,43,.07); +} + +.staark-local-cta { + padding-block: clamp(66px, 8vw, 108px); + background: var(--staark-system-primary-soft); +} + +.staark-local-cta-inner { + display: grid; + grid-template-columns: minmax(0,1fr) auto; + gap: 32px; + align-items: center; +} + +.staark-local-cta h2 { + max-width: 850px; + margin: 0; + font-size: clamp(2.3rem, 4.4vw, 4.5rem); + line-height: .98; +} + +@media (max-width: 900px) { + .staark-local-hero-grid, + .staark-local-heading, + .staark-local-contact-grid, + .staark-local-cta-inner { + grid-template-columns: 1fr; + } + + .staark-local-service-grid, + .staark-local-review-grid { + grid-template-columns: 1fr; + } + + .staark-local-proof-grid { + grid-template-columns: repeat(2,minmax(0,1fr)); + } + + .staark-local-hero-card { + min-height: 430px; + border-radius: 22px 22px 0 0; + } +} + +@media (max-width: 781px) { + .staark-local-shell { + width: min(calc(100% - 32px), var(--staark-system-wrap)); + } + + .staark-preset-local-business.page:not(.home) .staark-page-shell > .wp-block-post-title, + .staark-preset-local-business.page:not(.home) .staark-page-shell > .wp-block-post-content > .staark-privacy { + width: min(calc(100% - 32px), var(--staark-system-wrap)); + } + + .staark-local-hero { + padding-top: 38px; + } + + .staark-local-hero h1 { + font-size: clamp(3rem, 14vw, 5rem); + } + + .staark-local-proof-grid { + grid-template-columns: 1fr; + } + + .staark-local-proof-item { + min-height: auto; + padding-inline: 0; + border-right: 0; + } + + .staark-local-service { + min-height: auto; + } + + .staark-local-service-number { + margin-bottom: 38px; + } + + .staark-local-actions, + .staark-local-actions .wp-block-button, + .staark-local-actions .wp-block-button__link { + width: 100%; + } + + .staark-local-actions .wp-block-button__link { + text-align: center; + } +} diff --git a/themes/staark/assets/css/theme.css b/themes/staark/assets/css/theme.css index cedae68..1fc784c 100644 --- a/themes/staark/assets/css/theme.css +++ b/themes/staark/assets/css/theme.css @@ -18,6 +18,16 @@ body { -webkit-font-smoothing: antialiased; } +/* WordPress blockGap is for content, not the header / main / footer. */ +.wp-site-blocks > * { + margin-block-start: 0; +} + +/* Full-width landing sections carry their own vertical padding. */ +.staark-home > .wp-block-post-content > :is(.alignfull, .alignwide) { + margin-block-start: 0; +} + a { text-underline-offset: .18em; text-decoration-thickness: .08em; diff --git a/themes/staark/functions.php b/themes/staark/functions.php index 850bddc..f4566fa 100644 --- a/themes/staark/functions.php +++ b/themes/staark/functions.php @@ -32,15 +32,112 @@ ); }); -// The homepage form lives in a block pattern, outside post_content. +// Keep the original Showcase homepage before a static front page is selected. +// Once First Install creates Home, the front-page template renders that page's +// own patterns so its selected preset controls the actual homepage layout. +add_filter('render_block_core/post-content', static function (string $content): string { + if (! is_front_page() || get_option('show_on_front') === 'page') { + return $content; + } + + return do_blocks(<<<'BLOCKS' + + + + + + + + +BLOCKS); +}); + +// A starter page can already contain its own H1 (for example, About). +// Avoid printing the page title as a second H1 above that page's layout. +add_filter('render_block_core/post-title', static function (string $content): string { + if (! is_page() || is_front_page() || ! function_exists('staark_local_business_pack_is_active') + || ! staark_local_business_pack_is_active()) { + return $content; + } + + $page = get_queried_object(); + if (! $page instanceof WP_Post) { + return $content; + } + + $source = (string) $page->post_content; + $has_h1 = preg_match('/ [staark_brand] - -

Strategi, design och teknik för företag som vill växa med en webbplats som faktiskt gör sitt jobb.

- + + [staark_brand_tagline] + @@ -20,9 +20,9 @@

Navigera

- - - + + [staark_theme_page_links] + @@ -32,7 +32,7 @@

Nav

Kontakt

- + diff --git a/themes/staark/parts/header.html b/themes/staark/parts/header.html index 5aa5ef7..47d68e7 100644 --- a/themes/staark/parts/header.html +++ b/themes/staark/parts/header.html @@ -24,9 +24,6 @@ - -

◎ SV⌄

- diff --git a/themes/staark/patterns/local-business-contact.php b/themes/staark/patterns/local-business-contact.php new file mode 100644 index 0000000..df857f0 --- /dev/null +++ b/themes/staark/patterns/local-business-contact.php @@ -0,0 +1,34 @@ + + +
+
+ +
+

Kontakta oss

+

Beskriv jobbet. Vi återkommer med nästa steg.

+

Formuläret är kopplat till Staark Forms och sparar förfrågan lokalt även om e-postleveransen tillfälligt skulle misslyckas.

+
+
ÅterkopplingNormalt inom en arbetsdag
+
OffertTydligt upplägg innan start
+
OmrådeAnpassa till företagets ort och serviceområde
+
+
+ + + +
+ + [staark_contact_form form_id="local-business-contact" button="Skicka förfrågan"] + +
+ +
+
+ diff --git a/themes/staark/patterns/local-business-cta.php b/themes/staark/patterns/local-business-cta.php new file mode 100644 index 0000000..616b0cf --- /dev/null +++ b/themes/staark/patterns/local-business-cta.php @@ -0,0 +1,23 @@ + + +
+ +
+
+

Redo att komma vidare?

+

Få ett tydligt nästa steg — utan förpliktelser.

+
+ +
+ +
+ diff --git a/themes/staark/patterns/local-business-hero.php b/themes/staark/patterns/local-business-hero.php new file mode 100644 index 0000000..f2948ce --- /dev/null +++ b/themes/staark/patterns/local-business-hero.php @@ -0,0 +1,36 @@ + + +
+ +
+
+

Lokalt företag · Personlig service

+

Pålitlig hjälp när du behöver den.

+

Vi hjälper privatpersoner och företag med tydliga offerter, snabb återkoppling och ett arbete vi kan stå för.

+ +
+ Snabb återkoppling + Tydliga priser + Lokal service +
+
+ +
+ +
+ diff --git a/themes/staark/patterns/local-business-home.php b/themes/staark/patterns/local-business-home.php new file mode 100644 index 0000000..9ef86dd --- /dev/null +++ b/themes/staark/patterns/local-business-home.php @@ -0,0 +1,14 @@ + + + + + + + diff --git a/themes/staark/patterns/local-business-proof.php b/themes/staark/patterns/local-business-proof.php new file mode 100644 index 0000000..096c510 --- /dev/null +++ b/themes/staark/patterns/local-business-proof.php @@ -0,0 +1,20 @@ + + +
+ +
+
Lokalt förankradeVi finns nära våra kunder och känner området.
+
Tydlig offertDu vet vad som ingår innan arbetet börjar.
+
Personlig kontaktDu får en riktig kontaktväg när frågor uppstår.
+
Trygg leveransFokus på kvalitet, ordning och uppföljning.
+
+ +
+ diff --git a/themes/staark/patterns/local-business-reviews.php b/themes/staark/patterns/local-business-reviews.php new file mode 100644 index 0000000..a4914bb --- /dev/null +++ b/themes/staark/patterns/local-business-reviews.php @@ -0,0 +1,28 @@ + + +
+ +
+
+
+

Kundernas ord

+

Förtroende byggs ett jobb i taget.

+
+

Byt exempeltexterna mot verifierade omdömen från kunden innan publicering.

+
+
+

★★★★★

“Snabb återkoppling, tydlig kommunikation och ett resultat som blev precis som vi hade tänkt oss.”
Exempelomdöme · ersätt före publicering
+

★★★★★

“Vi fick hjälp hela vägen och visste hela tiden vad nästa steg var. Väldigt smidigt.”
Exempelomdöme · ersätt före publicering
+

★★★★★

“Professionellt bemötande och bra ordning från första kontakt till färdigt arbete.”
Exempelomdöme · ersätt före publicering
+
+
+ +
+ diff --git a/themes/staark/patterns/local-business-services.php b/themes/staark/patterns/local-business-services.php new file mode 100644 index 0000000..0a17383 --- /dev/null +++ b/themes/staark/patterns/local-business-services.php @@ -0,0 +1,28 @@ + + +
+ +
+
+
+

Våra tjänster

+

Praktisk hjälp, utan krångel.

+
+

Byt rubrikerna nedan mot företagets viktigaste tjänster. Strukturen är byggd för att kunden snabbt ska förstå vad ni gör och hur man går vidare.

+
+
+

01

Huvudtjänst

Beskriv den vanligaste tjänsten kort och konkret, med fokus på kundens behov och resultatet.

+

02

Service & underhåll

En återkommande tjänst passar bra här — exempelvis underhåll, felsökning eller löpande hjälp.

+

03

Projekt & offert

För större jobb: förklara hur kunden får en bedömning, offert och tydlig plan innan start.

+
+
+ +
+ diff --git a/themes/staark/presets/local-business.json b/themes/staark/presets/local-business.json new file mode 100644 index 0000000..96ca252 --- /dev/null +++ b/themes/staark/presets/local-business.json @@ -0,0 +1,47 @@ +{ + "id": "local-business", + "name": "Local Business", + "description": "Conversion-first starter direction for Swedish local service companies: clear offers, trust signals, strong contact paths and an editorial display typeface.", + "version": 1, + "tokens": { + "colors": { + "ink": "#17212B", + "muted": "#5C6874", + "line": "#D9DED9", + "paper": "#F8F7F2", + "surface": "#EAEFE9", + "white": "#FFFFFF", + "primary": "#C64E2C", + "primaryDark": "#92361F", + "primarySoft": "#FFF0EA", + "success": "#187A58", + "forest": "#17362F", + "forestDeep": "#102722", + "gold": "#D3A23A" + }, + "typography": { + "body": "Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, \"Segoe UI\", sans-serif", + "display": "Georgia, \"Times New Roman\", serif", + "displayWeight": "700" + }, + "radius": { + "sm": "8px", + "md": "14px", + "lg": "22px", + "button": "999px" + }, + "layout": { + "content": "760px", + "wide": "1280px", + "wrap": "1360px" + } + }, + "components": { + "header": "solid", + "buttons": "pill", + "cards": "outlined", + "hero": "offer", + "footer": "deep" + }, + "stylesheet": "" +} diff --git a/themes/staark/style.css b/themes/staark/style.css index b087354..6b3e96e 100644 --- a/themes/staark/style.css +++ b/themes/staark/style.css @@ -4,7 +4,7 @@ Theme URI: https://staarkinc.com Author: Staark Inc. Author URI: https://staarkinc.com Description: Light block theme for sites managed with Staark Hub. Includes native patterns, branding and contact form integration. -Version: 0.6.5 +Version: 0.6.5.2 Requires at least: 6.6 Requires PHP: 8.1 Text Domain: staark diff --git a/themes/staark/templates/front-page.html b/themes/staark/templates/front-page.html index 1a65998..bda4205 100644 --- a/themes/staark/templates/front-page.html +++ b/themes/staark/templates/front-page.html @@ -2,14 +2,7 @@
- - - - - - - - +