Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
koyuawsmbrtn committed Jun 17, 2022
0 parents commit 3aad961
Show file tree
Hide file tree
Showing 17 changed files with 5,678 additions and 0 deletions.
20 changes: 20 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# build output
dist/
.output/

# dependencies
node_modules/

# logs
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*


# environment variables
.env
.env.production

# macOS-specific files
.DS_Store
2 changes: 2 additions & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Expose Astro dependencies for `pnpm` users
shamefully-hoist=true
4 changes: 4 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"recommendations": ["astro-build.astro-vscode"],
"unwantedRecommendations": []
}
11 changes: 11 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"version": "0.2.0",
"configurations": [
{
"command": "./node_modules/.bin/astro dev",
"name": "Development server",
"request": "launch",
"type": "node-terminal"
}
]
}
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# koyu.space Hub

koyu.space Hub application powered by Astro
8 changes: 8 additions & 0 deletions astro.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import { defineConfig } from 'astro/config';
import vercel from '@astrojs/vercel/serverless';
import vue from '@astrojs/vue';

export default defineConfig({
integrations: [vue()],
adapter: vercel()
});
22 changes: 22 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"name": "koyuspace-hub",
"version": "1.0.0",
"license": "MIT",
"scripts": {
"dev": "astro dev",
"start": "astro dev",
"build": "astro build",
"preview": "astro preview",
"deploy": "vercel deploy --prod"
},
"devDependencies": {
"astro": "^1.0.0-beta.47"
},
"dependencies": {
"@astrojs/vercel": "^0.2.3",
"@astrojs/vue": "^0.1.5",
"vercel": "^25.1.0",
"vue": "^3.2.37",
"xhr2": "^0.2.1"
}
}
Binary file added public/favicon.ico
Binary file not shown.
74 changes: 74 additions & 0 deletions public/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
:root {
--accent-color: #fe53e1;
--accent-color-hover: #ff78e8;
--trends-transparency: rgba(254, 83, 225, .25);
--element-color: #223;
}

body {
font-family: sans-serif;
background: var(--element-color);
color: #fff;
margin: 0;
padding: 0;
}

nav ul {
list-style-type: none;
margin: 0;
padding: 0;
background: var(--accent-color);
color: var(--element-color);
}

nav li:not(.except) {
padding: 10px;
}

nav li {
display: inline-block;
}

nav li:hover:not(.except) {
background: var(--accent-color-hover);
}

nav a {
color: #fff;
text-decoration: none;
}

main {
text-align: center;
}

.right {
float: right;
}

.right li:not(.except) {
margin-top: -2px;
}

.service {
font-size: 72pt !important;
display: inline;
padding: 10px;
}

.service a {
color: #fff !important;
text-decoration: none;
}

@media(min-width:800px) {
#services {
display: inline-block;
width: 50%;
margin: 0 auto;
}
}

#avatar {
vertical-align: middle;
}
17 changes: 17 additions & 0 deletions src/components/navigation.astro
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<script>
document.getElementById("avatar").setAttribute("src", localStorage.getItem("avatar"));
document.querySelector("#logout").addEventListener("click", (e) => {
localStorage.clear();
window.location.href = '/';
e.preventDefault();
});
</script>
<nav>
<ul>
<li><a href="/"><i class="fa fa-home" aria-hidden="true" /></a></li>
<div class="right">
<li class="except"><a href="https://koyu.space/settings/profile" target="_blank"><img id="avatar" height="36"></a></li>
<li><a href="#" id="logout"><i class="fa fa-sign-out" aria-hidden="true" /></a></li>
</div>
</ul>
</nav>
9 changes: 9 additions & 0 deletions src/components/service.astro
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
const { url, title, icon } = Astro.props;
---

<div class="service">
<a href={url} target="_blank" title={title}>
<i class={`fa fa-${icon}`} alt={title}></i>
</a>
</div>
160 changes: 160 additions & 0 deletions src/data/data.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,160 @@
{
"users": {
"koyuchan": {
"services": [
"mastodon",
"gemini",
"web",
"telegram",
"chat",
"mail",
"stream",
"xmpp",
"nordcast"
],
"web": "web",
"gemini": "koyu"
},
"Shorl": {
"services": [
"mastodon",
"telegram",
"chat",
"mail",
"xmpp",
"nordcast"
]
},
"TastyTentacles": {
"services": [
"mastodon",
"web",
"telegram",
"chat",
"xmpp",
"nordcast"
],
"web": "tastytentacles"
},
"Pukima": {
"services": [
"mastodon",
"gemini",
"telegram",
"chat",
"xmpp",
"nordcast"
],
"gemini": "pukima"
},
"Einhjeriar": {
"services": [
"mastodon",
"telegram",
"chat",
"xmpp",
"nordcast",
"stream"
]
},
"fyrfaras": {
"services": [
"mastodon",
"telegram",
"chat",
"xmpp",
"nordcast",
"stream"
]
},
"cronomaestro": {
"services": [
"mastodon",
"telegram",
"chat",
"xmpp",
"nordcast",
"gemini"
],
"gemini": "cronomaestro"
},
"blu256": {
"services": [
"mastodon",
"telegram",
"chat",
"xmpp",
"nordcast",
"gemini"
],
"gemini": "blu256"
},
"seek": {
"services": [
"mastodon",
"telegram",
"chat",
"xmpp",
"nordcast",
"gemini"
],
"gemini": "SEEK"
},
"bartf1969": {
"services": [
"mastodon",
"telegram",
"chat",
"xmpp",
"nordcast",
"gemini"
],
"gemini": "bartf1969"
},
"default": {
"services": [
"mastodon",
"telegram",
"chat",
"xmpp",
"nordcast"
]
}
},
"services": {
"mastodon": {
"url": "https://koyu.space",
"title": "Mastodon"
},
"gemini": {
"title": "Gemini",
"icon": "gem"
},
"web": {
"title": "Web",
"icon": "globe"
},
"telegram": {
"url": "https://t.me/+xIh9r2VqrD9mYmJk",
"title": "Telegram"
},
"chat": {
"title": "Chat",
"icon": "comments"
},
"mail": {
"title": "Mail",
"icon": "envelope"
},
"stream": {
"title": "koyu.space Stream",
"icon": "video-camera"
},
"xmpp": {
"title": "XMPP"
},
"nordcast": {
"title": "Nordcast"
}
}
}
18 changes: 18 additions & 0 deletions src/layouts/Layout.astro
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
import Navigation from "../components/navigation.astro";
---

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width">
<link rel="icon" type="image/x-icon" href="/favicon.ico" />
<link rel="stylesheet" type="text/css" href="/style.css" />
<title>koyu.space Hub</title>
</head>
<body>
<slot />
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/css/fork-awesome.min.css" integrity="sha256-XoaMnoYC5TH6/+ihMEnospgm0J1PM/nioxbOUdnM8HY=" crossorigin="anonymous">
</body>
</html>
Loading

0 comments on commit 3aad961

Please sign in to comment.