Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F2708868
base.astro
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
base.astro
View Options
---
import '@/styles.css'
import { ViewTransitions } from "astro:transitions";
interface Props {
title: string;
description: string;
image?: string;
}
const { title, description } = Astro.props;
---
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width,initial-scale=1" />
<meta name="generator" content={Astro.generator} />
<title>{title}</title>
<link rel="icon" type="image/svg+xml" href="{{base_path | safe}}/assets/favicon.svg" />
<link rel="stylesheet" href="https://rsms.me/inter/inter.css">
<app-redirect data-base="{{base_path | safe}}" />
<meta name="title" content={title} />
<meta name="description" content={description} />
<meta property="og:type" content="website" />
<meta property="og:title" content={title} />
<meta property="og:description" content={description} />
<meta property="og:image" content="{{base_path | safe}}/assets/banner.png" />
<meta property="twitter:card" content="summary_large_image" />
<meta property="twitter:title" content={title} />
<meta property="twitter:description" content={description} />
<meta property="twitter:image" content="{{base_path | safe}}/assets/banner.png" />
<ViewTransitions />
<script>
import { $settings } from '@/store';
class AppRedirect extends HTMLElement {
constructor() {
super();
const base = this.dataset.base;
fetch(base + '/daemon/metrics', {
headers: { token: $settings.get().token || '' }
}).then((response) => {
if (window.location.pathname.includes('login')) {
if (response.status === 200) {
window.location.href = base + '/';
}
} else {
if (response.status !== 200) {
window.location.href = base + '/login';
}
}
});
}
}
customElements.define('app-redirect', AppRedirect);
</script>
<head>
<body>
<slot />
</body>
</html>
File Metadata
Details
Attached
Mime Type
application/javascript
Expires
Mon, Feb 2, 1:35 AM (1 d, 14 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
491651
Default Alt Text
base.astro (1 KB)
Attached To
Mode
rPMC Process Management Controller
Attached
Detach File
Event Timeline
Log In to Comment