avant corrections

This commit is contained in:
Valentin
2023-11-02 08:04:25 +01:00
parent 52fdf5bdf4
commit 4999a4a944
12 changed files with 1328 additions and 137 deletions
+57 -16
View File
@@ -1,6 +1,21 @@
@extends('layouts.app')
@section('content')
<div id="about_popup">
<div id="about_modale">
<span class="xoo-el-icon-cancel-circle" aria-hidden="true" onclick="closeAboutPopup()"></span>
<div id="about_title">
À propos
</div>
<div id="about_content">
<?php echo apply_filters('the_content', get_post(9962)->post_content) ?>
</div>
</div>
</div>
<div id="content_search_tag" style="display: none;"><?php echo apply_filters('the_content', get_post(13943)->post_content) ?></div>
<div id="content_login_popup" style="display: none;"><?php echo apply_filters('the_content', get_post(9960)->post_content) ?></div>
<div id="content_privacy" style="display: none;"><?php echo apply_filters('the_content', get_post(3)->post_content) ?></div>
<div class="fixed left-0 w-8 flex flex-col-reverse z-1" id="timeline_container"></div>
@@ -12,7 +27,7 @@
<table class="w-full bg-jlg-dark-blue flex justify-center mt-[70px] z-0 pl-10 lg:pl-[10px]">
<thead>
<tr class="border-jlg-white border-b h-64 top-0 w-full lg:w-2/3 fixed z-0 flex items-stretch justify-around text-left uppercase bg-jlg-dark-blue">
<tr class="border-jlg-white border-b h-64 top-0 lg:w-2/3 fixed z-0 flex items-stretch justify-around text-left uppercase bg-jlg-dark-blue">
<th class="flex items-end justify-start"></th>
<th class="flex items-end justify-start pb-4">Images</th>
<th class="flex items-end justify-start pb-4">Voix Off et In</th>
@@ -26,7 +41,7 @@
$args = array(
'post_type' => 'post',
'posts_per_page' => -1,
'meta_key' => 'Index',
'meta_key' => 'index',
'meta_type' => 'NUMERIC',
'orderby' => 'meta_value',
'order' => 'ASC'
@@ -35,27 +50,52 @@
if ($query->have_posts()) :
while ($query->have_posts()) : $query->the_post();
$contenu = get_the_content();
if (get_post_meta(get_the_ID(), 'isMainPart', true)) { ?>
<tr class="border-jlg-white border-b font-authentic-90 uppercase w-full flex flex-row py-6 isMainPart">
<td class="pl-0 flex">
<div class="w-2 h-5 bg-jlg-white mr-3"></div>
<div>{{ get_post_meta(get_the_ID(), 'isMainPart', true) }}</div>
</td>
</tr>
<?php } elseif (get_post_meta(get_the_ID(), 'isSubPart', true)) { ?>
<tr class="border-jlg-white border-b font-authentic-90 w-full flex flex-row py-6 isSubPart">
<td class="pl-0 flex">
<div class="w-2 h-5 bg-jlg-white mr-3"></div>
<div>{{ get_post_meta(get_the_ID(), 'isSubPart', true) }}</div>
</td>
</tr>
<?php } else {
$contenu = wpautop(get_the_content());
$infosArray = explode("---", $contenu); // Divise le contenu en fonction des séparateurs
// Initialisez des variables pour stocker les informations
$images = isset($infosArray[0]) ? $infosArray[0] : '';
$voixOffIn = isset($infosArray[1]) ? $infosArray[1] : '';
$bandeson = isset($infosArray[2]) ? $infosArray[2] : '';
$ecrits = isset($infosArray[3]) ? $infosArray[3] : '';
$images = isset($infosArray[1]) ? $infosArray[1] : '';
$images = substr($images, 0, -21);
$voixOffIn = isset($infosArray[2]) ? $infosArray[2] : '';
$voixOffIn = substr($voixOffIn, 0, -16);
$bandeson = isset($infosArray[3]) ? $infosArray[3] : '';
$bandeson = substr($bandeson, 0, -14);
$ecrits = isset($infosArray[4]) ? $infosArray[4] : '';
//lien pour le crayon
$edit_link = 'https://localhost/wp/wp-admin/admin.php?page=rvy-revisions&post='. get_the_ID() .'&action=revise';
?>
<tr class="border-jlg-light-white border-b font-authentic-60 w-full flex flex-row py-6 isContentPart">
<td class="block text-sm pl-0 pr-6">{{ the_title()}}</td>
<td class="block pl-0 pr-6"><?php echo $images; ?></td>
<td class="block pl-0 pr-6"><?php echo $voixOffIn; ?></td>
<td class="block pl-0 pr-6"><?php echo $bandeson; ?></td>
<td class="block pl-0 pr-6"><?php echo $ecrits; ?></td>
<td class="block text-sm pl-0 pr-6"><?php if(is_user_logged_in()){ echo '<a href="' . esc_url( $edit_link ) . '" class="edit-button">&#128393;</a>';} elseif (!is_user_logged_in()) { echo '<a href="' . esc_url( $edit_link ) . '" class="edit-button xoo-el-login-tgr ">&#128393;</a>';}?></td>
</tr>
<?php
<tr class="border-jlg-light-white border-b font-authentic-60 w-full flex flex-row py-6 isContentPart">
<td class="block text-sm pl-0 pr-6">{{ the_title()}}</td>
<td class="block pl-0 pr-6"><?php echo $images; ?></td>
<td class="block pl-0 pr-6"><?php echo $voixOffIn; ?></td>
<td class="block pl-0 pr-6"><?php echo $bandeson; ?></td>
<td class="block pl-0 pr-6"><?php echo $ecrits; ?></td>
<td class="block text-sm pl-0 pr-6">
<?php if(is_user_logged_in()){
echo '<a title="Contribution" href="' . esc_url( $edit_link ) . '" class="edit-button">&#128393;</a>';
} elseif (!is_user_logged_in()) {
echo '<a href="' . esc_url( $edit_link ) . '" class="edit-button xoo-el-login-tgr ">&#128393;</a>';
}?>
</td>
</tr>
<?php }
// endif;
endwhile;
endif;
@@ -65,6 +105,7 @@
</table>
@if (! have_posts())
<x-alert type="warning">
{!! __('Sorry, no results were found.', 'sage') !!}
+66 -2
View File
@@ -1,8 +1,8 @@
<footer class="fixed w-full h-[8vh] py-4 bottom-0 bg-jlg-dark-blue border-t border-jlg-light-white flex justify-between">
<!-- @php(dynamic_sidebar('sidebar-footer'))-->
<div class="text-sm">
<button class="px-4 py-2 rounded-md ml-6 underline underline-offset-8 hover:underline-offset-4 active:underline-offset-8">À PROPOS</button>
<button class="px-4 py-2 rounded-md ml-6 underline underline-offset-8 hover:underline-offset-4 active:underline-offset-8">CONTACT</button>
<button class="px-4 py-2 rounded-md ml-6 underline underline-offset-8 hover:underline-offset-4 active:underline-offset-8" onclick="displayAboutPopup()" id="about_button">À PROPOS</button>
<button class="px-4 py-2 rounded-md ml-6 underline underline-offset-8 hover:underline-offset-4 active:underline-offset-8"><a href="mailto:<?php echo get_option('admin_email') ?>">CONTACT</a></button>
</div>
<div class="mr-6 flex items-center">
<a href="https://www.thalim.cnrs.fr/?lang=fr" target="_blank" class="w-12 mr-4">
@@ -19,3 +19,67 @@
</a>
</div>
</footer>
<div id="loading" style="
width: 100vw;
height: 100vh;
background-color: #010d19;
z-index: 9999;
position: fixed;
top: 0;
left: 0;
display: flex;
justify-content: center;
align-items: center;
font-family: sans-serif;
color: white;
opacity: 1;
transition: opacity 0.2s ease-out;
">
<p>
Chargement
<span class="dot-one">.</span>
<span class="dot-two">.</span>
<span class="dot-three">.</span>
</p>
</div>
<script>
// Define the event listener function
function closeAboutPopupHandler(event) {
event.preventDefault();
console.log(event.target);
if (
event.target != document.querySelector('#about_modale') &&
event.target != document.querySelector('#about_button') &&
event.target != document.querySelector('#about_title') &&
event.target != document.querySelector('#about_content') &&
event.target.parentElement != document.querySelector('#about_content')
) {
closeAboutPopup();
}
}
// Attach the event listener in the displayAboutPopup function
function displayAboutPopup() {
document.getElementById('about_popup').style.display = 'flex';
setTimeout(() => {
document.getElementById('about_popup').style.opacity = '1';
window.addEventListener('click', closeAboutPopupHandler);
}, 1);
document.body.style.overflow = 'hidden';
}
// Remove the event listener in the closeAboutPopup function
function closeAboutPopup() {
document.getElementById('about_popup').style.opacity = '0';
setTimeout(() => {
document.getElementById('about_popup').style.display = 'none';
}, 300);
document.body.style.overflowY = 'scroll';
// Remove the event listener
window.removeEventListener('click', closeAboutPopupHandler);
}
</script>
+41 -5
View File
@@ -1,7 +1,20 @@
<header class="border-b border-jlg-light-white py-4 h-1/12 shadow-xlg fixed top-0 w-full bg-jlg-dark-blue flex flex-row justify-between items-center z-10">
<div class="text-sm">
<button class="bg-jlg-xlight-white hover:bg-jlg-hxlight-white active:bg-jlg-axlight-white px-4 py-2 rounded-full border-jlg-hxlight-white border ml-6 transition-colors xoo-el-login-tgr">MES CONTRIBUTIONS</button>
<button class="bg-jlg-xlight-white hover:bg-jlg-hxlight-white active:bg-jlg-axlight-white px-4 py-2 rounded-full border-jlg-hxlight-white border ml-6 transition-colors">EXPORT</button>
<button class="bg-jlg-xlight-white hover:bg-jlg-hxlight-white active:bg-jlg-axlight-white px-4 py-2 rounded-full border-jlg-hxlight-white border ml-6 transition-colors">
<?php
$current_user = wp_get_current_user();
$author_id = $current_user->ID;
$revisionary_page = admin_url('admin.php?page=revisionary-q&author=' . $author_id);
$link = sprintf(
'<a href="%s">MES CONTRIBUTIONS</a>',
esc_url($revisionary_page)
);
echo do_shortcode('[xoo_el_action type="login" change_to="' . $revisionary_page . '" change_to_text="MES CONTRIBUTIONS" text="CONTRIBUER" redirect_to="' . $revisionary_page . '"]');
?>
</button>
<button class="bg-jlg-xlight-white hover:bg-jlg-hxlight-white active:bg-jlg-axlight-white px-4 py-2 rounded-full border-jlg-hxlight-white border ml-6 transition-colors"><a href="<?php echo esc_url(home_url('/?format=csv')); ?>">EXPORT</a></button>
</div>
<a class="brand text-center text-2xl leading-none" href="{{ home_url('/') }}">
@@ -10,13 +23,36 @@
<span class="font-caslon italic">Le Livre d'Image</span>
</a>
<div class="mr-6">
<div class="mr-6 w-52">
<input type="search" class="px-4 py-2 rounded bg-jlg-xlight-white text-sm" placeholder="RECHERCHER">
</div>
<div class="z-30 right-6 absolute w-52 max-h-52 border-jlg-light-white border rounded" id="search_results">
<div class="flex flex-row p-3 justify-around items-center h-full text-sm">
<p><span id="result_amount">0</span> occurences</p>
<p class="hidden">Aucune occurence</p>
<div class="flex flex-row">
<img src="<?= get_template_directory_uri(); ?>/resources/assets/icons/arrow_drop_down.svg" alt="arrow down" class="cursor-pointer">
<img src="<?= get_template_directory_uri(); ?>/resources/assets/icons/arrow_drop_up.svg" alt="arrow up" class="cursor-pointer">
</div>
</div>
<div class="text-sm w-full">
</div>
</div>
@if (has_nav_menu('primary_navigation'))
<nav class="nav-primary" aria-label="{{ wp_get_nav_menu_name('primary_navigation') }}">
{!! wp_nav_menu(['theme_location' => 'primary_navigation', 'menu_class' => 'nav', 'echo' => false]) !!}
<nav class="nav-primary" aria-label="{{ wp_get_nav_menu_name('primary_navigation') }}">
{!! wp_nav_menu(['theme_location' => 'primary_navigation', 'menu_class' => 'nav', 'echo' => false]) !!}
</nav>
@endif
</header>
<script>
setTimeout(() => {
const privacyLink = document.querySelector('.xoo-aff-checkbox_single a');
privacyLink.addEventListener('click', function (e) {
e.preventDefault();
});
}, 1000);
</script>