first
31
.github/workflows/gh-pages.yml
vendored
Normal file
@ -0,0 +1,31 @@
|
||||
name: github pages
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
build-deploy:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: 14
|
||||
ref: main
|
||||
submodules: true
|
||||
fetch-depth: 0
|
||||
- run: yarn install
|
||||
|
||||
- name: Build
|
||||
env:
|
||||
TZ: "Asia/Tokyo"
|
||||
run: |
|
||||
yarn build
|
||||
|
||||
- name: Deploy
|
||||
uses: peaceiris/actions-gh-pages@v3
|
||||
with:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
publish_dir: ./dist
|
4
.gitignore
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
.DS_Store
|
||||
node_modules
|
||||
dist
|
||||
*.lock
|
22
package.json
Normal file
@ -0,0 +1,22 @@
|
||||
{
|
||||
"name": "atr-web",
|
||||
"version": "0.0.1",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"serve": "vue-cli-service serve",
|
||||
"build": "vue-cli-service build",
|
||||
"lint": "vue-cli-service lint"
|
||||
},
|
||||
"dependencies": {
|
||||
"axios": "^0.25.0",
|
||||
"core-js": "^3.6.4",
|
||||
"moment": "^2.29.4",
|
||||
"superagent": "^8.0.9",
|
||||
"vue": "^2.6.11",
|
||||
"vue-loading-template": "^1.3.2",
|
||||
"vue-template-compiler": "^2.6.14"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@vue/cli-service": "~4.5.15"
|
||||
}
|
||||
}
|
1
public/CNAME
Normal file
@ -0,0 +1 @@
|
||||
at.syui.ai
|
80
public/card/card.json
Normal file
@ -0,0 +1,80 @@
|
||||
[
|
||||
{
|
||||
"id": 0,
|
||||
"h": "創造",
|
||||
"src": "89",
|
||||
"cid": "bafkreibh4nmdgyzvjvkhek2ultx4lsrrq2dnc7z2lqbua2ik47xo2zgkru"
|
||||
},
|
||||
{
|
||||
"id": 1,
|
||||
"h": "夢幻",
|
||||
"src": "100",
|
||||
"cid": "bafkreiajf5lblrojyo7vcqdhiqgbhd5eaj3u47mvvqf63kvexwfwphpx2y"
|
||||
},
|
||||
{
|
||||
"id": 2,
|
||||
"h": "光輝",
|
||||
"src": "109",
|
||||
"cid": "bafkreieywv4thvjrwbcf2dcol4svwmculf5qm2kvjtu2ywyyh56c7swi64"
|
||||
},
|
||||
{
|
||||
"id": 3,
|
||||
"h": "中性子",
|
||||
"src": "88",
|
||||
"cid": "bafkreieuphzhesuoqouszzwuv3iw7d5nz4eamlqc2csfv26d5vmcdg2qby"
|
||||
},
|
||||
{
|
||||
"id": 4,
|
||||
"h": "太陽",
|
||||
"src": "59",
|
||||
"cid": "bafkreifw7f44ldmi7bufs5rzwftjvgmsflekkvxazqns63venm7hqnql3q"
|
||||
},
|
||||
{
|
||||
"id": 5,
|
||||
"h": "夜空",
|
||||
"src": "112",
|
||||
"cid": "bafkreicuieuz6wjva7l7t2u5n46izxs7nku6tedlgtlgkabszjz5dn3yl4"
|
||||
},
|
||||
{
|
||||
"id": 6,
|
||||
"h": "白雪",
|
||||
"src": "15",
|
||||
"cid": "bafkreihl5ifvl3ougbfdjfdjwrhdjrncqm5opj65cteow5f2aj7p6nz42y"
|
||||
},
|
||||
{
|
||||
"id": 7,
|
||||
"h": "雷帝",
|
||||
"src": "30",
|
||||
"cid": "bafkreihylxc22kfcb3bereypl6tvqkiqtazod3tp7vbze7yxdqedwli6z4"
|
||||
},
|
||||
{
|
||||
"id": 8,
|
||||
"h": "超究",
|
||||
"src": "108",
|
||||
"cid": "bafkreieq4tdiq72tsbvqv5bnitd5sj5bbvtmee5off3k4nvl7za3plhj5m"
|
||||
},
|
||||
{
|
||||
"id": 9,
|
||||
"h": "剣技",
|
||||
"src": "103",
|
||||
"cid": "bafkreig2uzf5cyn5fty5ftumd6wyg7vf5wry37h4v4mmorkx5msvn3uqvu"
|
||||
},
|
||||
{
|
||||
"id": 10,
|
||||
"h": "破壊",
|
||||
"src": "87",
|
||||
"cid": "bafkreifcos5ur6y753jepmy4ttgylasvcyk5osguzlaojcnlrshl3q6k3a"
|
||||
},
|
||||
{
|
||||
"id": 11,
|
||||
"h": "地球",
|
||||
"src": "78",
|
||||
"cid": "bafkreigpxxkzz2oesnb2mnfe42nrgk57wnr73ssn5luriy3j25mij43uki"
|
||||
},
|
||||
{
|
||||
"id": 12,
|
||||
"h": "天ノ川",
|
||||
"src": "115",
|
||||
"cid": "bafkreiefcjjplklmo6wrc7pq23yaewg2zgjm7nsmjy5q7mut2dnxydomnm"
|
||||
}
|
||||
]
|
BIN
public/card/card_0.jpg
Normal file
After Width: | Height: | Size: 173 KiB |
BIN
public/card/card_0.png
Normal file
After Width: | Height: | Size: 1.9 MiB |
BIN
public/card/card_0.webp
Normal file
After Width: | Height: | Size: 67 KiB |
BIN
public/card/card_1.jpg
Normal file
After Width: | Height: | Size: 182 KiB |
BIN
public/card/card_1.png
Normal file
After Width: | Height: | Size: 2.0 MiB |
BIN
public/card/card_1.webp
Normal file
After Width: | Height: | Size: 73 KiB |
BIN
public/card/card_10.jpg
Normal file
After Width: | Height: | Size: 225 KiB |
BIN
public/card/card_10.png
Normal file
After Width: | Height: | Size: 2.5 MiB |
BIN
public/card/card_10.webp
Normal file
After Width: | Height: | Size: 94 KiB |
BIN
public/card/card_11.jpg
Normal file
After Width: | Height: | Size: 196 KiB |
BIN
public/card/card_11.png
Normal file
After Width: | Height: | Size: 2.2 MiB |
BIN
public/card/card_11.webp
Normal file
After Width: | Height: | Size: 83 KiB |
BIN
public/card/card_12.jpg
Normal file
After Width: | Height: | Size: 174 KiB |
BIN
public/card/card_12.png
Normal file
After Width: | Height: | Size: 2.0 MiB |
BIN
public/card/card_12.webp
Normal file
After Width: | Height: | Size: 70 KiB |
BIN
public/card/card_2.jpg
Normal file
After Width: | Height: | Size: 155 KiB |
BIN
public/card/card_2.png
Normal file
After Width: | Height: | Size: 1.9 MiB |
BIN
public/card/card_2.webp
Normal file
After Width: | Height: | Size: 62 KiB |
BIN
public/card/card_3.jpg
Normal file
After Width: | Height: | Size: 192 KiB |
BIN
public/card/card_3.png
Normal file
After Width: | Height: | Size: 2.2 MiB |
BIN
public/card/card_3.webp
Normal file
After Width: | Height: | Size: 83 KiB |
BIN
public/card/card_4.jpg
Normal file
After Width: | Height: | Size: 208 KiB |
BIN
public/card/card_4.png
Normal file
After Width: | Height: | Size: 2.2 MiB |
BIN
public/card/card_4.webp
Normal file
After Width: | Height: | Size: 83 KiB |
BIN
public/card/card_5.jpg
Normal file
After Width: | Height: | Size: 172 KiB |
BIN
public/card/card_5.png
Normal file
After Width: | Height: | Size: 1.9 MiB |
BIN
public/card/card_5.webp
Normal file
After Width: | Height: | Size: 68 KiB |
BIN
public/card/card_6.jpg
Normal file
After Width: | Height: | Size: 166 KiB |
BIN
public/card/card_6.png
Normal file
After Width: | Height: | Size: 2.0 MiB |
BIN
public/card/card_6.webp
Normal file
After Width: | Height: | Size: 73 KiB |
BIN
public/card/card_7.jpg
Normal file
After Width: | Height: | Size: 191 KiB |
BIN
public/card/card_7.png
Normal file
After Width: | Height: | Size: 2.2 MiB |
BIN
public/card/card_7.webp
Normal file
After Width: | Height: | Size: 78 KiB |
BIN
public/card/card_8.jpg
Normal file
After Width: | Height: | Size: 152 KiB |
BIN
public/card/card_8.png
Normal file
After Width: | Height: | Size: 1.9 MiB |
BIN
public/card/card_8.webp
Normal file
After Width: | Height: | Size: 61 KiB |
BIN
public/card/card_9.jpg
Normal file
After Width: | Height: | Size: 152 KiB |
BIN
public/card/card_9.png
Normal file
After Width: | Height: | Size: 1.9 MiB |
BIN
public/card/card_9.webp
Normal file
After Width: | Height: | Size: 80 KiB |
21
public/card/t.zsh
Executable file
@ -0,0 +1,21 @@
|
||||
#!/bin/zsh
|
||||
|
||||
d=${0:a:h}
|
||||
j=$d/card.json
|
||||
n=`cat $j|jq length`
|
||||
n=$((n - 1))
|
||||
for ((i=0;i<=$n;i++))
|
||||
do
|
||||
t=`cat $j|jq ".[$i].cid"`
|
||||
id=`cat $j|jq ".[$i].id"`
|
||||
f=card_${id}.webp
|
||||
if ls $f;then
|
||||
cid=`atr img-upload $f|head -n 1`
|
||||
echo $cid
|
||||
if cat $j |jq ".[$i]|= .+ {\"cid\":\"$cid\"}";then
|
||||
cat $j |jq ".[$i]|= .+ {\"cid\":\"$cid\"}" >! $j.back
|
||||
mv $j.back $j
|
||||
cat $j|jq ".[$i]"
|
||||
fi
|
||||
fi
|
||||
done
|
BIN
public/chara/ai.png
Normal file
After Width: | Height: | Size: 310 KiB |
BIN
public/chara/drai.png
Normal file
After Width: | Height: | Size: 387 KiB |
BIN
public/chara/kyosuke.png
Normal file
After Width: | Height: | Size: 382 KiB |
BIN
public/chara/mr.png
Normal file
After Width: | Height: | Size: 350 KiB |
BIN
public/chara/neko.png
Normal file
After Width: | Height: | Size: 315 KiB |
BIN
public/chara/octkat.png
Normal file
After Width: | Height: | Size: 237 KiB |
BIN
public/chara/papas.png
Normal file
After Width: | Height: | Size: 391 KiB |
BIN
public/chara/plan.png
Normal file
After Width: | Height: | Size: 393 KiB |
BIN
public/chara/ponta.png
Normal file
After Width: | Height: | Size: 337 KiB |
BIN
public/chara/zen.png
Normal file
After Width: | Height: | Size: 403 KiB |
After Width: | Height: | Size: 75 KiB |
After Width: | Height: | Size: 72 KiB |
After Width: | Height: | Size: 72 KiB |
After Width: | Height: | Size: 25 KiB |
1
public/index.html
Normal file
@ -0,0 +1 @@
|
||||
<!DOCTYPE html><html lang=""><head><title><%= htmlWebpackPlugin.options.title %></title><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><title>Vue App</title><link href="app.css" rel="preload" as="style"><link href="app.js" rel="preload" as="script"><link href="chunk-vendors.js" rel="preload" as="script"><link href="app.css" rel="stylesheet"></head><body><div id="app"></div><script src="chunk-vendors.js"></script><script src="app.js"></script></body></html>
|
20
public/json/syui.syui.ai.json
Normal file
@ -0,0 +1,20 @@
|
||||
{
|
||||
"did": "did:plc:schldsdljwxcdtslnbqaoifh",
|
||||
"declaration": {
|
||||
"actorType": "app.bsky.system.actorUser",
|
||||
"cid": "bafyreid27zk7lbis4zw5fz4podbvbs4fc5ivwji3dmrwa6zggnj4bnd57u"
|
||||
},
|
||||
"handle": "syui.syui.ai",
|
||||
"avatar": "https://at.syui.ai/image/1gNGwD6W74qb_Nuncr5H5i9UADEtdyds9myxRGnkGMw/rs:fill:1000:1000:1:0/plain/bafkreibxgpwttqvpsnn5yrvqkx47nwuzpzrkfyladqy2hbj3chedph3fni@jpeg",
|
||||
"followsCount": 0,
|
||||
"followersCount": 1,
|
||||
"postsCount": 1,
|
||||
"creator": "did:plc:schldsdljwxcdtslnbqaoifh",
|
||||
"indexedAt": "2023-03-21T08:23:26.046Z",
|
||||
"viewer": {
|
||||
"muted": false
|
||||
},
|
||||
"myState": {
|
||||
"muted": false
|
||||
}
|
||||
}
|
132
src/App.vue
Executable file
@ -0,0 +1,132 @@
|
||||
<template>
|
||||
<div id="app">
|
||||
<form @submit.prevent="submit">
|
||||
<input v-model="id" placeholder="id" value="id">
|
||||
<input type="submit">
|
||||
</form>
|
||||
|
||||
<div v-if="cards" class="bluesky-card">
|
||||
<h3>{{ user.data.username }} card list</h3>
|
||||
<span v-for="ii in cards.data">
|
||||
<img :src='"https://at.syui.ai/card/card_" + ii.card + ".png"'/>{{ ii.cp }}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div v-if="record" class="bluesky-record">
|
||||
<li v-for="i in record.data">
|
||||
<p><span class="text">id : {{ i.id }}</span></p>
|
||||
<p><span class="text">{{ i.username }}</span></p>
|
||||
</li>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import axios from 'axios'
|
||||
let default_id = "syui.syui.ai";
|
||||
export default {
|
||||
name: "App",
|
||||
metaInfo: {
|
||||
title: "syui.ai",
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
card: null,
|
||||
cards: null,
|
||||
id: null,
|
||||
record: null,
|
||||
url: null,
|
||||
user: null,
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
axios.get("https://cors-card.herokuapp.com/https://api.syui.ai/users",{ crossdomain: true })
|
||||
.then(response => (this.record = response))
|
||||
.catch(error => console.log(error));
|
||||
},
|
||||
methods: {
|
||||
submit() {
|
||||
let url = "https://cors-card.herokuapp.com/https://api.syui.ai/users/" + this.id + "/card";
|
||||
axios
|
||||
.get(url,{ crossdomain: true })
|
||||
.then(response => (this.cards = response));
|
||||
axios
|
||||
.get("https://cors-card.herokuapp.com/https://api.syui.ai/users/" + this.id,{ crossdomain: true })
|
||||
.then(response => (this.user = response));
|
||||
},
|
||||
draw(id) {
|
||||
let url = "https://cors-card.herokuapp.com/https://api.syui.ai/users/" + id + "/card";
|
||||
axios
|
||||
.get(url,{ crossdomain: true })
|
||||
.then(response => (this.cards = response));
|
||||
}
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
div#app {
|
||||
list-style: none;
|
||||
margin: 100px;
|
||||
}
|
||||
.bluesky-avatar img {
|
||||
width: 55px;
|
||||
}
|
||||
span.time {
|
||||
color: blue;
|
||||
}
|
||||
span.name {
|
||||
font-weight: 700;
|
||||
background-color: #a3c3ff1a;
|
||||
padding:10px;
|
||||
}
|
||||
span.text {
|
||||
font-weight: 400;
|
||||
font-size: 19px;
|
||||
}
|
||||
.bluesky-record li {
|
||||
border-bottom: solid 1px #ccc;
|
||||
}
|
||||
.bluesky-record p {
|
||||
padding:0 20px 0;
|
||||
}
|
||||
.bluesky-record {
|
||||
border: solid 1px #ccc;
|
||||
border-radius: 10px;
|
||||
margin: 50px 100px 0 0;
|
||||
}
|
||||
a {
|
||||
color: #00A4E1;
|
||||
font-weight: '700';
|
||||
}
|
||||
footer#footer {
|
||||
text-align: center;
|
||||
}
|
||||
span.text {
|
||||
word-break: break-all;
|
||||
}
|
||||
p.tl-avatar img {
|
||||
width: 20px;
|
||||
}
|
||||
img {
|
||||
width: 50px;
|
||||
margin:10px;
|
||||
}
|
||||
|
||||
code {
|
||||
font-size: 15px;
|
||||
/*color: #3f89ff;*/
|
||||
padding: 5px 5px 5px 5px;
|
||||
background-color: #d4deee2b;
|
||||
}
|
||||
li {
|
||||
list-style-type: none;
|
||||
}
|
||||
@media screen and (max-width:1000px) {
|
||||
div#app{list-style:none;margin:0px}.bluesky-avatar img{width:55px}span.time{color:#00f}span.name{background-color:rgba(163,195,255,.10196078431372549);padding:10px}.bluesky-record li{border-bottom:1px solid #ccc}.bluesky-record p{padding:0 20px 0}.bluesky-record{border:1px solid #ccc;border-radius:10px;margin:0px 0px 0 0}a{color:#3f89ff}footer#footer{text-align:center}
|
||||
span.text {
|
||||
word-break: break-all;
|
||||
}
|
||||
}
|
||||
</style>
|
8
src/main.js
Executable file
@ -0,0 +1,8 @@
|
||||
import Vue from 'vue'
|
||||
import App from './App.vue'
|
||||
|
||||
Vue.config.productionTip = false
|
||||
|
||||
new Vue({
|
||||
render: h => h(App)
|
||||
}).$mount('#app')
|
23
vue.config.js
Normal file
@ -0,0 +1,23 @@
|
||||
module.exports = {
|
||||
chainWebpack: config => {
|
||||
config
|
||||
.plugin('html')
|
||||
.tap(args => {
|
||||
args[0].title = "syui.ai";
|
||||
return args;
|
||||
})
|
||||
},
|
||||
publicPath: "/",
|
||||
configureWebpack: {
|
||||
output: {
|
||||
filename: '[name].js',
|
||||
chunkFilename: '[name].js'
|
||||
}
|
||||
},
|
||||
css: {
|
||||
extract: {
|
||||
filename: '[name].css',
|
||||
chunkFilename: '[name].css'
|
||||
},
|
||||
},
|
||||
}
|