diff --git a/examples/app_hub/DEPLOY.md b/examples/app_hub/DEPLOY.md index 83b3a22..d13766b 100644 --- a/examples/app_hub/DEPLOY.md +++ b/examples/app_hub/DEPLOY.md @@ -16,9 +16,13 @@ Browser → apps.f0xx.org (Gentoo FE, TLS) On FE, hub and (if you fix it) crashes should both target **`http://artc0.intra.raptor.org:80`**, same as `location /`. -## 1. `index.html` + hub assets +## 1. Hub entry (`index.php`) + assets + +Landing uses **`index.php`** (shared footer from `examples/platform/footer.config.php`). Copy **`index.html`** only as a redirect fallback. ```bash +cp .../android_cast/examples/app_hub/index.php \ + .../htdocs/apps/app/androidcast_project/index.php cp .../android_cast/examples/app_hub/index.html \ .../htdocs/apps/app/androidcast_project/index.html cp .../android_cast/examples/app_hub/hub.css \ @@ -68,7 +72,7 @@ Use prefix location for the hub (not `alias` to a single file): ```nginx location /app/androidcast_project/ { alias /var/www/localhost/htdocs/apps/app/androidcast_project/; - index index.html; + index index.php index.html; } ``` diff --git a/examples/app_hub/index.html b/examples/app_hub/index.html index 55f0ae7..16f891d 100644 --- a/examples/app_hub/index.html +++ b/examples/app_hub/index.html @@ -1,1090 +1 @@ - - - - - - Android Cast — Project hub - - - - - - - - - - - - - -
-
-
-
- - - - - - -
-
EUROPE/WARSAW
-
WED 27 MAY 2026
-
- -
-
-
- -
-
-
-
- -
-

Android Cast

- -
-
-

Project hub

- -
-
-
- - - - - - +Redirect

Continue

diff --git a/examples/app_hub/index.php b/examples/app_hub/index.php new file mode 100644 index 0000000..8d495ae --- /dev/null +++ b/examples/app_hub/index.php @@ -0,0 +1,1093 @@ + + + + + + + Android Cast — Project hub + + + + + + + + + + + + + +
+
+
+
+ + + + + + +
+
EUROPE/WARSAW
+
WED 27 MAY 2026
+
+ +
+
+
+ +
+
+
+
+ +
+

Android Cast

+ +
+
+

Project hub

+ +
+
+
+ + false]); ?> + + + + diff --git a/examples/build_console/backend/src/bootstrap.php b/examples/build_console/backend/src/bootstrap.php index 73fa5aa..241ff3e 100644 --- a/examples/build_console/backend/src/bootstrap.php +++ b/examples/build_console/backend/src/bootstrap.php @@ -3,6 +3,7 @@ declare(strict_types=1); $examplesRoot = dirname(__DIR__, 3); require_once $examplesRoot . '/platform/shared_session.php'; +require_once $examplesRoot . '/platform/footer.php'; $crashSrc = $examplesRoot . '/crash_reporter/backend/src'; $configPath = __DIR__ . '/../config/config.php'; diff --git a/examples/build_console/backend/views/layout.php b/examples/build_console/backend/views/layout.php index 0c7b94c..f1a22c8 100644 --- a/examples/build_console/backend/views/layout.php +++ b/examples/build_console/backend/views/layout.php @@ -53,6 +53,6 @@ $links = cfg('links', []); - + diff --git a/examples/build_console/backend/views/login.php b/examples/build_console/backend/views/login.php index a3141ba..59c0c7a 100644 --- a/examples/build_console/backend/views/login.php +++ b/examples/build_console/backend/views/login.php @@ -21,5 +21,6 @@ $ab = assets_base(); + diff --git a/examples/crash_reporter/backend/nginx.apps-port80.fragment b/examples/crash_reporter/backend/nginx.apps-port80.fragment index 0584f3e..7daa09c 100644 --- a/examples/crash_reporter/backend/nginx.apps-port80.fragment +++ b/examples/crash_reporter/backend/nginx.apps-port80.fragment @@ -9,9 +9,21 @@ server { return 301 /app/androidcast_project/; } + location = /app/androidcast_project/index.php { + include fastcgi_params; + fastcgi_pass unix:/run/php-fpm.socket; + fastcgi_param SCRIPT_FILENAME /var/www/localhost/htdocs/apps/app/androidcast_project/index.php; + fastcgi_param SCRIPT_NAME /app/androidcast_project/index.php; + } + + location = /app/androidcast_project/ { + rewrite ^ /app/androidcast_project/index.php last; + } + location /app/androidcast_project/ { alias /var/www/localhost/htdocs/apps/app/androidcast_project/; - index index.html; + index index.php index.html; + try_files $uri $uri/ =404; } location = /app/androidcast_project/crashes { diff --git a/examples/crash_reporter/backend/nginx.apps.conf.fragment b/examples/crash_reporter/backend/nginx.apps.conf.fragment index 620be89..5c0242c 100644 --- a/examples/crash_reporter/backend/nginx.apps.conf.fragment +++ b/examples/crash_reporter/backend/nginx.apps.conf.fragment @@ -13,10 +13,22 @@ return 301 /app/androidcast_project/; } - # Hub — live vhost is listen 80 on BE (see nginx.apps-port80.fragment). Not :8089. + # Hub — see nginx.apps-port80.fragment (index.php + shared footer). + location = /app/androidcast_project/index.php { + include fastcgi_params; + fastcgi_pass unix:/run/php-fpm.socket; + fastcgi_param SCRIPT_FILENAME /var/www/localhost/htdocs/apps/app/androidcast_project/index.php; + fastcgi_param SCRIPT_NAME /app/androidcast_project/index.php; + } + + location = /app/androidcast_project/ { + rewrite ^ /app/androidcast_project/index.php last; + } + location /app/androidcast_project/ { alias /var/www/localhost/htdocs/apps/app/androidcast_project/; - index index.html; + index index.php index.html; + try_files $uri $uri/ =404; } location ^~ /app/androidcast_project/crashes/assets/ { diff --git a/examples/crash_reporter/backend/nginx.vm.conf b/examples/crash_reporter/backend/nginx.vm.conf index 8f9208c..48d1ce1 100644 --- a/examples/crash_reporter/backend/nginx.vm.conf +++ b/examples/crash_reporter/backend/nginx.vm.conf @@ -30,9 +30,21 @@ server { return 301 /app/androidcast_project/; } + location = /app/androidcast_project/index.php { + include fastcgi_params; + fastcgi_pass unix:/run/php-fpm.socket; + fastcgi_param SCRIPT_FILENAME /var/www/localhost/htdocs/apps/app/androidcast_project/index.php; + fastcgi_param SCRIPT_NAME /app/androidcast_project/index.php; + } + location = /app/androidcast_project/ { + rewrite ^ /app/androidcast_project/index.php last; + } + + location /app/androidcast_project/ { alias /var/www/localhost/htdocs/apps/app/androidcast_project/; - index index.html; + index index.php index.html; + try_files $uri $uri/ =404; } location ^~ /app/androidcast_project/crashes/assets/ { diff --git a/examples/crash_reporter/backend/src/bootstrap.php b/examples/crash_reporter/backend/src/bootstrap.php index a6baf8a..1933b6a 100644 --- a/examples/crash_reporter/backend/src/bootstrap.php +++ b/examples/crash_reporter/backend/src/bootstrap.php @@ -13,6 +13,7 @@ declare(strict_types=1); require_once dirname(__DIR__, 3) . '/platform/shared_session.php'; +require_once dirname(__DIR__, 3) . '/platform/footer.php'; if (!function_exists('session_start')) { http_response_code(500); diff --git a/examples/crash_reporter/backend/views/layout.php b/examples/crash_reporter/backend/views/layout.php index 02b1cf9..f695611 100644 --- a/examples/crash_reporter/backend/views/layout.php +++ b/examples/crash_reporter/backend/views/layout.php @@ -340,6 +340,6 @@ - + diff --git a/examples/crash_reporter/backend/views/login.php b/examples/crash_reporter/backend/views/login.php index d8e3780..eda061f 100644 --- a/examples/crash_reporter/backend/views/login.php +++ b/examples/crash_reporter/backend/views/login.php @@ -51,5 +51,6 @@ $bp = Auth::basePath();

Default: admin / admin

Register (coming soon)

+ diff --git a/examples/platform/README.md b/examples/platform/README.md new file mode 100644 index 0000000..afa1508 --- /dev/null +++ b/examples/platform/README.md @@ -0,0 +1,27 @@ +# Shared platform pieces + +## Footer (`footer.php`) + +Single copyright footer for hub, crashes, tickets, graphs, and builder consoles. + +**Configure:** edit `footer.config.php` (copy from `footer.config.example.php`). + +| Key | Purpose | +|-----|---------| +| `holder` | Copyright name | +| `copyright_symbol` | `(c)` or `©` | +| `show_year` | Append year | +| `year` | Fixed year, or `null` for current | +| `use_i18n` | `data-i18n` for consoles with `i18n.js` | + +**In PHP views:** `` (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. diff --git a/examples/platform/footer.config.example.php b/examples/platform/footer.config.example.php new file mode 100644 index 0000000..872baed --- /dev/null +++ b/examples/platform/footer.config.example.php @@ -0,0 +1,22 @@ + 'Anton Afanaasyeu', + // Prefix before the name: "(c)", "©", or "". + 'copyright_symbol' => '(c)', + // Append current calendar year (or fixed year below). + 'show_year' => true, + // null = (int) date('Y') at render time. + 'year' => null, + // CSS class on