mirror of
https://github.com/alehaa/nginx-fancyindex-flat-theme.git
synced 2025-05-02 03:49:53 +03:00
Compare commits
No commits in common. "master" and "v1.0" have entirely different histories.
16 changed files with 34 additions and 169 deletions
|
@ -17,17 +17,17 @@
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
# Copyright (C)
|
# Copyright (C)
|
||||||
# 2018-2024 Alexander Haase <ahaase@alexhaase.de>
|
# 2018 Alexander Haase <ahaase@alexhaase.de>
|
||||||
|
|
||||||
# This is the clang-format configuration for JavaScript files.
|
# This is the clang-format configuration for JavaScript files.
|
||||||
#
|
#
|
||||||
# Clang-format should help to beautify the code, so that every developer can
|
# Clang-format should help to beautify the code, so that every developer can
|
||||||
# write code, while the beautifier will take care about the style guides. Please
|
# write code, while the beautifier will take care about the style guides. Please
|
||||||
# read the README and/or docs for more information, how to use this
|
# read the README and/or docs for more informations, how to use this
|
||||||
# configuration with clang-format.
|
# configuration with clang-format.
|
||||||
|
|
||||||
|
|
||||||
# Basically we use LLVM style, but have some changes listed in this
|
# Basicaly we use LLVM style, but have some changes listet in this
|
||||||
# configuration.
|
# configuration.
|
||||||
BasedOnStyle: LLVM
|
BasedOnStyle: LLVM
|
||||||
|
|
||||||
|
|
|
@ -1,33 +0,0 @@
|
||||||
# This file is part of nginx-fancyindex-flat-theme.
|
|
||||||
#
|
|
||||||
# nginx-fancyindex-flat-theme is free software: you can redistribute it and/or
|
|
||||||
# modify it under the terms of the GNU General Public License as published by
|
|
||||||
# the Free Software Foundation, either version 3 of the License, or (at your
|
|
||||||
# option) any later version.
|
|
||||||
#
|
|
||||||
# nginx-fancyindex-flat-theme is distributed in the hope that it will be
|
|
||||||
# useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
|
|
||||||
# Public License for more details.
|
|
||||||
#
|
|
||||||
# You should have received a copy of the GNU General Public License along with
|
|
||||||
# this program. If not, see
|
|
||||||
#
|
|
||||||
# http://www.gnu.org/licenses/
|
|
||||||
#
|
|
||||||
#
|
|
||||||
# Copyright (C)
|
|
||||||
# 2018-2024 Alexander Haase <ahaase@alexhaase.de>
|
|
||||||
|
|
||||||
root = true
|
|
||||||
|
|
||||||
[*]
|
|
||||||
charset = utf-8
|
|
||||||
indent_style = space
|
|
||||||
indent_size = 4
|
|
||||||
end_of_line = lf
|
|
||||||
insert_final_newline = true
|
|
||||||
trim_trailing_whitespace = true
|
|
||||||
|
|
||||||
[*.js]
|
|
||||||
indent_size = 2
|
|
21
.gitignore
vendored
21
.gitignore
vendored
|
@ -1,23 +1,2 @@
|
||||||
# This file is part of nginx-fancyindex-flat-theme.
|
|
||||||
#
|
|
||||||
# nginx-fancyindex-flat-theme is free software: you can redistribute it and/or
|
|
||||||
# modify it under the terms of the GNU General Public License as published by
|
|
||||||
# the Free Software Foundation, either version 3 of the License, or (at your
|
|
||||||
# option) any later version.
|
|
||||||
#
|
|
||||||
# nginx-fancyindex-flat-theme is distributed in the hope that it will be
|
|
||||||
# useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
|
|
||||||
# Public License for more details.
|
|
||||||
#
|
|
||||||
# You should have received a copy of the GNU General Public License along with
|
|
||||||
# this program. If not, see
|
|
||||||
#
|
|
||||||
# http://www.gnu.org/licenses/
|
|
||||||
#
|
|
||||||
#
|
|
||||||
# Copyright (C)
|
|
||||||
# 2018-2024 Alexander Haase <ahaase@alexhaase.de>
|
|
||||||
|
|
||||||
/layout/theme.css*
|
/layout/theme.css*
|
||||||
/layout/theme.d
|
/layout/theme.d
|
||||||
|
|
32
Dockerfile
32
Dockerfile
|
@ -1,32 +0,0 @@
|
||||||
# This file is part of nginx-fancyindex-flat-theme.
|
|
||||||
#
|
|
||||||
# nginx-fancyindex-flat-theme is free software: you can redistribute it and/or
|
|
||||||
# modify it under the terms of the GNU General Public License as published by
|
|
||||||
# the Free Software Foundation, either version 3 of the License, or (at your
|
|
||||||
# option) any later version.
|
|
||||||
#
|
|
||||||
# nginx-fancyindex-flat-theme is distributed in the hope that it will be
|
|
||||||
# useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
|
|
||||||
# Public License for more details.
|
|
||||||
#
|
|
||||||
# You should have received a copy of the GNU General Public License along with
|
|
||||||
# this program. If not, see
|
|
||||||
#
|
|
||||||
# http://www.gnu.org/licenses/
|
|
||||||
#
|
|
||||||
#
|
|
||||||
# Copyright (C)
|
|
||||||
# 2018-2024 Alexander Haase <ahaase@alexhaase.de>
|
|
||||||
|
|
||||||
FROM debian
|
|
||||||
|
|
||||||
ENV DEBIAN_FRONTEND=noninteractive
|
|
||||||
RUN apt update && \
|
|
||||||
apt install -y \
|
|
||||||
make \
|
|
||||||
uglifyjs \
|
|
||||||
node-less \
|
|
||||||
node-less-plugin-clean-css \
|
|
||||||
&& \
|
|
||||||
rm -rf /var/lib/apt/lists/*
|
|
2
Makefile
2
Makefile
|
@ -17,7 +17,7 @@
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
# Copyright (C)
|
# Copyright (C)
|
||||||
# 2018-2024 Alexander Haase <ahaase@alexhaase.de>
|
# 2018 Alexander Haase <ahaase@alexhaase.de>
|
||||||
|
|
||||||
all: build/theme.css \
|
all: build/theme.css \
|
||||||
build/js/list.js \
|
build/js/list.js \
|
||||||
|
|
38
README.md
38
README.md
|
@ -3,15 +3,13 @@
|
||||||
[](https://github.com/alehaa/nginx-fancyindex-flat-theme/issues)
|
[](https://github.com/alehaa/nginx-fancyindex-flat-theme/issues)
|
||||||
[](LICENSE)
|
[](LICENSE)
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
|
|
||||||
## About
|
## About
|
||||||
|
|
||||||
The [fancyindex module](https://github.com/aperezdc/ngx-fancyindex) of
|
The [fancyindex module](https://github.com/aperezdc/ngx-fancyindex) of
|
||||||
[nginx](http://nginx.org/) has the powerful capability to be customizable.
|
[nginx](http://nginx.org/) has the powerful capability to be customizable.
|
||||||
Instead of using an external application, this gives us the ability to use
|
Instead of using an external application, this gives us the ability to use use
|
||||||
just the webserver's capabilities to generate beautiful directory listings.
|
just the webservers capabilities to generate beautiful directory listings.
|
||||||
|
|
||||||
This theme provides a simple, flat interface based on
|
This theme provides a simple, flat interface based on
|
||||||
[Bootstrap 4](https://getbootstrap.com), [Font Awesome](https://fontawesome.com)
|
[Bootstrap 4](https://getbootstrap.com), [Font Awesome](https://fontawesome.com)
|
||||||
|
@ -24,11 +22,10 @@ dynamic code.
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
1. Get the latest resources from [GitHub releases][releases], or build them
|
1. Get the latest ressources from [GitHub releases](https://github.com/alehaa/nginx-fancyindex-flat-theme/releases)
|
||||||
yourself by running `make` inside this repository. Instructions on how to
|
or build them on your own by running `make` inside this repository and copy
|
||||||
build the resources can be found [below](#build).
|
these files into any location accessible by *nginx*.
|
||||||
1. Copy these files into any location accessible by *nginx*.
|
2. Configure your vhost to use the theme's ressources for fancyindex:
|
||||||
1. Configure your vhost to use the theme's resources for fancyindex:
|
|
||||||
```
|
```
|
||||||
# Fancyindex
|
# Fancyindex
|
||||||
fancyindex on;
|
fancyindex on;
|
||||||
|
@ -39,28 +36,11 @@ dynamic code.
|
||||||
fancyindex_exact_size off;
|
fancyindex_exact_size off;
|
||||||
fancyindex_localtime on;
|
fancyindex_localtime on;
|
||||||
|
|
||||||
location /theme/{
|
location /theme {
|
||||||
alias /srv/www/fileserver/theme/;
|
alias /srv/www/fileserver/theme;
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
[releases]: https://github.com/alehaa/nginx-fancyindex-flat-theme/releases
|
|
||||||
|
|
||||||
|
|
||||||
## Build
|
|
||||||
|
|
||||||
Instead of using pre-built sources, you can build them on a local machine. For
|
|
||||||
convenience, a [Dockerfile](Dockerfile) is provided that creates a container
|
|
||||||
with all the necessary tools to compile the sources. You can easily build the
|
|
||||||
theme using the following commands:
|
|
||||||
|
|
||||||
```
|
|
||||||
docker build -t fancyindex-flat .
|
|
||||||
docker run --rm -it -v ./:/mnt -w /mnt fancyindex-flat make
|
|
||||||
```
|
|
||||||
|
|
||||||
The compiled sources for the theme will be located in the `build` directory.
|
|
||||||
|
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
|
||||||
|
@ -74,4 +54,4 @@ ANY WARRANTY**; without even the implied warranty of **MERCHANTABILITY** or
|
||||||
**FITNESS FOR A PARTICULAR PURPOSE**. A Copy of the GNU General Public License
|
**FITNESS FOR A PARTICULAR PURPOSE**. A Copy of the GNU General Public License
|
||||||
can be found in the [LICENSE](LICENSE) file.
|
can be found in the [LICENSE](LICENSE) file.
|
||||||
|
|
||||||
© 2018-2024 Alexander Haase
|
© 2018 Alexander Haase
|
||||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 170 KiB |
|
@ -17,7 +17,7 @@
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* Copyright (C)
|
* Copyright (C)
|
||||||
* 2018-2024 Alexander Haase <ahaase@alexhaase.de>
|
* 2018 Alexander Haase <ahaase@alexhaase.de>
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* NOTE: The following comment will be used as short version of the copyright
|
* NOTE: The following comment will be used as short version of the copyright
|
||||||
|
@ -30,7 +30,7 @@
|
||||||
* General Public License. See the LICENSE file for details.
|
* General Public License. See the LICENSE file for details.
|
||||||
*
|
*
|
||||||
* Copyright (C)
|
* Copyright (C)
|
||||||
* 2018-2024 Alexander Haase <ahaase@alexhaase.de>
|
* 2018 Alexander Haase <ahaase@alexhaase.de>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -47,7 +47,7 @@ function generateBreadcrumbs()
|
||||||
*
|
*
|
||||||
* @param string name the name of the breadcrumb
|
* @param string name the name of the breadcrumb
|
||||||
* @param string url the url of the breadcrumb
|
* @param string url the url of the breadcrumb
|
||||||
* @param string active whether this breadcrumb is active or not
|
* @param string active wheter this breadcrumb is active or not
|
||||||
*
|
*
|
||||||
* @return string the breadcrumb string
|
* @return string the breadcrumb string
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* Copyright (C)
|
* Copyright (C)
|
||||||
* 2018-2024 Alexander Haase <ahaase@alexhaase.de>
|
* 2018 Alexander Haase <ahaase@alexhaase.de>
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* NOTE: The following comment will be used as short version of the copyright
|
* NOTE: The following comment will be used as short version of the copyright
|
||||||
|
@ -30,7 +30,7 @@
|
||||||
* General Public License. See the LICENSE file for details.
|
* General Public License. See the LICENSE file for details.
|
||||||
*
|
*
|
||||||
* Copyright (C)
|
* Copyright (C)
|
||||||
* 2018-2024 Alexander Haase <ahaase@alexhaase.de>
|
* 2018 Alexander Haase <ahaase@alexhaase.de>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -165,7 +165,7 @@ function generateList()
|
||||||
* Get the font awesome icon to be used for a specific filetype.
|
* Get the font awesome icon to be used for a specific filetype.
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* @param string filetype the filetype for which an icon is required
|
* @param string filetype the filetype for wich an icon is required
|
||||||
*
|
*
|
||||||
* @return string the HTML icon tag to be used
|
* @return string the HTML icon tag to be used
|
||||||
*/
|
*/
|
||||||
|
@ -175,7 +175,7 @@ function generateList()
|
||||||
* Get the font awesome class of the icon to be used.
|
* Get the font awesome class of the icon to be used.
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* @param string filetype the filetype for which an icon is required
|
* @param string filetype the filetype for wich an icon is required
|
||||||
*
|
*
|
||||||
* @return string the icon class to be used
|
* @return string the icon class to be used
|
||||||
*/
|
*/
|
||||||
|
@ -221,8 +221,8 @@ function generateList()
|
||||||
list.classList.add('table', 'table-sm', 'table-hover', 'text-nowrap');
|
list.classList.add('table', 'table-sm', 'table-hover', 'text-nowrap');
|
||||||
|
|
||||||
/* As file size and last-modified date will be hidden at mobile devices, also
|
/* As file size and last-modified date will be hidden at mobile devices, also
|
||||||
* hide the the table header for mobile devices, as it's unnecessary for the
|
* hide the the table header for mobile devices, as it's unneccessary for the
|
||||||
* single remaining cell containing the filename. */
|
* single remaining cell containig the filename. */
|
||||||
list.tHead.children[0].classList.add('d-none', 'd-md-table-row');
|
list.tHead.children[0].classList.add('d-none', 'd-md-table-row');
|
||||||
|
|
||||||
/* If we're in a subdirectory, remove the 'Parent Directory' row, as the
|
/* If we're in a subdirectory, remove the 'Parent Directory' row, as the
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* Copyright (C)
|
* Copyright (C)
|
||||||
* 2018-2024 Alexander Haase <ahaase@alexhaase.de>
|
* 2018 Alexander Haase <ahaase@alexhaase.de>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -32,16 +32,3 @@ body {
|
||||||
* the content and the footer. */
|
* the content and the footer. */
|
||||||
padding-bottom: @footer-height;
|
padding-bottom: @footer-height;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* If the client prefers a dark color scheme, the following classes will be
|
|
||||||
* applied to give the site a dark look and feel.
|
|
||||||
*
|
|
||||||
* NOTE: These classes need to be at the end of this file, as they override the
|
|
||||||
* default settings previously defined, if the dark color scheme is
|
|
||||||
* requested. */
|
|
||||||
@media (prefers-color-scheme: dark) {
|
|
||||||
body {
|
|
||||||
background-color: @gray-800;
|
|
||||||
color: white;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* Copyright (C)
|
* Copyright (C)
|
||||||
* 2018-2024 Alexander Haase <ahaase@alexhaase.de>
|
* 2018 Alexander Haase <ahaase@alexhaase.de>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* Copyright (C)
|
* Copyright (C)
|
||||||
* 2018-2024 Alexander Haase <ahaase@alexhaase.de>
|
* 2018 Alexander Haase <ahaase@alexhaase.de>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -33,7 +33,7 @@
|
||||||
* Grayscale colors.
|
* Grayscale colors.
|
||||||
*
|
*
|
||||||
* NOTE: Although not all colors of the grayscale palette will be used, all
|
* NOTE: Although not all colors of the grayscale palette will be used, all
|
||||||
* colors have been copied for simplicity when fixing color issues in
|
* colors have been copied for simlicity when fixing color issues in
|
||||||
* future commits.
|
* future commits.
|
||||||
*/
|
*/
|
||||||
@white: #fff;
|
@white: #fff;
|
||||||
|
|
|
@ -17,12 +17,12 @@
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* Copyright (C)
|
* Copyright (C)
|
||||||
* 2018-2024 Alexander Haase <ahaase@alexhaase.de>
|
* 2018 Alexander Haase <ahaase@alexhaase.de>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This file configures the footer navbar. The navbar will be transparent with
|
* This file configures the footer navbar. The navbar will be transparent with
|
||||||
* muted text. If the content doesn't fill the whole browser window, the footer
|
* muted text. If the content doesn't fill the whole brwoser window, the footer
|
||||||
* will stick to the bottom of it, otherwise it will reside at the bottom of the
|
* will stick to the bottom of it, otherwise it will reside at the bottom of the
|
||||||
* page.
|
* page.
|
||||||
*
|
*
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* Copyright (C)
|
* Copyright (C)
|
||||||
* 2018-2024 Alexander Haase <ahaase@alexhaase.de>
|
* 2018 Alexander Haase <ahaase@alexhaase.de>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* Copyright (C)
|
* Copyright (C)
|
||||||
* 2018-2024 Alexander Haase <ahaase@alexhaase.de>
|
* 2018 Alexander Haase <ahaase@alexhaase.de>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -27,8 +27,8 @@
|
||||||
|
|
||||||
#list {
|
#list {
|
||||||
/* Filenames and the table headings may link to the relating file or sort
|
/* Filenames and the table headings may link to the relating file or sort
|
||||||
* the table. However, these links should NOT be highlighted. Decorations
|
* the table. However, these links shoul NOT be highlighted. Decorations
|
||||||
* will be kept enabled for underlining the link when hovering. */
|
* will be kept enabled for underlineing the link when hovering. */
|
||||||
a,
|
a,
|
||||||
a:hover,
|
a:hover,
|
||||||
a:focus {
|
a:focus {
|
||||||
|
@ -49,19 +49,3 @@
|
||||||
white-space: normal;
|
white-space: normal;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* If the client prefers a dark color scheme, the following classes will be
|
|
||||||
* applied to give the site a dark look and feel.
|
|
||||||
*
|
|
||||||
* NOTE: These classes need to be at the end of this file, as they override the
|
|
||||||
* default settings previously defined, if the dark color scheme is
|
|
||||||
* requested. */
|
|
||||||
@media (prefers-color-scheme: dark) {
|
|
||||||
#list {
|
|
||||||
a,
|
|
||||||
a:hover,
|
|
||||||
a:focus {
|
|
||||||
color: @white;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* Copyright (C)
|
* Copyright (C)
|
||||||
* 2018-2024 Alexander Haase <ahaase@alexhaase.de>
|
* 2018 Alexander Haase <ahaase@alexhaase.de>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* This theme heavily uses Twitter Bootstrap (v4). That means, bootstrap CSS
|
/* This theme heavily uses Twitter Bootstrap (v4). That means, bootstrap CSS
|
||||||
|
@ -61,7 +61,7 @@
|
||||||
* license) and uses Twitter Bootstrap (v4) (licensed under the MIT license).
|
* license) and uses Twitter Bootstrap (v4) (licensed under the MIT license).
|
||||||
*
|
*
|
||||||
* Copyright (C)
|
* Copyright (C)
|
||||||
* 2018-2024 Alexander Haase <ahaase@alexhaase.de>
|
* 2018 Alexander Haase <ahaase@alexhaase.de>
|
||||||
*
|
*
|
||||||
* See the LICENSE file for details.
|
* See the LICENSE file for details.
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue