Skip to content

Commit be39685

Browse files
authored
Merge pull request #2 from django-files/screenshots
Add genshots.js and Update screenshots
2 parents 0844acd + f82ec44 commit be39685

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+111
-67
lines changed

_config.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,7 @@
11
timezone: America/Los_Angeles
2+
encoding: utf-8
3+
4+
author: Shane/Ralph
5+
site_name: Django Files
6+
site_url: https://django-files.github.io/
7+
github_url: https://github.com/django-files/django-files

_layouts/default.html

Lines changed: 19 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -6,30 +6,35 @@
66
<meta name="viewport" content="width=device-width, initial-scale=1">
77
<title>Django Files - {{ page.title }}</title>
88

9-
<meta name="author" content="Shane"/>
10-
<meta name="title" content="Django Files - {{ page.title }}"/>
11-
<meta name="description" content="Django Files - A Django File, plural style."/>
9+
<meta name="author" content="{{ site.author }}"/>
10+
<meta name="title" content="{{ site.site_name }} - {{ page.title }}"/>
11+
<meta name="description" content="{{ site.site_name }} - {{ page.description }}"/>
1212

13-
<meta property="og:author" content="Shane">
14-
<meta property="og:title" content="Django Files - {{ page.title }}">
15-
<meta property="og:description" content="Django Files - A Django File, plural style.">
13+
<meta property="og:author" content="{{ site.author }}">
14+
<meta property="og:title" content="{{ site.site_name }} - {{ page.title }}">
15+
<meta property="og:description" content="{{ site.site_name }} - {{ page.description }}">
1616
<meta property="og:type" content="website">
17-
<meta property="og:url" content="https://django-files.github.io/">
18-
<meta property="og:image" content="https://django-files.github.io/images/logo.png">
17+
<meta property="og:url" content="{{ site.site_url }}">
18+
<meta property="og:image" content="{{ site.site_url }}/media/logo.png">
1919

2020
<script type="text/javascript" src="/js/theme.js"></script>
2121

2222
<link rel="icon" href="favicon.ico" sizes="any">
2323
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.1/dist/css/bootstrap.min.css">
2424
<link rel="stylesheet" href="/css/main.css">
2525

26+
{% if page.title == 'Screen Shots' %}
27+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/swiper@10/swiper-bundle.min.css" />
28+
<link rel="stylesheet" href="/css/screenshots.css">
29+
{% endif %}
30+
2631
</head>
2732
<body class="d-flex flex-column h-100">
2833

2934
<header>
3035
<nav class="navbar navbar-expand-sm bg-dark border-bottom" data-bs-theme="dark">
3136
<div class="container-fluid">
32-
<a class="navbar-brand" href="https://github.com/django-files/django-files">
37+
<a class="navbar-brand" href="{{ site.github_url }}">
3338
<img src="/images/logo.png" width="30" height="30" alt="logo"></a>
3439
<button class="navbar-toggler" type="button" data-bs-toggle="collapse"
3540
data-bs-target="#navbarSupportedContent" aria-controls="navbarSupportedContent"
@@ -39,8 +44,8 @@
3944
<div class="collapse navbar-collapse" id="navbarSupportedContent">
4045
<ul class="navbar-nav me-auto mb-2 mb-sm-0">
4146
<li class="nav-item"><a class="nav-link" href="/">Home</a></li>
42-
<li class="nav-item"><a class="nav-link" href="/docs.html">Docs</a></li>
43-
<li class="nav-item"><a class="nav-link" href="/screenshots.html" target="_blank">Screen Shots</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>
4449
</ul>
4550
</div>
4651
</div>
@@ -55,16 +60,16 @@
5560
<div class="container-fluid">
5661
<div class="row">
5762
<div class="col-12 col-sm-4">
58-
<p><a class="text-decoration-none" href="https://github.com/django-files/django-files" target="_blank">
63+
<p><a class="text-decoration-none" href="{{ site.github_url }}" target="_blank">
5964
<i class="fab fa-github"></i> Django Files</a></p>
6065
</div>
6166
<div class="col-12 col-sm-8 text-sm-end">
6267
<ul class="list-inline">
6368
<li class="list-inline-item"><a href="/">Home</a></li>
6469
<li class="list-inline-item">|</li>
65-
<li class="list-inline-item"><a href="/docs.html">Docs</a></li>
70+
<li class="list-inline-item"><a href="/docs/">Docs</a></li>
6671
<li class="list-inline-item">|</li>
67-
<li class="list-inline-item"><a href="/screenshots.html" target="_blank">Screen Shots</a></li>
72+
<li class="list-inline-item"><a href="/screenshots/" target="_blank">Screen Shots</a></li>
6873
</ul>
6974
</div>
7075
</div>

