add userpages to the home page
This commit is contained in:
parent
f2e198afa5
commit
b26f639726
|
@ -25,6 +25,7 @@
|
|||
</div>
|
||||
<main>
|
||||
<div id="userpages" class="userpages-list">
|
||||
<ul>
|
||||
<?php
|
||||
$usercount = 0;
|
||||
foreach (glob("/home/*/public_html", GLOB_ONLYDIR) as $user):
|
||||
|
@ -49,6 +50,7 @@
|
|||
$usercount++; ?>
|
||||
<li><a href="/~<?=$user?>/" class="userpage-item">~<?=$user?></a></li>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
</div>
|
||||
</main>
|
||||
</body>
|
||||
|
|
|
@ -34,4 +34,18 @@
|
|||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<h2>userpages</h2>
|
||||
<script src="https://unpkg.com/htmx.org@1.5.0"></script>
|
||||
<div
|
||||
hx-get="/users.php"
|
||||
hx-trigger="load"
|
||||
hx-select="#userpages"
|
||||
hx-swap="outerHTML"
|
||||
/>
|
||||
<noscript>looks like you're blocking javascript,
|
||||
<a href="/users.php">click here</a>
|
||||
to see all the userpages.</noscript>
|
||||
</div>
|
||||
{% endblock content %}
|
||||
|
|
Reference in New Issue