Skip to content

Commit f82ec44

Browse files
committed
Update Liquid Template and Make Screenshots Directory Relative
1 parent 2ae6cbe commit f82ec44

File tree

6 files changed

+52
-30
lines changed

6 files changed

+52
-30
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>

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/screenshots.js

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

3-
const baseDir = 'screenshots/'
3+
// const baseDir = '/screenshots/'
44

55
const shotsEl = document.getElementById('swiper-shots')
66
const thumbsEl = document.getElementById('swiper-thumbs')
@@ -10,7 +10,8 @@ for (const shot of screenShots) {
1010
const div = document.createElement('div')
1111
div.classList.add('swiper-slide')
1212
const img = document.createElement('img')
13-
img.src = `${baseDir}${shot}`
13+
// img.src = `${baseDir}${shot}`
14+
img.src = shot
1415
img.alt = shot
1516
div.appendChild(img)
1617
shotsEl.appendChild(div)

screenshots.html

Lines changed: 15 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" />

0 commit comments

Comments
 (0)