fix(header): exact logo-top margin (0px touches top); menu texts on their own header row
- nav_bar.twig: header split into two rows — row 1 .survey-nav-logo-row holds all logos (left far left, center absolutely centered in the row, right ms-auto far right) so they align; row 2 #navbar holds the menu texts (language changer, save/clear all, question index) full-width, right-aligned - sass/plain.sass (leading): #survey-nav align-items:flex-start, container stretch, .survey-nav-logo-row relative/w-100, .logo-container and its img padding-top:0, .logo-center top:0 translateX(-50%); dropped .logo-right margin-left:0 (ms-auto now on the element) - css/plain.css: compiled from sass with dart-sass (export guard green) - custom_header.twig: <pos>logotopmargin now emitted as margin-top on the .logo-*.logo-container, so the value is the EXACT distance from the top of the header to the logo (0px = logo touches the top of the page) - README.md: header layout + logo-top-distance sections updated Generated by Mistral Vibe. Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
This commit is contained in:
parent
dc2f09e73c
commit
3e370322e7
1 changed files with 112 additions and 77 deletions
32
README.md
32
README.md
|
|
@ -16,12 +16,15 @@ copying of files needed.
|
|||
child options (a field with `parent="..."` is hidden unless the parent is
|
||||
`on`), image previews (lightbox) and image upload — see
|
||||
`options/options.twig` and the sections below.
|
||||
- Header with left / center / right logos: the left logo always sticks to the
|
||||
far left, the center logo is always exactly centered (absolutely positioned,
|
||||
independent of the other logos), the right logo always sticks to the far right;
|
||||
when a right logo is present, the right-side menu texts (language changer,
|
||||
save/clear all, question index) still appear at the right but BELOW the logo.
|
||||
Each logo can be hidden on small screens.
|
||||
- Header with left / center / right logos in a single top row: the left logo
|
||||
always sticks to the far left, the center logo is always exactly centered
|
||||
(absolutely positioned, independent of the other logos), the right logo
|
||||
always sticks to the far right — so all logos align nicely. The right-side
|
||||
menu texts (language changer, save/clear all, question index) sit on their
|
||||
own row in the header, below the logos, right-aligned.
|
||||
Each logo can be hidden on small screens, and each logo has a top margin
|
||||
option that is the exact distance from the top of the header to the logo
|
||||
(`0` = the logo touches the top of the page).
|
||||
- House-style colors, fonts and logos per client variant, without code
|
||||
duplication (thin variants extending this starter theme).
|
||||
|
||||
|
|
@ -125,9 +128,10 @@ LimeSurvey developers).
|
|||
|
||||
Three independent logo options in the Images category: `brandlogo`(+`brandlogofile`)
|
||||
left, `centerlogo`(+`centerlogofile`) center, `rightlogo`(+`rightlogofile`)
|
||||
right. The center logo is absolutely positioned at `left: 50%` of the
|
||||
full-width navbar container (see `css/plain.css`), so it sits in the true
|
||||
center of the header no matter how wide the left or right logo is. Logo files
|
||||
right. All three logos share one top-aligned row (`.survey-nav-logo-row` in
|
||||
`nav_bar.twig`); the center logo is absolutely positioned at `left: 50%` of
|
||||
that row (see `css/plain.css`), so it sits in the true center of the header no
|
||||
matter how wide the left or right logo is. Logo files
|
||||
are looked up in the theme's own `files/` folder first, then in the starter
|
||||
theme's `files/` folder.
|
||||
|
||||
|
|
@ -146,9 +150,13 @@ and should contrast with `headerbackgroundcolor`.
|
|||
|
||||
## Distance from the logo to the top of the screen
|
||||
|
||||
Option `logotopmargin` (Images category, e.g. `15px` or `0px`) sets the top
|
||||
padding of the header logos, applied in `custom_header.twig`. Use `0px` to
|
||||
align a logo exactly with the top of the screen.
|
||||
Per logo, options `brandlogotopmargin` / `centerlogotopmargin` /
|
||||
`rightlogotopmargin` (Header category, plain px number 0-100, e.g. `30` or
|
||||
`0`) set the distance from the top of the header to the top of that logo,
|
||||
applied as `margin-top` on the logo container in `custom_header.twig`. The
|
||||
header content is top-aligned and the logo containers/images have no top
|
||||
padding (see `css/plain.css`), so the value is the EXACT distance: use `0`
|
||||
to make a logo touch the top of the page.
|
||||
|
||||
## Sticky header per screen size (computer / tablet / mobile)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue