1
0
mirror of https://github.com/oupala/apaxy.git synced 2025-09-18 04:32:22 +02:00

53 Commits
1.0.0 ... 2.0.1

Author SHA1 Message Date
oupala
b525e7e19c chore: bump version from 2.0.1-dev to 2.0.1 2019-05-30 22:26:32 +02:00
oupala
367722a973 fix: make the script apaxy-configure.sh more robust
The script apaxy-configure.sh can now be launched from anywhere in the system, and not only from the `apaxy` directory.

This is very useful when the context is managed by another tool, such as ansible.
2019-05-30 22:22:24 +02:00
oupala
049ff109f8 chore: bump version from 2.0.0 to 2.0.1-dev 2019-05-30 22:17:39 +02:00
oupala
83e73ef721 chore: bump version from 1.0.0 to 2.0.0
Version is bumped to 2.0.0 as we are switching apache directive from AddIcon to AddIconByType, which is a huge change, potentially a breaking change for users.
2019-05-29 16:51:30 +02:00
oupala
6ddd63dadd Merge pull request #131 from oupala/feature/lightgallery
feat: add lightgallery as lightbox gallery
2019-05-29 16:35:23 +02:00
oupala
a1cfdd3df5 feat: replace lightGallery by lightgallery.js
Replace lightGallery by lightgallery.js because lightGallery require jQuery whereas lightgallery.js has no dependency.
2019-05-29 16:34:32 +02:00
oupala
cc364861f0 feat: add lightgallery as lightbox gallery
This commit is based on issue #89.
2019-05-29 15:22:42 +02:00
oupala
bf175eab74 chore: set file permissions
Set file permissions on apaxy.config.
2019-05-29 15:21:41 +02:00
oupala
b393699e57 feat: add a favicon
Add a favicon at the root level and remove incorrect favicon links in error pages.

fix #128
2019-05-29 15:21:31 +02:00
oupala
2b13b41cca Merge pull request #129 from oupala/feature/breadcrumb
feat: add a breadcrumb
2019-05-29 14:33:37 +02:00
oupala
4d61aab058 feat: css styling for breadcrumb
Add cdd styling inspired from the following website:

https://css-tricks.com/triangle-breadcrumbs/
2019-05-29 14:32:01 +02:00
oupala
bb8503b85a fix: remove dependency to font Open Sans
We want apaxy to need as few dependencies as possible, and even less external dependencies (because we have control over external dependencies). This commit removes dependency to font Open Sans.

As pointed by nodisc in issue #59, there are some advantages in removing this dependency: no cross-site requests, no leaking of HTTP referers to font provider, works on LAN-only setups, no dependency on an external service.

fix #59
2019-05-28 15:09:52 +02:00
oupala
33d4777101 feat: add a breadcrumb
Add a breadcrumb to tell the user where he is in the tree. js and html is there and working. It needs some css styling though.
2019-05-28 15:01:36 +02:00
oupala
08446fb51f fix: remove a minor typo in the Dockerfile 2019-05-28 14:37:24 +02:00
oupala
adf7563e7e Merge pull request #116 from oupala/feature/mimetype
refactor: replace some AddIcon directives by AddIconByType
2019-05-27 21:53:09 +02:00
oupala
412d45f564 refactor: rewrite AddIcon to AddIconByType
Huge rewrite of .htaccess file so that AddIcon are rewritten to AddIconByType for most of the file. Icon are now displayed on a real media type basis <hich is more reliable that file extension.

More extensions are now supported.

File extensions that are not associated to a media type are still using the old AddIcon syntax.
2019-05-27 21:37:52 +02:00
oupala
917e61a6cc refactor: replace some AddIcon directives by AddIconByType
Replace some AddIcon directives by AddIconByType as recommended in the documentation:

https://httpd.apache.org/docs/2.4/en/mod/mod_autoindex.html#addicon
2019-05-20 17:04:11 +02:00
oupala
f2a81442d1 feat: docker image
The new Dockerfile is based on a smaller image (httpd instead of php) and is more secure due to a smaller attack surface. It also comes with a docker-compose configuration and offers some options.

The Dockerfile is using a multi-stage build, and it using the brand new apaxy install script. It is also running as non root so the image can run in a secured container cluster.
2019-05-20 16:56:14 +02:00
oupala
26e919af93 Merge pull request #124 from jordanbancino/develop
feat: add install script with instructions
2019-05-20 13:29:16 +02:00
oupala
3f98b279fe refactor: large rewrite of install script 2019-05-13 17:22:41 +02:00
oupala
2d17027a54 Merge pull request #127 from chbrandt/develop
Fix docker example
2019-05-13 16:47:13 +02:00
Carlos H Brandt
199b50f2ab Change docker(compose) port to 80 2019-05-13 12:40:58 +02:00
Carlos H Brandt
52c508400c Fix Docker: icons noshow bug, file syntax 2019-05-13 12:39:57 +02:00
oupala
05ba73c6a0 fix: rename htaccess.txt in theme directory
Rename htaccess.txt to .htaccess in theme directory as it remove a 
useless step in installation.
2019-05-07 18:19:36 +02:00
oupala
17475e12e0 fix: remove the leading slash before {FOLDERNAME}
Remove the leading slash before {FOLDERNAME} so that apaxy can be 
installed at the web root level.
2019-05-07 18:06:47 +02:00
oupala
f8670f0d59 fix: filter content works again
This commit fixes a bug where the filter content was not working any more on recent browsers.

close #125
2019-03-22 15:06:43 +01:00
oupala
2ad82a41ad Merge pull request #121 from oupala/feature/code-of-conduct
chore: add a code of conduct and a contributing guide
2018-12-18 19:20:01 +01:00
oupala
654b27f754 chore: add a contributing guide
The contributing guide has been generated using the `generate-contributing` package.
2018-12-18 11:06:31 +01:00
oupala
b83a5abe85 chore: add a code of conduct
The code of conduct has been generated using the `covgen` package.
2018-12-18 10:59:21 +01:00
Jordan Bancino
4b3d4b80ef docs: fix manual install instructions 2018-12-04 20:01:10 -05:00
Jordan Bancino
23f3b8ec67 feat: add install script with instructions 2018-12-05 00:57:25 +00:00
oupala
b67821ed84 Merge branch 'feature/search-bar' into develop 2018-12-03 16:34:27 +01:00
Woodrow Barlow
a935227561 Implement content filtering.
This adds a search bar at the top which filters the results on the
current page.
2018-12-03 12:07:34 +01:00
oupala
008ffc9b38 docs: update install instructions
Update install instruction so that commit 153df9c is complete (code + doc).
2018-11-30 18:29:26 +01:00
oupala
1a89909dc6 Merge pull request #123 from jordanbancino/develop
Fixed #122: Error pages stylesheets do not point to absolute paths.
2018-11-30 18:15:06 +01:00
Jordan Bancino
153df9c90d Fixed #122: Error pages stylesheets do not point to absolute paths. 2018-11-30 15:55:33 +00:00
oupala
31e14beea4 chore: update pull request template 2018-11-29 14:36:10 +01:00
oupala
10de49ea51 chore: add a pull request template 2018-11-27 15:52:20 +01:00
Aleksandr Kliushenok
04b185d702 fix: invalid links from the root folder 2018-11-27 14:01:59 +01:00
oupala
73e44c7852 chore: update issue templates 2018-11-27 14:01:53 +01:00
oupala
2eeb079790 fix: title and paths in error pages 2018-03-04 21:02:30 +01:00
oupala
1164a1b48f feat: add ebooks to supported filetypes 2018-03-01 00:41:48 +01:00
oupala
96f02cdec1 Merge pull request #114 from jordanbancino/patch-1
feat: Add styled error pages
2018-03-01 00:31:57 +01:00
Jordan Bancino
d289b3f639 Merge branch 'develop' into patch-1 2018-02-28 13:09:57 -05:00
oupala
24590e0866 Merge pull request #105 from PeterDaveHelloKitchen/README-codeblock-syntax-highlight
[Docs] Enable README code block syntax highlight
2018-02-27 21:20:07 +01:00
oupala
826fbc15df Merge pull request #106 from PeterDaveHelloKitchen/README-Table-of-Contents
[Doc] Add "Table of Contents" to README.md
2018-02-27 21:19:19 +01:00
oupala
bde848c607 Merge pull request #108 from PeterDaveHelloKitchen/format-improvement
Improve code readability, maintainability, style
2018-02-27 20:56:39 +01:00
Jordan Bancino
0e69f5d866 feat: Add styled error pages 2018-02-26 16:11:43 -05:00
oupala
4471ec1b9f feat(css): responsive design for small screen
Remove padding for mobile client.

closes #29
2018-02-26 21:23:34 +01:00
oupala
9b20006964 chore: bump version from 1.0.0 to 1.1.0-dev 2018-02-26 21:23:33 +01:00
Peter Dave Hello
806e1100dd style: Improve coding style 2018-02-23 11:09:43 +08:00
Peter Dave Hello
f198e57e02 docs: Add "Table of Contents" to README.md 2018-02-23 11:09:18 +08:00
Peter Dave Hello
64534be76e docs: Enable README code block syntax highlight 2018-02-23 11:08:18 +08:00
40 changed files with 2963 additions and 234 deletions

35
.github/ISSUE_TEMPLATE/bug_report.md vendored Normal file
View File

@@ -0,0 +1,35 @@
---
name: Bug report
about: Create a report to help us improve
---
**Describe the bug**
A clear and concise description of what the bug is.
**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error
**Expected behavior**
A clear and concise description of what you expected to happen.
**Screenshots**
If applicable, add screenshots to help explain your problem.
**Desktop (please complete the following information):**
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]
**Smartphone (please complete the following information):**
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]
**Additional context**
Add any other context about the problem here.

View File

@@ -0,0 +1,17 @@
---
name: Feature request
about: Suggest an idea for this project
---
**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
**Describe the solution you'd like**
A clear and concise description of what you want to happen.
**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.
**Additional context**
Add any other context or screenshots about the feature request here.

8
.github/PULL_REQUEST_TEMPLATE.md vendored Normal file
View File

@@ -0,0 +1,8 @@
fixes #
## proposed changes
-
-
-

View File

