You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
55 lines
1.7 KiB
PHP
55 lines
1.7 KiB
PHP
<?php
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
|
|
$noteids = $database->select('notes', 'noteid', ['ownerid' => $_SESSION['uid']]);
|
|
|
|
$notes = [];
|
|
|
|
foreach ($noteids as $n) {
|
|
$notes[] = Note::loadNote($n);
|
|
}
|
|
?>
|
|
|
|
<style nonce="<?php echo $SECURE_NONCE; ?>">
|
|
<?php
|
|
foreach ($notes as $note) {
|
|
echo "#notecard_" . $note->getID() . " {\n"
|
|
. " background-color: #" . $note->getColor() . ";\n"
|
|
. " border: 1px solid #" . $note->getColor() . ";\n"
|
|
. "}\n";
|
|
}
|
|
?>
|
|
</style>
|
|
|
|
<div class="btn-group mb-4">
|
|
<a href="app.php?page=editnote" class="btn btn-success"><i class="fas fa-plus"></i> <?php $Strings->get("New note"); ?></a>
|
|
</div>
|
|
|
|
<div class="row">
|
|
|
|
<?php
|
|
foreach ($notes as $note) {
|
|
?>
|
|
<div class="col-12 col-sm-6 col-md-6 col-lg-4">
|
|
<div class="card" data-color="<?php echo $note->getColor(); ?>" id="notecard_<?php echo $note->getID(); ?>">
|
|
<div class="card-body">
|
|
<?php echo $note->getHTML(); ?>
|
|
</div>
|
|
|
|
<div class="card-footer">
|
|
<a href="./app.php?page=editnote¬e=<?php echo $note->getID(); ?>" class="text-body mr-2">
|
|
<i class="fas fa-edit"></i> <?php $Strings->get('Edit'); ?>
|
|
</a>
|
|
<a href="./action.php?action=deletenote¬eid=<?php echo $note->getID(); ?>" class="text-body text-danger">
|
|
<i class="fas fa-trash"></i> <?php $Strings->get('Delete'); ?>
|
|
</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<?php
|
|
}
|
|
?>
|
|
|
|
</div>
|