Update 13 files

- /html/src/css/style.css
- /html/admin.php
- /html/compte.php
- /html/editpage.php
- /html/index.php
- /html/login.php
- /html/news.php
- /html/register.php
- /html/upload.php
- /html/users.php
- /html/about.php
- /include/functions.php
- /config/global.ini
This commit is contained in:
Jan BELLON 2024-03-08 20:18:50 +00:00
parent a48b868c69
commit 30e7b2cf48
13 changed files with 34 additions and 38 deletions

View File

@ -27,5 +27,5 @@ A propos = "about.php"
3 = "Directeur" 3 = "Directeur"
[themes] [themes]
0 = 'dark' 0 = '--hue: 0; --saturation: 0%'
1 = 'light' 1 = '--hue: 60; --saturation: 80%'

View File

@ -9,10 +9,11 @@ require "../include/functions.php";
<meta charset="UTF-8"> <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="./src/css/style.css"> <link rel="stylesheet" href="./src/css/style.css">
<style>.body {<?=$theme?>}</style>
<link rel="icon" href="src/img/favicon.ico"> <link rel="icon" href="src/img/favicon.ico">
<title><?=$title?></title> <title><?=$title?></title>
</head> </head>
<body class='<?=$_SESSION['theme']?>'> <body class="body">
<header> <header>
<div class="pancontent"> <div class="pancontent">
<div class="athena-container"> <div class="athena-container">

View File

