Skip to content

Commit 2d555b1

Browse files
committed
Match values to the language picker and unclutter the mobile masthead
Show only the language-matched AI lede. Many items now carry bibo:shortDescription twice, once tagged "fr" and once "en", and both were printing on every page -- a row doubled with a translation of itself. Narrow the property to the site's language when it has a value there; a lede with no match, or none tagged, still renders in full. Scoped to a named term list, not applied wholesale: dcterms:description and dcterms:alternative also come in fr/en pairs, but there a second language can be genuine source metadata. Compare primary subtags rather than whole strings while in there. The English site's locale is "en-US" but its values are tagged "en", so core's exact strcasecmp could never match them -- turning on the filter_locale_values site setting would have hidden every English value. Stop the mobile wordmark shrinking below the acronym it shows. At 375px the box was squeezed to 53px for a mark needing 66px, clipping "IWAC" to "IW...". `ch` cannot express that floor: it resolves against the wrapper's inherited body font, not the anchor's Besley 800 at --text-lg plus display tracking. Size to content instead and let the search box, the designed flexible member of the tools row, give up the difference. Scoped with :has() so a site with no acronym set keeps shrinking rather than pushing the hamburger off-canvas. Move the PWA install button to the footer. It was the fifth control in a row that already carries search, language, theme and the hamburger. Installing is a once-ever action, so it sits in the footer bottom bar beside the social links, wearing their chrome and carrying a visible label instead of a bare download glyph. The iOS hint now opens upward and takes max-content width -- anchored to a ~113px button it had been wrapping two words per line. Bump the theme version to 2.9.8.
1 parent 46cb195 commit 2d555b1

16 files changed

Lines changed: 263 additions & 105 deletions

File tree

