Merge branch 'main' of gitlab.com:bashrc2/epicyon

merge-requests/30/head
Bob Mottram 2022-12-22 19:24:08 +00:00
commit bf689f59fb
30 changed files with 54 additions and 41 deletions

View File

@ -16263,7 +16263,8 @@ class PubServer(BaseHTTPRequestHandler):
self.server.http_prefix,
self.server.domain_full,
self.server.system_language,
False, ua_str).encode('utf-8')
False, ua_str,
self.server.theme_name).encode('utf-8')
msglen = len(msg)
self._logout_headers('text/html', msglen, calling_domain)
self._write(msg)
@ -18029,7 +18030,8 @@ class PubServer(BaseHTTPRequestHandler):
self.server.http_prefix,
self.server.domain_full,
self.server.system_language,
True, ua_str).encode('utf-8')
True, ua_str,
self.server.theme_name).encode('utf-8')
msglen = len(msg)
self._login_headers('text/html', msglen, calling_domain)
self._write(msg)

Binary file not shown.

View File

@ -25,6 +25,7 @@ Orbitron is under OFL and came from CCC Rc3 style guide https://styleguide.rc3.w
RailModel is GPL. See https://www.fontspace.com/rail-model-font-f10741
Rainyhearts in public domain. By Camellina tr.camellina@gmail.com
Solidaric by Bob Mottram is under AGPL
StonehengeRegular is by unknown author, but freely licensed. See https://www.fontmirror.com/stonehenge
SubZER0 is under GPL. See http://www.free-fonts-download.com/Techno/subzer0-font
SundownerRegular is public domain. See https://www.fontspace.com/sundowner-font-f40837
Warenhaus-Standard is public domain. See https://fontlibrary.org/en/font/warenhaus-typenhebel

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 120 KiB

After

Width:  |  Height:  |  Size: 82 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 284 KiB

After

Width:  |  Height:  |  Size: 211 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 118 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 188 KiB

After

Width:  |  Height:  |  Size: 208 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 47 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 197 KiB

After

Width:  |  Height:  |  Size: 110 KiB

View File

@ -12,11 +12,11 @@
"post-separator-margin-bottom": "10px",
"time-color": "grey",
"event-color": "white",
"login-bg-color": "#567726",
"login-bg-color": "#362e31",
"welcome-bg-color": "#ccc",
"login-fg-color": "black",
"login-fg-color": "white",
"welcome-fg-color": "black",
"options-bg-color": "black",
"options-bg-color": "#383335",
"newswire-publish-icon": "True",
"full-width-timeline-buttons": "False",
"icons-as-buttons": "False",
@ -29,6 +29,8 @@
"font-page-dash-mobile": "32px",
"font-size-button-mobile": "26px",
"font-size-pageslist": "32px",
"font-size-links": "20px",
"font-size-newswire": "20px",
"font-size": "32px",
"font-size2": "26px",
"font-size3": "40px",
@ -38,7 +40,7 @@
"post-bg-color": "#383335",
"timeline-posts-background-color": "#383335",
"header-bg-color": "#383335",
"column-left-color": "#383335",
"column-left-color": "#42383c",
"text-entry-background": "#383335",
"link-bg-color": "#383335",
"main-link-color": "white",
@ -77,13 +79,15 @@
"lines-color": "#c5d2b9",
"day-number": "#c5d2b9",
"day-number2": "#ccc",
"event-background": "#555",
"event-background-private": "#999",
"event-background": "#222",
"event-background-private": "#111",
"timeline-border-radius": "20px",
"image-corners": "8%",
"quote-right-margin": "0.1em",
"header-font": "'bgrove'",
"*font-family": "'bgrove'",
"*src": "url('fonts/bgrove.woff2') format('woff2')",
"*font-family": "'Hyperlegible'",
"*src": "url('fonts/Atkinson-Hyperlegible-Regular.woff2') format('woff2')",
"header-font": "'HyperlegibleBold'",
"**font-family": "'HyperlegibleBold'",
"**src": "url('fonts/Atkinson-Hyperlegible-Bold.woff2') format('woff2')",
"reply-icon-direction": "-1"
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

