Skip to content

Commit 0e340d5

Browse files
authored
Update Template (#3)
* Update Template * Update Template Add Copy Button
1 parent be39685 commit 0e340d5

File tree

8 files changed

+60
-54
lines changed

8 files changed

+60
-54
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
.idea/
22
*.iml
33
.vscode/
4+
.jekyll-cache/
5+
_site/

.prettierrc.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
}
1212
},
1313
{
14-
"files": ["**/*.json"],
14+
"files": ["**/*.json", "**/*.yaml"],
1515
"options": {
1616
"tabWidth": 2
1717
}

_layouts/default.html

Lines changed: 33 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
11
<!doctype html>
2-
<html lang="en" class="h-100">
2+
<html lang="en" class="h-100" {% if page.dark %}data-bs-theme="dark"{% endif %}>
33
<head>
44

55
<meta charset="utf-8">
66
<meta name="viewport" content="width=device-width, initial-scale=1">
7-
<title>Django Files - {{ page.title }}</title>
7+
<title>{{ site.site_name }} - {{ page.title }}</title>
8+
9+
{% if page.noindex %}
10+
<meta name="robots" content="noindex, nofollow">
11+
{% endif %}
812

913
<meta name="author" content="{{ site.author }}"/>
1014
<meta name="title" content="{{ site.site_name }} - {{ page.title }}"/>
@@ -17,10 +21,13 @@
1721
<meta property="og:url" content="{{ site.site_url }}">
1822
<meta property="og:image" content="{{ site.site_url }}/media/logo.png">
1923

20-
<script type="text/javascript" src="/js/theme.js"></script>
24+
{% if page.dark != true %}
25+
<script type="text/javascript" src="/js/theme.js"></script>
26+
{% endif %}
2127

22-
<link rel="icon" href="favicon.ico" sizes="any">
23-
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.1/dist/css/bootstrap.min.css">
28+
<link rel="icon" href="/favicon.ico" sizes="any">
29+
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap/5.3.2/css/bootstrap.min.css" integrity="sha512-b2QcS5SsA8tZodcDtGRELiGv5SaKSk1vDHDaQRda0htPYWZ6046lr3kJ5bAAQdpV2mmA/4v0wQF9MyU6/pDIAg==" crossorigin="anonymous" referrerpolicy="no-referrer" />
30+
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.2/css/all.min.css" integrity="sha512-z3gLpd7yknf1YoNbCzqRKc4qyor8gaKU1qmn+CShxbuBusANI9QpRohGBreCFkKxLhei6S9CQXFEbbKuqLg0DA==" crossorigin="anonymous" referrerpolicy="no-referrer" />
2431
<link rel="stylesheet" href="/css/main.css">
2532

2633
{% if page.title == 'Screen Shots' %}
@@ -32,9 +39,9 @@
3239
<body class="d-flex flex-column h-100">
3340

3441
<header>
35-
<nav class="navbar navbar-expand-sm bg-dark border-bottom" data-bs-theme="dark">
42+
<nav class="navbar navbar-expand-sm">
3643
<div class="container-fluid">
37-
<a class="navbar-brand" href="{{ site.github_url }}">
44+
<a class="navbar-brand" href="/">
3845
<img src="/images/logo.png" width="30" height="30" alt="logo"></a>
3946
<button class="navbar-toggler" type="button" data-bs-toggle="collapse"
4047
data-bs-target="#navbarSupportedContent" aria-controls="navbarSupportedContent"
@@ -43,41 +50,47 @@
4350
</button>
4451
<div class="collapse navbar-collapse" id="navbarSupportedContent">
4552
<ul class="navbar-nav me-auto mb-2 mb-sm-0">
46-
<li class="nav-item"><a class="nav-link" href="/">Home</a></li>
47-
<li class="nav-item"><a class="nav-link" href="/docs/">Docs</a></li>
48-
<li class="nav-item"><a class="nav-link" href="/screenshots/" target="_blank">Screen Shots</a></li>
53+
<li class="nav-item"><a class="nav-link {% if page.title == 'Home' %}active{% endif %}" href="/">
54+
Home</a></li>
55+
<li class="nav-item"><a class="nav-link {% if page.title == 'Docs' %}active{% endif %}" href="/docs/">
56+
Docs</a></li>
57+
<li class="nav-item"><a class="nav-link" href="/screenshots/" target="_blank">
58+
Screen Shots <i class="fa-solid fa-arrow-up-right-from-square"></i></a></li>
59+
<li class="nav-item"><a class="nav-link" href="{{ site.github_url }}" target="_blank" rel="noopener">
60+
GitHub <i class="fa-solid fa-arrow-up-right-from-square"></i></a></li>
4961
</ul>
5062
</div>
5163
</div>
5264
</nav>
5365
</header>
5466

55-
<main class="flex-shrink-0 p-3">
56-
{{ content }}
67+
<main class="flex-grow-1 p-3">
68+
{{ content }}
69+
<div class="clearfix"></div>
5770
</main>
5871

59-
<footer class="footer mt-auto p-2">
72+
<footer class="footer mt-auto p-2 flex-shrink-0">
6073
<div class="container-fluid">
6174
<div class="row">
6275
<div class="col-12 col-sm-4">
63-
<p><a class="text-decoration-none" href="{{ site.github_url }}" target="_blank">
64-
<i class="fab fa-github"></i> Django Files</a></p>
76+
<p><a class="link-body-emphasis text-decoration-none" href="{{ site.github_url }}#readme" target="_blank" rel="noopener">
77+
<i class="fab fa-github"></i> {{ site.site_name }}</a></p>
6578
</div>
6679
<div class="col-12 col-sm-8 text-sm-end">
6780
<ul class="list-inline">
68-
<li class="list-inline-item"><a href="/">Home</a></li>
81+
<li class="list-inline-item"><a class="link-body-emphasis text-decoration-none {% if page.title == 'Home' %}fw-bold{% endif %}" href="/">Home</a></li>
6982
<li class="list-inline-item">|</li>
70-
<li class="list-inline-item"><a href="/docs/">Docs</a></li>
83+
<li class="list-inline-item"><a class="link-body-emphasis text-decoration-none {% if page.title == 'Docs' %}fw-bold{% endif %}" href="/docs/">Docs</a></li>
7184
<li class="list-inline-item">|</li>
72-
<li class="list-inline-item"><a href="/screenshots/" target="_blank">Screen Shots</a></li>
85+
<li class="list-inline-item"><a class="link-body-emphasis text-decoration-none" href="/screenshots/" target="_blank">Screen Shots <i class="fa-solid fa-arrow-up-right-from-square"></i></a></li>
7386
</ul>
7487
</div>
7588
</div>
7689
</div>
7790
</footer>
7891

79-
<script src="https://cdn.jsdelivr.net/npm/jquery@3.7.1/dist/jquery.min.js"></script>
80-
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.1/dist/js/bootstrap.min.js"></script>
92+
<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap/5.3.2/js/bootstrap.bundle.min.js" integrity="sha512-X/YkDZyjTf4wyc2Vy16YGCPHwAY8rZJY+POgokZjQB2mhIRFJCckEGc6YyX9eNsPfn0PzThEuNs+uaomE5CO6A==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
93+
<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.11/clipboard.min.js" integrity="sha512-7O5pXpc0oCRrxk8RUfDYFgn0nO1t+jLuIOQdOMRp4APB7uZ4vSjspzp5y6YDtDs4VzUSTbWzBFZ/LKJhnyFOKw==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
8194
<script type="text/javascript" src="/js/main.js"></script>
8295

8396
</body>

docs.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
description: Brief Documentation for Django Files, a feature Packed Self-Hosted Django/Docker File Manager for Sharing Files.
66
---
77

8-
<h1>Django Files - {{ page.title }}</h1>
8+
<h1>{{ site.site_name }} - {{ page.title }}</h1>
99

1010
<p class="lead">Coming Soon...</p>
1111

12-
<p>Please see the <a href="{{ site.github_url }}#table-of-contents" target="_blank">
12+
<p>Please see the <a href="{{ site.github_url }}#table-of-contents" target="_blank" rel="noopener">
1313
README.md</a> for more information.</p>

index.html

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,24 +5,26 @@
55
description: A Feature Packed Self-Hosted Django/Docker File Manager for Sharing Files with ShareX, Flameshot and Much more...
66
---
77

8-
<h1>Django Files</h1>
8+
<h1>{{ site.site_name }}</h1>
99

1010
<p>A Self-Hosted Django File Manager for Uploading and Sharing;
11-
designed to work with client apps such as <a href="https://github.com/ShareX/ShareX" target="_blank">ShareX</a> and
12-
<a href="https://github.com/flameshot-org/flameshot" target="_blank">Flameshot</a>. Django Files is currently
11+
designed to work with client apps such as <a href="https://github.com/ShareX/ShareX" target="_blank" rel="noopener">ShareX</a> and
12+
<a href="https://github.com/flameshot-org/flameshot" target="_blank" rel="noopener">Flameshot</a>. Django Files is currently
1313
functional but <strong>Under Active Development</strong>. Expect breaking changes until an official
14-
<a href="{{ site.github_url }}/releases" target="_blank">release</a> is made.</p>
14+
<a href="{{ site.github_url }}/releases" target="_blank" rel="noopener">release</a> is made.</p>
1515

16-
<p>Please open a <a href="{{ site.github_url }}/discussions/new?category=feature-requests" target="_blank">
17-
Feature Request</a> or submit an <a href="https://github.com/cssnr/zipline-cli/issues/new" target="_blank">Issue</a> for any bugs.</p>
16+
<p>Please open a <a href="{{ site.github_url }}/discussions/categories/feature-requests" target="_blank" rel="noopener">
17+
Feature Request</a> or submit an <a href="{{ site.github_url }}/issues" target="_blank" rel="noopener">Issue</a> for any bugs.</p>
1818

1919
<h2>Running</h2>
2020

2121
<p>Django Files is designed to run with Docker.</p>
2222

23-
<h3>Docker Run</h3>
24-
25-
<pre class="border border-success rounded-3 px-3"><code id="docker-run-inline">
23+
<h3>
24+
Docker Run
25+
<small class="text-body-secondary"><a href="#" onclick="return false;" class="clip" data-clipboard-target="#docker-run-inline"><i class="fa-solid fa-copy"></i></a></small>
26+
</h3>
27+
<pre class="border border-success rounded-3 px-3 pb-3"><code id="docker-run-inline">
2628
docker run --name "django-files" -d --restart unless-stopped \
2729
-p 80:80 -v /data/django-files:/data/media \
2830
-e SECRET=07Y5uGMWF8icYIJXsKPpbdMm \
@@ -31,9 +33,11 @@ <h3>Docker Run</h3>
3133
ghcr.io/django-files/django-files:latest
3234
</code></pre>
3335

34-
<h3>Docker Compose</h3>
35-
36-
<pre class="border border-success rounded-3 px-3"><code id="docker-compose-inline">
36+
<h3>
37+
Docker Compose
38+
<small class="text-body-secondary"><a href="#" onclick="return false;" class="clip" data-clipboard-target="#docker-compose-inline"><i class="fa-solid fa-copy"></i></a></small>
39+
</h3>
40+
<pre class="border border-success rounded-3 px-3 pb-3"><code id="docker-compose-inline">
3741
version: '3'
3842

3943
services:

js/main.js

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1 @@
1-
// $(document).ready(function () {
2-
//
3-
// // // Open Links in New Window
4-
// // $('a').each(function() {
5-
// // $(this).click(function (event) {
6-
// // event.preventDefault();
7-
// // event.stopPropagation();
8-
// // window.open(this.href, '_blank');
9-
// // });
10-
// // });
11-
//
12-
// })
1+
new ClipboardJS('.clip')

js/screenshots.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
// JS for screenshots.html
22

3-
// const baseDir = '/screenshots/'
4-
53
const shotsEl = document.getElementById('swiper-shots')
64
const thumbsEl = document.getElementById('swiper-thumbs')
75

@@ -28,7 +26,7 @@ const swiper = new Swiper('.mySwiper', {
2826
watchSlidesProgress: true,
2927
})
3028

31-
const swiper2 = new Swiper('.mySwiper2', {
29+
new Swiper('.mySwiper2', {
3230
grabCursor: true,
3331
effect: 'fade',
3432
loop: true,

screenshots.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
<meta charset="utf-8">
1212
<meta name="viewport" content="width=device-width, initial-scale=1">
13-
<title>Django Files - {{ page.title }}</title>
13+
<title>{{ site.site_name }} - {{ page.title }}</title>
1414

1515
<meta name="author" content="{{ site.author }}"/>
1616
<meta name="title" content="{{ site.site_name }} - {{ page.title }}"/>
@@ -20,7 +20,7 @@
2020
<meta property="og:title" content="{{ site.site_name }} - {{ page.title }}">
2121
<meta property="og:description" content="{{ site.site_name }} - {{ page.description }}">
2222
<meta property="og:type" content="website">
23-
<meta property="og:url" content="{{ site.site_url }}">
23+
<meta property="og:url" content="{{ site.site_url }}{{ page.dir }}">
2424
<meta property="og:image" content="{{ site.site_url }}/media/logo.png">
2525

2626
<link rel="icon" href="favicon.ico" sizes="any">
@@ -32,15 +32,15 @@
3232

3333
<div style="--swiper-navigation-color: #fff; --swiper-pagination-color: #fff" class="swiper mySwiper2">
3434
<div class="swiper-wrapper" id="swiper-shots">
35-
<!-- <div class="swiper-slide"><img src="screenshots/01_Login.png" alt="01_Login.png"></div>-->
35+
{% comment %}<div class="swiper-slide"><img src="01_Login.png" alt="01_Login.png"></div>{% endcomment %}
3636
</div>
3737
<div class="swiper-button-next"></div>
3838
<div class="swiper-button-prev"></div>
3939
<div class="swiper-pagination"></div>
4040
</div>
4141
<div thumbsSlider="" class="swiper mySwiper">
4242
<div class="swiper-wrapper" id="swiper-thumbs">
43-
<!-- <div class="swiper-slide"><img src="screenshots/01_Login.png" alt="01_Login.png"></div>-->
43+
{% comment %}<div class="swiper-slide"><img src="01_Login.png" alt="01_Login.png"></div>{% endcomment %}
4444
</div>
4545
</div>
4646

0 commit comments

Comments
 (0)