Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add snapshot icon #261

Merged
merged 2 commits into from
Jul 6, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ Sniffs the DHT gossip and indexes file and directory hashes. Metadata and search
- [Project Apollo Archives](https://ipfs.io/ipfs/QmSnuWmxptJZdLJpKRarxBMS2Ju2oANVrgbr2xWbie9b2D) [Source](https://github.com/ipfs/archives/issues/143)
- [textfiles.com](https://ipfs.io/ipfs/QmNoscE3kNc83dM5rZNUC5UDXChiTdDcgf16RVtFCRWYuU) [Source](https://github.com/ipfs/archives/issues/155)
- [World Wide Web History Project](https://ipfs.io/ipfs/QmRTSA1UFHSx3z7taNRwUVM8AjB2EQwKvyZu3BfJg9QRtZ) [Source](https://github.com/ipfs/archives/issues/159)
- [XKCD](https://ipfs.io/ipns/xkcd.hacdias.com) [Source](https://github.com/ipfs/archives/issues/21)
- [xkcd](https://ipfs.io/ipns/xkcd.hacdias.com) - Snapshot of 6th of July of 2019: /ipfs/QmPaSQc397fJ8KbrQ1E4uR8RB1tBkEojBR91sUSG6qGt4K. [Source](https://github.com/ipfs/archives/issues/21)
- [yarchive.net](https://ipfs.io/ipfs/QmdA5WkDNALetBn4iFeSepHjdLGJdxPBwZyY47ir1bZGAK) [Source](https://github.com/ipfs/archives/issues/76)

## Tools
Expand Down
5 changes: 4 additions & 1 deletion data/datasets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,11 @@ content:
website: https://ipfs.io/ipfs/QmNvTjdqEPjZVWCvRWsFJA1vK7TTw1g9JP6we1WBJTRADM
source: https://github.com/ipfs/archives/issues/18
size: 500MB
- title: XKCD
- title: xkcd
hash: /ipns/xkcd.hacdias.com
snapshot:
hash: /ipfs/QmPaSQc397fJ8KbrQ1E4uR8RB1tBkEojBR91sUSG6qGt4K
date: 06/07/2019
website: https://ipfs.io/ipns/xkcd.hacdias.com
source: https://github.com/ipfs/archives/issues/21
description:
Expand Down
1 change: 1 addition & 0 deletions src/layouts/partials/icons/history.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
27 changes: 18 additions & 9 deletions src/layouts/partials/list.html
Original file line number Diff line number Diff line change
@@ -1,9 +1,18 @@
{{ define "text" }}
<p class="f6 lh-copy mw5 mt2 mb0 mid-gray">
{{- . -}}
<p class="f6 lh-copy mw5 mt2 mb0 mid-gray" style="word-break: break-all">
{{- markdownify . -}}
</p>
{{ end }}

{{ define "hash" }}
<a href="https://ipfs.io{{ . }}" target="_blank" alt="Website" title="Website" class="aqua hover-teal">
<abbr title="{{ . }}">
{{ $length := sub (len .) 5 }}
<code>{{ substr . 0 10 }}...{{ substr . $length 5 }}</code>
</abbr>
</a>
{{ end }}

<div class="ma2 dn" id="search">
<input
placeholder="Find your awesome app..."
Expand Down Expand Up @@ -41,12 +50,7 @@ <h1 class="f5 mw5 f4-ns mv0">{{- .title -}}</h1>

{{- if isset . "hash" -}}
<div class="mt2 mw5">
<a href="https://ipfs.io{{ .hash }}" target="_blank" alt="Website" title="Website" class="aqua hover-teal">
<abbr title="{{ .hash }}">
{{ $length := sub (len .hash) 5 }}
<code>{{ substr .hash 0 10 }}...{{ substr .hash $length 5 }}</code>
</abbr>
</a>
{{ template "hash" .hash }}
</div>
{{- end -}}

Expand Down Expand Up @@ -76,8 +80,13 @@ <h1 class="f5 mw5 f4-ns mv0">{{- .title -}}</h1>
{{ partial "icons/flask.svg" }}
</a>
{{- end -}}

{{- if isset . "snapshot" -}}
<a href="http://ipfs.io/{{ .snapshot.hash }}" target="_blank" alt="Snapshot as of {{ .snapshot.date }}" title="Snapshot as of {{ .snapshot.date }}">
{{ partial "icons/history.svg" }}
</a>
{{- end -}}
</div>

</div>
</article>
{{ end }}
Expand Down