Skip to content

Commit 1fc9dce

Browse files
committed
Update Site
1 parent 3802f70 commit 1fc9dce

20 files changed

+472
-305
lines changed

.github/workflows/build.yaml

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
1-
name: 'Pages'
1+
name: "Pages"
22

33
on:
44
push:
5-
branches: ['master']
6-
repository_dispatch:
7-
types:
8-
- webhook
5+
branches: ["master"]
96
workflow_dispatch:
107

118
permissions:
@@ -14,34 +11,34 @@ permissions:
1411
id-token: write
1512

1613
concurrency:
17-
group: 'pages'
14+
group: "pages"
1815
cancel-in-progress: false
1916

2017
jobs:
2118
build:
22-
name: 'Build'
19+
name: "Build"
2320
runs-on: ubuntu-latest
2421
timeout-minutes: 5
2522

2623
steps:
27-
- name: 'Checkout'
24+
- name: "Checkout"
2825
uses: actions/checkout@v4
2926

30-
- name: 'Configure Pages'
27+
- name: "Configure Pages"
3128
uses: actions/configure-pages@v5
3229

33-
- name: 'Jekyll Build Pages'
30+
- name: "Jekyll Build Pages"
3431
uses: actions/jekyll-build-pages@v1
3532
with:
36-
source: './src'
33+
source: "./src"
3734

38-
- name: 'Upload Pages Artifact'
35+
- name: "Upload Pages Artifact"
3936
uses: actions/upload-pages-artifact@v2
4037
with:
4138
path: _site/
4239

4340
deploy:
44-
name: 'Deploy'
41+
name: "Deploy"
4542
runs-on: ubuntu-latest
4643
timeout-minutes: 5
4744
needs: build
@@ -51,7 +48,7 @@ jobs:
5148
url: ${{ steps.deployment.outputs.page_url }}
5249

5350
steps:
54-
- name: 'Deploy Pages'
51+
- name: "Deploy Pages"
5552
id: deployment
5653
uses: actions/deploy-pages@v2
5754
with:

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
.idea/
22
*.iml
33
.vscode/
4+
node_modules/
45
**/.jekyll-cache/
56
**/_site/
7+
**/dist/
8+
src/css/bootstrap.css

.prettierignore

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# IDE
2+
.idea/
3+
.vscode/
4+
5+
# Tools
6+
.ruff_cache/
7+
.mypy_cache/
8+
.pytest_cache/
9+
eslint_report.json
10+
11+
# Build
12+
dist/
13+
node_modules/
14+
.github/disabled/
15+
16+
# Files
17+
.github/pull_request_template.md
18+
*.html

