Update styling and changelogs
All checks were successful
/ build (push) Successful in 19s

This commit is contained in:
Dustin Thomas 2025-09-05 15:56:32 -05:00
parent e73f506daf
commit 02ff3ad96f
Signed by: cptlobster
GPG key ID: 33D607425C830B4C
4 changed files with 39 additions and 11 deletions

View file

@ -2,6 +2,11 @@
## Unreleased Changes
## v0.1.2 (2025-09-05)
- Allow for using slashes in paths.
- Improve error handling slightly.
- [rich] Tweak styles and add viewport scaling.
## v0.1.1 (2025-08-22)
- [rich] Fix docker image missing templates
- [rich] Add light mode to routes and error pages

View file

@ -21,4 +21,8 @@ using = "regex"
from = "dod([fs][0-9]{2})e([0-9]{3})"
# Capture groups can be replaced using numbered capture groups (`$1`, `$2`, ...)
to = "https://dod.cptlobster.dev/episodes/$1/$2"
using = "regex"
using = "regex"
[[routes]]
from = "sub/path"
to = "https://www.youtube.com/watch?v=dQw4w9WgXcQ"

View file

@ -52,6 +52,7 @@ async fn list_paths(cm: &State<ConfigManager>) -> Template {
async fn redirect_path(cm: &State<ConfigManager>, path: PathBuf) -> Result<Redirect, Status> {
let config = cm.get().await;
if let Some(p) = path.to_str() {
debug!("Path string: {}", p);
match config.find(p) {
Some(p) => Ok(Redirect::to(p)),
None => {
@ -70,6 +71,7 @@ async fn redirect_path(cm: &State<ConfigManager>, path: PathBuf) -> Result<Redir
async fn redirect_path(cm: &State<ConfigManager>, path: PathBuf) -> Result<Redirect, Status> {
let config = cm.get().await;
if let Some(p) = path.to_str() {
debug!("Path string: {}", p);
match config.find(p) {
Some(p) => Ok(Redirect::to(p)),
None => {

View file

@ -7,24 +7,25 @@
{% else %}
<title>stargate</title>
{% endif %}
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<style type="text/css">
* {
transition: all 0.25s ease-in-out;
}
:root {
--fg: hsl(240, 40%, 80%);
--fg-header: hsl(240, 40%, 100%);
--bg: hsl(240, 20%, 15%);
--fg: hsl(240, 60%, 85%);
--fg-header: hsl(240, 60%, 100%);
--bg: hsl(240, 30%, 20%);
--link: hsl(240, 100%, 75%);
}
@media (prefers-color-scheme: light) {
:root {
--fg: hsl(240, 40%, 20%);
--fg-header: hsl(240, 40%, 0%);
--bg: hsl(240, 20%, 85%);
--link: hsl(240, 100%, 40%);
--fg: hsl(240, 60%, 15%);
--fg-header: hsl(240, 60%, 0%);
--bg: hsl(240, 30%, 85%);
--link: hsl(240, 100%, 35%);
}
}
@ -37,6 +38,7 @@
a:link, a:visited {
color: var(--link);
font-weight: 700;
}
a:hover {
@ -47,6 +49,23 @@
color: var(--fg-header);
}
h1 {
font-size: 2.5rem;
}
h2 {
font-size: 1.75rem;
}
p {
font-size: 1.1rem;
}
ul {
font-size: 1.1rem;
line-height: 1.4;
}
main {
padding: 0rem 2rem;
}
@ -65,9 +84,7 @@
<h2>stargate</h2>
<p>
stargate is a minimal URL shortener service. For more information and how to deploy this yourself, visit
<a href="https://forge.cptlobster.dev/cptlobster/stargate">the repository</a>.
</p>
<p>
<a href="https://forge.cptlobster.dev/cptlobster/stargate">the repository</a>.<br />
stargate is licensed using <a href="https://www.gnu.org/licenses/gpl-3.0.html">the GNU General Public License,
Version 3</a>.
</p>