1
0
mirror of git://f0xx.org/ac/ac-platform-php synced 2026-07-29 02:58:38 +03:00
This commit is contained in:
Anton Afanasyeu
2026-06-23 12:29:28 +02:00
commit f4b39bea26
11 changed files with 2095 additions and 0 deletions

57
platform/README.md Normal file
View File

@@ -0,0 +1,57 @@
# Shared platform pieces
## Footer (`footer.php`)
Flexible site-wide footer for hub, crashes, tickets, graphs, and builder consoles.
**Configure:** edit `footer.config.php` (copy from `footer.config.example.php`).
### Layout
```
┌─────────────────────────────────────────────┐
│ top (optional, full width) │
├──────────────────────────┬──────────────────┤
│ left (optional / auto) │ right (optional) │
├──────────────────────────┴──────────────────┤
│ bottom (optional, full width) │
└─────────────────────────────────────────────┘
```
When `left` is null, the left column is built from `copyright_symbol`, `holder`, and year settings.
| Key | Purpose |
|-----|---------|
| `top` | Full-width line above main row (`null` = hidden) |
| `left` | Main left text; `null` = auto copyright line |
| `right` | Main right text (e.g. build id, links) |
| `bottom` | Full-width line below main row |
| `holder` | Copyright name (default left) |
| `copyright_symbol` | `©` (U+00A9) or empty |
| `show_year` | Append year / range on default left |
| `year` | Fixed end year, or `null` for 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`) |
**Per-page override** when rendering:
```php
platform_render_footer([
'right' => 'OTA: staging',
'bottom' => 'Internal only',
]);
```
**In PHP views:** `<?php platform_render_footer(); ?>` (loaded via each app `bootstrap.php`).
**Hub:** `examples/app_hub/index.php` (landing nginx runs it through PHP-FPM).
**Static HTML export:**
```bash
php examples/platform/scripts/render-footer-html.php
```
**Gitea** (`/git/`) uses the upstream Gitea UI; this footer does not apply there unless you customize Gitea templates separately.