parent
94bb9103cd
commit
0b3132d2bc
8 changed files with 84 additions and 28 deletions
|
@ -10,6 +10,12 @@
|
||||||
|
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
<li class="social-li">
|
||||||
|
<a class="social-link" href="<?php bloginfo('rss2_url'); ?>">
|
||||||
|
<i class="fa fa-fw fa-rss" aria-hidden="true"></i>
|
||||||
|
<span class='sr-only'>Flux RSS du site</span>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
<li class="social-li">
|
<li class="social-li">
|
||||||
<a class="social-link" href="https://kazhnuz.space/links">
|
<a class="social-link" href="https://kazhnuz.space/links">
|
||||||
<i class="fa fa-fw fa-ellipsis-h" aria-hidden="true"></i>
|
<i class="fa fa-fw fa-ellipsis-h" aria-hidden="true"></i>
|
||||||
|
|
|
@ -18,21 +18,37 @@
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</ul>
|
</ul>
|
||||||
<ul>
|
|
||||||
<h2>Liste des catégories</h2>
|
|
||||||
<?php
|
<?php
|
||||||
$categories = get_categories( array(
|
$parent_categories = get_categories( array(
|
||||||
'orderby' => 'name',
|
'orderby' => 'slug',
|
||||||
'order' => 'ASC'
|
'order' => 'ASC',
|
||||||
|
'parent' => 0
|
||||||
) );
|
) );
|
||||||
|
|
||||||
foreach( $categories as $category ) {?>
|
foreach( $parent_categories as $parent_category ) {
|
||||||
<li>
|
?>
|
||||||
<a class="menu-item" href="<?php echo get_category_link($category->term_id) ?>"><?php echo $category->name ?></a>
|
<ul>
|
||||||
</li>
|
<h2><?php echo $parent_category->name ?></h2>
|
||||||
<?php }
|
<?php
|
||||||
|
$categories = get_categories( array(
|
||||||
|
'orderby' => 'slug',
|
||||||
|
'order' => 'ASC',
|
||||||
|
'parent' => $parent_category->term_id
|
||||||
|
) );
|
||||||
|
|
||||||
|
foreach( $categories as $category ) {
|
||||||
|
if ($category->slug != "chapters") {
|
||||||
|
echo "<!-- " . get_category_link($category->term_id) . " -->";
|
||||||
|
echo '<li><a class="menu-element" href="' . get_category_link($category->term_id) . '">' . $category->name . '</a></li>';
|
||||||
|
}
|
||||||
|
}
|
||||||
?>
|
?>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
<ul>
|
<ul>
|
||||||
<h2>Pages</h2>
|
<h2>Pages</h2>
|
||||||
<?php
|
<?php
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<nav class="container menu toolbar flex-that fg-light">
|
<nav class="container menu toolbar flex-that fg-light d-none d-flex-sm">
|
||||||
<h2 class="sr-only">Menu des pages</h2>
|
<h2 class="sr-only">Menu des pages</h2>
|
||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
|
@ -20,7 +20,7 @@
|
||||||
$listmenu = get_nav_menu_locations();
|
$listmenu = get_nav_menu_locations();
|
||||||
$menu = wp_get_nav_menu_items($listmenu['top-navbar-2']);
|
$menu = wp_get_nav_menu_items($listmenu['top-navbar-2']);
|
||||||
foreach ($menu as $menuElement) {
|
foreach ($menu as $menuElement) {
|
||||||
echo '<li><a href="' . $menuElement->url . '" class="btn btn-navbar">'. $menuElement->title . '</a></li>';
|
echo '<li class="d-none d-block-sm"><a href="' . $menuElement->url . '" class="btn btn-navbar">'. $menuElement->title . '</a></li>';
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<li>
|
<li>
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
|
|
||||||
foreach( $parent_categories as $parent_category ) {
|
foreach( $parent_categories as $parent_category ) {
|
||||||
?>
|
?>
|
||||||
<section class="card head-primary">
|
<section class="card head-primary d-none d-block-sm">
|
||||||
<h2 class="card-header"><i class="fa fa-folder" aria-hidden="true"></i> <?php echo $parent_category->name ?></h2>
|
<h2 class="card-header"><i class="fa fa-folder" aria-hidden="true"></i> <?php echo $parent_category->name ?></h2>
|
||||||
<div class="menu fg-dark">
|
<div class="menu fg-dark">
|
||||||
<ul>
|
<ul>
|
||||||
|
|
|
@ -26,19 +26,40 @@
|
||||||
<?php wp_list_pages( 'sort_column=menu_order&depth=1&title_li=' ) ?>
|
<?php wp_list_pages( 'sort_column=menu_order&depth=1&title_li=' ) ?>
|
||||||
</ul>
|
</ul>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section class="mb-1">
|
<section class="mb-1">
|
||||||
<h2>Catégories</h2>
|
<h2>Catégories</h2>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
$parent_categories = get_categories( array(
|
||||||
|
'orderby' => 'slug',
|
||||||
|
'order' => 'ASC',
|
||||||
|
'parent' => 0
|
||||||
|
) );
|
||||||
|
|
||||||
|
foreach( $parent_categories as $parent_category ) {
|
||||||
|
?>
|
||||||
<ul>
|
<ul>
|
||||||
|
<h3><?php echo $parent_category->name ?></h3>
|
||||||
<?php
|
<?php
|
||||||
$categories = get_categories( array(
|
$categories = get_categories( array(
|
||||||
'orderby' => 'name',
|
'orderby' => 'slug',
|
||||||
'order' => 'ASC'
|
'order' => 'ASC',
|
||||||
|
'parent' => $parent_category->term_id
|
||||||
) );
|
) );
|
||||||
|
|
||||||
foreach( $categories as $category ) {
|
foreach( $categories as $category ) {
|
||||||
|
if ($category->slug != "chapters") {
|
||||||
|
echo "<!-- " . get_category_link($category->term_id) . " -->";
|
||||||
echo '<li><a href="' . get_category_link($category->term_id) . '">' . $category->name . '</a></li>';
|
echo '<li><a href="' . get_category_link($category->term_id) . '">' . $category->name . '</a></li>';
|
||||||
}?>
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
</section>
|
</section>
|
||||||
<section class="mb-1">
|
<section class="mb-1">
|
||||||
<h2>Archive des articles</h2>
|
<h2>Archive des articles</h2>
|
||||||
|
|
|
@ -35,10 +35,16 @@
|
||||||
border-top: 6px solid get-color("dark");
|
border-top: 6px solid get-color("dark");
|
||||||
background-position: bottom center;
|
background-position: bottom center;
|
||||||
background-repeat: repeat-x;
|
background-repeat: repeat-x;
|
||||||
margin-bottom:1.5rem;
|
margin-bottom:-1.5rem;
|
||||||
|
padding-bottom:5rem;
|
||||||
.fa {
|
.fa {
|
||||||
font-size: 1rem;
|
font-size: 1rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@include sm() {
|
||||||
|
padding-bottom: 0;
|
||||||
|
margin-bottom: 1.5rem;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
header h1 {
|
header h1 {
|
||||||
|
|
|
@ -14,6 +14,8 @@
|
||||||
@include sm() {
|
@include sm() {
|
||||||
display:none;
|
display:none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
z-index:10;
|
||||||
}
|
}
|
||||||
|
|
||||||
.menu-button {
|
.menu-button {
|
||||||
|
@ -30,10 +32,10 @@
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
aspect-ratio: 1;
|
aspect-ratio: 1;
|
||||||
border-radius:999px;
|
border-radius:999px;
|
||||||
opacity: 0.75;
|
z-index: 12;
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
opacity:1;
|
background-color: $color-primary;
|
||||||
}
|
}
|
||||||
|
|
||||||
@include sm() {
|
@include sm() {
|
||||||
|
|
15
style.css
15
style.css
|
@ -2464,10 +2464,14 @@ textarea {
|
||||||
border-top: 6px solid #002b36;
|
border-top: 6px solid #002b36;
|
||||||
background-position: bottom center;
|
background-position: bottom center;
|
||||||
background-repeat: repeat-x;
|
background-repeat: repeat-x;
|
||||||
margin-bottom: 1.5rem; }
|
margin-bottom: -1.5rem;
|
||||||
|
padding-bottom: 5rem; }
|
||||||
#page-header .fa {
|
#page-header .fa {
|
||||||
font-size: 1rem; }
|
font-size: 1rem; }
|
||||||
|
@media (min-width: 576px) {
|
||||||
|
#page-header {
|
||||||
|
padding-bottom: 0;
|
||||||
|
margin-bottom: 1.5rem; } }
|
||||||
header h1 {
|
header h1 {
|
||||||
border-style: none !important;
|
border-style: none !important;
|
||||||
font-weight: 800;
|
font-weight: 800;
|
||||||
|
@ -3032,7 +3036,8 @@ ul.social {
|
||||||
height: 100vh;
|
height: 100vh;
|
||||||
transition: left 0.2s;
|
transition: left 0.2s;
|
||||||
padding: 1rem;
|
padding: 1rem;
|
||||||
overflow: scroll; }
|
overflow: scroll;
|
||||||
|
z-index: 10; }
|
||||||
#mobile-sidebar.shown {
|
#mobile-sidebar.shown {
|
||||||
left: 0; }
|
left: 0; }
|
||||||
@media (min-width: 576px) {
|
@media (min-width: 576px) {
|
||||||
|
@ -3052,9 +3057,9 @@ ul.social {
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
aspect-ratio: 1;
|
aspect-ratio: 1;
|
||||||
border-radius: 999px;
|
border-radius: 999px;
|
||||||
opacity: 0.75; }
|
z-index: 12; }
|
||||||
.menu-button:hover {
|
.menu-button:hover {
|
||||||
opacity: 1; }
|
background-color: #CB357D; }
|
||||||
@media (min-width: 576px) {
|
@media (min-width: 576px) {
|
||||||
.menu-button {
|
.menu-button {
|
||||||
display: none; } }
|
display: none; } }
|
||||||
|
|
Reference in a new issue