docs.html

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
---
2-
title: Docs
2+
permalink: /docs/
33
layout: default
4+
title: Docs
5+
description: Brief Documentation for Django Files, a feature Packed Self-Hosted Django/Docker File Manager for Sharing Files.
46
---
57

68
<h1>Django Files - {{ page.title }}</h1>
79

810
<p class="lead">Coming Soon...</p>
911

10-
<p>Please see the <a href="https://github.com/django-files/django-files#table-of-contents" target="_blank">
12+
<p>Please see the <a href="{{ site.github_url }}#table-of-contents" target="_blank">
1113
README.md</a> for more information.</p>

genshots.js

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
const baseDir = './screenshots'
2+
3+
const fs = require('fs')
4+
const files = []
5+
fs.readdirSync(baseDir).forEach((file) => {
6+
files.push(file)
7+
})
8+
console.log(files)
9+
10+
const file = fs.createWriteStream('./js/vars.js')
11+
file.on('error', function (err) {
12+
console.error('err', err)
13+
})
14+
file.write('const screenShots = [\n')
15+
files.forEach(function (x) {
16+
file.write(` '${x}',\n`)
17+
})
18+
file.write(']\n')
19+
file.end()

index.html

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
---
2-
title: Home
2+
permalink: /
33
layout: default
4+
title: Home
5+
description: A Feature Packed Self-Hosted Django/Docker File Manager for Sharing Files with ShareX, Flameshot and Much more...
46
---
57

68
<h1>Django Files</h1>
@@ -9,9 +11,9 @@ <h1>Django Files</h1>
911
designed to work with client apps such as <a href="https://github.com/ShareX/ShareX" target="_blank">ShareX</a> and
1012
<a href="https://github.com/flameshot-org/flameshot" target="_blank">Flameshot</a>. Django Files is currently
1113
functional but <strong>Under Active Development</strong>. Expect breaking changes until an official
12-
<a href="https://github.com/django-files/django-files/releases" target="_blank">release</a> is made.</p>
14+
<a href="{{ site.github_url }}/releases" target="_blank">release</a> is made.</p>
1315

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

1719
<h2>Running</h2>

js/main.js

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
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+
// $(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+
// })

js/screenshots.js

Lines changed: 3 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,6 @@
11
// JS for screenshots.html
22

3-
const baseDir = 'screenshots/'
4-
const screenShots = [
5-
'01_Login.png',
6-
'02_Home.png',
7-
'03_Stats.png',
8-
'04_Gallery.png',
9-
'05_Upload.png',
10-
'06_Files.png',
11-
'07_Files-delete-click.png',
12-
'08_Files-delete-deleted.png',
13-
'09_Shorts.png',
14-
'10_Shorts-create.png',
15-
'11_Shorts-delete-click.png',
16-
'12_Shorts-delete-deleted.png',
17-
'13_Settings.png',
18-
'14_Settings-save-settings.png',
19-
'15_Settings-flush-cache.png',
20-
'16_Preview-gps2.jpg.png',
21-
'17_Raw-gps2.jpg.png',
22-
'18_Preview-README.md.png',
23-
'19_Preview-requirements.txt.png',
24-
'20_Preview-main.html.png',
25-
'21_Preview-home_tags.py.png',
26-
'22_Preview-an225.jpg.png',
27-
'23_logout.png',
28-
]
3+
// const baseDir = '/screenshots/'
294

305
const shotsEl = document.getElementById('swiper-shots')
316
const thumbsEl = document.getElementById('swiper-thumbs')
@@ -35,7 +10,8 @@ for (const shot of screenShots) {
3510
const div = document.createElement('div')
3611
div.classList.add('swiper-slide')
3712
const img = document.createElement('img')
38-
img.src = `${baseDir}${shot}`
13+
// img.src = `${baseDir}${shot}`
14+
img.src = shot
3915
img.alt = shot
4016
div.appendChild(img)
4117
shotsEl.appendChild(div)

js/vars.js

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
const screenShots = [
2+
'01_Login.png',
3+
'02_Home.png',
4+
'04_Files.png',
5+
'05_Files-file-context-dropdown.png',
6+
'06_Files-delete-click.png',
7+
'07_Shorts.png',
8+
'08_Shorts-create.png',
9+
'09_Shorts-delete-click.png',
10+
'10_Shorts-delete-deleted.png',
11+
'11_Stats.png',
12+
'12_Settings-User.png',
13+
'13_Settings-User-save-settings.png',
14+
'14_Settings-delete-click.png',
15+
'15_Settings-delete-deleted.png',
16+
'16_Public-disabled-redirect.png',
17+
'17_Settings-Site-save-settings.png',
18+
'18_Settings-Site-flush-cache.png',
19+
'20_Public-enabled.png',
20+
'21_Preview-gps2.jpg.png',
21+
'23_Preview-README.md.png',
22+
'27_Preview-an225.jpg.png',
23+
'29_Site Settings with Global Quota Near Full.png',
24+
'30_Upload Failed by Global Quota.png',
25+
'31_File-password.png',
26+
'32_Logout.png',
27+
]

screenshots.html

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,27 @@
1+
---
2+
permalink: /screenshots/
3+
title: Screen Shots
4+
description: Screen Shots of Django Files, a feature Packed Self-Hosted Django/Docker File Manager for Sharing Files.
5+
---
6+
17
<!doctype html>
28
<html lang="en">
39
<head>
410

511
<meta charset="utf-8">
612
<meta name="viewport" content="width=device-width, initial-scale=1">
7-
<title>Django Files Screen Shots</title>
13+
<title>Django Files - {{ page.title }}</title>
814

9-
<meta name="author" content="Shane"/>
10-
<meta name="title" content="Django Files Screen Shots"/>
11-
<meta name="description" content="Django Files - Browse Screen Shots."/>
15+
<meta name="author" content="{{ site.author }}"/>
16+
<meta name="title" content="{{ site.site_name }} - {{ page.title }}"/>
17+
<meta name="description" content="{{ site.site_name }} - {{ page.description }}"/>
1218

13-
<meta property="og:author" content="Shane">
14-
<meta property="og:title" content="Django Files Screen Shots">
15-
<meta property="og:description" content="Django Files - Browse Screen Shots.">
19+
<meta property="og:author" content="{{ site.author }}">
20+
<meta property="og:title" content="{{ site.site_name }} - {{ page.title }}">
21+
<meta property="og:description" content="{{ site.site_name }} - {{ page.description }}">
1622
<meta property="og:type" content="website">
17-
<meta property="og:url" content="https://django-files.github.io/shots.html">
18-
<meta property="og:image" content="https://django-files.github.io/images/logo.png">
23+
<meta property="og:url" content="{{ site.site_url }}">
24+
<meta property="og:image" content="{{ site.site_url }}/media/logo.png">
1925

2026
<link rel="icon" href="favicon.ico" sizes="any">
2127
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/swiper@10/swiper-bundle.min.css" />
@@ -39,6 +45,7 @@
3945
</div>
4046

4147
<script src="https://cdn.jsdelivr.net/npm/swiper@10/swiper-bundle.min.js"></script>
48+
<script type="text/javascript" src="/js/vars.js"></script>
4249
<script type="text/javascript" src="/js/screenshots.js"></script>
4350

4451
</body>

screenshots/01_Login.png

-196 KB

0 commit comments

Comments
 (0)