View File

@ -40,6 +40,7 @@
"font-size5": "22px",
"main-bg-color": "black",
"login-bg-color": "black",
"login-logo-width": "30vw",
"welcome-bg-color": "black",
"options-bg-color": "black",
"post-bg-color": "black",

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

BIN
theme/lcd/login.png 100644

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

BIN
theme/rc3/login.png 100644

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

BIN
theme/zen/login.png 100644

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

View File

@ -9,7 +9,9 @@ __module_group__ = "Web Interface"
import os
import time
import filecmp
from shutil import copyfile
from utils import get_image_extensions
from utils import get_config_param
from utils import no_of_accounts
from utils import get_nickname_validation_pattern
@ -61,43 +63,46 @@ def html_login(translate: {},
http_prefix: str, domain: str,
system_language: str,
autocomplete: bool,
ua_str: str) -> str:
ua_str: str,
theme_name: str) -> str:
"""Shows the login screen
"""
accounts = no_of_accounts(base_dir)
login_image = 'login.png'
extensions = get_image_extensions()
login_image_filename = None
if os.path.isfile(base_dir + '/accounts/' + login_image):
login_image_filename = base_dir + '/accounts/' + login_image
elif os.path.isfile(base_dir + '/accounts/login.jpg'):
login_image = 'login.jpg'
login_image_filename = base_dir + '/accounts/' + login_image
elif os.path.isfile(base_dir + '/accounts/login.jpeg'):
login_image = 'login.jpeg'
login_image_filename = base_dir + '/accounts/' + login_image
elif os.path.isfile(base_dir + '/accounts/login.gif'):
login_image = 'login.gif'
login_image_filename = base_dir + '/accounts/' + login_image
elif os.path.isfile(base_dir + '/accounts/login.svg'):
login_image = 'login.svg'
login_image_filename = base_dir + '/accounts/' + login_image
elif os.path.isfile(base_dir + '/accounts/login.webp'):
login_image = 'login.webp'
login_image_filename = base_dir + '/accounts/' + login_image
elif os.path.isfile(base_dir + '/accounts/login.avif'):
login_image = 'login.avif'
login_image_filename = base_dir + '/accounts/' + login_image
elif os.path.isfile(base_dir + '/accounts/login.heic'):
login_image = 'login.heic'
login_image_filename = base_dir + '/accounts/' + login_image
elif os.path.isfile(base_dir + '/accounts/login.jxl'):
login_image = 'login.jxl'
login_image_filename = base_dir + '/accounts/' + login_image
# does a login image exist for the current theme?
for ext in extensions:
login_image = 'login.' + ext
theme_image = \
base_dir + '/theme/' + theme_name + \
'/' + login_image
if os.path.isfile(theme_image):
login_image_filename = \
base_dir + '/accounts/' + login_image
if os.path.isfile(login_image_filename):
if not filecmp.cmp(theme_image,
login_image_filename):
copyfile(theme_image, login_image_filename)
else:
copyfile(theme_image, login_image_filename)
break
# does a custom login image exist?
if not login_image_filename:
for ext in extensions:
login_image = 'login.' + ext
image_filename = base_dir + '/accounts/' + login_image
if os.path.isfile(image_filename):
login_image_filename = image_filename
break
# no login image found, so use the default
if not login_image_filename:
login_image = 'login.png'
login_image_filename = base_dir + '/accounts/' + login_image
copyfile(base_dir + '/img/login.png', login_image_filename)
source_image = base_dir + '/img/login.png'
copyfile(source_image, login_image_filename)
text_mode_logo = get_text_mode_logo(base_dir)
text_mode_logo_html = html_keyboard_navigation(text_mode_logo, {}, {})