mirror of
https://github.com/yude-jp/yude.jp
synced 2024-12-23 04:30:11 +09:00
Compare commits
No commits in common. "ea617dd8dcc8a100c372934717f35155c65736cb" and "39457ec0921da9038591c55752f8ef66da7c2b8b" have entirely different histories.
ea617dd8dc
...
39457ec092
@ -1,3 +0,0 @@
|
|||||||
{
|
|
||||||
"extends": "next/core-web-vitals"
|
|
||||||
}
|
|
2
.gitignore
vendored
2
.gitignore
vendored
@ -11,5 +11,3 @@ yarn-error.log
|
|||||||
.vimrc~
|
.vimrc~
|
||||||
..vimrc.un~
|
..vimrc.un~
|
||||||
.env.local
|
.env.local
|
||||||
|
|
||||||
.vercel
|
|
||||||
|
@ -1,16 +1,17 @@
|
|||||||
このアカウントは**非公式**アカウントです。また、内容を保証するものではありません。
|
このアカウントは**非公式**アカウントです。また、内容を保証するものではありません。
|
||||||
|
|
||||||
# 連絡先
|
# 管理者
|
||||||
広島市立大学 情報科学部 2年の [yude](https://yude.jp/profile) が管理しています。このアカウントについての連絡は下記までお願いします。
|
広島市立大学 情報科学部 2年の [yude](https://yude.jp/profile) が管理しています。このアカウントについての連絡は下記までお願いします。
|
||||||
|
## 連絡先
|
||||||
* 電子メール: [admin@yude.jp](mailto:admin@yude.jp)
|
* 電子メール: [admin@yude.jp](mailto:admin@yude.jp)
|
||||||
* Twitter: [@yude_jp](https://twitter.com/yude_jp)
|
* Twitter: [@yude_jp](https://twitter.com/yude_jp)
|
||||||
|
|
||||||
# 仕組み
|
# 稼働方法
|
||||||
Microsoft Power Automate によって広島市立大学 Web ページの RSS フィードを取得し、新しい記事が投稿されている場合にツイートします。\
|
Microsoft Power Automate によって広島市立大学WebページのRSSフィードを取得し、新しい記事が投稿されている場合にツイートします。\
|
||||||
次の URL を監視しています。
|
次の URL を監視しています。
|
||||||
* [お知らせ|広島市立大学](https://www.hiroshima-cu.ac.jp/news/)
|
* [お知らせ|広島市立大学](https://www.hiroshima-cu.ac.jp/news/)
|
||||||
* [お知らせ(在学生・保護者の方へ)|広島市立大学](https://www.hiroshima-cu.ac.jp/news_student/)
|
* [お知らせ(在学生・保護者の方へ)|広島市立大学](https://www.hiroshima-cu.ac.jp/news_student/)
|
||||||
* [在学生・保護者の方へ|広島市立大学](https://www.hiroshima-cu.ac.jp/student/)
|
* [在学生・保護者の方へ|広島市立大学](https://www.hiroshima-cu.ac.jp/student/)
|
||||||
|
|
||||||
# 関連リンク
|
# 関連リンク
|
||||||
* [広島市立大学](https://www.hiroshima-cu.ac.jp/)
|
* [広島市立大学](https://www.hiroshima-cu.ac.jp/)
|
@ -19,6 +19,5 @@
|
|||||||
"fingerprint": "Digital fingerprint",
|
"fingerprint": "Digital fingerprint",
|
||||||
"view": "View",
|
"view": "View",
|
||||||
"device": "Devices",
|
"device": "Devices",
|
||||||
"account": "Accounts",
|
"account": "Accounts"
|
||||||
"wishlist": "Amazon Wishlist"
|
|
||||||
}
|
}
|
@ -19,6 +19,5 @@
|
|||||||
"fingerprint": "電子指紋",
|
"fingerprint": "電子指紋",
|
||||||
"view": "閲覧",
|
"view": "閲覧",
|
||||||
"device": "デバイス",
|
"device": "デバイス",
|
||||||
"account": "アカウント",
|
"account": "アカウント"
|
||||||
"wishlist": "Amazon ほしいものリスト"
|
|
||||||
}
|
}
|
@ -1,25 +1,12 @@
|
|||||||
const nextTranslate = require('next-translate')
|
const nextTranslate = require('next-translate')
|
||||||
|
|
||||||
const rewrites = async () => {
|
|
||||||
return [
|
|
||||||
{
|
|
||||||
source: '/minecraft/players/:uuid(\[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12})',
|
|
||||||
destination: '/minecraft/players/:uuid'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
source: '/minecraft/players/:uuid',
|
|
||||||
destination: '/404'
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
|
||||||
module.exports = nextTranslate({
|
module.exports = nextTranslate({
|
||||||
i18n: {
|
i18n: {
|
||||||
locales: ['ja', 'en'],
|
locales: ['ja', 'en'],
|
||||||
defaultLocale: 'ja',
|
defaultLocale: 'ja',
|
||||||
},
|
},
|
||||||
images: {
|
images: {
|
||||||
domains: ['mackerel.io', 'mc-heads.net', 'crafatar.com'],
|
domains: ['mackerel.io', 'mc-heads.net'],
|
||||||
},
|
},
|
||||||
webpack: function (config) {
|
webpack: function (config) {
|
||||||
config.module.rules.push({
|
config.module.rules.push({
|
||||||
@ -28,19 +15,4 @@ module.exports = nextTranslate({
|
|||||||
})
|
})
|
||||||
return config
|
return config
|
||||||
},
|
},
|
||||||
async redirects() {
|
|
||||||
return [
|
|
||||||
{
|
|
||||||
source: '/wishlist',
|
|
||||||
destination: 'https://www.amazon.jp/hz/wishlist/ls/8WTKCPWKOJ2N?ref_=wl_share',
|
|
||||||
permanent: true,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
source: '/scrapbox',
|
|
||||||
destination: 'https://scrapbox.io/yude',
|
|
||||||
permanent: true,
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
rewrites,
|
|
||||||
})
|
})
|
45
package.json
45
package.json
@ -7,8 +7,7 @@
|
|||||||
"dev": "next",
|
"dev": "next",
|
||||||
"build": "next build",
|
"build": "next build",
|
||||||
"start": "next start",
|
"start": "next start",
|
||||||
"export": "next export",
|
"export": "next export"
|
||||||
"lint": "next lint"
|
|
||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
@ -22,43 +21,39 @@
|
|||||||
},
|
},
|
||||||
"homepage": "https://github.com/yudemoe/yude.jp#readme",
|
"homepage": "https://github.com/yudemoe/yude.jp#readme",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/core": "^7.15.5",
|
"@fortawesome/fontawesome-svg-core": "^1.2.35",
|
||||||
"@fortawesome/fontawesome-svg-core": "^1.2.36",
|
"@fortawesome/free-brands-svg-icons": "^5.15.3",
|
||||||
"@fortawesome/free-brands-svg-icons": "^5.15.4",
|
"@fortawesome/free-solid-svg-icons": "^5.15.3",
|
||||||
"@fortawesome/free-solid-svg-icons": "^5.15.4",
|
"@fortawesome/react-fontawesome": "^0.1.14",
|
||||||
"@fortawesome/react-fontawesome": "^0.1.15",
|
|
||||||
"@tailwindcss/typography": "^0.4.0",
|
"@tailwindcss/typography": "^0.4.0",
|
||||||
"autoprefixer": "^10.3.4",
|
"autoprefixer": "^10.2.5",
|
||||||
"axios": "^0.21.4",
|
"axios": "^0.21.1",
|
||||||
"microcms-js-sdk": "^1.2.0",
|
"microcms-js-sdk": "^1.2.0",
|
||||||
"moment": "^2.29.1",
|
"moment": "^2.29.1",
|
||||||
"next": "^11.1.2",
|
"next": "^11.1.1",
|
||||||
"next-seo": "^4.28.1",
|
"next-seo": "^4.26.0",
|
||||||
"next-themes": "^0.0.15",
|
"next-themes": "^0.0.14",
|
||||||
"next-translate": "^1.1.0",
|
"next-translate": "^1.0.7",
|
||||||
"popper.js": "^1.16.1",
|
"popper.js": "^1.16.1",
|
||||||
"postcss": "^8.3.6",
|
"postcss": "^8.3.0",
|
||||||
"prop-types": "^15.7.2",
|
|
||||||
"querystring": "^0.2.1",
|
"querystring": "^0.2.1",
|
||||||
"raw-loader": "^4.0.2",
|
"raw-loader": "^4.0.2",
|
||||||
"react": "^17.0.2",
|
"react": "^17.0.2",
|
||||||
"react-dom": "^17.0.2",
|
"react-dom": "^17.0.2",
|
||||||
"react-markdown": "^7.0.1",
|
"react-markdown": "^6.0.2",
|
||||||
"react-moment": "^1.1.1",
|
"react-moment": "^1.1.1",
|
||||||
"react-switch": "^6.0.0",
|
"react-switch": "^6.0.0",
|
||||||
"remark-gfm": "^2.0.0",
|
"remark-gfm": "^1.0.0",
|
||||||
"swr": "^1.0.1",
|
"swr": "^0.5.6",
|
||||||
"tailwindcss": "^2.2.15",
|
"tailwindcss": "^2.1.4",
|
||||||
"tailwindcss-filters": "^3.0.0",
|
"tailwindcss-filters": "^3.0.0",
|
||||||
"tailwindcss-responsive-embed": "^1.0.0",
|
"tailwindcss-responsive-embed": "^1.0.0",
|
||||||
"webpack": "^5.53.0"
|
"webpack": "^5.37.1"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/node": "^16.9.6",
|
"@types/node": "^15.6.0",
|
||||||
"@types/react": "^17.0.24",
|
"@types/react": "^17.0.6",
|
||||||
"babel-plugin-inline-react-svg": "^2.0.1",
|
"babel-plugin-inline-react-svg": "^2.0.1",
|
||||||
"eslint": "7.32.0",
|
"typescript": "^4.2.4"
|
||||||
"eslint-config-next": "11.1.2",
|
|
||||||
"typescript": "^4.4.3"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,23 +0,0 @@
|
|||||||
// React
|
|
||||||
import React, { useState, useEffect } from 'react';
|
|
||||||
import axios from 'axios';
|
|
||||||
|
|
||||||
export const getName = async (props) => {
|
|
||||||
const uuid = props;
|
|
||||||
return fetch('https://api.ashcon.app/mojang/v2/user/' + uuid);
|
|
||||||
};
|
|
||||||
|
|
||||||
const RawPlayerName = async (req, res) => {
|
|
||||||
const { uuid } = req.query
|
|
||||||
const response = await getName(uuid);
|
|
||||||
const data = await response.json();
|
|
||||||
if (response.status === 204 || response.status > 400) {
|
|
||||||
return res.status(200).send("404");
|
|
||||||
}
|
|
||||||
const username = data.username;
|
|
||||||
return res.status(200).json({
|
|
||||||
username,
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
export default RawPlayerName
|
|
@ -36,7 +36,7 @@ export const getNowPlaying = async () => {
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
const Spotify = async (_, res) => {
|
export default async (_, res) => {
|
||||||
const response = await getNowPlaying();
|
const response = await getNowPlaying();
|
||||||
|
|
||||||
if (response.status === 204 || response.status > 400) {
|
if (response.status === 204 || response.status > 400) {
|
||||||
@ -55,6 +55,4 @@ const Spotify = async (_, res) => {
|
|||||||
isPlaying,
|
isPlaying,
|
||||||
title,
|
title,
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
export default Spotify
|
|
@ -27,7 +27,7 @@ function App (){
|
|||||||
const yes_playing = t('yes_playing', {playing: data.members[0].game.name})
|
const yes_playing = t('yes_playing', {playing: data.members[0].game.name})
|
||||||
return <p>{yes_playing}</p>
|
return <p>{yes_playing}</p>
|
||||||
}else{
|
}else{
|
||||||
return <></>
|
return <p></p>
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -10,7 +10,6 @@ const happybusy = (props) => {
|
|||||||
src="/images/brstrip.gif"
|
src="/images/brstrip.gif"
|
||||||
width={150}
|
width={150}
|
||||||
height={41}
|
height={41}
|
||||||
alt="EFF Blue Ribbon Campaign"
|
|
||||||
/>
|
/>
|
||||||
</a>
|
</a>
|
||||||
</Link>
|
</Link>
|
||||||
|
@ -10,7 +10,6 @@ const HappyBusy = (props) => {
|
|||||||
src="/images/busy_banner.png"
|
src="/images/busy_banner.png"
|
||||||
width={200}
|
width={200}
|
||||||
height={42}
|
height={42}
|
||||||
alt="時間のないサイト運営者リング"
|
|
||||||
/>
|
/>
|
||||||
</a>
|
</a>
|
||||||
</Link>
|
</Link>
|
||||||
|
@ -54,7 +54,7 @@ export default function Minecraft(props) {
|
|||||||
url.push('https://mc-heads.net/avatar/' + data.players.list[i])
|
url.push('https://mc-heads.net/avatar/' + data.players.list[i])
|
||||||
}
|
}
|
||||||
for (var i in url){
|
for (var i in url){
|
||||||
list.push(<Image src={url[i]} key={i} className="inline" height="50" width="50" alt={i}/>)
|
list.push(<Image src={url[i]} key={i} className="inline" height="50" width="50" />)
|
||||||
}
|
}
|
||||||
return <div>{list}</div>
|
return <div>{list}</div>
|
||||||
}
|
}
|
||||||
|
@ -1,33 +0,0 @@
|
|||||||
import React, { useState, useEffect } from 'react';
|
|
||||||
import axios from 'axios';
|
|
||||||
|
|
||||||
function App (props) {
|
|
||||||
const uuid = props;
|
|
||||||
const [data, setData] = useState({ hits: [] });
|
|
||||||
|
|
||||||
useEffect(() => {
|
|
||||||
const fetchData = async () => {
|
|
||||||
const result = await axios(
|
|
||||||
'https://playersbio.yude.jp/' + uuid.uuid,
|
|
||||||
);
|
|
||||||
setData(result.data);
|
|
||||||
};
|
|
||||||
fetchData();
|
|
||||||
}, []);
|
|
||||||
if (data === undefined){
|
|
||||||
console.log("[Minecraft: PlayersBio] データの取得に失敗しました。 / Failed to retrieve data.")
|
|
||||||
return <p></p>
|
|
||||||
}else {
|
|
||||||
if (data.toString() == "[object Object]"){
|
|
||||||
return <p>読み込み中...</p>
|
|
||||||
} else {
|
|
||||||
if (data.toString() == "") {
|
|
||||||
return <p>ひとことは設定されていません...</p>
|
|
||||||
} else {
|
|
||||||
return <p>ひとこと: <span className="italic">{data.toString()}</span></p>
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
export default App;
|
|
@ -1,30 +0,0 @@
|
|||||||
import React, { useState, useEffect } from 'react';
|
|
||||||
import axios from 'axios';
|
|
||||||
import { useRouter } from 'next/router'
|
|
||||||
|
|
||||||
function App (props) {
|
|
||||||
const uuid = props;
|
|
||||||
const [data, setData] = useState({ hits: [] });
|
|
||||||
|
|
||||||
useEffect(() => {
|
|
||||||
const fetchData = async () => {
|
|
||||||
const result = await axios(
|
|
||||||
'https://minecraft.yude.jp/group/' + uuid.uuid,
|
|
||||||
);
|
|
||||||
setData(result.data);
|
|
||||||
};
|
|
||||||
fetchData();
|
|
||||||
}, []);
|
|
||||||
|
|
||||||
if (data === undefined || data === null){
|
|
||||||
return <p></p>
|
|
||||||
}else {
|
|
||||||
if (data.toString() == "staff") {
|
|
||||||
return <span className="inline-flex items-center justify-center px-3 py-2 text-base font-bold leading-none text-indigo-100 bg-indigo-700 rounded ml-3">Staff</span>
|
|
||||||
} else {
|
|
||||||
return <></>
|
|
||||||
}
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
export default App;
|
|
@ -1,16 +0,0 @@
|
|||||||
import React, { useState, useEffect } from 'react';
|
|
||||||
import Image from 'next/image'
|
|
||||||
|
|
||||||
function App (props) {
|
|
||||||
const uuid = props;
|
|
||||||
|
|
||||||
return (
|
|
||||||
<Image
|
|
||||||
src={"https://crafatar.com/renders/body/" + uuid.uuid}
|
|
||||||
width={110}
|
|
||||||
height={250}
|
|
||||||
/>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
export default App;
|
|
@ -1,65 +0,0 @@
|
|||||||
import React, { useState, useEffect } from 'react';
|
|
||||||
import axios from 'axios';
|
|
||||||
|
|
||||||
function App (props) {
|
|
||||||
const uuid = props;
|
|
||||||
const [data, setData] = useState({ hits: [] });
|
|
||||||
|
|
||||||
const timeAgo = (prevDate) => {
|
|
||||||
const diff = Number(new Date()) - prevDate;
|
|
||||||
const minute = 60 * 1000;
|
|
||||||
const hour = minute * 60;
|
|
||||||
const day = hour * 24;
|
|
||||||
const month = day * 30;
|
|
||||||
const year = day * 365;
|
|
||||||
switch (true) {
|
|
||||||
case diff < minute:
|
|
||||||
const seconds = Math.round(diff / 1000);
|
|
||||||
return `${seconds} 秒前`
|
|
||||||
case diff < hour:
|
|
||||||
return Math.round(diff / minute) + ' 分前';
|
|
||||||
case diff < day:
|
|
||||||
return Math.round(diff / hour) + ' 時間前';
|
|
||||||
case diff < month:
|
|
||||||
return Math.round(diff / day) + ' 日前';
|
|
||||||
case diff < year:
|
|
||||||
return Math.round(diff / month) + ' ヶ月前';
|
|
||||||
case diff > year:
|
|
||||||
return Math.round(diff / year) + ' 年前';
|
|
||||||
default:
|
|
||||||
return "";
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
useEffect(() => {
|
|
||||||
const fetchData = async () => {
|
|
||||||
const result = await axios(
|
|
||||||
'https://minecraft.yude.jp/last/' + uuid.uuid,
|
|
||||||
);
|
|
||||||
setData(result.data);
|
|
||||||
};
|
|
||||||
fetchData();
|
|
||||||
}, []);
|
|
||||||
if (data === undefined){
|
|
||||||
console.log("[Minecraft: 最終プレイ日時] データの取得に失敗しました。 / Failed to retrieve data.")
|
|
||||||
return <p></p>
|
|
||||||
}else {
|
|
||||||
if (data.toString() == "[object Object]") {
|
|
||||||
return <p>取得中です...</p>
|
|
||||||
} else {
|
|
||||||
if (data.toString() == "not_found") {
|
|
||||||
return <></>
|
|
||||||
} else {
|
|
||||||
let dateTime = new Date(parseInt(data.toString()) * 1000);
|
|
||||||
return (
|
|
||||||
<div className='has-tooltip'>
|
|
||||||
<span className='tooltip rounded shadow-lg p-1 bg-gray-100 text-red-500 -mt-8'>{dateTime.toLocaleDateString() + " " + dateTime.toLocaleTimeString()}</span>
|
|
||||||
最終ログイン: {timeAgo(dateTime)}
|
|
||||||
</div>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
export default App;
|
|
@ -1,39 +0,0 @@
|
|||||||
import React, { useState, useEffect } from 'react';
|
|
||||||
import axios from 'axios';
|
|
||||||
import useTranslation from 'next-translate/useTranslation'
|
|
||||||
import { useRouter } from 'next/router'
|
|
||||||
import LastPlayed from './LastPlayed'
|
|
||||||
|
|
||||||
function App (props) {
|
|
||||||
const uuid = props;
|
|
||||||
const router = useRouter()
|
|
||||||
const { locale, locales, defaultLocale, pathname } = router
|
|
||||||
const { t, lang } = useTranslation("common")
|
|
||||||
const [data, setData] = useState({ hits: [] });
|
|
||||||
|
|
||||||
useEffect(() => {
|
|
||||||
const fetchData = async () => {
|
|
||||||
const result = await axios(
|
|
||||||
'https://minecraft.yude.jp/online/' + uuid.uuid,
|
|
||||||
);
|
|
||||||
setData(result.data);
|
|
||||||
};
|
|
||||||
fetchData();
|
|
||||||
}, []);
|
|
||||||
if (data === undefined){
|
|
||||||
console.log("[Minecraft: オンライン状況] データの取得に失敗しました。 / Failed to retrieve data.")
|
|
||||||
return <p></p>
|
|
||||||
}else {
|
|
||||||
if (data.toString() == "false") {
|
|
||||||
return <LastPlayed uuid={uuid.uuid} />
|
|
||||||
} else {
|
|
||||||
if (data.toString() == "true") {
|
|
||||||
return <p>オンライン</p>
|
|
||||||
} else {
|
|
||||||
return <p>取得中...</p>
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
export default App;
|
|
@ -1,35 +0,0 @@
|
|||||||
import React, { useState, useEffect } from 'react';
|
|
||||||
import axios from 'axios';
|
|
||||||
|
|
||||||
function App (props) {
|
|
||||||
const uuid = props;
|
|
||||||
const [data, setData] = useState({ hits: [] });
|
|
||||||
|
|
||||||
useEffect(() => {
|
|
||||||
const fetchData = async () => {
|
|
||||||
let result = null;
|
|
||||||
try {
|
|
||||||
result = await axios('https://api.ashcon.app/mojang/v2/user/' + uuid.uuid);
|
|
||||||
setData(result.data);
|
|
||||||
} catch (err) {
|
|
||||||
result = 404;
|
|
||||||
setData(result);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
fetchData();
|
|
||||||
}, []);
|
|
||||||
if (data === undefined){
|
|
||||||
console.log("[Minecraft: UUID to player's name] データの取得に失敗しました。 / Failed to retrieve data.")
|
|
||||||
return <>取得中...</>
|
|
||||||
}else {
|
|
||||||
if (data === 404) {
|
|
||||||
return <>404</>
|
|
||||||
} else {
|
|
||||||
return (
|
|
||||||
<>{data.username}</>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
export default App;
|
|
@ -1,39 +0,0 @@
|
|||||||
// Component
|
|
||||||
import Group from './Group';
|
|
||||||
|
|
||||||
// Data fetching
|
|
||||||
import useSwr from 'swr'
|
|
||||||
|
|
||||||
const fetcher = (url) => fetch(url).then((res) => res.json())
|
|
||||||
|
|
||||||
function App (props) {
|
|
||||||
const uuid = props;
|
|
||||||
const { data, error } = useSwr(
|
|
||||||
uuid.uuid ? `/api/PlayerName/${uuid.uuid}` : null,
|
|
||||||
fetcher
|
|
||||||
)
|
|
||||||
|
|
||||||
if (error) {
|
|
||||||
return (
|
|
||||||
<>エラーが発生しました。</>
|
|
||||||
)
|
|
||||||
} else {
|
|
||||||
if (!data) {
|
|
||||||
return (
|
|
||||||
<>読み込み中...</>
|
|
||||||
)
|
|
||||||
} else {
|
|
||||||
return (
|
|
||||||
<>
|
|
||||||
<div className='has-tooltip'>
|
|
||||||
<span className='tooltip rounded shadow-lg p-1 bg-gray-100 text-red-500 -mt-8 font-mono text-sm'>UUID: {uuid.uuid}</span>
|
|
||||||
<p className="text-2xl inline">{data.username}</p>
|
|
||||||
<Group uuid={uuid.uuid} />
|
|
||||||
</div>
|
|
||||||
</>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
export default App;
|
|
@ -1,25 +0,0 @@
|
|||||||
// Components
|
|
||||||
import Online from './Online'
|
|
||||||
import Head from './Head'
|
|
||||||
import PlayerNameHolder from './PlayerNameHolder'
|
|
||||||
import Biography from './Biography'
|
|
||||||
|
|
||||||
function App (props) {
|
|
||||||
const uuid = props;
|
|
||||||
|
|
||||||
return (
|
|
||||||
<div className="w-full flex flex-wrap">
|
|
||||||
<div>
|
|
||||||
<Head uuid={uuid.uuid} />
|
|
||||||
</div>
|
|
||||||
<div className="w-5"></div>
|
|
||||||
<div>
|
|
||||||
<p className="text-2xl text-mono"><PlayerNameHolder uuid={uuid.uuid} /></p>
|
|
||||||
<p><Online uuid={uuid.uuid} /></p>
|
|
||||||
<p><Biography uuid={uuid.uuid} /></p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
export default App;
|
|
@ -1,9 +0,0 @@
|
|||||||
function App (props) {
|
|
||||||
return (
|
|
||||||
<div className="text-center">
|
|
||||||
<h2>入力された UUID に該当するプレイヤーが見つかりませんでした。</h2>
|
|
||||||
</div>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
export default App;
|
|
@ -25,7 +25,7 @@ function App () {
|
|||||||
const status = data.artist + ' / ' + data.title
|
const status = data.artist + ' / ' + data.title
|
||||||
return <p>{t('listening', {listening: status})}</p>
|
return <p>{t('listening', {listening: status})}</p>
|
||||||
}else{
|
}else{
|
||||||
return <></>
|
return <p></p>
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -1,17 +1,15 @@
|
|||||||
// Base layout
|
|
||||||
import Layout from "./components/Layout"
|
import Layout from "./components/Layout"
|
||||||
|
|
||||||
// React, i18n
|
|
||||||
import useTranslation from 'next-translate/useTranslation'
|
import useTranslation from 'next-translate/useTranslation'
|
||||||
|
import { useRouter } from 'next/router'
|
||||||
import React from "react"
|
import React from "react"
|
||||||
import ReactMarkdown from "react-markdown"
|
import ReactMarkdown from "react-markdown"
|
||||||
|
|
||||||
// Markdown
|
|
||||||
import gfm from 'remark-gfm';
|
import gfm from 'remark-gfm';
|
||||||
import ja from '../docs/hcunews/ja.md'
|
import ja from '../docs/hcunews/ja.md'
|
||||||
import en from '../docs/hcunews/en.md'
|
import en from '../docs/hcunews/en.md'
|
||||||
|
|
||||||
export default function HcuNews() {
|
export default function Tos(props) {
|
||||||
|
const router = useRouter()
|
||||||
|
const { locale, locales, defaultLocale, pathname } = router
|
||||||
const { t, lang } = useTranslation("hcunews")
|
const { t, lang } = useTranslation("hcunews")
|
||||||
|
|
||||||
return(
|
return(
|
||||||
@ -19,13 +17,9 @@ export default function HcuNews() {
|
|||||||
<div>
|
<div>
|
||||||
<h1>{t('hcunews')}</h1>
|
<h1>{t('hcunews')}</h1>
|
||||||
{lang === 'ja' ? (
|
{lang === 'ja' ? (
|
||||||
<ReactMarkdown plugins={[gfm]}>
|
<ReactMarkdown plugins={[gfm]} children={ja} />
|
||||||
{ja}
|
|
||||||
</ReactMarkdown>
|
|
||||||
) : (
|
) : (
|
||||||
<ReactMarkdown plugins={[gfm]}>
|
<ReactMarkdown plugins={[gfm]} children={en} />
|
||||||
{en}
|
|
||||||
</ReactMarkdown>
|
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
</Layout>
|
</Layout>
|
||||||
|
@ -11,7 +11,7 @@ export default function About(props) {
|
|||||||
<Layout title={t('house')}>
|
<Layout title={t('house')}>
|
||||||
<div>
|
<div>
|
||||||
<p className="my-2 text-3xl text-center">{t('house')}</p>
|
<p className="my-2 text-3xl text-center">{t('house')}</p>
|
||||||
<iframe className="w-full h-96" src="https://mackerel.io/embed/public/embed/4mVIU29WCRVZgHUxQPzWsfXo953uxiAegbjDb83hTQ7szesCunwdpVkBIzhnLc9i?period=1d" frameBorder="0" scrolling="no"></iframe>
|
<iframe className="w-full h-96" src="https://mackerel.io/embed/public/embed/4mVIU29WCRVZgHUxQPzWsfXo953uxiAegbjDb83hTQ7szesCunwdpVkBIzhnLc9i?period=1d" frameborder="0" scrolling="no"></iframe>
|
||||||
</div>
|
</div>
|
||||||
</Layout>
|
</Layout>
|
||||||
)
|
)
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
// Base layout
|
// Load base layout
|
||||||
import Layout from "./components/Layout"
|
import Layout from "./components/Layout"
|
||||||
|
|
||||||
// Menu
|
// Menu
|
||||||
|
@ -53,7 +53,8 @@ export default function About(props) {
|
|||||||
<div className="w-full">
|
<div className="w-full">
|
||||||
<Image
|
<Image
|
||||||
src = "/images/dynmap.png"
|
src = "/images/dynmap.png"
|
||||||
alt = "Minecraft brief world map generated by Dynmap"
|
alt = "Dynmap Header"
|
||||||
|
unoptimized = {true}
|
||||||
width = {1354}
|
width = {1354}
|
||||||
height = {619}
|
height = {619}
|
||||||
/>
|
/>
|
||||||
@ -86,15 +87,12 @@ export default function About(props) {
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* Load markdown contents */}
|
{/* Load markdown contents */}
|
||||||
{lang === 'ja' ? (
|
{lang === 'ja' ? (
|
||||||
<ReactMarkdown plugins={[gfm]}>
|
<ReactMarkdown plugins={[gfm]} children={ja} />
|
||||||
{ja}
|
) : (
|
||||||
</ReactMarkdown>
|
<ReactMarkdown plugins={[gfm]} children={en} />
|
||||||
) : (
|
)}
|
||||||
<ReactMarkdown plugins={[gfm]}>
|
|
||||||
{en}
|
|
||||||
</ReactMarkdown>
|
|
||||||
)}
|
|
||||||
</div>
|
</div>
|
||||||
</Layout>
|
</Layout>
|
||||||
</>
|
</>
|
||||||
|
@ -1,59 +0,0 @@
|
|||||||
// Base layout
|
|
||||||
import Layout from "../../components/Layout"
|
|
||||||
|
|
||||||
// React
|
|
||||||
import { useRouter } from 'next/router'
|
|
||||||
|
|
||||||
// Data fetching
|
|
||||||
import Players from '../../components/Minecraft/Players'
|
|
||||||
import useSwr from 'swr'
|
|
||||||
const fetcher = (url) => fetch(url).then((res) => res.json())
|
|
||||||
|
|
||||||
// Components
|
|
||||||
import WrongUUID from '../../components/Minecraft/WrongUUID'
|
|
||||||
|
|
||||||
export default function UUID() {
|
|
||||||
const router = useRouter()
|
|
||||||
const { uuid } = router.query
|
|
||||||
const { data, error } = useSwr(
|
|
||||||
uuid ? `/api/PlayerName/${uuid}` : null,
|
|
||||||
fetcher
|
|
||||||
)
|
|
||||||
if (error) {
|
|
||||||
return (
|
|
||||||
<>
|
|
||||||
<Layout title="エラー - プレイヤー情報">
|
|
||||||
<p className="text-2xl">エラーが発生しました。</p>
|
|
||||||
</Layout>
|
|
||||||
</>
|
|
||||||
)
|
|
||||||
} else {
|
|
||||||
if (!data) {
|
|
||||||
return (
|
|
||||||
<>
|
|
||||||
<Layout title="読み込み中... - プレイヤー情報">
|
|
||||||
<Players uuid={uuid} />
|
|
||||||
</Layout>
|
|
||||||
</>
|
|
||||||
)
|
|
||||||
} else {
|
|
||||||
if (!data.username) {
|
|
||||||
return (
|
|
||||||
<>
|
|
||||||
<Layout title="404 - プレイヤー情報">
|
|
||||||
<WrongUUID />
|
|
||||||
</Layout>
|
|
||||||
</>
|
|
||||||
)
|
|
||||||
} else {
|
|
||||||
return (
|
|
||||||
<>
|
|
||||||
<Layout title={data.username + " - " + "プレイヤー情報"}>
|
|
||||||
<Players uuid={uuid} />
|
|
||||||
</Layout>
|
|
||||||
</>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -30,13 +30,9 @@ export default function Tos(props) {
|
|||||||
<Layout title={t('common:mutual')}>
|
<Layout title={t('common:mutual')}>
|
||||||
<div>
|
<div>
|
||||||
{lang === 'ja' ? (
|
{lang === 'ja' ? (
|
||||||
<ReactMarkdown plugins={[gfm]}>
|
<ReactMarkdown plugins={[gfm]} children={ja} />
|
||||||
{ja}
|
|
||||||
</ReactMarkdown>
|
|
||||||
) : (
|
) : (
|
||||||
<ReactMarkdown plugins={[gfm]}>
|
<ReactMarkdown plugins={[gfm]} children={en} />
|
||||||
{en}
|
|
||||||
</ReactMarkdown>
|
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
</Layout>
|
</Layout>
|
||||||
|
@ -5,7 +5,7 @@ import Layout from "./components/Layout"
|
|||||||
import useTranslation from 'next-translate/useTranslation'
|
import useTranslation from 'next-translate/useTranslation'
|
||||||
|
|
||||||
// Font Awesome
|
// Font Awesome
|
||||||
import { faDiscord, faTwitter, faGithub, faKeybase, faInstagram, faMastodon, faSteam, faAmazon } from '@fortawesome/free-brands-svg-icons'
|
import { faDiscord, faTwitter, faGithub, faKeybase, faInstagram, faMastodon, faSteam } from '@fortawesome/free-brands-svg-icons'
|
||||||
import { faEnvelope, faBirthdayCake, faMapPin, faSchool, faPhone, faInfo, faLink, faMobile } from '@fortawesome/free-solid-svg-icons'
|
import { faEnvelope, faBirthdayCake, faMapPin, faSchool, faPhone, faInfo, faLink, faMobile } from '@fortawesome/free-solid-svg-icons'
|
||||||
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
|
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
|
||||||
|
|
||||||
@ -115,8 +115,7 @@ export default function Profile(props) {
|
|||||||
<WakaTime />
|
<WakaTime />
|
||||||
<PublicKeys />
|
<PublicKeys />
|
||||||
<Button dest="https://scrapbox.io/yude/%E3%82%A2%E3%82%AB%E3%82%A6%E3%83%B3%E3%83%88" icon={faLink} caption={t('account')}/>
|
<Button dest="https://scrapbox.io/yude/%E3%82%A2%E3%82%AB%E3%82%A6%E3%83%B3%E3%83%88" icon={faLink} caption={t('account')}/>
|
||||||
<Button dest="https://scrapbox.io/yude/%E3%83%87%E3%83%90%E3%82%A4%E3%82%B9" icon={faMobile} caption={t('device')}/>
|
<Button dest="https://scrapbox.io/yude/%E3%83%87%E3%83%90%E3%82%A4%E3%82%B9" icon={faMobile} caption={t('device')}/>
|
||||||
<Button dest="https://www.amazon.jp/hz/wishlist/ls/8WTKCPWKOJ2N?ref_=wl_share" icon={faAmazon} caption={t('wishlist')}/>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
@ -43,18 +43,6 @@ export default function Server(props) {
|
|||||||
</div>
|
</div>
|
||||||
<iframe className="w-full h-96" src="https://mackerel.io/embed/public/embed/heHnGhDanoIDlf7jjxUe9yPVrsG3deeH5ptD8suErrq5w46crWEIYdLfzLoukzfF?period=24h" height="400" frameBorder="0" scrolling="no"></iframe>
|
<iframe className="w-full h-96" src="https://mackerel.io/embed/public/embed/heHnGhDanoIDlf7jjxUe9yPVrsG3deeH5ptD8suErrq5w46crWEIYdLfzLoukzfF?period=24h" height="400" frameBorder="0" scrolling="no"></iframe>
|
||||||
|
|
||||||
{
|
|
||||||
// saika
|
|
||||||
}
|
|
||||||
<h2 className="text-2xl text-left font-bold leading-7 sm:text-3xl sm:truncate">saika</h2>
|
|
||||||
<div className="flex xl:w-2/3 text-center">
|
|
||||||
<div className="flex-1"><p className="font-bold">CPU </p>i5-6500</div>
|
|
||||||
<div className="flex-1"><p className="font-bold">RAM </p>DDR4 8GB</div>
|
|
||||||
<div className="flex-1"><p className="font-bold">OS </p>Ubuntu Server 20.04.3 LTS</div>
|
|
||||||
<div className="flex-1"><p className="font-bold">{t('location')} </p>{t('hiroshima')}</div>
|
|
||||||
</div>
|
|
||||||
<iframe className="w-full h-96" src="https://mackerel.io/embed/public/embed/QCRK3wZxG7ufgunJ5iuIs9cIEJ490swAmlYMF50nNLmJw6gASXyVlzhrybiE2A1G?period=24h" height="400" frameBorder="0" scrolling="no"></iframe>
|
|
||||||
|
|
||||||
{
|
{
|
||||||
// yukino
|
// yukino
|
||||||
}
|
}
|
||||||
|
14
pages/tos.js
14
pages/tos.js
@ -14,15 +14,11 @@ export default function Tos(props) {
|
|||||||
return(
|
return(
|
||||||
<Layout title={t('tos')}>
|
<Layout title={t('tos')}>
|
||||||
<div>
|
<div>
|
||||||
{lang === 'ja' ? (
|
{lang === 'ja' ? (
|
||||||
<ReactMarkdown plugins={[gfm]}>
|
<ReactMarkdown plugins={[gfm]} children={ja} />
|
||||||
{ja}
|
) : (
|
||||||
</ReactMarkdown>
|
<ReactMarkdown plugins={[gfm]} children={en} />
|
||||||
) : (
|
)}
|
||||||
<ReactMarkdown plugins={[gfm]}>
|
|
||||||
{en}
|
|
||||||
</ReactMarkdown>
|
|
||||||
)}
|
|
||||||
</div>
|
</div>
|
||||||
</Layout>
|
</Layout>
|
||||||
)
|
)
|
||||||
|
@ -1 +0,0 @@
|
|||||||
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDfEH46roc6pn97+Bi0UxWaeogvN38U5/7W+s2TWAQfpE8gv7ibFwZ5FVvHguT8BbCkK8YuXW7Oug1n8S6o3ABhUQD/zGIuEBLVKO6BTUYNDpYNxmmXKZ+dbB1nz++bvson8pYv/MdkeeeRrmqVgmrZzDifgBqYicGep+LKobhXvgCX6Qb9cHC9MCx+3mUzT0RhwwxEL/AsBm6f5oPJZdnF3agnOi61KA+wrK7RPU5v88HY5jHb87irFjNbc2xvyoLJmx+ILyKIcdsaADiTdy2JX5fqsO4S3WFELK+utw1MgBnGt0ENaev2Tce9r2QuUZQYNpa1+vAcdsc0qcR2W9wV
|
|
@ -1,6 +0,0 @@
|
|||||||
{
|
|
||||||
"redirects": [
|
|
||||||
{ "source": "/wishlist", "destination": "https://www.amazon.jp/hz/wishlist/ls/8WTKCPWKOJ2N?ref_=wl_share" },
|
|
||||||
{ "source": "/scrapbox", "destination": "https://scrapbox.io/yude" }
|
|
||||||
]
|
|
||||||
}
|
|
Loading…
Reference in New Issue
Block a user