3 <div class="card" :class="item.class">
4 <a :href="item.url" :target="item.target" rel="noreferrer">
5 <div class="card-content">
7 <div v-if="item.logo" class="media-left">
8 <figure class="image is-48x48">
9 <img :src="item.logo" :alt="`${item.name} logo`" />
12 <div v-if="item.icon" class="media-left">
13 <figure class="image is-48x48">
14 <i style="font-size: 35px" :class="['fa-fw', item.icon]"></i>
17 <div class="media-content">
18 <p class="title is-4">{{ item.name }}</p>
19 <p class="subtitle is-6">
20 <template v-if="item.subtitle">
23 <template v-else-if="api">
24 {{ percentage }}% blocked
28 <div v-if="api" class="status" :class="api.status">
32 <div class="tag" :class="item.tagstyle" v-if="item.tag">
33 <strong class="tag-text">#{{ item.tag }}</strong>
50 ads_percentage_today: 0,
54 percentage: function () {
56 return this.api.ads_percentage_today.toFixed(1);
65 fetchStatus: async function () {
66 const url = `${this.item.url}/api.php`;
67 this.api = await fetch(url{
68 credentials: 'include'
70 .then((response) => response.json())
71 .catch((e) => console.log(e));
77 <style scoped lang="scss">
83 color: var(--text-title);
86 background-color: #94e185;
87 border-color: #78d965;
88 box-shadow: 0 0 5px 1px #94e185;
92 background-color: #c9404d;
93 border-color: #c42c3b;
94 box-shadow: 0 0 5px 1px #c9404d;
99 display: inline-block;
103 border: 1px solid #000;