fix(marketing): button macro safety + placeholder assets + mobile login
- Button macro: variants/sizes use .get() with primary/md fallback (no KeyError), add as_button=True parameter for form submit CTAs (forms in B-2.2 signup, B-2.7 checkout) - Header: drop hidden sm:inline-block on Connexion link so login is always visible from mobile (avoids UX dead-end before A-2.7 hamburger lands) - Add placeholder static/images/favicon.svg (brand gradient + 'D') - Add placeholder 1x1 PNG static/images/og/og-default.png (replaced in A-3.3 with real 1200x630 branded OG image)
This commit is contained in:
File diff suppressed because one or more lines are too long
11
static/images/favicon.svg
Normal file
11
static/images/favicon.svg
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64">
|
||||||
|
<defs>
|
||||||
|
<linearGradient id="g" x1="0" y1="0" x2="1" y2="1">
|
||||||
|
<stop offset="0%" stop-color="#0062ff"/>
|
||||||
|
<stop offset="52%" stop-color="#00bdd8"/>
|
||||||
|
<stop offset="100%" stop-color="#00c896"/>
|
||||||
|
</linearGradient>
|
||||||
|
</defs>
|
||||||
|
<rect width="64" height="64" rx="14" fill="url(#g)"/>
|
||||||
|
<text x="32" y="46" text-anchor="middle" font-family="Inter, system-ui, sans-serif" font-weight="900" font-size="40" fill="#fff">D</text>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 505 B |
BIN
static/images/og/og-default.png
Normal file
BIN
static/images/og/og-default.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 70 B |
@@ -1,15 +1,24 @@
|
|||||||
{# Reusable button macro — primary (gradient + glow), secondary (white outline), ghost (transparent on dark) #}
|
{# Reusable button macro. Variants: primary | secondary | ghost (default: primary). Sizes: sm | md | lg (default: md). #}
|
||||||
{%- macro button(text, href='#', variant='primary', size='md', icon=None, target=None, rel=None) -%}
|
{%- macro button(text, href='#', variant='primary', size='md', icon=None, target=None, rel=None, as_button=False, type='button') -%}
|
||||||
{%- set classes = {
|
{%- set variants = {
|
||||||
'primary': 'grad-bg shadow-cta hover:shadow-cta-hover hover:-translate-y-px',
|
'primary': 'grad-bg shadow-cta hover:shadow-cta-hover hover:-translate-y-px',
|
||||||
'secondary': 'bg-white text-brand-navy border border-brand-border hover:bg-brand-bg',
|
'secondary': 'bg-white text-brand-navy border border-brand-border hover:bg-brand-bg',
|
||||||
'ghost': 'text-white border border-white/[0.08] hover:bg-white/[0.05]'
|
'ghost': 'text-white border border-white/[0.08] hover:bg-white/[0.05]'
|
||||||
}[variant] -%}
|
} -%}
|
||||||
{%- set sizing = {
|
{%- set sizes = {
|
||||||
'sm': 'px-3 py-1.5 text-sm',
|
'sm': 'px-3 py-1.5 text-sm',
|
||||||
'md': 'px-5 py-2.5 text-[15px]',
|
'md': 'px-5 py-2.5 text-[15px]',
|
||||||
'lg': 'px-6 py-3 text-base'
|
'lg': 'px-6 py-3 text-base'
|
||||||
}[size] -%}
|
} -%}
|
||||||
|
{%- set classes = variants.get(variant, variants['primary']) -%}
|
||||||
|
{%- set sizing = sizes.get(size, sizes['md']) -%}
|
||||||
|
{%- if as_button -%}
|
||||||
|
<button type="{{ type }}"
|
||||||
|
class="inline-flex items-center justify-center gap-2 rounded-[0.75rem] font-semibold transition-all duration-200 {{ classes }} {{ sizing }}">
|
||||||
|
<span>{{ text }}</span>
|
||||||
|
{%- if icon -%}<span class="ml-0.5" aria-hidden="true">{{ icon | safe }}</span>{%- endif -%}
|
||||||
|
</button>
|
||||||
|
{%- else -%}
|
||||||
<a href="{{ href }}"
|
<a href="{{ href }}"
|
||||||
class="inline-flex items-center justify-center gap-2 rounded-[0.75rem] font-semibold transition-all duration-200 {{ classes }} {{ sizing }}"
|
class="inline-flex items-center justify-center gap-2 rounded-[0.75rem] font-semibold transition-all duration-200 {{ classes }} {{ sizing }}"
|
||||||
{% if target %}target="{{ target }}"{% endif %}
|
{% if target %}target="{{ target }}"{% endif %}
|
||||||
@@ -17,4 +26,5 @@
|
|||||||
<span>{{ text }}</span>
|
<span>{{ text }}</span>
|
||||||
{%- if icon -%}<span class="ml-0.5" aria-hidden="true">{{ icon | safe }}</span>{%- endif -%}
|
{%- if icon -%}<span class="ml-0.5" aria-hidden="true">{{ icon | safe }}</span>{%- endif -%}
|
||||||
</a>
|
</a>
|
||||||
|
{%- endif -%}
|
||||||
{%- endmacro -%}
|
{%- endmacro -%}
|
||||||
|
|||||||
@@ -51,7 +51,7 @@
|
|||||||
</nav>
|
</nav>
|
||||||
|
|
||||||
<div class="flex items-center gap-3">
|
<div class="flex items-center gap-3">
|
||||||
<a href="/login" class="hidden sm:inline-block text-sm font-medium text-white/80 hover:text-white">Connexion</a>
|
<a href="/login" class="text-sm font-medium text-white/80 hover:text-white">Connexion</a>
|
||||||
{% from 'macros/button.html' import button %}
|
{% from 'macros/button.html' import button %}
|
||||||
{{ button('Démarrer →', href='/signup', variant='primary', size='sm') }}
|
{{ button('Démarrer →', href='/signup', variant='primary', size='sm') }}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user