CITATION.cff

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ authors:
2727
given-names: Frédérick
2828
orcid: "https://orcid.org/0000-0003-0959-2092"
2929
affiliation: "University of Bayreuth"
30-
version: "2.9.7"
31-
date-released: "2026-08-06"
30+
version: "2.9.8"
31+
date-released: "2026-08-07"
3232
license: GPL-3.0-or-later
3333
repository-code: "https://github.com/fmadore/IWAC-theme"
3434
url: "https://islam.zmo.de/s/westafrica/"

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ This is a customized Omeka S theme for the [Islam West Africa Collection](https:
2121

2222
### Installable PWA
2323
- Each site is installable as an app ("Add to Home Screen" / desktop "Install") with a brand icon
24-
- Quiet install button in the masthead**no auto-popup**; it only appears when the browser can install
24+
- Quiet install button in the footer bottom bar**no auto-popup**; it only appears when the browser can install
2525
- iOS Safari gets a click-only "Share → Add to Home Screen" hint
2626
- Per-site web-app manifest (name, icons, theme color, Browse/Search shortcuts) built at runtime
2727
- Toggle off via **General Settings → Enable PWA**. See [`docs/PWA.md`](docs/PWA.md)
@@ -64,7 +64,7 @@ npm install
6464
### General Settings
6565
- **Primary Color** - The theme's primary brand color (default: `#E64A19`, IWAC Burnt Orange). Every primary variant (hover, active, focus ring, glows, blockquote) and the data-visualization sequential ramps derive from it via `color-mix(in oklab, …)`. Automatically adapts for dark mode.
6666
- **Secondary Color** - A second, **non-brand** color used only for data visualizations — chart series 2 and corpus comparison in the IwacVisualizations module (default: `#394f68`, slate blue). Not used for buttons, links, or focus. See [`docs/DESIGN-SYSTEM.md`](docs/DESIGN-SYSTEM.md).
67-
- **Enable PWA (installable app)** - Adds the web app manifest, icons, and the masthead install button so visitors can install the site as an app. Default on. See [`docs/PWA.md`](docs/PWA.md).
67+
- **Enable PWA (installable app)** - Adds the web app manifest, icons, and the footer install button so visitors can install the site as an app. Default on. See [`docs/PWA.md`](docs/PWA.md).
6868

6969
### Top Navigation Depth
7070
Maximum number of levels to show in the site's top navigation bar. Set to 0 to show all levels.

asset/css/style.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

asset/sass/abstracts/mixins/_mixins.scss

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -171,9 +171,10 @@
171171

172172
// ==========================================================================
173173
// Masthead icon button
174-
// The quiet round utility control in the masthead row (theme toggle,
175-
// PWA install). Also styles its `&__icon` child; the component decides the
176-
// icon's display (the theme toggle shows one of three icons via CSS).
174+
// The quiet round utility control in the masthead row (the theme toggle; the
175+
// PWA install button used this too before it moved to the footer). Also styles
176+
// its `&__icon` child; the component decides the icon's display (the theme
177+
// toggle shows one of three icons via CSS).
177178
// ==========================================================================
178179
@mixin masthead-icon-button {
179180
display: inline-flex;

asset/sass/components/_components.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
--------------------------------------------- */
1010
@forward "header/header";
1111
@forward "header/theme-toggle";
12-
@forward "header/pwa-install";
1312
@forward "header/language-switcher";
1413

1514
/* Navigation
@@ -111,3 +110,4 @@
111110
/* Footer
112111
--------------------------------------------- */
113112
@forward "footer/footer";
113+
@forward "footer/pwa-install";
Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
@use "../../abstracts/abstracts" as *;
2+
3+
// ==========================================================================
4+
// PWA Install
5+
// Footer "install app" control + iOS add-to-home-screen hint.
6+
//
7+
// It used to sit in the masthead, but on a 375px phone that row already
8+
// carries search, language, theme and the hamburger — a fifth control left
9+
// the wordmark too little width. Installing happens once, so it belongs with
10+
// the other once-in-a-while footer affordances, where there is room to label
11+
// it rather than leave a bare download glyph to be guessed at.
12+
//
13+
// Borrows the footer social links' quiet chrome (same box, same border and
14+
// hover) so the bottom bar reads as one row. Stays hidden (the [hidden]
15+
// attribute) until js/pwa-install.js confirms installability.
16+
// ==========================================================================
17+
18+
.pwa-install {
19+
align-items: center;
20+
justify-content: center;
21+
gap: var(--space-2);
22+
height: var(--size-control-md);
23+
padding-inline: var(--space-3);
24+
background: transparent;
25+
border: 1px solid var(--footer-divider);
26+
border-radius: var(--radius-sm);
27+
color: var(--footer-text);
28+
font-family: var(--font-body);
29+
font-size: var(--text-xs);
30+
line-height: 1;
31+
// Every <button> inherits the global base style (_buttons.scss): radius,
32+
// --glow-sm and a hover lift. Reset the halo and the bounce so this reads
33+
// as the flat outlined control its social-link neighbours are.
34+
box-shadow: none;
35+
transition:
36+
border-color var(--transition-fast),
37+
color var(--transition-fast),
38+
background-color var(--transition-fast);
39+
40+
// `hidden` must win even though we set a display — scope display to the
41+
// not-hidden state so the attribute keeps the button out of flow.
42+
display: none;
43+
44+
&:not([hidden]) {
45+
display: inline-flex;
46+
}
47+
48+
&:hover {
49+
background: color-mix(in oklab, var(--footer-text) 8%, transparent);
50+
border-color: var(--primary);
51+
color: var(--primary);
52+
box-shadow: none;
53+
transform: none;
54+
}
55+
56+
&__icon {
57+
display: flex;
58+
}
59+
60+
// iOS hint popover — opens *upward* from the footer control (in the
61+
// masthead it dropped down), so it never pushes past the page bottom.
62+
//
63+
// `width: max-content` is load-bearing: an absolutely-positioned box
64+
// shrink-to-fits inside its containing block, so without it the popover
65+
// inherited the ~113px width of its anchor and wrapped one or two words
66+
// per line. It grows leftward from the anchor's inline-end edge, capped
67+
// against the viewport rather than the anchor.
68+
&__hint {
69+
position: absolute;
70+
bottom: calc(100% + var(--space-2));
71+
inset-inline-end: 0;
72+
z-index: var(--z-tooltip);
73+
width: max-content;
74+
max-width: min(20rem, calc(100vw - var(--space-8)));
75+
padding: var(--space-3) var(--space-4);
76+
background: var(--surface);
77+
color: var(--ink);
78+
border: 1px solid var(--border);
79+
border-radius: var(--radius-md);
80+
box-shadow: var(--shadow-md);
81+
font-family: var(--font-body);
82+
font-size: var(--text-sm);
83+
line-height: var(--line-height-normal);
84+
text-align: start;
85+
}
86+
}
87+
88+
// Anchor for the absolutely-positioned iOS hint (the hint is inserted as a
89+
// sibling of the button inside this wrapper).
90+
.main-footer__install {
91+
position: relative;
92+
display: flex;
93+
justify-content: center;
94+
flex-shrink: 0;
95+
// Below $lg the bottom bar is a centred column: stretch the wrapper across
96+
// the row so the hint, anchored to its inline-end, has the full row width
97+
// to open leftward into and can't run off the screen edge.
98+
align-self: stretch;
99+
100+
// Desktop: sit with the social cluster at the end of the bottom bar
101+
// (copyright keeps order 0 and stays first).
102+
@media (min-width: $lg) {
103+
order: 2;
104+
align-self: auto;
105+
}
106+
}

asset/sass/components/header/_header.scss

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,24 @@
5555

5656
@media (max-width: #{$sm - 0.02px}) {
5757
min-width: 5ch;
58+
59+
// Once the wordmark is down to a four-letter acronym it has
60+
// nothing left to give, so take it out of the shrink pool: at
61+
// 375px the box was squeezed to 53px for a mark needing 66px and
62+
// "IWAC" clipped to "IW…". `ch` can't express that floor — it
63+
// resolves against this div's inherited body font, not the
64+
// anchor's Besley 800 at --text-lg plus display tracking — so
65+
// size to content and let the search box, the designed flexible
66+
// member of the tools row, give up the difference (it lands at
67+
// ~145px, well clear of its 4.5rem cap).
68+
//
69+
// Scoped to the acronym case: without the setting the full title
70+
// is the visible mark, and an unshrinkable one would push the
71+
// hamburger off-canvas — the very thing __tools guards against.
72+
&:has(.main-header__site-title-acronym) {
73+
flex: 0 0 auto;
74+
min-width: 0;
75+
}
5876
}
5977

6078
// Acronym wordmark on narrow screens (admin setting

asset/sass/components/header/_pwa-install.scss

Lines changed: 0 additions & 48 deletions
This file was deleted.

config/theme.ini

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[info]
22
name = "IWAC Theme"
3-
version = "2.9.7"
3+
version = "2.9.8"
44
author = "Frédérick Madore"
55
description = "Islam West Africa Collection Theme - A customized Omeka S theme for the IWAC digital collection at ZMO Berlin. Features light/dark mode toggle and multilingual support."
66
theme_link = "https://github.com/fmadore/IWAC-theme"
@@ -39,7 +39,7 @@ elements.pwa_enabled.name = "pwa_enabled"
3939
elements.pwa_enabled.attributes.id = "pwa_enabled"
4040
elements.pwa_enabled.type = "Checkbox"
4141
elements.pwa_enabled.options.label = "Enable PWA (installable app)"
42-
elements.pwa_enabled.options.info = "Adds a web app manifest, icons and an install button in the header so visitors can install the site as an app (Add to Home Screen). No pop-up — the install button only appears when the browser supports installing. Uses the site title as the app name (and the masthead acronym, if set, as the short name)."
42+
elements.pwa_enabled.options.info = "Adds a web app manifest, icons and an install button in the footer so visitors can install the site as an app (Add to Home Screen). No pop-up — the install button only appears when the browser supports installing. Uses the site title as the app name (and the masthead acronym, if set, as the short name)."
4343
elements.pwa_enabled.attributes.value = 1
4444
elements.pwa_enabled.options.element_group = "general"
4545

docs/PWA.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,29 @@
22

33
The theme makes each Omeka S site **installable** as an app — "Add to Home
44
Screen" on mobile, "Install" in the desktop browser — with a brand icon and a
5-
quiet install button in the masthead. There is **no auto-popup**: the button
5+
quiet install button in the footer. There is **no auto-popup**: the button
66
only appears when the browser can actually install the site.
77

8+
The button sat in the masthead until it was moved. On a 375px phone that row already
9+
carries search, language, theme and the hamburger, and a fifth control squeezed
10+
the wordmark to "IW…". Installing is a once-ever action, so it moved to the
11+
footer bottom bar beside the social links, where there is room to label it
12+
rather than leave a bare download glyph to be guessed at.
13+
814
## What ships
915

1016
| Piece | File |
1117
|-------|------|
1218
| Per-site web-app manifest (built at runtime) | `view/layout/layout.phtml` (JSON island) + `asset/js/pwa-install.js` |
13-
| Install button + iOS hint | `view/common/header.phtml`, `asset/sass/components/header/_pwa-install.scss` |
19+
| Install button + iOS hint | `view/common/footer.phtml`, `asset/sass/components/footer/_pwa-install.scss` |
1420
| Icons (app / maskable / monochrome / Apple / favicons) | `asset/img/pwa/*.png` |
1521
| Icon generator | `scripts/gen-pwa-icons.js` (`npm run build:icons`) |
1622
| Enable/disable toggle | `config/theme.ini`**General Settings → Enable PWA** (default on) |
1723

1824
## How it behaves
1925

2026
- **Chromium (desktop + Android).** The browser fires `beforeinstallprompt`;
21-
the script suppresses the default mini-infobar and reveals the masthead
27+
the script suppresses the default mini-infobar and reveals the footer
2228
install button instead. Clicking it shows the native install prompt.
2329
- **iOS Safari.** No programmatic install exists, so the same button reveals a
2430
short, dismissible "Share → Add to Home Screen" hint (still click-only).

0 commit comments

Comments
 (0)