summaryrefslogtreecommitdiff
path: root/src/web/_views/header.php
diff options
context:
space:
mode:
authorFreya Murphy <freya@freyacat.org>2024-05-20 17:11:38 -0400
committerFreya Murphy <freya@freyacat.org>2024-05-20 17:11:38 -0400
commit708594d32ffe779cf547c816fa7cdd19d095be2e (patch)
tree30d28553316db02bc027664e17b76d58f2e352ff /src/web/_views/header.php
parentadd en_CAT makefile and use ucfirst/ucwords (diff)
downloadxssbook2-708594d32ffe779cf547c816fa7cdd19d095be2e.tar.gz
xssbook2-708594d32ffe779cf547c816fa7cdd19d095be2e.tar.bz2
xssbook2-708594d32ffe779cf547c816fa7cdd19d095be2e.zip
v2 done
Diffstat (limited to 'src/web/_views/header.php')
-rw-r--r--src/web/_views/header.php17
1 files changed, 15 insertions, 2 deletions
diff --git a/src/web/_views/header.php b/src/web/_views/header.php
index 97eb435..98fcf81 100644
--- a/src/web/_views/header.php
+++ b/src/web/_views/header.php
@@ -55,7 +55,7 @@
</script>
<?=pfp($self, FALSE, 'toggleUserMenu()')?>
<div class="card col hidden" id="user-menu">
- <span class="row" id="user-menu-header">
+ <span class="row mr" id="user-menu-header">
<?=pfp($self, FALSE)?>
<span class="col">
<strong><?=$this->format_model->name($self)?></strong>
@@ -65,16 +65,25 @@
<hr>
<?=ilang(
'action_profile',
+ id: 'action-profile',
class: 'btn',
href: '/profile?id=' . $self['id']
)?>
<?=ilang(
+ 'action_xssbook_about',
+ id: 'action-xssbook-about',
+ class: 'btn',
+ click: 'viewAbout'
+ )?>
+ <?=ilang(
'action_settings',
+ id: 'action-settings',
class: 'btn',
href: '/settings'
)?>
<?=ilang(
'action_logout',
+ id: 'action-logout',
class: 'btn',
href: '/auth/logout'
)?>
@@ -84,6 +93,11 @@
<?php endif; ?>
</div>
<script>
+ $('#action-xssbook-about').on('click', function() {
+ $.get( "/modal/about", function (data) {
+ $(document.body).append(data);
+ });
+ })
$('#action-hamburger').on('click', function() {
let menu = $('.nav-center');
menu.toggleClass('visible');
@@ -94,7 +108,6 @@
userMenu = $('#user-menu');
var nav = $('.nav');
document.onclick = function(event) {
- console.log(event.target, nav[0]);
let outside = !(nav[0].contains(event.target));
if (outside) {
userMenu.addClass('hidden');