-
Notifications
You must be signed in to change notification settings - Fork 14
Expand file tree
/
Copy pathBlockImage.vue
More file actions
57 lines (47 loc) · 1.86 KB
/
Copy pathBlockImage.vue
File metadata and controls
57 lines (47 loc) · 1.86 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
<script setup>
/** Vendor */
import { DateTime } from "luxon"
/** Services */
import { comma, formatBytes } from "@/services/utils"
defineOptions({
inheritAttrs: false,
})
const props = defineProps({
title: String,
block: Object,
})
const bgStyles = computed(() => {
return {
style: {
filter: "grayscale(1)",
opacity: "0.05",
},
}
})
const messages = computed(() => [...new Set(props.block.message_types)])
</script>
<template>
<div class="w-full h-full" :style="{ background: '#111111', padding: '100px', fontFamily: 'IBM+Plex+Mono', overflow: 'hidden' }">
<img src="/img/bg.png" width="1200" height="600" class="absolute" v-bind="bgStyles" />
<div :style="{ height: '100%', display: 'flex', flexDirection: 'column', gap: '40px' }">
<div :style="{ display: 'flex' }">
<span :style="{ fontSize: '70px', color: 'rgba(255,255,255, 0.9)' }"> block </span>
<span :style="{ fontSize: '70px', color: 'rgba(255,255,255, 0.3)' }">('</span>
<span :style="{ fontSize: '70px', color: '#FF8351' }">{{ comma(block.height) }}</span>
<span :style="{ fontSize: '70px', color: 'rgba(255,255,255, 0.3)' }">')</span>
</div>
<div :style="{ display: 'flex' }">
<span :style="{ fontSize: '40px', color: 'rgba(255,255,255, 0.7)' }">
{{ messages.slice(0, 4).join(", ") }} {{ messages.length > 4 ? `and ${messages.length - 4} more` : "" }}
</span>
</div>
<span :style="{ fontSize: '40px', color: 'rgba(255,255,255, 0.4)' }">{{ DateTime.fromISO(block.time).toFormat("ff") }}</span>
<div :style="{ display: 'flex', gap: '24px' }">
<div :style="{ display: 'flex', gap: '12px' }">
<span :style="{ fontSize: '40px', color: 'rgba(255,255,255, 0.3)' }">Blobs Size: </span>
<span :style="{ fontSize: '40px', color: 'rgba(255,255,255, 0.6)' }">{{ formatBytes(block.stats.blobs_size) }} </span>
</div>
</div>
</div>
</div>
</template>