.prettierrc.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@
55
"singleQuote": true,
66
"overrides": [
77
{
8-
"files": ["**/*.html"],
8+
"files": ["**/*.json", "**/*.yaml", "**/*.yml"],
99
"options": {
1010
"singleQuote": false
1111
}
1212
},
1313
{
14-
"files": ["**/*.json", "**/*.yaml"],
14+
"files": ["**/*.json", "**/*.yaml", "**/*.yml"],
1515
"options": {
1616
"tabWidth": 2
1717
}

README.md

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,22 @@
11
[![Pages](https://github.com/django-files/django-files.github.io/actions/workflows/build.yaml/badge.svg)](https://github.com/django-files/django-files.github.io/actions/workflows/build.yaml)
2+
23
# Django Files Website
34

45
https://django-files.github.io/
56

6-
* Django Files: https://github.com/django-files/django-files
7-
* Web Extension: https://github.com/django-files/web-extension
7+
- Django Files: https://github.com/django-files/django-files
8+
- Web Extension: https://github.com/django-files/web-extension
9+
- iOS Application: https://github.com/django-files/ios-client
10+
11+
## Development
12+
13+
Install Jekyll: https://jekyllrb.com/docs/installation/
14+
15+
Run: `jekyll serve -s src -o -l`
16+
17+
This will build the site from the `src` directory, open `-o` it in your browser, watch for file changes, automatically
18+
rebuild the site and refresh `-l` the site in your browser; enjoy...
19+
20+
For more information see `jekyll help` and `jekyll serve --help` or visit: https://jekyllrb.com/docs/
21+
22+
For production, this site is built with GitHub Actions on push to master or dispatch: [build.yaml](.github/workflows/build.yaml)

genshots.js

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,23 @@
1+
const fs = require('fs')
2+
13
const repoDir = './src/screenshots'
4+
const varsFile = './src/js/vars.js'
5+
const varName = 'screenShots'
26
const relPath = ''
37

4-
const fs = require('fs')
58
const files = []
69
fs.readdirSync(repoDir).forEach((file) => {
7-
files.push(file)
10+
files.push(`${relPath}${file}`)
811
})
912
console.log(files)
1013

11-
const file = fs.createWriteStream('./src/js/vars.js')
14+
const file = fs.createWriteStream(varsFile)
1215
file.on('error', function (err) {
1316
console.error('err', err)
1417
})
15-
file.write('const screenShots = [\n')
18+
file.write(`const ${varName} = [\n`)
1619
files.forEach(function (x) {
17-
file.write(` '${relPath}${x}',\n`)
20+
file.write(` '${x}',\n`)
1821
})
1922
file.write(']\n')
2023
file.end()

src/_config.yml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,23 +11,25 @@ menu:
1111
link: /
1212
- name: Docs
1313
link: /docs/
14+
- name: iOS App
15+
link: /ios/
1416
- name: Web Extension
1517
link: /extension/
1618
- name: Screen Shots
1719
link: /screenshots/
18-
external: true
1920

20-
github_owner_repo: django-files/django-files
21-
github_url: https://github.com/django-files/django-files
2221
github_name: django-files/web-extension
22+
github_url: https://github.com/django-files/django-files
2323

2424
chrome_id: abpbiefojfkekhkjnpakpekkpeibnjej
2525
chrome_url: https://chromewebstore.google.com/detail/django-files/abpbiefojfkekhkjnpakpekkpeibnjej
2626

2727
firefox_id: django-files
2828
firefox_url: https://addons.mozilla.org/en-US/firefox/addon/django-files/
2929

30-
extension_github: https://github.com/django-files/web-extension
31-
3230
discord_invite: https://discord.gg/wXy6m2X8wY
33-
discord_webhook: https://discord.com/api/webhooks/1258944618389569566/gqge0T5UZcJHLxfAFLPNjlzsuqikQJtTlCRvVWbw2ufDv_WrJ8yzVRWenb__s1PxyawH
31+
discord_server: 899171661457293343
32+
33+
extension_github: https://github.com/django-files/web-extension
34+
github_owner_repo: django-files/django-files
35+
relay_url: https://relay.cssnr.com/discord/1258944618389569566

src/_layouts/default.html

Lines changed: 61 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<title>{{ site.site_name }} - {{ page.title }}</title>
88

99
{% if page.noindex %}
10-
<meta name="robots" content="noindex, nofollow">
10+
<meta name="robots" content="noindex">
1111
{% endif %}
1212

1313
<meta name="author" content="{{ site.author }}"/>
@@ -21,6 +21,8 @@
2121
<meta property="og:url" content="{{ "/" | absolute_url }}">
2222
<meta property="og:image" content="{{ "/media/logo.png" | absolute_url }}">
2323

24+
<meta name="darkreader-lock">
25+
2426
{% if page.dark != true %}
2527
<script type="text/javascript" src="{{ "/js/theme.js" | relative_url }}"></script>
2628
{% endif %}
@@ -33,6 +35,10 @@
3335
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.1.1/animate.min.css" integrity="sha512-c42qTSw/wPZ3/5LBzD+Bw5f7bSF2oxou6wEb+I/lqeaKV5FDIfMvvRp772y4jcJLKuGUOpbJMdg/BTl50fJYAw==" crossorigin="anonymous" referrerpolicy="no-referrer" />
3436
<link rel="stylesheet" href="{{ "/css/main.css" | relative_url }}">
3537

38+
{% if page.title == 'Screen Shots' %}
39+
<link rel="stylesheet" href="{{ "/dist/swiper/swiper-bundle.min.css" | relative_url }}">
40+
<link rel="stylesheet" href="{{ "/css/screenshots.css" | relative_url }}">
41+
{% endif %}
3642
{% if page.title == 'Uninstall' %}
3743
<link rel="stylesheet" href="{{ "/css/uninstall.css" | relative_url }}">
3844
{% endif %}
@@ -43,71 +49,90 @@
4349
<div id="tsparticles"></div>
4450

4551
<header>
46-
<nav class="navbar navbar-expand-sm bg-body-tertiary mb-2" aria-label="Primary Navigation">
52+
<nav aria-label="Primary Navigation" class="navbar navbar-expand-md bg-body-tertiary mb-2">
4753
<div class="container-fluid">
48-
<a class="mx-2" href="{{ "/" | relative_url }}">
49-
<img src="{{ "/media/logo.png" | relative_url }}" width="30" height="30" alt="logo" class="my-auto"></a>
54+
<a class="px-2" href="{{ "/" | relative_url }}">
55+
<img alt="logo" src="{{ "/media/logo.png" | relative_url }}" width="30" height="30" class="my-auto"></a>
5056
<button class="navbar-toggler" type="button" data-bs-toggle="collapse"
5157
data-bs-target="#navbarSupportedContent" aria-controls="navbarSupportedContent"
5258
aria-expanded="false" aria-label="Toggle navigation">
5359
<span class="navbar-toggler-icon"></span>
5460
</button>
55-
<div class="collapse navbar-collapse me-auto " id="navbarSupportedContent">
61+
<div class="collapse navbar-collapse me-auto" id="navbarSupportedContent">
5662
<ul class="navbar-nav me-auto">
5763
{% for item in site.menu %}
5864
<li class="nav-item">
59-
<a class="nav-link {% if page.title == item.name %}active{% endif %}"
65+
<a class="nav-link {% if page.permalink == item.link %}active{% endif %}"
6066
href="{{ item.link | relative_url }}" {% if item.external %}target="_blank"{% endif %}>
6167
{{ item.name }}{% if item.external %} <i class="fa-solid fa-arrow-up-right-from-square fa-sm"></i>{% endif %}</a>
6268
</li>
6369
{% endfor %}
64-
</ul>
70+
</ul> <!-- main navigation -->
6571
<ul class="navbar-nav nav-icons d-flex flex-row">
72+
6673
<li class="nav-item">
6774
<a class="nav-link hvr-grow-lg" href="{{ site.discord_invite }}" target="_blank" rel="noopener">
6875
<i class="fa-brands fa-discord fa-xl"></i></a>
6976
</li>
77+
7078
<li class="nav-item">
71-
<a class="nav-link hvr-grow-lg" href="{{ site.github_url }}" target="_blank" rel="noopener">
79+
<a class="nav-link hvr-grow-lg" href="{{ site.github_url }}?tab=readme-ov-file#readme" target="_blank" rel="noopener">
7280
<i class="fa-brands fa-github fa-xl"></i></a>
7381
</li>
74-
</ul>
75-
</div>
76-
</div>
82+
83+
<li class="nav-item dropdown">
84+
<a class="nav-link hvr-grow ms-1" id="bd-theme-disabled" role="button" data-bs-toggle="dropdown" aria-expanded="false" style="min-width: 56px;">
85+
<i id="theme-icon" class="fa-solid fa-circle-half-stroke fa-lg" style="min-width: 20px;"></i> <i class="fa-solid fa-caret-down fa-xs mx-1"></i></a>
86+
<ul class="dropdown-menu auto dropdown-menu-end" aria-labelledby="bd-theme-disabled">
87+
<li><button class="dropdown-item" data-bs-theme-value="dark" aria-pressed="false">
88+
<i class="fa-regular fa-moon" style="min-width: 16px;"></i> <span class="ms-3">Dark</span></button></li>
89+
<li><button class="dropdown-item" data-bs-theme-value="light" aria-pressed="false">
90+
<i class="fa-solid fa-sun" style="min-width: 16px;"></i> <span class="ms-3">Light</span></button></li>
91+
<li><button class="dropdown-item" data-bs-theme-value="auto" aria-pressed="false">
92+
<i class="fa-solid fa-circle-half-stroke" style="min-width: 16px;"></i> <span class="ms-3">Auto</span></button></li>
93+
</ul>
94+
</li>
95+
</ul> <!-- icons -->
96+
</div> <!-- navbar -->
97+
</div> <!-- container -->
7798
</nav>
7899
</header>
79100

101+
80102
<main class="flex-grow-1 px-0 px-sm-3">
81103
{{ content }}
82104
</main>
83105

84-
<footer class="footer mt-auto px-1 flex-shrink-0 bg-body-tertiary">
85-
<div class="container-fluid py-2">
86-
<div class="d-flex flex-column flex-md-row">
87-
<div class="me-md-auto">
88-
<a class="text-decoration-none link-body-emphasis" href="{{ site.github_url }}" target="_blank" rel="noopener">
89-
<i class="fab fa-github"></i> {{ site.site_name }}</a>
90-
</div>
91-
<div class="ms-md-auto">
92-
<nav aria-label="Secondary Navigation">
93-
<ol class="list-inline mb-1 d-flex flex-column flex-sm-row">
94-
{% for item in site.menu %}
106+
107+
{% if page.nofooter != true %}
108+
<footer class="footer mt-auto px-1 flex-shrink-0 bg-body-tertiary">
109+
<div class="container-fluid py-2">
110+
<div class="d-flex flex-column flex-md-row">
111+
<div class="me-md-auto mb-2 mb-md-0">
112+
<a class="link-body-emphasis text-decoration-none" href="{{ site.github_url }}?tab=readme-ov-file#readme" target="_blank" rel="noopener">
113+
<i class="fab fa-github"></i> {{ site.site_name }}</a>
114+
</div>
115+
<div class="ms-md-auto">
116+
<nav aria-label="Secondary Navigation">
117+
<ol class="list-inline mb-1 d-flex flex-column flex-sm-row">
118+
{% for item in site.menu %}
119+
<li class="list-inline-item mb-2 mb-sm-0">
120+
<a class="link-body-emphasis text-decoration-none {% if page.permalink == item.link %}fw-bold{% endif %}"
121+
href="{{ item.link | relative_url }}" {% if item.external %}target="_blank"{% endif %}>
122+
{{ item.name }}{% if item.external %} <i class="fa-solid fa-arrow-up-right-from-square fa-sm"></i>{% endif %}</a>
123+
</li>
124+
{% endfor %}
95125
<li class="list-inline-item">
96-
<a class="text-decoration-none link-body-emphasis {% if page.title == item.name %}fw-bold{% endif %}"
97-
href="{{ item.link | relative_url }}" {% if item.external %}target="_blank"{% endif %}>
98-
{{ item.name }}{% if item.external %} <i class="fa-solid fa-arrow-up-right-from-square fa-sm"></i>{% endif %}</a>
126+
<a class="link-body-emphasis text-decoration-none" href="{{ site.discord_invite }}" target="_blank">
127+
Discord <i class="fa-solid fa-arrow-up-right-from-square fa-xs"></i></a>
99128
</li>
100-
{% endfor %}
101-
<li class="list-inline-item">
102-
<a class="text-decoration-none link-body-emphasis" href="{{ site.discord_invite }}" target="_blank">
103-
Discord <i class="fa-solid fa-arrow-up-right-from-square fa-sm"></i></a>
104-
</li>
105-
</ol>
106-
</nav>
107-
</div>
108-
</div>
109-
</div>
110-
</footer>
129+
</ol>
130+
</nav>
131+
</div> <!-- bottom navigation -->
132+
</div> <!-- row -->
133+
</div> <!-- container -->
134+
</footer>
135+
{% endif %}
111136

112137
<button type="button" class="btn btn-outline-secondary" id="back-to-top">
113138
<i class="fa-regular fa-square-caret-up"></i>

0 commit comments

Comments
 (0)