add structure to random
This commit is contained in:
parent
b8de28aade
commit
4f3712536a
8 changed files with 98 additions and 11 deletions
|
|
@ -16,7 +16,7 @@ $entryTopPos = $entryTopPos ?? 20;
|
|||
|
||||
<meta name="robots" content="noindex, nofollow, noarchive">
|
||||
</head>
|
||||
<body class="grid" data-template="<?= $page->template() ?>" >
|
||||
<body class="background-grid <?= e($page->fullWidth() == 'true', 'full-width') ?>" data-template="<?= $page->template() ?>" >
|
||||
<header id="main-header">
|
||||
<div id="logo" >
|
||||
<a id="logo__link" href="/" class="no-line">
|
||||
|
|
|
|||
|
|
@ -1,23 +1,52 @@
|
|||
<?php
|
||||
$firstCol = rand(0, 8);
|
||||
$secondCol = rand(0, 8)
|
||||
?>
|
||||
|
||||
<sidebar id="desktop-nav">
|
||||
<ul>
|
||||
<li class="left top" style="--left: <?= rand(0, 8) ?>; --top: <?= rand(0, 6) ?>">
|
||||
<li
|
||||
class="left top"
|
||||
style="
|
||||
--left: <?= e($page->fullWidth() != 'true', $firstCol, 0) ?>;
|
||||
--top: <?= e($page->fullWidth() != 'true', rand(0, 6), 0) ?>
|
||||
"
|
||||
>
|
||||
<button class="toggle-btn toggle-btn--left" onclick="togglePanel('left', event)">
|
||||
années
|
||||
</button>
|
||||
</li>
|
||||
<li class="left top" style="--left: <?= rand(0, 8) ?>; --top: <?= rand(0, 6) ?>">
|
||||
<li
|
||||
class="left top"
|
||||
style="
|
||||
--left: <?= e($page->fullWidth() != 'true', $secondCol, 0) ?>;
|
||||
--top: <?= e($page->fullWidth() != 'true', rand(0, 6), 0) ?>
|
||||
"
|
||||
>
|
||||
<button class="toggle-btn toggle-btn--left" onclick="togglePanel('right', event)">
|
||||
catégories
|
||||
</button>
|
||||
</li>
|
||||
<li class="empty
|
||||
"></li>
|
||||
<li class="left top" style="--left: <?= rand(0, 8) ?>; --top: <?= rand(0, 6) ?>">
|
||||
<li
|
||||
class="left top"
|
||||
style="
|
||||
--left: <?= e($page->fullWidth() != 'true', $firstCol, 0) ?>;
|
||||
--top: <?= e($page->fullWidth() != 'true', rand(0, 6), 0) ?>
|
||||
"
|
||||
>
|
||||
<a href="#">
|
||||
s'abonner
|
||||
</a>
|
||||
</li>
|
||||
<li class="left top" style="--left: <?= rand(0, 8) ?>; --top: <?= rand(0, 6) ?>">
|
||||
<li
|
||||
class="left top"
|
||||
style="
|
||||
--left: <?= e($page->fullWidth() != 'true', $secondCol, 0) ?>;
|
||||
--top: <?= e($page->fullWidth() != 'true', rand(0, 6), 0) ?>
|
||||
"
|
||||
>
|
||||
<a href="<?= $site->find('a-propos')->url() ?>">
|
||||
à propos
|
||||
</a>
|
||||
|
|
@ -157,8 +186,8 @@
|
|||
<ul class="panel__items">
|
||||
<?php
|
||||
$categories = $kirby->collection('categories');
|
||||
shuffle($categories);
|
||||
foreach($categories as $category): ?>
|
||||
shuffle($categories);
|
||||
foreach($categories as $category): ?>
|
||||
<li
|
||||
class="panel__item "
|
||||
x-data='{ isOpen: false }'
|
||||
|
|
@ -182,8 +211,8 @@
|
|||
>
|
||||
<ul class="panel-item-content__texts">
|
||||
<?php
|
||||
shuffle($category['texts']);
|
||||
foreach($category['texts'] as $article): ?>
|
||||
shuffle($category['texts']);
|
||||
foreach($category['texts'] as $article): ?>
|
||||
<li
|
||||
class="text"
|
||||
x-data="{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue