Skip to content

Commit

Permalink
remove all external links from src code
Browse files Browse the repository at this point in the history
  • Loading branch information
glendc committed Oct 22, 2023
1 parent 1dc18ff commit b333980
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 7 deletions.
9 changes: 8 additions & 1 deletion src/router/redirect.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
use axum::{extract::Path, response::Redirect};

pub async fn get(Path(hash): Path<String>) -> Redirect {
Redirect::temporary(&format!("https://{hash}"))
match hash.as_str() {
"code" => Redirect::permanent("https://github.com/plabayo/bucket"),
"author" => Redirect::permanent("https://plabayo.tech"),
"og-image" => Redirect::permanent(
"https://upload.wikimedia.org/wikipedia/commons/3/3b/Sand_bucket.jpg",
),
hash => Redirect::temporary(&format!("https://{hash}")),
}
}
12 changes: 6 additions & 6 deletions templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,28 +20,28 @@
<meta property="og:description" content="link shortener and secret share" />
<meta property="og:url" content="https://bckt.xyz/" />
<meta property="og:site_name" content="bckt.xyz" />
<meta property="og:image" content="https://upload.wikimedia.org/wikipedia/commons/3/3b/Sand_bucket.jpg">
<meta property="og:image" content="/og-image">

<script src="/static/js/htmx.min.js?v=1.9.6"></script>
<link rel="stylesheet" href="/static/css/missing.min.css?v=1.1.1" />
<link rel="stylesheet" href="/static/css/style.css?t=bucket&v=0.1.1" />
</head>

<body hx-boost="true">
<body>
<main class="width:100%" style="max-width: 780px;">
<header class="width:100% center" style="margin: 0 0 10px 0;">
<h1 style="margin: 0;">
<a href="/">🪣 bckt.xyz</a>
<a href="/" hx-boost="true">🪣 bckt.xyz</a>
</h1>
<p style="margin: 0; padding-bottom: 10px;">
<a href="https://github.com/plabayo/bucket">Made with</a>
<a href="/code">Made with</a>
❤️ by
<a href="https://plabayo.tech">plabayo</a>
<a href="/author">plabayo</a>
.
</p>
</header>

<div class="center" style="padding: 5px">
<div id="content" class="center" style="padding: 5px" hx-boost="true">
{% block content %}{% endblock %}
</div>
</main>
Expand Down

0 comments on commit b333980

Please sign in to comment.