Merge branch 'tweak/public-background' into 'dev'

Make background available to all public pages

See merge request crafty-controller/crafty-4!499
This commit is contained in:
Iain Powrie 2022-12-01 01:09:09 +00:00
commit ccf0ed9356
7 changed files with 157 additions and 133 deletions

View File

@ -1,16 +1,5 @@
# Changelog
## --- [4.0.18] - 2022/TBD
### New features
TBD
### Bug fixes
TBD
### Tweaks
TBD
### Lang
TBD
<br><br>
## --- [4.0.17] - 2022/11/30
## --- [4.0.17/4.0.18] - 2022/11/30
### New features
- Automate forge install process through Crafty server creation for Forge server version 1.16 and greater. ([Merge Request](https://gitlab.com/crafty-controller/crafty-4/-/merge_requests/495))
- Tooltip for server port on dashboard. ([Merge Request](https://gitlab.com/crafty-controller/crafty-4/-/merge_requests/496))
@ -18,8 +7,10 @@ TBD
### Bug fixes
- Fix no port on bedrock server creation. ([Merge Request](https://gitlab.com/crafty-controller/crafty-4/-/merge_requests/493))
### Tweaks
- Docker🐋 | Update image base to Ubuntu 22.04 Jammy ([Merge Request](https://gitlab.com/crafty-controller/crafty-4/-/merge_requests/497))<br>
- Docker🐋 | Update image base to Ubuntu 22.04 Jammy. ([Merge Request](https://gitlab.com/crafty-controller/crafty-4/-/merge_requests/497))<br>
*(OpenJDK16 Removed, no jammy backport)*
### Hotfix (4.0.18)
- Apply custom login backgrounds on all public pages. ([Merge Request](https://gitlab.com/crafty-controller/crafty-4/-/merge_requests/499))
<br><br>
## --- [4.0.16] - 2022/10/23

View File

@ -39,6 +39,7 @@ class PublicHandler(BaseHandler):
"lang": self.helper.get_setting("language"),
"lang_page": self.helper.get_lang_page(self.helper.get_setting("language")),
"query": "",
"background": self.controller.cached_login,
}
if self.request.query:
@ -48,7 +49,6 @@ class PublicHandler(BaseHandler):
template = "public/404.html"
if page == "login":
page_data["background"] = self.controller.cached_login
template = "public/login.html"
elif page == 404:

View File

@ -7,7 +7,7 @@ logger = logging.getLogger(__name__)
class StatusHandler(BaseHandler):
def get(self):
page_data = {}
page_data = {"background": self.controller.cached_login}
page_data["lang"] = self.helper.get_setting("language")
page_data["lang_page"] = self.helper.get_lang_page(
self.helper.get_setting("language")

View File

@ -1,5 +1,6 @@
<!DOCTYPE html>
<html lang="en">
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
@ -20,6 +21,14 @@
<link rel="shortcut icon" type="image/svg+xml" href="/static/assets/images/logo_small.svg">
<link rel="alternate icon" href="/static/assets/images/favicon.png" />
</head>
<style>
.auth.auth-bg-1 {
background: url("../../static/assets/images/auth/{{data['background']}}"),
url("../../static/assets/images/auth/login-1.jpg");
background-size: cover;
}
</style>
<body class="dark-theme">
<div class="container-scroller">
<div class="container-fluid page-body-wrapper full-page-wrapper">
@ -38,7 +47,8 @@
<p class="mb-2 comment font-weight-light">
{{ translate('404', 'unableToFind', data['lang']) }}
<br /><br />
<a class="d-inline font-weight-medium" href="https://discord.gg/9VJPhCE"> {{ translate('404', 'contact', data['lang']) }}</a>
<a class="d-inline font-weight-medium" href="https://discord.gg/9VJPhCE"> {{ translate('404',
'contact', data['lang']) }}</a>
</p>
</div>
</div>
@ -67,4 +77,5 @@
<script src="/static/assets/js/shared/todolist.js"></script>
<!-- endinject -->
</body>
</html>

View File

@ -1,5 +1,6 @@
<!DOCTYPE html>
<html lang="en">
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
@ -20,6 +21,14 @@
<link rel="shortcut icon" type="image/svg+xml" href="/static/assets/images/logo_small.svg">
<link rel="alternate icon" href="/static/assets/images/favicon.png" />
</head>
<style>
.auth.auth-bg-1 {
background: url("../../static/assets/images/auth/{{data['background']}}"),
url("../../static/assets/images/auth/login-1.jpg");
background-size: cover;
}
</style>
<body class="dark-theme">
<div class="container-scroller">
<div class="container-fluid page-body-wrapper full-page-wrapper">
@ -33,15 +42,18 @@
<div class="col-sm-12 grid-margin stretch-card">
<div class="card card-statistics social-card google-card card-colored">
<div class="card-body">
<h4 class="platform-name mb-3 mt-4 font-weight-semibold user-name">{{ translate('error', 'error', data['lang']) }}</h4>
<h5 class="headline font-weight-medium">{{ translate('error', 'terribleFailure', data['lang']) }}</h5>
<h4 class="platform-name mb-3 mt-4 font-weight-semibold user-name">{{ translate('error', 'error',
data['lang']) }}</h4>
<h5 class="headline font-weight-medium">{{ translate('error', 'terribleFailure', data['lang']) }}
</h5>
<p class="mb-2 comment font-weight-light">
{{ translate('error', 'embarassing', data['lang']) }}<br />
<br />
<b>{{ translate('error', 'hereIsTheError', data['lang']) }}: {{data['error']}}</b><br /><br />
That's all the help I can give you - Godspeed
<br /><br />
<a class="d-inline font-weight-medium" href="https://discord.gg/9VJPhCE"> {{ translate('error', 'contact', data['lang']) }}</a>
<a class="d-inline font-weight-medium" href="https://discord.gg/9VJPhCE"> {{ translate('error',
'contact', data['lang']) }}</a>
</p>
</div>
</div>
@ -70,4 +82,5 @@
<script src="/static/assets/js/shared/todolist.js"></script>
<!-- endinject -->
</body>
</html>

View File

@ -21,6 +21,13 @@
<link rel="shortcut icon" type="image/svg+xml" href="/static/assets/images/logo_small.svg">
<link rel="alternate icon" href="/static/assets/images/favicon.png" />
</head>
<style>
.auth.auth-bg-1 {
background: url("../../static/assets/images/auth/{{data['background']}}"),
url("../../static/assets/images/auth/login-1.jpg");
background-size: cover;
}
</style>
<body class="dark-theme">
<div class="container-scroller">
@ -60,11 +67,6 @@
.login-input:focus {
box-shadow: 0 12px 16px 0 hsla(0, 0%, 0%, 0.4);
}
.auth.auth-bg-1 {
background: url("../../static/assets/images/auth/{{data['background']}}");
background-size: cover;
}
</style>
{% if data['query'] %}
<form action="/public/login?{{ data['query'] }}" method="post">

View File

@ -7,6 +7,13 @@
{% block content %}
<!-- View for Large screen -->
<style>
.auth.auth-bg-1 {
background: url("../../static/assets/images/auth/{{data['background']}}"),
url("../../static/assets/images/auth/login-1.jpg");
background-size: cover;
}
</style>
<div class="row justify-content-center">
<div class="content-wrapper col-md login-modal d-none d-sm-block" style="background-color: var(--dropdown-bg);">
<img src="/static/assets/images/logo_long.png" style='width: 25%; margin-left: 38%;'>