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.
48 lines
1.3 KiB
PHP
48 lines
1.3 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="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="" class="text-body">
|
|
<i class="fas fa-edit"></i> <?php $Strings->get('Edit'); ?>
|
|
</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<?php
|
|
}
|
|
?>
|
|
|
|
</div>
|