mirror of
git://f0xx.org/android_cast
synced 2026-07-29 04:38:53 +03:00
wg start
This commit is contained in:
@@ -30,7 +30,8 @@ When `left` is null, the left column is built from `copyright_symbol`, `holder`,
|
||||
| `copyright_symbol` | `©` (U+00A9) or empty |
|
||||
| `show_year` | Append year / range on default left |
|
||||
| `year` | Fixed end year, or `null` for current |
|
||||
| `year_start` | If set (e.g. `2026`), shows `2026–{current}` |
|
||||
| `year_start` | Start year (integer). With `year_through_current` → `2026 - current`; else range `2026–{end}` |
|
||||
| `year_through_current` | If true with `year_start`, year label is `{start} - current` (not a rolling end year) |
|
||||
| `use_i18n` | `data-i18n` on auto-built left column |
|
||||
| `footer_class` | Extra CSS class (always adds `platform-footer`) |
|
||||
|
||||
|
||||
@@ -25,9 +25,10 @@ return [
|
||||
'show_year' => true,
|
||||
// null = current calendar year at render time (end of range).
|
||||
'year' => null,
|
||||
// Set e.g. 2026 for "2026–{current}" (en dash). Omit for single year only.
|
||||
'year_start' => "2026 - current",
|
||||
# 'year_start' => null,
|
||||
// Integer start year. With year_through_current: "2026 - current" (literal suffix).
|
||||
// Without it: "2026–2027" range (en dash) or lone "2026" when start equals end year.
|
||||
'year_start' => 2026,
|
||||
'year_through_current' => true,
|
||||
|
||||
// CSS class on <footer> (platform-footer layout classes are always added).
|
||||
'footer_class' => 'bottom-bar',
|
||||
|
||||
@@ -53,6 +53,9 @@ function platform_footer_year_label(array $cfg): string
|
||||
$end = platform_footer_year_end($cfg);
|
||||
$start = isset($cfg['year_start']) ? (int) $cfg['year_start'] : 0;
|
||||
if ($start > 0) {
|
||||
if (!empty($cfg['year_through_current'])) {
|
||||
return $start . ' - current';
|
||||
}
|
||||
if ($start === $end) {
|
||||
return (string) $start;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user