Part on rendering notes finished
This commit is contained in:
parent
efdfb02518
commit
3f7c7ef7dd
7 changed files with 58 additions and 4 deletions
12
views/note.view.php
Normal file
12
views/note.view.php
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
<?php require ('partials/head.php') ?>
|
||||
<?php require ('partials/nav.php') ?>
|
||||
<?php require ('partials/banner.php') ?>
|
||||
<main>
|
||||
<div class="mx-auto max-w-7xl py-6 sm:px-6 lg:px-8">
|
||||
<p class="mb-6">
|
||||
<a href="/notes" class="text-blue-500 hover:underline">go back</a>
|
||||
</p>
|
||||
<p><?= $note['body'] ?></p>
|
||||
</div>
|
||||
</main>
|
||||
<?php require ('partials/footer.php') ?>
|
||||
15
views/notes.view.php
Normal file
15
views/notes.view.php
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
<?php require ('partials/head.php') ?>
|
||||
<?php require ('partials/nav.php') ?>
|
||||
<?php require ('partials/banner.php') ?>
|
||||
<main>
|
||||
<div class="mx-auto max-w-7xl py-6 sm:px-6 lg:px-8">
|
||||
<?php foreach ($notes as $note) : ?>
|
||||
<li>
|
||||
<a href="/note?id=<?= $note['id'] ?>" class="text-blue-500 hover:underline">
|
||||
<?= $note['body'] ?>
|
||||
</a>
|
||||
</li>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
</main>
|
||||
<?php require ('partials/footer.php') ?>
|
||||
|
|
@ -18,6 +18,7 @@
|
|||
|
||||
<a href="/mathe" class="<?= urlIs('/mathe') ? 'bg-gray-900 text-white' : 'text-gray-300' ?> hover:bg-gray-700 hover:text-white px-3 py-2 rounded-md text-sm font-medium">Mathe</a>
|
||||
|
||||
<a href="/notes" class="<?= urlIs('/notes') ? 'bg-gray-900 text-white' : 'text-gray-300' ?> hover:bg-gray-700 hover:text-white px-3 py-2 rounded-md text-sm font-medium">Notes</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -50,14 +51,16 @@
|
|||
From: "transform opacity-100 scale-100"
|
||||
To: "transform opacity-0 scale-95"
|
||||
-->
|
||||
<!--
|
||||
<div class="absolute right-0 z-10 mt-2 w-48 origin-top-right rounded-md bg-white py-1 shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none" role="menu" aria-orientation="vertical" aria-labelledby="user-menu-button" tabindex="-1">
|
||||
<!-- Active: "bg-gray-100", Not Active: "" -->
|
||||
Active: "bg-gray-100", Not Active: ""
|
||||
<a href="#" class="block px-4 py-2 text-sm text-gray-700" role="menuitem" tabindex="-1" id="user-menu-item-0">Your Profile</a>
|
||||
|
||||
<a href="#" class="block px-4 py-2 text-sm text-gray-700" role="menuitem" tabindex="-1" id="user-menu-item-1">Settings</a>
|
||||
|
||||
<a href="#" class="block px-4 py-2 text-sm text-gray-700" role="menuitem" tabindex="-1" id="user-menu-item-2">Sign out</a>
|
||||
</div>
|
||||
-->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue