1
0
This commit is contained in:
syui 2024-04-03 05:37:41 +09:00
parent 6ffe2d69a8
commit ee86bc866a
Signed by: syui
GPG Key ID: 5417CFEBAD92DF56
2 changed files with 45 additions and 12 deletions

View File

@ -2,8 +2,6 @@
<html lang="en">
<head>
<title>yui | manga</title><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><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">
<link rel="stylesheet" href="https://yui.syui.ai/bower_components/icomoon/css/icomoon.css" />
<link rel="stylesheet" href="https://yui.syui.ai/bower_components/font-awesome/css/all.min.css" />
<meta name="twitter:card" content="summary">
<meta property="og:url" content="https://manga.syui.ai">
<meta property="og:title" content="yui">

View File

@ -1,5 +1,7 @@
<template>
<div id="app">
<link rel="stylesheet" href="https://yui.syui.ai/bower_components/icomoon/css/icomoon.css" />
<link rel="stylesheet" href="https://yui.syui.ai/bower_components/font-awesome/css/all.min.css" />
<hooper :settings="hooperSettings">
<slide v-for="(n,index) of products" :key="n">
<div v-if="loading" class="loading">
@ -52,16 +54,25 @@
</div>
</div>
<div class="bsky_comment">
<span v-for="i in api_json.data" class="comment">
<p class="comment-body" v-if="i.text">
<!--
<img :src="i.avatar" v-if="i.avatar" class="comment"/> <span class="comment-time" v-if="i.handle">{{ moment(i.updated_at) }}</span> <span class="comment-handle" v-if="i.handle"><a :href="i.bsky_url">@{{ i.handle }}</a></span>
-->
<img :src="'/icon/' + i.did.replace('did:plc:', '') + '.jpg'" v-if="i.avatar" class="comment"/> <span class="comment-time" v-if="i.handle">{{ moment(i.updated_at) }}</span> <span class="comment-handle" v-if="i.handle"><a :href="i.bsky_url">@{{ i.handle }}</a></span>
<span class="comment-text">{{ i.text }}</span>
<div class="bsky_comment" v-if="comment_open == false">
<span class="comment">
<p class="comment-body" v-if="comment_first">
<img :src="'/icon/' + comment_first.did.replace('did:plc:', '') + '.jpg'" v-if="comment_first.avatar" class="comment"/> <span class="comment-time" v-if="comment_first.updated_at">{{ moment(comment_first.updated_at) }}</span> <span class="comment-handle" v-if="comment_first.handle"><a :href="comment_first.bsky_url">@{{ comment_first.handle }}</a></span>
<span class="comment-text" v-if="comment_first.text">{{ comment_first.text }}</span>
</p>
</span>
<div class="comment_open"><button class="comment_open" v-on:click="comment_open = !comment_open"><i class="fa-solid fa-chevron-down"></i></button></div>
</div>
<div class="bsky_comment" v-else>
<span v-for="i in api_json.data" class="comment">
<p class="comment-body" v-if="i">
{{ axios_check('/icon/' + i.did.replace('did:plc:', '') + '.jpg') }}
<img :src="'/icon/' + i.did.replace('did:plc:', '') + '.jpg'" v-if="url_check" class="comment"/><img :src="i.avatar" v-else-if="i.avatar" class="comment"/> <span class="comment-time" v-if="i.updated_at">{{ moment(i.updated_at) }}</span> <span class="comment-handle" v-if="i.handle"><a :href="i.bsky_url">@{{ i.handle }}</a></span>
<span class="comment-text" v-if="i.text">{{ i.text }}</span>
</p>
</span>
<div class="comment_open"><button class="comment_open" v-on:click="comment_open = !comment_open"><i class="fa-solid fa-chevron-up"></i></button></div>
</div>
<div class="page_title">
@ -104,6 +115,7 @@ import {
import 'hooper/dist/hooper.css';
import axios from 'axios'
import moment from "moment";
import fs from 'fs';
var page = 21;
var loc = window.location.pathname.split('/').slice(-1)[0];
@ -127,7 +139,11 @@ export default {
bsky_json: null,
api_url: null,
api_json: null,
comment_open: false,
comment_first: null,
loading: true,
f: null,
url_check: true,
url: "/",
s_a: 0,
s_b: 2,
@ -152,6 +168,12 @@ export default {
},
load() {
this.loading = false;
},
axios_check(url) {
axios.get(url)
.catch(error => {
this.url_check = false;
});
}
},
mounted() {
@ -175,7 +197,11 @@ export default {
let url = this.api_url + "/users/2/ma?itemsPerPage=4000";
axios
.get(url,{ crossdomain: true })
.then(response => (this.api_json = response));
.then(
response => {this.api_json = response
this.comment_first = this.api_json.data[0]
}
);
}
};
</script>
@ -319,7 +345,16 @@ span.comment-text {
span.comment {
}
.bsky_comment {
button.comment_open {
padding:5px 40px 5px 40px;
background-color: #fff;
}
button.comment_open:hover {
background-color: #fff700;
}
.comment_open {
text-align: center;
}
@media screen and (max-width:1000px) {