diff options
author | Stefan Melmuk <[email protected]> | 2022-12-02 17:58:27 +0100 |
---|---|---|
committer | Stefan Melmuk <[email protected]> | 2022-12-05 00:08:46 +0100 |
commit | d209df9e10544b7c1fc8ebfdb3a7910400ba0289 (patch) | |
tree | 8da6bc19045494cebcbb5ad357400fe72facd3f8 /src/static | |
parent | 1b56f4266bdedd567e939295735d75c54e57bb14 (diff) | |
download | vaultwarden-d209df9e10544b7c1fc8ebfdb3a7910400ba0289.tar.gz vaultwarden-d209df9e10544b7c1fc8ebfdb3a7910400ba0289.zip |
use a custom 404 page
to customize the 404 page you can copy the handlebar template
`src/static/templates/404.hbs` to the TEMPLATES_FOLDER (defaults to
`data/templates/`)
Diffstat (limited to 'src/static')
-rw-r--r-- | src/static/images/404.png | bin | 0 -> 5042 bytes | |||
-rw-r--r-- | src/static/templates/404.hbs | 62 |
2 files changed, 62 insertions, 0 deletions
diff --git a/src/static/images/404.png b/src/static/images/404.png Binary files differnew file mode 100644 index 00000000..a76ddb04 --- /dev/null +++ b/src/static/images/404.png diff --git a/src/static/templates/404.hbs b/src/static/templates/404.hbs new file mode 100644 index 00000000..dc30b9e4 --- /dev/null +++ b/src/static/templates/404.hbs @@ -0,0 +1,62 @@ +<!DOCTYPE html> +<html lang="en"> +<head> + <meta http-equiv="content-type" content="text/html; charset=UTF-8" /> + <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" /> + <meta name="robots" content="noindex,nofollow" /> + <link rel="icon" type="image/png" href="{{urlpath}}/vw_static/vaultwarden-icon.png"> + <title>Page not found!</title> + <link rel="stylesheet" href="{{urlpath}}/vw_static/bootstrap.css" /> + <style> + body { + padding-top: 75px; + } + .vaultwarden-icon { + width: 48px; + height: 48px; + height: 32px; + width: auto; + margin: -5px 0 0 0; + } + .footer { + padding: 40px 0 40px 0; + border-top: 1px solid #dee2e6; + } + .container { + max-width: 980px; + } + .content { + padding-top: 20px; + padding-bottom: 20px; + padding-left: 15px; + padding-right: 15px; + } + </style> +</head> + +<body class="bg-light"> + + <nav class="navbar navbar-expand-md navbar-dark bg-dark mb-4 shadow fixed-top"> + <div class="container"> + <a class="navbar-brand" href="{{urlpath}}/"><img class="vaultwarden-icon" src="{{urlpath}}/vw_static/vaultwarden-icon.png" alt="V">aultwarden</a> + <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarCollapse" + aria-controls="navbarCollapse" aria-expanded="false" aria-label="Toggle navigation"> + <span class="navbar-toggler-icon"></span> + </button> + <div class="collapse navbar-collapse" id="navbarCollapse"> + <ul class="navbar-nav me-auto"> + </div> + </div> + </nav> + + <main class="container inner content text-center"> + <h2>Page not found!</h2> + <p class="lead">Sorry, but the page you were looking for could not be found.</p> + <p class="display-6"> + <a href="{{urlpath}}/"><img style="max-width: 500px; width: 100%;" src="{{urlpath}}/vw_static/404.png" alt="Return to the web vault?"></a></p> + <p>You can <a href="{{urlpath}}/">return to the web-vault</a>, or <a href="https://github.com/dani-garcia/vaultwarden">contact us</a>.</p> + </main> + + <div class="container footer text-muted content">Vaultwarden (unofficial Bitwarden® server)</div> +</body> +</html> |