securité cours + correction bug accueil
This commit is contained in:
parent
f7e8cfe938
commit
9f5424c89b
@ -1,6 +1,6 @@
|
||||
@import url('https://fonts.googleapis.com/css2?family=Nunito:ital,wght@0,200..1000;1,200..1000&display=swap');
|
||||
|
||||
h1 {
|
||||
.MuiTypography-h1 {
|
||||
font-size: 3.2em;
|
||||
line-height: 1.1;
|
||||
font-family: "Nunito", sans-serif !important;
|
||||
@ -21,6 +21,10 @@ span {
|
||||
|
||||
}
|
||||
|
||||
.MuiTypography-h2{
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
.css-1ulggnf h2,
|
||||
.MuiTypography-span,
|
||||
.MuiTypography-h6{
|
||||
@ -28,25 +32,3 @@ span {
|
||||
|
||||
}
|
||||
|
||||
.c4lv-remember {
|
||||
background-color: #d7d9eb;
|
||||
margin: 24px auto 8px auto;
|
||||
padding: 24px 30px;
|
||||
max-width: 75%;
|
||||
border: 2px solid #315397;
|
||||
border-radius: 16px;
|
||||
color: #315397;
|
||||
font-family: Poppins, sans-serif;
|
||||
font-size: 1rem;
|
||||
font-weight: 400;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.c4lv-remember::before {
|
||||
content: "🧠 À retenir";
|
||||
display: block;
|
||||
margin-bottom: 10px;
|
||||
font-size: 1.5em;
|
||||
font-weight: 600;
|
||||
color: #315397;
|
||||
}
|
||||
@ -18,6 +18,8 @@ import {
|
||||
Tab,
|
||||
} from "@mui/material";
|
||||
import axios from "axios";
|
||||
import { useNavigate } from "react-router-dom";
|
||||
import { getToken } from "../../auth";
|
||||
import '../../assets/styleCours.css';
|
||||
|
||||
const API_URL = "https://www.formations.octopusdesign.fr/webservice/rest/server.php";
|
||||
@ -37,9 +39,17 @@ const ListeCours = () => {
|
||||
const [assignmentQuery, setAssignmentQuery] = useState("");
|
||||
const [showOnlyMedia, setShowOnlyMedia] = useState(false);
|
||||
const [tabIndex, setTabIndex] = useState(0);
|
||||
const navigate = useNavigate();
|
||||
|
||||
// ✅ Redirection si non connecté
|
||||
useEffect(() => {
|
||||
if (!getToken()) {
|
||||
navigate("/admin/login");
|
||||
}
|
||||
}, [navigate]);
|
||||
|
||||
const itemsPerPage = 5;
|
||||
const pdfRef = useRef();
|
||||
|
||||
const pageHasMedia = (html) => /<img|<video|<audio|pluginfile\.php/.test(html);
|
||||
|
||||
const fetchCours = async () => {
|
||||
|
||||
@ -67,18 +67,17 @@ const GestionPageAccueil = () => {
|
||||
const data = await response.json();
|
||||
setHeroTitle(data.acf?.hero_title || "");
|
||||
setHeroText(data.acf?.hero_text || "");
|
||||
setMissions(data.acf?.mission || []);
|
||||
|
||||
// ✅ Image Hero
|
||||
if (data.acf?.img_hero) {
|
||||
if (data.acf?.img_hero_url) {
|
||||
setHeroImage(data.acf.img_hero_url);
|
||||
} else {
|
||||
const mediaResponse = await fetch(
|
||||
`https://preprod.octopusdesign.fr/api-octopus/server/wp-json/wp/v2/media/${data.acf.img_hero}`
|
||||
);
|
||||
const mediaData = await mediaResponse.json();
|
||||
setHeroImage(mediaData.source_url);
|
||||
}
|
||||
if (data.acf?.img_hero_url) {
|
||||
setHeroImage(data.acf.img_hero_url);
|
||||
} else if (data.acf?.img_hero) {
|
||||
const mediaResponse = await fetch(
|
||||
`https://preprod.octopusdesign.fr/api-octopus/server/wp-json/wp/v2/media/${data.acf.img_hero}`
|
||||
);
|
||||
const mediaData = await mediaResponse.json();
|
||||
setHeroImage(mediaData.source_url);
|
||||
}
|
||||
|
||||
// ✅ GDC Construct
|
||||
|
||||
4949
frontend/stats.html
4949
frontend/stats.html
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user