mirror of
https://github.com/zamentur/libreto.git
synced 2025-11-19 03:52:17 +05:30
Code totaly rewritted + added pad(url:) support
This commit is contained in:
parent
a449f9f617
commit
baf91773ec
114 changed files with 4192 additions and 429 deletions
36
views/templates/reader.php
Normal file
36
views/templates/reader.php
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
<?php
|
||||
global $libreto;
|
||||
?>
|
||||
<!doctype html>
|
||||
<html lang="fr">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title><?= $libreto->name() ?> - Libreto</title>
|
||||
<link rel="stylesheet" href="/libreto/assets/style-reader.css">
|
||||
<style>
|
||||
<?= $libreto->pads()->css() ?>
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<main class="content">
|
||||
<?php
|
||||
if ($libreto->router()->pad()) :
|
||||
?>
|
||||
<?= $libreto->pads()->selected()->html() ?>
|
||||
<?php
|
||||
else:
|
||||
?>
|
||||
<h1><?= $this->name() ?></h1>
|
||||
<?php
|
||||
$pads = $this->pads()->children('visible');
|
||||
foreach($pads as $pad) :
|
||||
?>
|
||||
<h2><?= $pad->name() ?></h2>
|
||||
<div><?= $pad->html() ?></div>
|
||||
<?php
|
||||
endforeach;
|
||||
endif;
|
||||
?>
|
||||
</main>
|
||||
</body>
|
||||
</html>
|
||||
Loading…
Add table
Add a link
Reference in a new issue