BioTorrents.de’s version of Gazelle
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

publicheader.php 1.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. <?php
  2. declare(strict_types=1);
  3. $ENV = ENV::go();
  4. global $LoggedUser;
  5. ?>
  6. <!doctype html>
  7. <html>
  8. <head>
  9. <title>
  10. <?= display_str($PageTitle) ?>
  11. </title>
  12. <?= View::commonMeta(); ?>
  13. <link
  14. href="<?=STATIC_SERVER ?>styles/public.css?v=<?=filemtime(SERVER_ROOT.'/static/styles/public.css')?>"
  15. rel="stylesheet" type="text/css">
  16. <?php
  17. # Load JS
  18. $Scripts = array_filter(
  19. array_merge(
  20. [
  21. 'vendor/jquery.min',
  22. 'global',
  23. 'ajax.class',
  24. 'cookie.class',
  25. 'storage.class',
  26. 'public',
  27. 'u2f'
  28. ],
  29. explode(',', $JSIncludes)
  30. )
  31. );
  32. foreach ($Scripts as $Script) {
  33. View::pushAsset(
  34. "$ENV->STATIC_SERVER/functions/$Script.js",
  35. 'script'
  36. );
  37. }
  38. # Load CSS
  39. $Styles = ['global', 'public'];
  40. foreach ($Styles as $Style) {
  41. echo View::pushAsset(
  42. "$ENV->STATIC_SERVER/styles/$Style.css",
  43. 'style'
  44. );
  45. }
  46. # Fonts
  47. echo View::pushAsset(
  48. # Only Noto Sans available on public pages
  49. "$ENV->STATIC_SERVER/styles/assets/fonts/noto/woff2/NotoSans-SemiCondensed.woff2",
  50. 'font'
  51. ); ?>
  52. </head>
  53. <body>
  54. <header>
  55. <a href="login.php">Log In</a>
  56. <?php if ($ENV->OPEN_REGISTRATION) { ?>
  57. <a href="register.php">Register</a>
  58. <?php } ?>
  59. <a
  60. href="mailto:help@biotorrents.de?subject=[TxID <?= strtoupper(bin2hex(random_bytes(2))) ?>] Vague subject lines ignored">Support</a>
  61. </header>
  62. <main>
  63. <h1 id="logo">
  64. <a href="/" aria-label="Front page"></a>
  65. </h1>