Skip to content

Commit

Permalink
feat: add snapshot icon (#261)
Browse files Browse the repository at this point in the history
License: MIT
Signed-off-by: Henrique Dias <[email protected]>
  • Loading branch information
hacdias authored Jul 6, 2019
1 parent 5209484 commit b4b21eb
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 11 deletions.
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

0 comments on commit b4b21eb

Please sign in to comment.