Skip to content

Commit

Permalink
[+] 多人運動
Browse files Browse the repository at this point in the history
  • Loading branch information
bestpika committed May 29, 2020
1 parent 2f429b6 commit 90f69fc
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 23 deletions.
4 changes: 2 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,14 @@
<article class="media">
<div class="media-left">
<figure class="image is-64x64" id="icon">
<img src="//www.gravatar.com/avatar/bf73e08d8bc1db95b62f02d50f8a03e9" alt="Image">
<img :src="avatar" alt="Image">
<span class="icon"></span>
</figure>
</div>
<div class="media-content">
<div class="content">
<p>
<strong>Hiraku</strong> <small>@hirakujira</small> <small> · 1m</small>
<strong>{{ name }}</strong> <small>@{{ uname }}</small> <small> · 1m</small>
<br>
<span v-cloak>{{ message }}</span>
<!-- 好ㄉ小ㄉ知道ㄖ -->
Expand Down
18 changes: 0 additions & 18 deletions public/hiraku.txt

This file was deleted.

16 changes: 13 additions & 3 deletions public/main.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,28 @@
/* global Vue */
(async () => {
const hiraku = await fetch('public/hiraku.txt')
const gravatar = {
hirakujira: { name: 'Hiraku', avatar: 'bf73e08d8bc1db95b62f02d50f8a03e9' }
}
const hiraku = await fetch('public/saying.txt')
const saying = await hiraku.text()
const hirakuSaying = saying.split(',').slice().map(x => x.trim())
const hirakuSaying = saying.split(';').slice(0, -1).map(x => x.trim())
new Vue({ // eslint-disable-line no-new
el: '#app',
data: {
hiraku: hirakuSaying,
uname: '',
name: '',
avatar: 'https://www.gravatar.com/avatar/00000000000000000000000000000000',
message: ''
},
methods: {
updateHiraku () {
const idx = Math.floor(Math.random() * this.hiraku.length)
this.message = this.hiraku[idx]
const saying = this.hiraku[idx].split(',')
this.uname = saying[0]
this.name = gravatar[this.uname].name
this.avatar = `https://www.gravatar.com/avatar/${gravatar[this.uname].avatar}`
this.message = saying[1]
}
},
created () {
Expand Down
18 changes: 18 additions & 0 deletions public/saying.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
hirakujira,我買的每一個垃圾 domain 都至少放個 index.html ┌(┌^o^)┐;
hirakujira,因為我都找 Apple 麻煩所以 (´・ω・`);
hirakujira,就我笨啊;
hirakujira,笑死,每個人都質疑你沒 SSL @Shawn_N;
hirakujira,咬我啊;
hirakujira,怕爆;
hirakujira,Ubuntu 20.04 刷爆了,耶 ( ✌️‘ω’)✌️;
hirakujira,我不會 unix (´・ω・`);
hirakujira,我以為 kinta.ma 的網域本身就是彩蛋 (´・ω・`);
hirakujira,應該是我智障喔;
hirakujira,反正寫這個就是抄抄別人的就會了;
hirakujira,單純我笨而已;
hirakujira,嗚嗚我辣雞;
hirakujira,夢遊寫 code;
hirakujira,原來我才辣雞;
hirakujira,兩隻 iPhone SE 四萬而已比一隻 11 Pro Max 便宜;
hirakujira,那是我做的 bot 叫做唐鳳。;
hirakujira,你以為這個群有 4448 人?其實裡面都是我,不信我等下發一樣訊息給你看看;

0 comments on commit 90f69fc

Please sign in to comment.