pub / rememori

Simple file-based bookmarking and notes application
git clone https://src.jayvii.de/pub/rememori.git
Home | Log | Files | Exports | Refs | README | RSS

commit 256e1f7d8cb84933c06fcf6c58214ab16363261e
parent f09c788a43a4e15bd3095026c936a7bbbead3ac3
Author: JayVii <jayvii[AT]posteo[DOT]de>
Date:   Sat,  2 Nov 2024 09:22:04 +0100

feat: separate html blocks into sections

Diffstat:
Mlib/account.php | 95++++++++++++++++++++++++++++++++++++++++++-------------------------------------
1 file changed, 51 insertions(+), 44 deletions(-)

diff --git a/lib/account.php b/lib/account.php @@ -21,26 +21,29 @@ function show_account( <h4><?php echo $GLOBALS["i18n_account"] . ": " . $user; ?></h4> <!-- Bookmarklet --> -<h5><?php echo $GLOBALS["i18n_bookmarklet"]; ?></h5> -<p><?php echo $GLOBALS["i18n_bookmarklet_tp"]; ?></p> -<a - href="<?php echo bookmarklet(); ?>" - onclick="window.alert('<?php echo $GLOBALS["i18n_bookmarklet_tp"];?>');" - title="<?php echo $GLOBALS["i18n_bookmarklet_tp"]; ?>" -> - Rememori -</a> +<section id="bookmarklet"> + <h5><?php echo $GLOBALS["i18n_bookmarklet"]; ?></h5> + <p><?php echo $GLOBALS["i18n_bookmarklet_tp"]; ?></p> + <a + href="<?php echo bookmarklet(); ?>" + onclick="window.alert('<?php echo $GLOBALS["i18n_bookmarklet_tp"];?>');" + title="<?php echo $GLOBALS["i18n_bookmarklet_tp"]; ?>" + > + Rememori + </a> +</section> <!-- Tokens --> -<h5><?php echo $GLOBALS["i18n_tokens"]; ?></h5> -<p><?php echo $GLOBALS["i18n_tokens_info"]; ?></p> -<form action="/" target="_self" method="post"> - <input - id="action" - name="action" - type="hidden" - value="update_tokens" - > +<section id="tokens"> + <h5><?php echo $GLOBALS["i18n_tokens"]; ?></h5> + <p><?php echo $GLOBALS["i18n_tokens_info"]; ?></p> + <form action="/" target="_self" method="post"> + <input + id="action" + name="action" + type="hidden" + value="update_tokens" + > <?php /* cycle through each token and list it in the form */ @@ -54,38 +57,42 @@ function show_account( } ?> - <label for="token_<?php echo $i; ?>"> - Token <?php echo ($i + 1); ?> - </label> - <stretch style="font-size:66%;"> + <label for="token_<?php echo $i; ?>"> + Token <?php echo ($i + 1); ?> + </label> + <stretch style="font-size:66%;"> <?php if ($token == $tokens[$i]) { echo " " . $GLOBALS["i18n_tokens_curr"]; } ?> - </stretch> - <input - id="token_<?php echo $i; ?>" - name="token_<?php echo $i; ?>" - class="<?php echo $class; ?>" - type="text" - value="<?php echo $tokens[$i]; ?>" - > + </stretch> + <input + id="token_<?php echo $i; ?>" + name="token_<?php echo $i; ?>" + class="<?php echo $class; ?>" + type="text" + value="<?php echo $tokens[$i]; ?>" + > + <br> <?php } // for-loop ?> - <input type="submit" value="<?php echo $GLOBALS["i18n_save"]; ?>"> -</form> + <input type="submit" value="<?php echo $GLOBALS["i18n_save"]; ?>"> + </form> +</section> <!-- New token --> -<h5><?php echo $GLOBALS["i18n_tokens_add"]; ?></h5> -<p><?php echo $GLOBALS["i18n_tokens_add_info"]; ?></p> -<form action="/" target="_self" method="post"> - <input - id="action" - name="action" - type="hidden" - value="add_password" - > - <input id="new_pass" name="new_pass" type="text" placeholder="secret123"> - <input type="submit" value="<?php echo $GLOBALS["i18n_save"]; ?>"> -</form> +<section id="new_token"> + <h5><?php echo $GLOBALS["i18n_tokens_add"]; ?></h5> + <p><?php echo $GLOBALS["i18n_tokens_add_info"]; ?></p> + <form action="/" target="_self" method="post"> + <input + id="action" + name="action" + type="hidden" + value="add_password" + > + <input id="new_pass" name="new_pass" type="text" placeholder="secret123"> + <input type="submit" value="<?php echo $GLOBALS["i18n_save"]; ?>"> + </form> +</section> <?php