Browse Source

gère le titre de la page correctement

master
vince vince 3 years ago
parent
commit
3fa209105d
1 changed files with 4 additions and 2 deletions
  1. +4
    -2
      index.php

+ 4
- 2
index.php View File

@ -1,5 +1,7 @@
<?php
define('DEFAULT_TITLE', 'Mon panier bio');
define('REQUEST_REGEX', '/^\/(?<supplier>[^\/]+)\/?(?<event>[^\/]+)?\/?$/');
define('SUPPLIER_REGEX', '/^[A-Za-z]\w{0,31}$/');
define('EVENT_REGEX', '/^\d{4}\-[01]\d\-[0123]\d$/');
@ -238,7 +240,7 @@ if (!$isConfig and $hasSupplier) {
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title><?php echo strip_tags($config[$supplier]['title']); ?> — <?php echo strip_tags($config[$supplier]['subtitle']); ?></title>
<title><?php if ($hasSupplier) : ?><?php echo strip_tags($config[$supplier]['title']); ?><?php if (!$isConfig) : ?> — <?php echo strip_tags($config[$supplier]['subtitle']); ?><?php endif; ?><?php else : ?><?php echo DEFAULT_TITLE; ?><?php endif; ?></title>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous">
</head>
<body>
@ -249,7 +251,7 @@ if (!$isConfig and $hasSupplier) {
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="currentColor" class="bi bi-basket d-inline-block align-text-top" viewBox="0 0 16 16">
<path d="M5.757 1.071a.5.5 0 0 1 .172.686L3.383 6h9.234L10.07 1.757a.5.5 0 1 1 .858-.514L13.783 6H15a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1v4.5a2.5 2.5 0 0 1-2.5 2.5h-9A2.5 2.5 0 0 1 1 13.5V9a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h1.217L5.07 1.243a.5.5 0 0 1 .686-.172zM2 9v4.5A1.5 1.5 0 0 0 3.5 15h9a1.5 1.5 0 0 0 1.5-1.5V9H2zM1 7v1h14V7H1zm3 3a.5.5 0 0 1 .5.5v3a.5.5 0 0 1-1 0v-3A.5.5 0 0 1 4 10zm2 0a.5.5 0 0 1 .5.5v3a.5.5 0 0 1-1 0v-3A.5.5 0 0 1 6 10zm2 0a.5.5 0 0 1 .5.5v3a.5.5 0 0 1-1 0v-3A.5.5 0 0 1 8 10zm2 0a.5.5 0 0 1 .5.5v3a.5.5 0 0 1-1 0v-3a.5.5 0 0 1 .5-.5zm2 0a.5.5 0 0 1 .5.5v3a.5.5 0 0 1-1 0v-3a.5.5 0 0 1 .5-.5z"/>
</svg>
<?php echo $hasSupplier ? $supplier : 'Mon panier bio'; ?>
<?php echo $hasSupplier ? $supplier : DEFAULT_TITLE; ?>
</a>
<?php if ($hasSupplier) : ?>
<span class="navbar-text text-muted">


Loading…
Cancel
Save