-
Notifications
You must be signed in to change notification settings - Fork 37
/
archive.vue
56 lines (52 loc) · 1.68 KB
/
archive.vue
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
<template>
<div>
<div class="container">
<div class="jumbotron">
<h1>Archive</h1>
<p>Use this page to permanently archive websites. Distributed archiving ensures that nothing can ever be scrubbed from the internet.</p>
<hr>
<p></p>
<code>
$> npm run archive -- https://example.com
</code>
</div>
</div>
<div class="container">
<div class="col-md-12 blog-main">
<div
class="blog-post"
v-for="(archive, i) in archiveDB"
:key="i"
>
<h2 class="blog-post-title mb-4">{{archive.created_at | moment('dddd, MMMM Do YYYY, h:mm:ss a') }}</h2>
<p>
<strong>Archived URL: </strong>
<a :href="'storage/archive/' + archive.id">
{{archive.id | parseURL}}
</a>
</p>
<p>
Source URL:
<a :href="archive.url">{{archive.url}}</a>
</p>
<hr>
</div>
</div>
</div>
</div>
</template>
<script>
import archiveDB from "./../archiveDB.json";
export default {
data: () => ({
archiveDB
}),
filters: {
parseURL: id => {
var GATEWAY = ""; // https://gateway.ipfs.io/ipns/
var HASH = ""; // Qmxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
return GATEWAY + HASH + "/storage/archive/" + id;
}
}
};
</script>