@ -18,7 +18,7 @@ if($_SESSION['role'] < 3) {
<link rel="icon" href="src/img/favicon.ico"> <link rel="icon" href="src/img/favicon.ico">
<title><?=$title?></title> <title><?=$title?></title>
</head> </head>
<body class='<?=$_SESSION['theme']?>'> <body class="body">
<header> <header>
<div class="pancontent"> <div class="pancontent">
<div class="athena-container"> <div class="athena-container">

View File

@ -31,7 +31,7 @@ if(isset($_POST['delete_account'])) {
<link rel="icon" href="src/img/favicon.ico"> <link rel="icon" href="src/img/favicon.ico">
<title><?=$title?></title> <title><?=$title?></title>
</head> </head>
<body class='<?=$_SESSION['theme']?>'> <body class="body">
<header> <header>
<div class="pancontent"> <div class="pancontent">
<div class="athena-container"> <div class="athena-container">

View File

@ -70,7 +70,7 @@ if(isset($fichier)) {
} }
</style> </style>
</head> </head>
<body class='<?=$_SESSION['theme']?>'> <body class="body">
<header> <header>
<div class="pancontent"> <div class="pancontent">
<div class="athena-container"> <div class="athena-container">

View File

@ -12,7 +12,7 @@ require "../include/functions.php";
<link rel="icon" href="src/img/favicon.ico"> <link rel="icon" href="src/img/favicon.ico">
<title><?=$title?></title> <title><?=$title?></title>
</head> </head>
<body class='<?=$_SESSION['theme']?>'> <body class="body">
<header> <header>
<div class="pancontent"> <div class="pancontent">
<div class="athena-container"> <div class="athena-container">

View File

@ -43,7 +43,7 @@ if(isset($_POST['username']) && isset($_POST['password'])) {
<link rel="icon" href="src/img/favicon.ico"> <link rel="icon" href="src/img/favicon.ico">
<title><?=$title?></title> <title><?=$title?></title>
</head> </head>
<body class='<?=$_SESSION['theme']?>'> <body class="body">
<header> <header>
<div class="pancontent"> <div class="pancontent">
<div class="athena-container"> <div class="athena-container">

View File

@ -17,7 +17,7 @@ if (filter_var($_GET['article'], FILTER_VALIDATE_INT)) {
<link rel="icon" href="src/img/favicon.ico"> <link rel="icon" href="src/img/favicon.ico">
<title><?=$title?></title> <title><?=$title?></title>
</head> </head>
<body class='<?=$_SESSION['theme']?>'> <body class="body">
<header> <header>
<div class="pancontent"> <div class="pancontent">
<div class="athena-container"> <div class="athena-container">

View File

@ -43,7 +43,7 @@ if(isset($_POST['username']) && isset($_POST['password']) && isset($_POST['passw
<link rel="icon" href="src/img/favicon.ico"> <link rel="icon" href="src/img/favicon.ico">
<title><?=$title?></title> <title><?=$title?></title>
</head> </head>
<body class='<?=$_SESSION['theme']?>'> <body class="body">
<header> <header>
<div class="pancontent"> <div class="pancontent">
<div class="athena-container"> <div class="athena-container">

View File

@ -1,28 +1,28 @@
:root { :root {
--text: #000000; --saturation: 0%;
--background: hsl(0, 0%, 100%); --hue: 0;
--dark-background: hsl(0, 0%, 100%);
--darker-background: hsl(0, 0%, 100%);
--article-background: hsl(0, 0%, 100%);
--article-text: hsl(0, 0%, 0%);
} }
.light { @media (prefers-color-scheme: dark) {
--text: #373737; .body {
--background: hsl(0, 0%, 100%); --text: hsl(var(--hue), var(--saturation), 80%);
--dark-background: hsl(0, 0%, 100%); --background: hsl(var(--hue), var(--saturation), 15%);
--darker-background: hsl(0, 0%, 100%); --dark-background: hsl(var(--hue), var(--saturation), 10%);
--article-background: hsl(0, 0%, 100%); --darker-background: hsl(var(--hue), var(--saturation), 5%);
--article-text: hsl(0, 0%, 0%); --article-background: hsl(var(--hue), var(--saturation), 15%);
--article-text: hsl(var(--hue), var(--saturation), 100%);
}
} }
.dark { @media (prefers-color-scheme: light) {
--text: #b3b3b3; .body {
--background: hsl(0, 0%, 15%); --text: hsl(var(--hue), var(--saturation), 20%);
--dark-background: hsl(0, 0%, 10%); --background: hsl(var(--hue), var(--saturation), 100%);
--darker-background: hsl(0, 0%, 5%); --dark-background: hsl(var(--hue), var(--saturation), 100%);
--article-background: hsl(0, 0%, 15%); --darker-background: hsl(var(--hue), var(--saturation), 100%);
--article-text: hsl(0, 0%, 100%); --article-background: hsl(var(--hue), var(--saturation), 100%);
--article-text: hsl(var(--hue), var(--saturation), 0%);
}
} }
@font-face { @font-face {

View File

@ -47,7 +47,7 @@ if(isset($_POST['page-content'])) {
} }
</style> </style>
</head> </head>
<body class='<?=$_SESSION['theme']?>'> <body class="body">
<header> <header>
<div class="pancontent"> <div class="pancontent">
<div class="athena-container"> <div class="athena-container">

View File

@ -32,7 +32,7 @@ if(isset($_POST['userid']) && isset($_POST['role']) && isset($_POST['accreditati
<link rel="icon" href="src/img/favicon.ico"> <link rel="icon" href="src/img/favicon.ico">
<title><?=$title?></title> <title><?=$title?></title>
</head> </head>
<body class='<?=$_SESSION['theme']?>'> <body class="body">
<header> <header>
<div class="pancontent"> <div class="pancontent">
<div class="athena-container"> <div class="athena-container">

View File

@ -9,13 +9,8 @@ if(!isset($_SESSION['role'])) {
$_SESSION['role'] = 0; $_SESSION['role'] = 0;
} }
if(!isset($_SESSION['theme'])) { $theme = isset($_GET['theme']) ? $themes[$_GET['theme']] : $themes[0];
$_SESSION['theme'] = $themes[0];
}
if(isset($_GET['theme'])) {
$_SESSION['theme'] = $themes[(int)$_GET['theme'] % 2];
}
function nav($nav) { function nav($nav) {
foreach($nav as $name => $url) { foreach($nav as $name => $url) {