@@ -1,3 +1,41 @@
## [2.0.1](https://github.com/oupala/apaxy/compare/2.0.0...2.0.1) (2019-05-30)
### Bug Fixes
* make the script apaxy-configure.sh more robust ([367722a](https://github.com/oupala/apaxy/commit/367722a))
# [2.0.0](https://github.com/oupala/apaxy/compare/1.0.0...2.0.0) (2019-05-29)
### Bug Fixes
* filter content works again ([f8670f0](https://github.com/oupala/apaxy/commit/f8670f0)), closes [#125](https://github.com/oupala/apaxy/issues/125)
* invalid links from the root folder ([04b185d](https://github.com/oupala/apaxy/commit/04b185d))
* remove a minor typo in the Dockerfile ([08446fb](https://github.com/oupala/apaxy/commit/08446fb))
* remove dependency to font Open Sans ([bb8503b](https://github.com/oupala/apaxy/commit/bb8503b)), closes [#59](https://github.com/oupala/apaxy/issues/59) [#59](https://github.com/oupala/apaxy/issues/59)
* remove the leading slash before {FOLDERNAME} ([17475e1](https://github.com/oupala/apaxy/commit/17475e1))
* rename htaccess.txt in theme directory ([05ba73c](https://github.com/oupala/apaxy/commit/05ba73c))
* title and paths in error pages ([2eeb079](https://github.com/oupala/apaxy/commit/2eeb079))
### Features
* **css:** responsive design for small screen ([4471ec1](https://github.com/oupala/apaxy/commit/4471ec1)), closes [#29](https://github.com/oupala/apaxy/issues/29)
* add a breadcrumb ([33d4777](https://github.com/oupala/apaxy/commit/33d4777))
* add a favicon ([b393699](https://github.com/oupala/apaxy/commit/b393699)), closes [#128](https://github.com/oupala/apaxy/issues/128)
* add ebooks to supported filetypes ([1164a1b](https://github.com/oupala/apaxy/commit/1164a1b))
* add install script with instructions ([23f3b8e](https://github.com/oupala/apaxy/commit/23f3b8e))
* add lightgallery as lightbox gallery ([cc36486](https://github.com/oupala/apaxy/commit/cc36486)), closes [#89](https://github.com/oupala/apaxy/issues/89)
* Add styled error pages ([0e69f5d](https://github.com/oupala/apaxy/commit/0e69f5d))
* css styling for breadcrumb ([4d61aab](https://github.com/oupala/apaxy/commit/4d61aab))
* docker image ([f2a8144](https://github.com/oupala/apaxy/commit/f2a8144))
* replace lightGallery by lightgallery.js ([a1cfdd3](https://github.com/oupala/apaxy/commit/a1cfdd3))
<a name="1.0.0"></a>
# 1.0.0 (2018-02-21)

77
CODE_OF_CONDUCT.md Normal file
View File

@@ -0,0 +1,77 @@
# Contributor Covenant Code of Conduct
## Our Pledge
In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, sex characteristics, gender identity and expression,
level of experience, education, socio-economic status, nationality, personal
appearance, race, religion, or sexual identity and orientation.
## Our Standards
Examples of behavior that contributes to creating a positive environment
include:
* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members
Examples of unacceptable behavior by participants include:
* The use of sexualized language or imagery and unwelcome sexual attention or
advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic
address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting
## Our Responsibilities
Project maintainers are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behavior.
Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.
## Scope
This Code of Conduct applies both within project spaces and in public spaces
when an individual is representing the project or its community. Examples of
representing a project or community include using an official project e-mail
address, posting via an official social media account, or acting as an appointed
representative at an online or offline event. Representation of a project may be
further defined and clarified by project maintainers.
## Enforcement
Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team at <contact@apaxy.33mail.com>. All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. The project team is
obligated to maintain confidentiality with regard to the reporter of an incident.
Further details of specific enforcement policies may be posted separately.
Project maintainers who do not follow or enforce the Code of Conduct in good
faith may face temporary or permanent repercussions as determined by other
members of the project's leadership.
## Attribution
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
[homepage]: https://www.contributor-covenant.org
For answers to common questions about this code of conduct, see
https://www.contributor-covenant.org/faq

161
CONTRIBUTING.md Normal file
View File

@@ -0,0 +1,161 @@
# Contributing to apaxy
First and foremost, thank you! We appreciate that you want to contribute
to apaxy, your time is valuable, and your contributions mean a lot to us.
## Important!
By contributing to this project, you:
- Agree that you have authored 100% of the content
- Agree that you have the necessary rights to the content
- Agree that you have received the necessary permissions from your
employer to make the contributions (if applicable)
- Agree that the content you contribute may be provided under the
Project license(s)
## Getting started
**What does "contributing" mean?**
Creating an issue is the simplest form of contributing to a project. Creating a
merge reques is more efficient form of contributing. But there are many ways to
contribute, including the following:
- Updating or correcting documentation
- Feature requests
- Bug reports
If you'd like to learn more about contributing in general, the [Guide to
Idiomatic
Contributing](https://github.com/jonschlinkert/idiomatic-contributing)
has a lot of useful information.
**Showing support for apaxy**
Please keep in mind that open source software is built by people like
you, who spend their free time creating things the rest the community
can use.
Don't have time to contribute? No worries, here are some other ways to
show your support for apaxy:
- star the [project](https://github.com/oupala/apaxy)
- tweet your support for apaxy
## Issues
### Before creating an issue
Please try to determine if the issue is caused by an underlying library,
and if so, create the issue there. Sometimes this is difficult to know.
We only ask that you attempt to give a reasonable attempt to find out.
Oftentimes the readme will have advice about where to go to create issues.
Try to follow these guidelines
- **Investigate the issue**:
- **Check the readme** - oftentimes you will find notes about creating
issues, and where to go depending on the type of issue
- Create the issue in the appropriate repository
### Creating an issue
Please be as descriptive as possible when creating an issue. Give us the
information we need to successfully answer your question or address your
issue by answering the following in your issue:
- **version**: please note the version of apaxy are you using
- **extensions, plugins, helpers, etc** (if applicable): please list any
extensions you're using
- **error messages**: please paste any error messages into the issue, or
a [gist](https://gist.github.com/)
### Closing issues
The original poster or the maintainer's of apaxy may close an issue at
any time. Typically, but not exclusively, issues are closed when:
- The issue is resolved
- The project's maintainers have determined the issue is out of scope
- An issue is clearly a duplicate of another issue, in which case the
duplicate issue will be linked
- A discussion has clearly run its course
## Pull requests
### Before creating a merge request
Please try to determine if the issue is caused by an underlying library,
and if so, create the merge request there. Sometimes this is difficult to know.
We only ask that you attempt to give a reasonable attempt to find out.
Oftentimes the readme will have advice about where to go to create merge
requests.
Try to follow these guidelines
- **Investigate the issue**:
- **Check the readme** - oftentimes you will find notes about creating
issues, and where to go depending on the type of issue
- Create the merge request in the appropriate repository
### Creating a merge request
Please be as descriptive as possible when creating a merge request. Give us the
information we need to successfully understand what you want to change or to add
to apaxy. Create the merge request as soon as possible so that the discussion
around your changes can start at the beginning of your work, not when it's over
and you don't time anymore to discuss it.
### Closing merge requests
The original poster or the maintainer's of apaxy may close a merge request at
any time. Typically, but not exclusively, issues are closed when:
- The merge request has conflict with the develop branch that makes it difficult
to merge without a hard work
- The commit message of each commit of the merge request does not follow the
[conventional commits](https://www.conventionalcommits.org/) standard
- The project's maintainers have determined the merge request is out of scope
- A merge request is clearly a duplicate of another merge request, in which case
the duplicate merge request will be linked
- A discussion has clearly run its course
## Next steps
**Tips for creating idiomatic issues**
Spending just a little extra time to review best practices and brush up
on your contributing skills will, at minimum, make your issue easier to
read, easier to resolve, and more likely to be found by others who have
the same or similar issue in the future. At best, it will open up doors
and potential career opportunities by helping you be at your best.
The following resources were hand-picked to help you be the most
effective contributor you can be:
- The [Guide to Idiomatic
Contributing](https://github.com/jonschlinkert/idiomatic-contributing)
is a great place for newcomers to start, but there is also information
for experienced contributors there
- Take some time to learn basic markdown. We can't stress this enough.
Don't start pasting code into GitHub issues before you've taken a moment
to review this [markdown
cheatsheet](https://gist.github.com/jonschlinkert/5854601)
- The GitHub guide to [basic
markdown](https://help.github.com/articles/markdown-basics/) is another
great markdown resource
- Learn about [GitHub Flavored
Markdown](https://help.github.com/articles/github-flavored-markdown/).
And if you want to really go above and beyond, read [mastering
markdown](https://guides.github.com/features/mastering-markdown/)
At the very least, please try to:
- Use backticks to wrap code. This ensures that it retains its
formatting and isn't modified when it's rendered by GitHub, and makes
the code more readable to others
- When applicable, use syntax highlighting by adding the correct
language name after the first "code fence"

View File

@@ -1,28 +1,52 @@
FROM php:7.0-apache
MAINTAINER Inti Gabriel <inti.gabriel+github@intigabriel.de>
# bash docker image will be used for configuring apaxy
FROM bash
RUN a2enmod rewrite
ENV APACHE_RUN_USER=www-data APACHE_RUN_GROUP=www-data APACHE_LOG_DIR=/var/log/apache2 APACHE_LOCK_DIR=/var/lock/apache2 APACHE_PID_FILE=/var/run/apache2.pid
# set apaxyPath to the path where you want apaxy to be installed
# by default, apaxy will be available at "/" (web root)
ARG apaxyPath=""
COPY apache-config.conf /etc/apache2/sites-enabled/000-default.conf
COPY apaxy/ /var/www/html/
RUN mv /var/www/html/htaccess.txt /var/www/html/.htaccess && \
mv /var/www/html/theme/htaccess.txt /var/www/html/theme/.htaccess && \
rm -f /var/www/html/index.html && \
touch /var/www/html/example.gif && \
touch /var/www/html/example.jpg && \
touch /var/www/html/example.txt && \
touch /var/www/html/example.md && \
touch /var/www/html/example && \
touch /var/www/html/example.mp4 && \
touch /var/www/html/example.zip && \
touch /var/www/html/example.doc && \
touch /var/www/html/example.xls && \
touch /var/www/html/example.pdf && \
touch /var/www/html/example.tex && \
touch /var/www/html/example.c && \
touch /var/www/html/example.mp3
# copy apaxy and proceed to configuration
WORKDIR /
COPY . /
RUN bash apaxy-configure.sh -w "${apaxyPath}"
EXPOSE 80
# httpd docker image will be used for running apaxy
FROM httpd:2.4
CMD /usr/sbin/apache2ctl -D FOREGROUND
# set apaxyPath to the path where you want apaxy to be installed
# by default, apaxy will be available at "/" (web root)
ARG apaxyPath=""
# image labels and description
LABEL name="apaxy" \
description="Apaxy is a customisable theme built to enhance the experience of browsing web directories. It uses the mod_autoindex Apache module — and some CSS — to override the default style of a directory listing" \
maintainer="Ploc" \
url="https://oupala.github.io/apaxy/"
# remove index.html file from original httpd image
RUN rm /usr/local/apache2/htdocs/index.html
# enable apache config to be overridden by .htaccess files
RUN sed -i '/<Directory "\/usr\/local\/apache2\/htdocs">/,/<\/Directory>/ s/AllowOverride None/AllowOverride Options Indexes FileInfo/' /usr/local/apache2/conf/httpd.conf
# define apache listen port on a port greater than 1024 to allow a non-root user to start apache
RUN sed -i 's/Listen\ 80/Listen\ 8080/g' /usr/local/apache2/conf/httpd.conf
EXPOSE 8080
# create 'me' group whith gid 1000 and 'me' user in this group with uid 1000
# see https://docs.openshift.com/enterprise/3.2/creating_images/guidelines.html#use-uid
RUN groupadd -f -g 1000 me && \
useradd -u 1000 -g me me
# copy apaxy directory
COPY --from=0 /var/www/html${apaxyPath} /usr/local/apache2/htdocs${apaxyPath}
WORKDIR /usr/local/apache2/htdocs${apaxyPath}
RUN for file_extension in 3dml 3ds 3g2 3gp 7z aac adp ai aif aifc aiff apk appcache asf asm asx atom au avi azw bat bin bmp bpk btif bz bz2 c cab caf cb7 cba cbr cbt cbz cc cgm class cmx com conf cpp css csv curl cxx dcurl deb def deploy dic diff dist distz djv djvu dll dmg dms doc docx dot dra dsc dtd dts dtshd dump dvb dwg dxf ecelp4800 ecelp7470 ecelp9600 elc eol eps epub etx exe f f4v f77 f90 fbs fh fh4 fh5 fh7 fhc flac fli flv flx fly for fpx fst fvt g3 gif gv gz gzip h h261 h263 h264 hh hpp htm html ico ics ief ifb in iso jad jar java jpe jpeg jpg jpgm jpgv jpm js json kar ktx latex list log lrf lvp m1v m2a m2v m3a m3u m3u8 m4a m4u m4v Makefile man mar markdown mcurl md mdb mdi me mid midi mj2 mjp2 mk3d mka mks mkv mmr mng mobi mov movie mp2 mp2a mp3 mp4 mp4a mp4v mpe mpeg mpg mpg4 mpga mpkg ms msi mxu n3 nfo npx odb odc odf odft odg odi odm odp ods odt oga ogg ogv opml otc otf otg oth oti otp ots ott p pas patch pbm pct pcx pdf pgm php phtml pic pkg pls png pnm pot ppm pps ppsx ppt pptx prc ps psd py pya pyv qt ra ram rar ras rb README rgb rip rlc rmi rmp roff rpm rss rtf rtx s s3m sass scss scurl sfv sgi sgm sgml sh sid sil smv snd so spot spx sql sub svg svgz t tar tex text tga tif tiff torrent tr tsv ttc ttf ttl txt udeb uri uris urls uu uva uvg uvh uvi uvm uvp uvs uvu uvv uvva uvvg uvvh uvvi uvvm uvvp uvvs uvvu uvvv vcard vcf vcs viv vob wav wax wbmp wdp weba webm webp wm wma wml wmls wmv wmx woff woff2 wvx xbm xht xhtml xif xla xlc xlm xls xlsx xlt xlw xm xml xpmxwd xsl zip; do touch example.${file_extension}; done
# allow user 'me' to read apache's files
RUN chown -R me:root /usr/local/apache2/ && \
chmod -R g+rwX /usr/local/apache2/
# start container as me
USER me

121
README.md
View File

@@ -1,92 +1,139 @@
# Apaxy
Apaxy is a customisable theme built to enhance the experience of browsing web directories. It uses the `mod_autoindex` Apache moduleand some CSS—to override the default style of a directory listing.
apaxy is a customisable theme built to enhance the experience of browsing web directories. It uses the `mod_autoindex` Apache module - and some css - to override the default style of a directory listing.
## Table of contents
- [features](#features)
- [installation](#installation)
- [docker images](#docker-images)
- [apaxy themes](#apaxy-themes)
- [mime Types](#mime-types)
- [troubleshooting](#troubleshooting)
- [credits](#credits)
## Features
Apaxy may be basic, but it gives you a great deal of creative freedom when styling your directory.
* Style your directory listing with CSS.
* Make it pop with Javascript or jQuery.
* Add welcome messages, download instructions or copyright notices.
* Add custom mime type icons (requires editing the `.htaccess` file)
* style your directory listing with css
* make it pop with javascript
* add welcome messages, download instructions or copyright notices
* add custom media type icons (requires editing the `.htaccess` file)
* use custom error pages
_Sadly, visual style is all you can work with. It's not possible to alter the generated table structure of the listing directory with Apaxy._
*Sadly, visual style is all you can work with. It's not possible to alter the generated table structure of the listing directory with Apaxy.*
## Installation
Apaxy requires an Apache(2.2.11+) enabled HTTP server.
apaxy requires an apache (2.2.11+) enabled http server.
### Quick Start
If you would like, you can automate the installation of Apaxy with the included `apaxy-configure.sh` script.
To get started, first open `apaxy.config` in your favorite editor, then edit the `apacheWebRootPath` and `installWebPath` variables to correspond to your server's settings. Save the file and exit.
You can set some parameters of `apaxy.config` on the command line instead of the config file. You can see the documentation of the cli with the following command: `apaxy-configure.sh -h`.
Then run the configuration script as a user that can write to the `installWebPath` directory. With apache under debian, this would be the `www-data` user:
$ sudo -u www-data ./apaxy-configure.sh
The files will be copied to the web server directory, and modified automatically based on the settings specified.
### Manual Install
Let's assume you have a folder named `share` in your server root directory (the path thus being `http://mywebsite.com/share`) that you'd like to use as your listing directory:
* [Download](https://github.com/AdamWhitcroft/Apaxy/archive/master.zip) and unzip Apaxy
* Copy and paste the contents of the `/apaxy` folder to your `/share` folder.
* Edit `htaccess.txt` (now in the `/share` folder) and update all instances of paths marked with *{FOLDERNAME}* to point to your site root.
- [download](https://github.com/oupala/apaxy/archive/master.zip) and unzip apaxy
- copy and paste the contents of the `/apaxy` folder to your `/share` folder
- edit `htaccess.txt` (now in the `/share` folder) and update all instances of paths marked with *{FOLDERNAME}* to point to your site root
So...
AddIcon /{FOLDERNAME}/theme/icons/gif.png .gif
```apache
AddIconByType (gif,{FOLDERNAME}/theme/icons/gif.png) image/gif
```
Should be changed to...
AddIcon /share/theme/icons/gif.png .gif
```apache
AddIconByType (gif,/share/theme/icons/gif.png) image/gif
```
* Edit `footer.html` (now in the `/share/theme` folder) and update all instances of paths marked with *{FOLDERNAME}* to point to your site root.
- if you want to enable the [gallery](#gallery) feature, overwrite the header and footer files:
```bash
mv footer-lightgallery.html footer.html
mv header-lightgallery.html header.html
```
- edit `footer.html`, along with all the other `html` documents (in the `/share/theme` folder) and update all instances of paths marked with *{FOLDERNAME}* to point to your site root
So...
<script src=/{FOLDERNAME}/theme/apaxy.js></script>
```html
<script src={FOLDERNAME}/theme/apaxy.js></script>
```
Should be changed to...
<script src=/share/theme/apaxy.js></script>
```html
<script src=/share/theme/apaxy.js></script>
```
* Once done, rename `htaccess.txt` to `.htaccess` in both the `/share` and `/share/theme` folders.
* [Treat yo'self](http://25.media.tumblr.com/tumblr_lw7q28y0Mz1qanm80o1_500.gif), you're done.
* once done, rename `htaccess.txt` to `.htaccess` in the `/share` directory
* [treat yo'self](http://25.media.tumblr.com/tumblr_lw7q28y0Mz1qanm80o1_500.gif), you're done!
## Docker images
## Docker image
A [local Demo](http://localhost:8080) can be started with docker.
`docker-compose build`
`docker-compose up`
```bash
docker-compose up
```
## Apaxy themes
If you'd like to alter the default Apaxy theme, look in the `/theme` folder and you'll find the following files:
* `header.html`
* `footer.html`
* `style.css`
- `header.html`
- `footer.html`
- `style.css`
Edit these as you would any other HTML or CSS file.
Edit these as you would any other html or css file.
Adding your own icons is a little more involved. You'll need to edit the main Apaxy `.htaccess` file. Look for the following as an example:
AddIcon /{FOLDERNAME}/theme/icons/gif.png .gif
```apache
AddIconByType (gif,{FOLDERNAME}/theme/icons/gif.png) image/gif
```
The above rule will assign an icon named `gif.png` from the directory `/{FOLDERNAME}/theme/icons/` to any file with the `.gif` extension.
The above rule will assign an icon named `gif.png` from the directory `{FOLDERNAME}/theme/icons/` to any file whose media type is `image/gif`.
This URL path is relative to your site's root.
This url path is relative to your site's root.
## Mime Types
## Media types
The default Apaxy theme `/themes/apaxy` has icons in place for the following mime types:
The default apaxy theme `/themes/apaxy` has icons in place for the following media types:
.aif .aif .asf .asx .avi .bin .c .css .csv .dmg .doc .docm .docx .dot .dotm .eps .flv .gif
.htm .html .ico .iff .jar .jpeg .jpg .js .json .log .m3u .m4a .md .mid .mov .mp3 .mp4 .mpa
.mpg .msg .mwa .odt .pages .pdf .pkg .png .ps .psd .ra .rar .rb .rm .rss .rtf .shtml
.sql .srt .swf .tex .tiff .txt .vob .wav .wmv .wpd .wps .xhtml .xlam .xlr .xls .xlsm .xlsx
.xltm .xltx .xml .zip
3dml 3ds 3g2 3gp 7z aac adp ai aif aifc aiff apk appcache asf asm asx atom au avi azw bat bin bmp bpk btif bz bz2 c cab caf cb7 cba cbr cbt cbz cc cgm class cmx com conf cpp css csv curl cxx dcurl deb def deploy dic diff dist distz djv djvu dll dmg dms doc docx dot dra dsc dtd dts dtshd dump dvb dwg dxf ecelp4800 ecelp7470 ecelp9600 elc eol eps epub etx exe f f4v f77 f90 fbs fh fh4 fh5 fh7 fhc flac fli flv flx fly for fpx fst fvt g3 gif gv gz gzip h h261 h263 h264 hh hpp htm html ico ics ief ifb in iso jad jar java jpe jpeg jpg jpgm jpgv jpm js json kar ktx latex list log lrf lvp m1v m2a m2v m3a m3u m3u8 m4a m4u m4v Makefile man mar markdown mcurl md mdb mdi me mid midi mj2 mjp2 mk3d mka mks mkv mmr mng mobi mov movie mp2 mp2a mp3 mp4 mp4a mp4v mpe mpeg mpg mpg4 mpga mpkg ms msi mxu n3 nfo npx odb odc odf odft odg odi odm odp ods odt oga ogg ogv opml otc otf otg oth oti otp ots ott p pas patch pbm pct pcx pdf pgm php phtml pic pkg pls png pnm pot ppm pps ppsx ppt pptx prc ps psd py pya pyv qt ra ram rar ras rb README rgb rip rlc rmi rmp roff rpm rss rtf rtx s s3m sass scss scurl sfv sgi sgm sgml sh sid sil smv snd so spot spx sql sub svg svgz t tar tex text tga tif tiff torrent tr tsv ttc ttf ttl txt udeb uri uris urls uu uva uvg uvh uvi uvm uvp uvs uvu uvv uvva uvvg uvvh uvvi uvvm uvvp uvvs uvvu uvvv vcard vcf vcs viv vob wav wax wbmp wdp weba webm webp wm wma wml wmls wmv wmx woff woff2 wvx xbm xht xhtml xif xla xlc xlm xls xlsx xlt xlw xm xml xpmxwd xsl zip
## Gallery
You can enable a gallery feature on apaxy. This feature is based on [lightgallery.js](https://sachinchoolur.github.io/lightgallery.js/).
See [installation](#installation) section for more information.
## Troubleshooting
Make sure the options set in `.htaccess` files of Apaxy can actually be changed. This means that you need to allow to ovveride the used options in your apache configuration of the directory apaxy used with: `AllowOverride Indexes`
Make sure the options set in `.htaccess` files of Apaxy can actually be changed. This means that you need to allow to override the used options in your apache configuration of the directory apaxy used with: `AllowOverride Indexes`.
Find more information in the in the [apache documentation](https://httpd.apache.org/docs/2.2/de/mod/core.html).
Find more information in the in the [apache documentation](https://httpd.apache.org/docs/current/mod/core.html#allowoverride).
## Credits
Apaxy owes its existence to the amazing [h5ai](http://larsjung.de/h5ai/) by [Lars Jung](https://twitter.com/lrsjng). Had I not seen this, I would never have looked into making my own (probably way less useful) version.
apaxy owes its existence to the amazing [h5ai](http://larsjung.de/h5ai/) by [Lars Jung](https://twitter.com/lrsjng). Had I not seen this, I would never have looked into making my own (probably way less useful) version.
[Faenza Icons](http://tiheum.deviantart.com/art/Faenza-Icons-173323228) are used in the `apaxy` theme.

View File

@@ -1,10 +0,0 @@
<VirtualHost *:80>
DocumentRoot /var/www/html
<Directory /var/www/html/>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order deny,allow
Allow from all
</Directory>
</VirtualHost>

220
apaxy-configure.sh Executable file
View File

@@ -0,0 +1,220 @@
#!/bin/bash
#
# apaxy configurator
# v0.2
# configure apaxy according to your local paths and configuration
# author : Jordan Bancino and Ploc
# contact : jordan [@] bancino.net
# licence : GPLv3
# enabling strict mode
# -e - exit immediatly on error (disable with "+e" when an error can happens, then enable it again with "-e")
# -u - undefined variables are forbidden (enable this option after getting parameters from $1 $2...) see below
# -o pipefail - find error return code inside piped commands
# IFS - set strong internal field separator
set -eo pipefail
IFS=$'\n\t'
# default config
defaultLogLevel=2
defaultLogFile="$(basename "${0}" .sh).log"
defaultApacheWebRootPath="/var/www/html"
defaultInstallWebPath=""
defaultEnableGallery=false
workingDirectory="$(dirname "${0}")"
# functions
###
# display help
##
displayHelp () {
cat <<EOF
$(basename "${0}") configure apaxy according to your local paths and configuration.
It can either configure apaxy according to your local paths and configuration bu it can also install the required files in your http server path.
EOF
displayUsage
cat <<EOF
Available optionnal parameters are :
-h - display help
-d - set path/to/dir/ directory where apaxy will be installed on the filesystem
-w - set path/to/dir/ directory where apaxy will be available on the httpd server
-g - enable or disable gallery feature
-ll - set the log level
-lf - set the log file
EOF
}
###
# display usage
##
displayUsage () {
cat <<EOF
usage - $(basename "${0}") [-h] [-d path/to/dir/] [-w path/to/dir/] [-g true|false] [-ll logLevel] [-lf logFile]
EOF
}
###
# log a message
#
# @global $logLevel the log level
# @global $logFile the log file
# @param $1 the log level of the message
# @param $2 the log message
##
log () {
local paramLogLevel="${1}"
local paramLogMessage="${2}"
# shellcheck disable=SC2155
local logDate="$(date +%H:%M:%S)"
local logMessage="[${logDate}] ${paramLogMessage}"
if [ "${paramLogLevel}" -le "${logLevel}" ]
then
echo "${logMessage}"
fi
if [ ! -z "${logFile}" ]
then
echo "${logMessage}" >> "${logFile}"
fi
}
# getting parameters value from config file (can be overloaded by cli values)
if [ -f "${workingDirectory}/apaxy.config" ]; then
# shellcheck source=apaxy.config
source "${workingDirectory}/apaxy.config"
else
log 1 "ERROR - apaxy configuration not found, please restore or create the configuration file apaxy.config"
exit 1
fi
# getting parameters value from cli (can overload config file values)
while [ "$#" -ge 1 ] ; do
case "${1}" in
-h|--help) # display help
displayHelp
exit 0
;;
-d) # set path/to/dir/ directory where apaxy will be available on the httpd server
shiftStep=2
apacheWebRootPath="${2}"
;;
-w) # set path/to/dir/ directory where apaxy will be installed on the filesystem
shiftStep=2
installWebPath="${2}"
;;
-g) # enable or disable gallery feature
shiftStep=2
enableGallery="${2}"
;;
-ll) # set the log level
shiftStep=2
logLevel="${2}"
;;
-lf) # set the log file
shiftStep=2
logFile="${2}"
;;
*)
displayUsage
exit 2
;;
esac
if [ "$#" -ge "${shiftStep}" ]
then
shift "${shiftStep}"
else
log 1 "ERROR - invalid number of arguments"
exit 3
fi
done
# setting parameters value
if [ -z "${apacheWebRootPath}" ]
then
apacheWebRootPath="${defaultApacheWebRootPath}"
fi
if [ -z "${installWebPath}" ]
then
installWebPath="${defaultInstallWebPath}"
fi
if [ -n "${apacheWebRootPath}" ] && [ -z "${installWebPath}" ]
then
installDir="${apacheWebRootPath}"
else
installDir="${apacheWebRootPath}${installWebPath}"
fi
if [ -z "${enableGallery}" ]
then
enableGallery="${defaultEnableGallery}"
fi
if [ -z "${logLevel}" ]
then
logLevel="${defaultLogLevel}"
fi
if [ -z "${logFile}" ]
then
logFile="${workingDirectory}/${defaultLogFile}"
fi
# enabling strict mode
# -u - undefined variables are forbidden (enable this option after getting parameters from $1 $2...)
set -u
# checking parameters value
if [ ! -d "$(dirname "${logFile}")" ]
then
log 1 "ERROR - $(dirname "${logFile}") does not exist"
exit 4
fi
# script
log 1 "- creating install directory ${installDir}"
mkdir -p "${installDir}"
if [ ! -d "${installDir}" ] || [ ! -w "${installDir}" ]; then
log 1 "ERROR - install directory ${installDir} does not exist or is not writable by the current user"
exit 5
fi
log 1 "- copying apaxy in install directory"
cp -r ${workingDirectory}/apaxy/* "${installDir}/"
log 1 "- configuring apaxy in install directory"
log 2 "- generating htaccess"
sed "s|{FOLDERNAME}|${installWebPath}|g" < "${installDir}/htaccess.txt" > "${installDir}/.htaccess"
rm "${installDir}/htaccess.txt"
if [ "${enableGallery}" = "true" ]
then
log 1 "- enabling gallery feature"
mv -f "${installDir}/theme/header-lightgallery.html" "${installDir}/theme/header.html"
mv -f "${installDir}/theme/footer-lightgallery.html" "${installDir}/theme/footer.html"
else
log 2 "- gallery feature not enabled"
fi
# find all the html files and replace the variable in them
# this will automatically take care of the error pages, headers and footers
log 2 "- setting path in html files"
files=$(find ${installDir} -name "*.html")
while read -r file; do
sed -i "s|{FOLDERNAME}|${installWebPath}|g" "${file}"
done <<< "${files}"
log 2 "- syncing filesystem"
sync
log 1 "- filesystem has been synced and is now consistent"
log 1 "- apaxy has been successfully configured and installed in ${installDir}"

52
apaxy.config Normal file
View File

@@ -0,0 +1,52 @@
#!/bin/bash
#
# apaxy configurator
# v0.2
# use "apaxy-configure.sh" to configure apaxy after adjusting the needed values in this file
# author : Jordan Bancino and Ploc
# contact : jordan [@] bancino.net
# licence : GPLv3
# default log level on the console (the lower the number is, the less verbose it is)
#defaultLogLevel=2
# all log messages are written to log file
#defaultLogFile="apaxy.log"
# the apache web root path where the server serves documents
#
# default for apache is /var/www/html
#
# note that path should be absolute, so make sure it starts with a "/"
# and DO NOT leave a trailing slash
#
# good: "/var/www/html" <- starts with "/", does not have trailing "/"
# bad : "var/www/html/" <- does not start with "/", have a trailing "/"
#
apacheWebRootPath="/var/www/html"
# the directory where apaxy will be used (this is relative to the web server root, and contains the "theme" folder)
#
# for instance: "http://example.org/share" would make this value "/share", where "/share/theme" is the theme directory
#
# note that path should be absolute, so make sure it starts with a "/"
# and DO NOT leave a trailing slash
#
# good: "/share" <- starts with "/", does not have trailing "/"
# bad : "share/" <- does not start with "/", has a trailing "/"
#
# by default, apaxy is configured to be installed at the root level of your web server
#
# if you want apaxy to be installed anywhere else, you can set it in the installWebPath variable
#
# installWebPath="/share"
#
installWebPath=""
# enable lightgallery.js to preview images in the browser with navigation links
#
# this feature is disabled by default as it downloads css and js files from a CDN
#
# please enable it with caution
#
enableGallery=false

BIN
apaxy/favicon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

View File

@@ -1,94 +1,450 @@
#
# Apaxy by @adamwhitcroft
# apaxy by @adamwhitcroft
#
# For a full breakdown of the mod_autoindex module:
# http://apache.org/docs/2.2/mod/mod_autoindex.html
#
# ENABLE INDEXING
Options +Indexes
# INDEX OPTIONS
IndexOptions +Charset=UTF-8 +FancyIndexing +IgnoreCase +FoldersFirst +XHTML +HTMLTable +SuppressRules +SuppressDescription +NameWidth=* +IconsAreLinks
# META VIEWPORT
IndexHeadInsert "<meta name=\"viewport\" content=\"width=device-width, initial-scale=1\" />"
# HIDE /theme DIRECTORY
IndexIgnore .htaccess /theme
#
# GENERAL ICONS (BLANK, DIRECTORY, PARENT DIRECTORY)
# for a full breakdown of the mod_autoindex module:
# http://apache.org/docs/2.4/mod/mod_autoindex.html
#
#
# Replace {FOLDERNAME} with your directory URL eg:
# If your directory is http://mywebsite.com/share/
# you would change to:
# official media types list from IANA
# https://www.iana.org/assignments/media-types/media-types.xhtml
#
# media types included in apache
# https://svn.apache.org/repos/asf/httpd/httpd/trunk/docs/conf/mime.types
#
# enable indexing
Options +Indexes
# index options
IndexOptions +Charset=UTF-8 +FancyIndexing +FoldersFirst +HTMLTable +IconsAreLinks +IgnoreCase +NameWidth=* +SuppressDescription +SuppressRules +XHTML
# meta viewport
IndexHeadInsert "<meta name=\"viewport\" content=\"width=device-width, initial-scale=1\" />"
# hide ".htaccess" file, "favicon.ico" file and "/theme" directory
IndexIgnore .htaccess favicon.ico /theme
#
# general icons (blank, directory, parent directory)
#
#
# replace {FOLDERNAME} with your directory url
#
# if your directory is http://mywebsite.com/share/ you would change to:
#
# AddIcon /share/theme/icons/blank.png ^^BLANKICON^^
#
AddIcon /{FOLDERNAME}/theme/icons/blank.png ^^BLANKICON^^
AddIcon /{FOLDERNAME}/theme/icons/folder.png ^^DIRECTORY^^
AddIcon /{FOLDERNAME}/theme/icons/folder-home.png ..
AddIconByType (TXT,/{FOLDERNAME}/theme/icons/text.png) text/*
AddIconByType (IMG,/{FOLDERNAME}/theme/icons/image.png) image/*
AddIconByType (SND,/{FOLDERNAME}/theme/icons/audio.png) audio/*
AddIconByType (VID,/{FOLDERNAME}/theme/icons/video.png) video/*
AddIcon {FOLDERNAME}/theme/icons/blank.png ^^BLANKICON^^
AddIcon {FOLDERNAME}/theme/icons/folder.png ^^DIRECTORY^^
AddIcon {FOLDERNAME}/theme/icons/folder-home.png ..
#
# EXTENSION SPECIFIC ICONS
# unused icons (that should be soon removed)
#
# folder-open.png => maybe a js when a folder is hovered
# folder-page.png
#
AddIcon /{FOLDERNAME}/theme/icons/archive.png .7z .bz2 .cab .gz .tar
AddIcon /{FOLDERNAME}/theme/icons/audio.png .aac .aif .aifc .aiff .ape .au .flac .iff .m4a .mid .mp3 .mpa .ra .wav .wma .f4a .f4b .oga .ogg .xm .it .s3m .mod
AddIcon /{FOLDERNAME}/theme/icons/bin.png .bin .hex
AddIcon /{FOLDERNAME}/theme/icons/bmp.png .bmp
AddIcon /{FOLDERNAME}/theme/icons/c.png .c
AddIcon /{FOLDERNAME}/theme/icons/calc.png .xlsx .xlsm .xltx .xltm .xlam .xlr .xls .csv
AddIcon /{FOLDERNAME}/theme/icons/cd.png .iso
AddIcon /{FOLDERNAME}/theme/icons/cpp.png .cpp
AddIcon /{FOLDERNAME}/theme/icons/css.png .css .sass .scss
AddIcon /{FOLDERNAME}/theme/icons/deb.png .deb
AddIcon /{FOLDERNAME}/theme/icons/doc.png .doc .docx .docm .dot .dotx .dotm .log .msg .odt .pages .rtf .tex .wpd .wps
AddIcon /{FOLDERNAME}/theme/icons/draw.png .svg .svgz
AddIcon /{FOLDERNAME}/theme/icons/eps.png .ai .eps
AddIcon /{FOLDERNAME}/theme/icons/exe.png .exe
AddIcon /{FOLDERNAME}/theme/icons/gif.png .gif
AddIcon /{FOLDERNAME}/theme/icons/h.png .h
AddIcon /{FOLDERNAME}/theme/icons/html.png .html .xhtml .shtml .htm .URL .url
AddIcon /{FOLDERNAME}/theme/icons/ico.png .ico
AddIcon /{FOLDERNAME}/theme/icons/java.png .jar
AddIcon /{FOLDERNAME}/theme/icons/jpg.png .jpg .jpeg .jpe
AddIcon /{FOLDERNAME}/theme/icons/js.png .js .json
AddIcon /{FOLDERNAME}/theme/icons/markdown.png .md
AddIcon /{FOLDERNAME}/theme/icons/package.png .pkg .dmg
AddIcon /{FOLDERNAME}/theme/icons/pdf.png .pdf
AddIcon /{FOLDERNAME}/theme/icons/php.png .php .phtml
AddIcon /{FOLDERNAME}/theme/icons/playlist.png .m3u .m3u8 .pls .pls8
AddIcon /{FOLDERNAME}/theme/icons/png.png .png
AddIcon /{FOLDERNAME}/theme/icons/ps.png .ps
AddIcon /{FOLDERNAME}/theme/icons/psd.png .psd
AddIcon /{FOLDERNAME}/theme/icons/py.png .py
AddIcon /{FOLDERNAME}/theme/icons/rar.png .rar
AddIcon /{FOLDERNAME}/theme/icons/rb.png .rb
AddIcon /{FOLDERNAME}/theme/icons/rpm.png .rpm
AddIcon /{FOLDERNAME}/theme/icons/rss.png .rss
AddIcon /{FOLDERNAME}/theme/icons/script.png .bat .cmd .sh
AddIcon /{FOLDERNAME}/theme/icons/sql.png .sql
AddIcon /{FOLDERNAME}/theme/icons/tiff.png .tiff .tif
AddIcon /{FOLDERNAME}/theme/icons/text.png .txt .nfo
AddIcon /{FOLDERNAME}/theme/icons/video.png .asf .asx .avi .flv .mkv .mov .mp4 .mpg .rm .srt .swf .vob .wmv .m4v .f4v .f4p .ogv
AddIcon /{FOLDERNAME}/theme/icons/xml.png .xml
AddIcon /{FOLDERNAME}/theme/icons/zip.png .zip
DefaultIcon /{FOLDERNAME}/theme/icons/default.png
#
# THEME FILES
# image
#
HeaderName /{FOLDERNAME}/theme/header.html
ReadmeName /{FOLDERNAME}/theme/footer.html
IndexStyleSheet "/{FOLDERNAME}/theme/style.css"
# ext: bmp
AddIconByType (bmp,{FOLDERNAME}/theme/icons/bmp.png) image/bmp
# ext: svg svgz
AddIconByType (draw,{FOLDERNAME}/theme/icons/draw.png) image/svg+xml
# ext: gif
AddIconByType (gif,{FOLDERNAME}/theme/icons/gif.png) image/gif
# ext: ico
AddIconByType (ico,{FOLDERNAME}/theme/icons/ico.png) image/x-icon
# ext: jpg jpeg jpe
AddIconByType (jpg,{FOLDERNAME}/theme/icons/jpg.png) image/jpeg
# ext: png
AddIconByType (png,{FOLDERNAME}/theme/icons/png.png) image/png
# ext: ai eps ps
AddIconByType (ps,{FOLDERNAME}/theme/icons/eps.png) application/postscript
# ext: psd
AddIconByType (psd,{FOLDERNAME}/theme/icons/psd.png) image/vnd.adobe.photoshop
# ext: tiff tif
AddIconByType (tiff,{FOLDERNAME}/theme/icons/tiff.png) image/tiff
# oti media type bug in apache, fallback to AddIcon
# ext: oti
AddIcon {FOLDERNAME}/theme/icons/image.png .oti
# all other images
# ext: bmp cgm g3 gif ief jpeg jpg jpe ktx png btif sgi svg svgz tiff tif psd uvi uvvi uvg uvvg djvu djv sub dwg dxf fbs fpx fst mmr rlc mdi wdp npx wbmp xif webp 3ds ras cmx fh fhc fh4 fh5 fh7 ico sid pcx pic pct pnm pbm pgm ppm rgb tga xbm xpmxwd
# ext: odg
# ext: otg
# ext: odi
# ext: oti
AddIconByType (image,{FOLDERNAME}/theme/icons/image.png) image/* \
application/vnd.oasis.opendocument.graphics \
application/vnd.oasis.opendocument.graphics-template \
application/vnd.oasis.opendocument.image \
application/vnd.oasis.opendocument.image-template
#
# audio
#
# audio playlist
# ext: m3u
# ext: m3u8
# ext: pls
AddIconByType (playlist,{FOLDERNAME}/theme/icons/playlist.png) audio/x-mpegurl \
application/vnd.apple.mpegurl \
application/pls+xml
# all audio
# ext: adp au snd mid midi kar rmi m4a mp4a mpga mp2 mp2a mp3 m2a m3a oga ogg spx s3m sil uva uvva eol dra dts dtshd lvp pya ecelp4800 ecelp7470 ecelp9600 rip weba aac aif aiff aifc caf flac mka m3u wax wma xm rmp ram ra wav
AddIconByType (audio,{FOLDERNAME}/theme/icons/audio.png) audio/*
#
# video
#
# audio playlist
# ext: mxu m4u
AddIconByType (playlist,{FOLDERNAME}/theme/icons/video.png) video/vnd.mpegurl
# all video
# ext: 3g2 3gp h261 h263 h264 jpgv jpm jpgm mj2 mjp2 mp4 mp4v mpg4 mpeg mpg mpe m1v m2v ogv qt mov uvh uvvh uvm uvvm uvp uvvp uvs uvvs uvv uvvv dvb fvt mxu m4u pyv uvu uvvu viv webm f4v fli flv m4v mkv mk3d mks mng asf asx avi vob wmv wm wmx wvx movie smv
AddIconByType (video,{FOLDERNAME}/theme/icons/video.png) video/*
#
# internet
#
# ext: html htm
# ext: xhtml xht
# ext: uri uris urls
AddIconByType (html,{FOLDERNAME}/theme/icons/html.png) text/html \
application/xhtml+xml \
text/uri-list
# ext: rss
# ext: atom
AddIconByType (rss,{FOLDERNAME}/theme/icons/rss.png) application/rss+xml \
application/atom+xml
# ext: ics ifb
# ext: vcs
AddIconByType (vcal,{FOLDERNAME}/theme/icons/vcal.png) text/calendar \
text/x-vcalendar
# ext: vcard
# ext: vcf
AddIconByType (vcard,{FOLDERNAME}/theme/icons/vcard.png) text/vcard \
text/x-vcard
# ext: torrent
AddIconByType (torrent,{FOLDERNAME}/theme/icons/torrent.png) application/x-bittorrent
#
# office
#
# otc media type bug in apache, fallback to AddIcon
# ext: otc
AddIcon {FOLDERNAME}/theme/icons/calc.png .otc
# ext: odc
# ext: otc
# ext: odf
# ext: odft
# ext: ods
# ext: ots
# ext: csv
# ext: xls xlm xla xlc xlt xlw
# ext: xlsx
AddIconByType (calc,{FOLDERNAME}/theme/icons/calc.png) application/vnd.oasis.opendocument.chart \
application/vnd.oasis.opendocument.chart-template \
application/vnd.oasis.opendocument.formula \
application/vnd.oasis.opendocument.formula-template \
application/vnd.oasis.opendocument.spreadsheet \
application/vnd.oasis.opendocument.spreadsheet-template \
text/csv \
application/vnd.ms-excel \
application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
# ext: odt
# ext: odm
# ext: ott
# ext: oth
# ext: doc dot
# ext: docx
AddIconByType (doc,{FOLDERNAME}/theme/icons/doc.png) application/vnd.oasis.opendocument.text \
application/vnd.oasis.opendocument.text-master \
application/vnd.oasis.opendocument.text-template \
application/vnd.oasis.opendocument.text-web \
application/msword \
application/vnd.openxmlformats-officedocument.wordprocessingml.document
# ext: odp
# ext: otp
# ext: ppt pps pot
# ext: pptx
# ext: ppsx
AddIconByType (slideshow,{FOLDERNAME}/theme/icons/pres.png) application/vnd.oasis.opendocument.presentation \
application/vnd.oasis.opendocument.presentation-template \
application/vnd.ms-powerpoint \
\
application/vnd.openxmlformats-officedocument.presentationml.presentation \
application/vnd.openxmlformats-officedocument.presentationml.slideshow
# ext: mdb
# ext: odb
AddIconByType (database,{FOLDERNAME}/theme/icons/unknown.png) application/x-msaccess \
application/vnd.oasis.opendocument.database
# ext: pdf
AddIconByType (pdf,{FOLDERNAME}/theme/icons/pdf.png) application/pdf
# ext: rtf
AddIconByType (rtf,{FOLDERNAME}/theme/icons/rtf.png) application/rtf
# ext: latex
# ext: tex
AddIconByType (tex,{FOLDERNAME}/theme/icons/tex.png) application/x-latex \
application/x-tex
#
# programming
#
# h media type not yet included in apache, fallback to AddIcon
# ext: h
#AddIconByType (h,{FOLDERNAME}/theme/icons/h.png) text/x-h
AddIcon {FOLDERNAME}/theme/icons/h.png .h
# hpp files do not have a specific media type, fallback to AddIcon
# ext: hpp
AddIcon {FOLDERNAME}/theme/icons/hpp.png .hpp
# cpp files do not have a specific media type, fallback to AddIcon
# ext: cpp
AddIcon {FOLDERNAME}/theme/icons/cpp.png .cpp
# c media type bug in apache, fallback to AddIcon
# ext: c
AddIcon {FOLDERNAME}/theme/icons/c.png .c
# ext: c cc cxx cpp h hh dic
AddIconByType (c,{FOLDERNAME}/theme/icons/c.png) text/x-c
# ext: java
# ext: jar
# ext: class
AddIconByType (java,{FOLDERNAME}/theme/icons/java.png) text/x-java-source \
application/java-archive \
application/java-vm
# sass and scss files do not have a specific media type, fallback to AddIcon
# ext: sass scss
AddIcon {FOLDERNAME}/theme/icons/css.png .sass .scss
# ext: css
AddIconByType (css,{FOLDERNAME}/theme/icons/css.png) text/css
# ext: js
AddIconByType (js,{FOLDERNAME}/theme/icons/js.png) application/javascript
# ext: json
AddIconByType (json,{FOLDERNAME}/theme/icons/json.png) application/json
# diff and patch files do not have a specific media type, fallback to AddIcon
# ext: diff patch
AddIcon {FOLDERNAME}/theme/icons/diff.png .diff .patch
# makefile files do not have a specific media type, fallback to AddIcon
# ext: Makefile
AddIcon {FOLDERNAME}/theme/icons/makefile.png Makefile
# php files do not have a specific media type, fallback to AddIcon
# ext: php phtml
AddIcon {FOLDERNAME}/theme/icons/php.png .php .phtml
# python files do not have a specific media type, fallback to AddIcon
# ext: py
AddIcon {FOLDERNAME}/theme/icons/py.png .py
# ruby files do not have a specific media type, fallback to AddIcon
# ext: rb
AddIcon {FOLDERNAME}/theme/icons/rb.png .rb
# ext: sql
AddIconByType (sql,{FOLDERNAME}/theme/icons/sql.png) application/x-sql
# ext: xml xsl
# ext: dtd
AddIconByType (xml,{FOLDERNAME}/theme/icons/xml.png) application/xml \
application/xml-dtd
#
# sysadmin
#
# pkg files do not have a specific media type, fallback to AddIcon
# ext: pkg
AddIcon {FOLDERNAME}/theme/icons/package.png .pkg
# ext: bin dms lrf mar so dist distz pkg bpk dump elc deploy
AddIconByType (bin,{FOLDERNAME}/theme/icons/bin.png) application/octet-stream
# log files do not have a specific media type, fallback to AddIcon
# ext: log
AddIcon {FOLDERNAME}/theme/icons/log.png .log
# ext: iso
AddIconByType (cd,{FOLDERNAME}/theme/icons/cd.png) application/x-iso9660-image
# ext: deb udeb
AddIconByType (deb,{FOLDERNAME}/theme/icons/deb.png) application/x-debian-package
# msi files do not have a specific media type, fallback to AddIcon
# ext: msi
AddIcon {FOLDERNAME}/theme/icons/install.png .msi
# exe media type bug in apache, fallback to AddIcon
# ext: exe
AddIcon {FOLDERNAME}/theme/icons/exe.png .exe
# ext: exe dll com bat msi
AddIconByType (exe,{FOLDERNAME}/theme/icons/exe.png) application/x-msdownload
# ext: dmg
# ext: mpkg
# ext: apk
AddIconByType (package,{FOLDERNAME}/theme/icons/package.png) application/x-apple-diskimage \
application/vnd.apple.installer+xml \
application/vnd.android.package-archive
# rpm files do not have a specific media type, fallback to AddIcon
# ext: rpm
AddIcon {FOLDERNAME}/theme/icons/rpm.png .rpm
# ext: sh
AddIconByType (script,{FOLDERNAME}/theme/icons/script.png) application/x-sh
# otf media type bug in apache, fallback to AddIcon
# ext: otf
AddIcon {FOLDERNAME}/theme/icons/font.png .otf
# ext: ttc otf ttf woff2 woff
AddIconByType (font,{FOLDERNAME}/theme/icons/font.png) font/*
#
# archives
#
# gzip media type not yet included in apache, fallback to AddIcon
# ext: gzip gz
#AddIconByType (gzip,{FOLDERNAME}/theme/icons/gzip.png) application/gzip
AddIcon {FOLDERNAME}/theme/icons/gzip.png .gzip .gz
# ext: rar
AddIconByType (rar,{FOLDERNAME}/theme/icons/rar.png) application/x-rar-compressed
# ext: tar
AddIconByType (tar,{FOLDERNAME}/theme/icons/tar.png) application/x-tar
# ext: zip
AddIconByType (zip,{FOLDERNAME}/theme/icons/zip.png) application/zip
# ext: 7z bz bz2 cab
AddIconByType (archive,{FOLDERNAME}/theme/icons/archive.png) application/x-7z-compressed \
application/x-bzip \
application/x-bzip2 \
application/vnd.ms-cab-compressed
#
# books
#
# ext: cbr cba cbt cbz cb7
AddIconByType (text,{FOLDERNAME}/theme/icons/image.png) application/x-cbr
# ext: epub
# ext: prc mobi
# ext: azw
AddIconByType (text,{FOLDERNAME}/theme/icons/text.png) application/epub+zip \
application/x-mobipocket-ebook \
application/vnd.amazon.ebook
#
# text
#
# readme files do not have a specific media type, fallback to AddIcon
# ext: README
AddIcon {FOLDERNAME}/theme/icons/readme.png README
# markdown media type not yet included in apache, fallback to AddIcon
# ext: markdown md
#AddIconByType (markdown,{FOLDERNAME}/theme/icons/markdown.png) text/mardown
AddIcon {FOLDERNAME}/theme/icons/markdown.png .markdown .md
# conf media type bug in apache, fallback to AddIcon
# ext: conf
AddIcon {FOLDERNAME}/theme/icons/script.png .conf
# for media type bug in apache, fallback to AddIcon
# ext: for
AddIcon {FOLDERNAME}/theme/icons/text.png .for
# uu media type bug in apache, fallback to AddIcon
# ext: uu
AddIcon {FOLDERNAME}/theme/icons/text.png .uu
# this directive has to be at the end of the file because the text/* media type is very generic and should not be interpreted before other more specific directives
# ext: appcache ics ifb css csv html htm n3 txt text conf def list log in dsc rtx sgml sgm tsv t tr roff man me ms ttl uri uris urls vcard curl dcurl mcurl scurl sub fly flx gv 3dml spot jad wmls wml s asm c cc cxx cpp h hh dic f for f77 f90 java nfo opml p pas etx sfv uu vcs vcf
AddIconByType (text,{FOLDERNAME}/theme/icons/text.png) text/*
#
# default
#
DefaultIcon {FOLDERNAME}/theme/icons/default.png
#
# theme files
#
HeaderName {FOLDERNAME}/theme/header.html
ReadmeName {FOLDERNAME}/theme/footer.html
IndexStyleSheet {FOLDERNAME}/theme/style.css
#
# error pages
#
ErrorDocument 400 {FOLDERNAME}/theme/400.html
ErrorDocument 403 {FOLDERNAME}/theme/403.html
ErrorDocument 404 {FOLDERNAME}/theme/404.html
ErrorDocument 408 {FOLDERNAME}/theme/408.html
ErrorDocument 500 {FOLDERNAME}/theme/500.html
ErrorDocument 502 {FOLDERNAME}/theme/502.html

View File

@@ -6,4 +6,4 @@
#
# Don't index this folder
Options -Indexes
Options -Indexes

18
apaxy/theme/400.html Normal file
View File

@@ -0,0 +1,18 @@
<DOCTYPE html>
<html>
<head>
<meta charset="UTF-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Error 400</title>
<!-- Stylesheets -->
<link rel="stylesheet" href="{FOLDERNAME}/theme/style.css" />
</head>
<body class="fadeDown">
<center>
<h1>Error.</h1>
<div class="errorCode">400
</div>
<p>Sorry, I don't understand what you want me to do.</p>
</center>
</body>
</html>

18
apaxy/theme/403.html Normal file
View File

@@ -0,0 +1,18 @@
<DOCTYPE html>
<html>
<head>
<meta charset="UTF-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Error 403</title>
<!-- Stylesheets -->
<link rel="stylesheet" href="{FOLDERNAME}/theme/style.css" />
</head>
<body class="fadeDown">
<center>
<h1>Error.</h1>
<div class="errorCode">403
</div>
<p>You aren't allowed to be here.</p>
</center>
</body>
</html>

18
apaxy/theme/404.html Normal file
View File

@@ -0,0 +1,18 @@
<DOCTYPE html>
<html>
<head>
<meta charset="UTF-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Error 404</title>
<!-- Stylesheets -->
<link rel="stylesheet" href="{FOLDERNAME}/theme/style.css" />
</head>
<body class="fadeDown">
<center>
<h1>Error.</h1>
<div class="errorCode">404
</div>
<p>I can't find what you are looking for...</p>
</center>
</body>
</html>

18
apaxy/theme/408.html Normal file
View File

@@ -0,0 +1,18 @@
<DOCTYPE html>
<html>
<head>
<meta charset="UTF-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Error 408</title>
<!-- Stylesheets -->
<link rel="stylesheet" href="{FOLDERNAME}/theme/style.css" />
</head>
<body class="fadeDown">
<center>
<h1>Error.</h1>
<div class="errorCode">408
</div>
<p>I refuse to wait any longer.</p>
</center>
</body>
</html>

18
apaxy/theme/500.html Normal file
View File

@@ -0,0 +1,18 @@
<DOCTYPE html>
<html>
<head>
<meta charset="UTF-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Error 500</title>
<!-- Stylesheets -->
<link rel="stylesheet" href="{FOLDERNAME}/theme/style.css" />
</head>
<body class="fadeDown">
<center>
<h1>Error.</h1>
<div class="errorCode">500
</div>
<p>I don't know what to do. This isn't your fault.</p>
</center>
</body>
</html>

18
apaxy/theme/502.html Normal file
View File

@@ -0,0 +1,18 @@
<DOCTYPE html>
<html>
<head>
<meta charset="UTF-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Error 502</title>
<!-- Stylesheets -->
<link rel="stylesheet" href="{FOLDERNAME}/theme/style.css" />
</head>
<body class="fadeDown">
<center>
<h1>Error.</h1>
<div class="errorCode">502
</div>
<p>I received some invalid information from my master.</p>
</center>
</body>
</html>

View File

@@ -0,0 +1,15 @@
var imageSelector = [
'tr:not(.parent) td.indexcolname a[href$=".png"]',
'tr:not(.parent) td.indexcolname a[href$=".jpg"]',
'tr:not(.parent) td.indexcolname a[href$=".jpeg"]',
].join(', ');
lightGallery(document.getElementById('indexlist'), {
selector: imageSelector,
mode: 'lg-slide',
hideBarsDelay: 2000,
loop: false,
hideControlOnEnd: true,
download: true,
cssEasing : 'cubic-bezier(0.25, 0, 0.25, 1)'
});

View File

@@ -1,12 +1,102 @@
// grab the 2nd child and add the parent class. tr:nth-child(2)
document.getElementsByTagName('tr')[1].className = 'parent';
// fix links when not adding a / at the end of the URI
var uri = window.location.pathname.substr(1);
if (uri.substring(uri.length-1) != '/'){
var indexes = document.getElementsByClassName('indexcolname'),
i = indexes.length;
while (i--){
var a = indexes[i].getElementsByTagName('a')[0];
a.href = '/' + uri + '/' + a.getAttribute('href',2);
}
if (uri.substring(uri.length - 1) !== '/') {
var indexes = document.getElementsByClassName('indexcolname');
for (let i of indexes) {
var a = i.getElementsByTagName('a')[0];
a.href = '/' + a.getAttribute('href', 2);
}
}
// content filtering, based on "light javascript table filter" by Chris Coyier
// https://codepen.io/chriscoyier/pen/tIuBL - MIT License
(function(document) {
'use strict';
var TableFilter = (function(Arr) {
// the search bar element
var _input;
// find all rows of all tables and call _filter on them
function _onInputEvent(e) {
_input = e.target;
var tables = document.getElementsByTagName('table');
Arr.forEach.call(tables, function(table) {
Arr.forEach.call(table.tBodies, function(tbody) {
Arr.forEach.call(tbody.rows, _filter);
});
});
}
// show or hide a row based on the value of _input
function _filter(row) {
// skip "special" rows
if (row.className.indexOf('indexhead') != -1 || row.className.indexOf('parent') != -1) {
return;
}
// only check the 'name' field
var text = row.getElementsByTagName('td')[1].textContent.toLowerCase();
var val = _input.value.toLowerCase();
// change display type to show / hide this row
row.style.display = text.indexOf(val) === -1 ? 'none' : 'table-row';
}
return {
init: function() {
// grab the 1st child and add the indexhead class. tr:nth-child(1)
var row = document.getElementsByTagName('tr')[0];
// some versions of apache already add this class
if (row !== null && row.className.indexOf('indexhead') == -1) {
row.className += ' indexhead';
}
// grab the 2nd child and add the parent class. tr:nth-child(2)
row = document.getElementsByTagName('tr')[1];
// when apaxy is installed at doc root, there is no "parent directory" row
if (row !== null && row.getElementsByTagName('td')[1].textContent === 'Parent Directory') {
row.className += ' parent';
}
// find the search box and bind the input event
document.getElementById('filter').oninput = _onInputEvent;
}
};
})(Array.prototype);
document.addEventListener('readystatechange', function() {
if (document.readyState === 'complete') {
TableFilter.init();
}
});
})(document);
// generate a breadcrumb
var uri = window.location.pathname.substr(1);
var arr = uri.split('/');
var url = ""
var bread = '<li><strong><a href="/">Home</a></strong></li>';
var cont = 1;
arr.forEach(function(value){
url = url + '/' + value;
if(value != ''){
if(arr.length == cont+1)
bread += "<li class='active'>"+decodeURI(value)+"</li>";
else
bread += "<li><a href='"+url+"'>"+decodeURI(value)+"</a></li>";
}
cont++;
});
document.getElementById("breadcrumb").innerHTML = bread;
if (uri.substring(uri.length-1) != '/'){
var indexes = document.getElementsByClassName('indexcolname'),
i = indexes.length;
while (i--){
var a = indexes[i].getElementsByTagName('a')[0];
a.href = uri + '/' + a.getAttribute('href',2);
}
}

View File

@@ -0,0 +1,12 @@
<div class="block">
You can add your own HTML above or below the directory listing. Simply explore the <code>header.html</code> and <code>footer.html</code> files.
</div><!--/.postlisting-->
</div><!--/.wrapper-->
<div class="footer">
Apaxy by <a href="https://twitter.com/adamwhitcroft">@adamwhitcroft</a>
</div><!--/.footer-->
<script src={FOLDERNAME}/theme/apaxy.js></script>
<script src="https://cdn.jsdelivr.net/npm/lightgallery.js@1.1.3/dist/js/lightgallery.min.js" integrity="sha256-eoTGOrFW1o5KcmlIfJxlpOs0sMeGTy0/0rh/fGZEgNM=" crossorigin="anonymous"></script>
<script src={FOLDERNAME}/theme/apaxy-lightgallery.js></script>

View File

@@ -1,10 +1,10 @@
<div class="block">
You can add your own HTML above or below the directory listing. Simply explore the <code>header.html</code> and <code>footer.html</code> files.
</div><!--/.postlisting-->
<div class="block">
You can add your own HTML above or below the directory listing. Simply explore the <code>header.html</code> and <code>footer.html</code> files.
</div><!--/.postlisting-->
</div><!--/.wrapper-->
<div class="footer">
Apaxy by <a href="https://twitter.com/adamwhitcroft">@adamwhitcroft</a>
Apaxy by <a href="https://twitter.com/adamwhitcroft">@adamwhitcroft</a>
</div><!--/.footer-->
<script src=/{FOLDERNAME}/theme/apaxy.js></script>
<script src={FOLDERNAME}/theme/apaxy.js></script>

View File

@@ -0,0 +1,9 @@
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/lightgallery.js@1.1.3/dist/css/lightgallery.min.css" integrity="sha256-oPZ2OUkKul2aJQeDwKoO1p+DpvFR+w17n7YXydvFRWU=" crossorigin="anonymous">
<div class="wrapper">
<!-- we open the `wrapper` element here, but close it in the `footer.html` file -->
<ol class="breadcrumb" id="breadcrumb">
</ol>
<input type="search" id="filter" placeholder="filter contents" />

View File

@@ -1,2 +1,7 @@
<div class="wrapper">
<!-- we open the `wrapper` element here, but close it in the `footer.html` file -->
<!-- we open the `wrapper` element here, but close it in the `footer.html` file -->
<ol class="breadcrumb" id="breadcrumb">
</ol>
<input type="search" id="filter" placeholder="filter contents" />

Binary file not shown.

Before

Width:  |  Height:  |  Size: 699 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 619 B

After

Width:  |  Height:  |  Size: 817 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 494 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 621 B

BIN
apaxy/theme/icons/font.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 650 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 817 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 586 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 680 B

View File

Before

Width:  |  Height:  |  Size: 492 B

After

Width:  |  Height:  |  Size: 492 B

View File

@@ -9,122 +9,294 @@ button,hr,input{overflow:visible}audio,canvas,progress,video{display:inline-bloc
Theme author: @adamwhitcroft
\*------------------------------------*/
@import url('//fonts.googleapis.com/css?family=Open+Sans');
/* Have to use @import for the font, as you can only specify a single stylesheet */
* {
margin:0;
padding:0;
-webkit-box-sizing:border-box;
-moz-box-sizing:border-box;
box-sizing: border-box;
margin: 0;
padding: 0;
box-sizing: border-box;
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
}
html {
min-height:100%;
border-top:10px solid #ECEEF1;
border-bottom:10px solid #ECEEF1;
color:#61666c;
font-weight:400;
font-size:1em;
font-family:'Open Sans', sans-serif;
line-height:2em;
min-height: 100%;
border-top: 10px solid #ECEEF1;
border-bottom: 10px solid #ECEEF1;
color: #61666c;
font-weight: 400;
font-size: 1em;
font-family: sans-serif;
line-height: 2em;
}
body {
padding:20px;
-webkit-backface-visibility:hidden;
padding: 20px;
-webkit-backface-visibility: hidden;
}
code {
font-family:consolas,monospace;
font-family: consolas,monospace;
}
a {
color:#61666c;
text-decoration:none;
color: #61666c;
text-decoration: none;
}
a, img {
border:none;
outline:none
border: none;
outline: none;
}
a:hover {
color:#2a2a2a;
color: #2a2a2a;
}
/*------------------------------------*\
Wrapper
\*------------------------------------*/
.wrapper {
margin:0 auto;
padding-top:20px;
max-width:80%;
margin: 0 auto;
padding-top: 20px;
max-width: 80%;
}
/*------------------------------------*\
Filter (search box)
\*------------------------------------*/
#filter {
float: right;
font-size:.75em;
padding: .5em;
margin-bottom: .5em;
border: 1px solid #aaa;
border-radius: .25em;
width: 10em;
transition: width 0.25s ease;
}
#filter:focus {
width: 14em;
}
/*------------------------------------*\
Demo block
\*------------------------------------*/
.block {
font-size:.875em;
margin:20px 0;
padding:20px;
color:#9099A3;
font-size: .875em;
margin: 20px 0;
padding: 20px;
color: #9099A3;
}
/*------------------------------------*\
Table (directory listing)
\*------------------------------------*/
table {
width:100%;
border-collapse:collapse;
font-size:.875em;
width: 100%;
border-collapse: collapse;
font-size: .875em;
}
tr {
outline:0;
border:0;
outline: 0;
border: 0;
}
tr:hover td {
background:#f6f6f6;
background: #f6f6f6;
}
th {
text-align:left;
font-size:.75em;
padding-right:20px;
text-align: left;
font-size: .75em;
padding-right: 20px;
}
/* 2nd Column: Filename */
th + th {
width:65%;
width: 65%;
}
/* 3rd Column: Last Modified */
th + th + th {
}
/* 4th Column: Size */
th + th + th + th {
width:5%;
width: 5%;
}
tr td:first-of-type {
padding-left:10px;
padding-right:10px;
padding-left: 10px;
padding-right: 10px;
}
td {
padding:5px 0;
outline:0;
border:0;
border-bottom:1px solid #edf1f5;
vertical-align:middle;
text-align:left;
-webkit-transition:background 300ms ease;
-moz-transition:background 300ms ease;
-ms-transition:background 300ms ease;
-o-transition:background 300ms ease;
transition:background 300ms ease;
padding: 5px 0;
outline: 0;
border: 0;
border-bottom: 1px solid #edf1f5;
vertical-align: middle;
text-align: left;
transition: background 300ms ease;
-o-transition: background 300ms ease;
-ms-transition: background 300ms ease;
-moz-transition: background 300ms ease;
-webkit-transition: background 300ms ease;
}
td a{
display: block;
td a {
display: block;
}
tr.parent a[href^="/"] {
color:#9099A3;
color: #9099A3;
}
.parent a[href^="/"]:hover {
color:#2281d0;
}
.parent a[href^="/"]:hover {
color: #2281d0;
}
/*------------------------------------*\
Footer
\*------------------------------------*/
.footer {
text-align:center;
font-size:.75em;
text-align: center;
font-size: .75em;
}
/*------------------------------------*\
Media query for small screens
\*------------------------------------*/
@media (max-width: 768px) {
body {
padding: 10px;
}
.indexcollastmod { display: none; }
.wrapper { max-width: 100%; }
}
/*------------------------------------*\
Error pages
/*------------------------------------*/
/* Animation */
@-webkit-keyframes fadeDown {
0% {
opacity: 0;
-webkit-transform: translateY(-20px);
}
100% {
opacity: 1;
-webkit-transform: translateY(0);
}
}
@-moz-keyframes fadeDown {
0% {
opacity: 0;
-moz-transform: translateY(-20px);
}
100% {
opacity: 1;
-moz-transform: translateY(0);
}
}
@-ms-keyframes fadeDown {
0% {
opacity: 0;
-ms-transform: translateY(-20px);
}
100% {
opacity: 1;
-ms-transform: translateY(0);
}
}
@-o-keyframes fadeDown {
0% {
opacity: 0;
-o-transform: translateY(-20px);
}
100% {
opacity: 1;
-o-transform: translateY(0);
}
}
@keyframes fadeDown {
0% {
opacity: 0;
transform: translateY(-20px);
}
100% {
opacity: 1;
transform: translateY(0);
}
}
.fadeDown {
-webkit-animation:fadeDown 1s ease;
-moz-animation:fadeDown 1s ease;
-ms-animation:fadeDown 1s ease;
-o-animation:fadeDown 1s ease;
animation:fadeDown 1s ease;
}
/* Error code display */
.errorCode {
font-size: 80px;
}
/*------------------------------------*\
Breadcrumb
\*------------------------------------*/
.breadcrumb {
white-space: nowrap;
padding: 0;
margin: 0;
}
.breadcrumb li {
display: inline-block;
line-height: 26px;
margin: 0 9px 0 -10px;
padding: 0 15px;
position: relative;
}
.breadcrumb li::before,
.breadcrumb li::after {
border-right: 1px solid #666666;
content: '';
display: block;
height: 50%;
position: absolute;
left: 0;
right: 0;
top: 0;
z-index: -1;
transform: skewX(45deg);
}
.breadcrumb li::after {
bottom: 0;
top: auto;
transform: skewX(-45deg);
}
.breadcrumb li:last-of-type::before,
.breadcrumb li:last-of-type::after {
display: none;
}
.breadcrumb li a {
letter-spacing: -1px;
text-decoration: none;
}
.breadcrumb li:nth-of-type(1) a { color: hsl(0, 0%, 70%); }
.breadcrumb li:nth-of-type(2) a { color: hsl(0, 0%, 65%); }
.breadcrumb li:nth-of-type(3) a { color: hsl(0, 0%, 50%); }
.breadcrumb li:nth-of-type(4) a { color: hsl(0, 0%, 45%); }

View File

@@ -1,5 +1,13 @@
apaxy:
build: .
ports:
- "8080:80"
version: '3'
services:
apaxy:
image: apaxy
build:
context: .
args:
apaxyPath: ''
ports:
- '80:8080'
volumes:
- './share/:/usr/local/apache2/htdocs/share/'
image: apaxy

1282
package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -1,6 +1,6 @@
{
"name": "apaxy",
"version": "1.0.0",
"version": "2.0.1",
"description": "A simple, customisable theme for your Apache directory listing.",
"main": "index.js",
"scripts": {
@@ -27,6 +27,6 @@
},
"homepage": "https://github.com/oupala/apaxy#readme",
"devDependencies": {
"conventional-changelog": "^1.1.0"
"conventional-changelog": "^3.1.8"
}
}

View File

@@ -0,0 +1,3 @@
You can place your file in the "share" directory (here!) so that they are accessible if you use docker-compose.
If you want to share files at the root level of your docker container, you'll have to edit the Dockerfile.