Skip to content

Commit db13fd7

Browse files
author
xdnroot
committed
Add all needed files
1 parent b0d03f8 commit db13fd7

14 files changed

+884
-0
lines changed

.clang-format

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
# This file is part of nginx-fancyindex-flat-theme.
2+
#
3+
# nginx-fancyindex-flat-theme is free software: you can redistribute it and/or
4+
# modify it under the terms of the GNU General Public License as published by
5+
# the Free Software Foundation, either version 3 of the License, or (at your
6+
# option) any later version.
7+
#
8+
# nginx-fancyindex-flat-theme is distributed in the hope that it will be
9+
# useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
10+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
11+
# Public License for more details.
12+
#
13+
# You should have received a copy of the GNU General Public License along with
14+
# this program. If not, see
15+
#
16+
# http://www.gnu.org/licenses/
17+
#
18+
#
19+
# Copyright (C)
20+
# 2018 Alexander Haase <ahaase@alexhaase.de>
21+
22+
# This is the clang-format configuration for JavaScript files.
23+
#
24+
# Clang-format should help to beautify the code, so that every developer can
25+
# write code, while the beautifier will take care about the style guides. Please
26+
# read the README and/or docs for more informations, how to use this
27+
# configuration with clang-format.
28+
29+
30+
# Basicaly we use LLVM style, but have some changes listet in this
31+
# configuration.
32+
BasedOnStyle: LLVM
33+
34+
# A maximum of two blank lines are allowed.
35+
MaxEmptyLinesToKeep: 3
36+
37+
# If lines must be continued in a second line, indent the second line with two
38+
# spaces.
39+
ContinuationIndentWidth: 2
40+
41+
42+
---
43+
Language: JavaScript
44+
45+
# The first parameter of a function declaration must be in the first line, the
46+
# other parameters may be in the following lines but will be aligned horizontal.
47+
AllowAllParametersOfDeclarationOnNextLine: false
48+
49+
# Do not merge empty functions
50+
AllowShortFunctionsOnASingleLine: None
51+
52+
# Break before any braces for new context.
53+
BreakBeforeBraces: GNU
54+
55+
# Empty lines at the start of blocks will not be kept.
56+
KeepEmptyLinesAtTheStartOfBlocks: false
57+
58+
...

footer.html

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
</div>
2+
</div>
3+
</div>
4+
5+
<footer class="footer navbar">
6+
<div class="container">
7+
<div class="col text-right text-muted text-small text-nowrap">
8+
<small>
9+
Powered by NGINX using <a href="https://github.com/xdnroot/nginx-fancyindex" target="_blank">fancyindex</a>.
10+
</small>
11+
</div>
12+
</div>
13+
</footer>
14+
15+
<script type="text/javascript">
16+
generateBreadcrumbs();
17+
generateList();
18+
</script>
19+
<script src="https://cdnjs.cloudflare.com/ajax/libs/lightbox2/2.10.0/js/lightbox-plus-jquery.min.js"></script>
20+
</body>
21+
22+
</html>

header.html

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
4+
<head>
5+
<meta charset="utf-8">
6+
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
7+
8+
<title>Files - WebIPTEK.com</title>
9+
10+
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css">
11+
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
12+
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/lightbox2/2.10.0/css/lightbox.min.css">
13+
<!--<link rel="stylesheet" href="/theme/theme.less">-->
14+
<link rel="stylesheet/less" type="text/css" href="/theme/theme.less" />
15+
<script type="text/javascript" src="/theme/js/breadcrumbs.js"></script>
16+
<script type="text/javascript" src="/theme/js/list.js"></script>
17+
</head>
18+
19+
<body>
20+
<div class="header">
21+
<nav class="navbar sticky-top container">
22+
<div class="navbar-brand">
23+
<!--<i class="fa fa-fw fa-files-o" aria-hidden="true"></i>-->
24+
<a href="https://webiptek.com"><img src="/theme/logo.png" height="50px" /></a>
25+
</div>
26+
</nav>
27+
</div>
28+
29+
<div class="container">
30+
<nav aria-label="breadcrumb">
31+
<ol class="breadcrumb" id="breadcrumbs"/>
32+
</nav>
33+
34+
<div class="row">
35+
<div class="col">

js/breadcrumbs.js

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
/* This file is part of nginx-fancyindex-flat-theme.
2+
*
3+
* nginx-fancyindex-flat-theme is free software: you can redistribute it and/or
4+
* modify it under the terms of the GNU General Public License as published by
5+
* the Free Software Foundation, either version 3 of the License, or (at your
6+
* option) any later version.
7+
*
8+
* nginx-fancyindex-flat-theme is distributed in the hope that it will be
9+
* useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
10+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
11+
* Public License for more details.
12+
*
13+
* You should have received a copy of the GNU General Public License along with
14+
* this program. If not, see
15+
*
16+
* http://www.gnu.org/licenses/
17+
*
18+
*
19+
* Copyright (C)
20+
* 2018 Alexander Haase <ahaase@alexhaase.de>
21+
*
22+
*
23+
* NOTE: The following comment will be used as short version of the copyright
24+
* notice above to be included in compressed files, too.
25+
*/
26+
27+
/*!
28+
*
29+
* This file is part of the nginx-fancyindex-flat-theme, licensed under the GNU
30+
* General Public License. See the LICENSE file for details.
31+
*
32+
* Copyright (C)
33+
* 2018 Alexander Haase <ahaase@alexhaase.de>
34+
*/
35+
36+
/**
37+
* Print the breadcrumbs.
38+
*
39+
* This function will generate the breadcrumbs for the current page and updates
40+
* the 'breadcrumbs' element with the list of crumbs.
41+
*/
42+
function generateBreadcrumbs()
43+
{
44+
/**
45+
* Print a single breadcrumb.
46+
*
47+
*
48+
* @param string name the name of the breadcrumb
49+
* @param string url the url of the breadcrumb
50+
* @param string active wheter this breadcrumb is active or not
51+
*
52+
* @return string the breadcrumb string
53+
*/
54+
function crumb(name, url, active)
55+
{
56+
return '<li class="breadcrumb-item' +
57+
(active ? ' active aria-current="page' : '') + '">' +
58+
(active ? '' : '<a href="' + url + '">') + name +
59+
(active ? '' : '</a>');
60+
}
61+
62+
/* Get the path of the current directory and split it into the list of paths.
63+
* The trailing slash will be removed to avoid an empty breadcrumb at the end
64+
* of the list. */
65+
var crumbs = window.location.pathname.replace(/\/$/, '').split('/');
66+
67+
/* Iterate over the breadcrumbs and generate a link for each crumb. The home
68+
* directory will have the special name 'Home' and the current directory will
69+
* not be a link, but just plain text. */
70+
var nav = '';
71+
var path = '';
72+
for (var i = 0; i < crumbs.length; i++)
73+
{
74+
path += crumbs[i] + '/';
75+
nav += crumb((i == 0) ? 'Home' : decodeURIComponent(crumbs[i]), path,
76+
(i == crumbs.length - 1));
77+
}
78+
79+
/* Update the breadcrumbs element's contents with the breadcrumbs navigation
80+
* generated above. */
81+
document.getElementById('breadcrumbs').innerHTML = nav;
82+
}

0 commit comments

Comments
 (0)