first commit

This commit is contained in:
q 2025-09-23 17:27:43 -04:00
commit dc1afb2cb2
228 changed files with 12529 additions and 0 deletions

5
apps/gallery/README.md Normal file
View file

@ -0,0 +1,5 @@
# gallery
Gallery is a simple werc app that overrides the default directory listing behaviour to list directories full of pictures in an image list rather than a bullet point list.
CSS not provided, but classes are included so you can style images how you want

18
apps/gallery/app.rc Normal file
View file

@ -0,0 +1,18 @@
fn conf_enable_gallery {
enable_gallery=yes
conf_enable_app gallery
}
fn gallery_init {
if (! ~ $#enable_gallery 0 ) {
fn dir_listing_handler {
d=`{basename -d $1}
if(~ $#d 0)
d='/'
echo '<h1 class="dir-list-fail">'$gallery_name'</h1> <ul class="dir-list">'
# Symlinks suck: '/.' forces ls to list the linked dir if $d is a symlink.
ls -F $dir_listing_ls_opts $sitedir$d/. | grep -v '/$' | sed $dirfilter$dirclean' s,.*/([^/]+/?)$,<li style="width:100%;"><a href="\1"><img src="\1" alt="test" class="gallery"></img></a></li>,'
echo '</ul>'
}
}
}