doc: rounded avatars (#256)
Use weserv service to format avatars with circle masks. Make size configurable. Tweak readme and adopters pages. Updates #101
This commit is contained in:
committed by
GitHub
parent
1cbd35f134
commit
3d25f4574c
18
README.md
18
README.md
@@ -192,39 +192,39 @@ Implementations of full algorithms:
|
||||
|
||||
Popular projects using `avo`:
|
||||
|
||||
<img src="https://github.com/klauspost.png?size=24" width="24" height="24" hspace="4" valign="middle" /> [klauspost / **compress**](https://github.com/klauspost/compress) / **s2**
|
||||
<img src="https://images.weserv.nl?fit=cover&h=24&mask=circle&maxage=7d&url=https%3A%2F%2Fgithub.com%2Fklauspost.png&w=24" width="24" height="24" hspace="4" valign="middle" /> [klauspost / **compress**](https://github.com/klauspost/compress) / **s2**
|
||||
:star: 2702
|
||||
> Optimized Go Compression Packages
|
||||
|
||||
<img src="https://github.com/golang.png?size=24" width="24" height="24" hspace="4" valign="middle" /> [golang / **crypto**](https://github.com/golang/crypto) / **curve25519**
|
||||
<img src="https://images.weserv.nl?fit=cover&h=24&mask=circle&maxage=7d&url=https%3A%2F%2Fgithub.com%2Fgolang.png&w=24" width="24" height="24" hspace="4" valign="middle" /> [golang / **crypto**](https://github.com/golang/crypto) / **curve25519**
|
||||
:star: 2391
|
||||
> [mirror] Go supplementary cryptography libraries
|
||||
|
||||
<img src="https://github.com/klauspost.png?size=24" width="24" height="24" hspace="4" valign="middle" /> [klauspost / **reedsolomon**](https://github.com/klauspost/reedsolomon)
|
||||
<img src="https://images.weserv.nl?fit=cover&h=24&mask=circle&maxage=7d&url=https%3A%2F%2Fgithub.com%2Fklauspost.png&w=24" width="24" height="24" hspace="4" valign="middle" /> [klauspost / **reedsolomon**](https://github.com/klauspost/reedsolomon)
|
||||
:star: 1428
|
||||
> Reed-Solomon Erasure Coding in Go
|
||||
|
||||
<img src="https://github.com/segmentio.png?size=24" width="24" height="24" hspace="4" valign="middle" /> [segmentio / **asm**](https://github.com/segmentio/asm)
|
||||
<img src="https://images.weserv.nl?fit=cover&h=24&mask=circle&maxage=7d&url=https%3A%2F%2Fgithub.com%2Fsegmentio.png&w=24" width="24" height="24" hspace="4" valign="middle" /> [segmentio / **asm**](https://github.com/segmentio/asm)
|
||||
:star: 681
|
||||
> Go library providing algorithms optimized to leverage the characteristics of modern CPUs
|
||||
|
||||
<img src="https://github.com/zeebo.png?size=24" width="24" height="24" hspace="4" valign="middle" /> [zeebo / **blake3**](https://github.com/zeebo/blake3)
|
||||
<img src="https://images.weserv.nl?fit=cover&h=24&mask=circle&maxage=7d&url=https%3A%2F%2Fgithub.com%2Fzeebo.png&w=24" width="24" height="24" hspace="4" valign="middle" /> [zeebo / **blake3**](https://github.com/zeebo/blake3)
|
||||
:star: 288
|
||||
> Pure Go implementation of BLAKE3 with AVX2 and SSE4.1 acceleration
|
||||
|
||||
<img src="https://github.com/lukechampine.png?size=24" width="24" height="24" hspace="4" valign="middle" /> [lukechampine / **blake3**](https://github.com/lukechampine/blake3)
|
||||
<img src="https://images.weserv.nl?fit=cover&h=24&mask=circle&maxage=7d&url=https%3A%2F%2Fgithub.com%2Flukechampine.png&w=24" width="24" height="24" hspace="4" valign="middle" /> [lukechampine / **blake3**](https://github.com/lukechampine/blake3)
|
||||
:star: 278
|
||||
> A pure-Go implementation of the BLAKE3 cryptographic hash function
|
||||
|
||||
<img src="https://github.com/zeebo.png?size=24" width="24" height="24" hspace="4" valign="middle" /> [zeebo / **xxh3**](https://github.com/zeebo/xxh3)
|
||||
<img src="https://images.weserv.nl?fit=cover&h=24&mask=circle&maxage=7d&url=https%3A%2F%2Fgithub.com%2Fzeebo.png&w=24" width="24" height="24" hspace="4" valign="middle" /> [zeebo / **xxh3**](https://github.com/zeebo/xxh3)
|
||||
:star: 235
|
||||
> XXH3 algorithm in Go
|
||||
|
||||
<img src="https://github.com/dgryski.png?size=24" width="24" height="24" hspace="4" valign="middle" /> [dgryski / **go-bloomindex**](https://github.com/dgryski/go-bloomindex)
|
||||
<img src="https://images.weserv.nl?fit=cover&h=24&mask=circle&maxage=7d&url=https%3A%2F%2Fgithub.com%2Fdgryski.png&w=24" width="24" height="24" hspace="4" valign="middle" /> [dgryski / **go-bloomindex**](https://github.com/dgryski/go-bloomindex)
|
||||
:star: 111
|
||||
> Bloom-filter based search index
|
||||
|
||||
<img src="https://github.com/minio.png?size=24" width="24" height="24" hspace="4" valign="middle" /> [minio / **md5-simd**](https://github.com/minio/md5-simd)
|
||||
<img src="https://images.weserv.nl?fit=cover&h=24&mask=circle&maxage=7d&url=https%3A%2F%2Fgithub.com%2Fminio.png&w=24" width="24" height="24" hspace="4" valign="middle" /> [minio / **md5-simd**](https://github.com/minio/md5-simd)
|
||||
:star: 107
|
||||
> Accelerate aggregated MD5 hashing performance up to 8x for AVX512 and 4x for AVX2. Useful for server applications that need to compute many MD5 sums in parallel.
|
||||
|
||||
|
||||
@@ -1,89 +1,89 @@
|
||||
# Adopters
|
||||
|
||||
<img src="https://github.com/klauspost.png?size=24" width="24" height="24" hspace="4" valign="middle" /> [klauspost / **compress**](https://github.com/klauspost/compress) / **s2**
|
||||
<img src="https://images.weserv.nl?fit=cover&h=28&mask=circle&maxage=7d&url=https%3A%2F%2Fgithub.com%2Fklauspost.png&w=28" width="28" height="28" hspace="4" valign="middle" /> [klauspost / **compress**](https://github.com/klauspost/compress) / **s2**
|
||||
|
||||
Optimized Go Compression Packages
|
||||
|
||||
<img src="https://github.com/golang.png?size=24" width="24" height="24" hspace="4" valign="middle" /> [golang / **crypto**](https://github.com/golang/crypto) / **curve25519**
|
||||
<img src="https://images.weserv.nl?fit=cover&h=28&mask=circle&maxage=7d&url=https%3A%2F%2Fgithub.com%2Fgolang.png&w=28" width="28" height="28" hspace="4" valign="middle" /> [golang / **crypto**](https://github.com/golang/crypto) / **curve25519**
|
||||
|
||||
[mirror] Go supplementary cryptography libraries
|
||||
|
||||
<img src="https://github.com/klauspost.png?size=24" width="24" height="24" hspace="4" valign="middle" /> [klauspost / **reedsolomon**](https://github.com/klauspost/reedsolomon)
|
||||
<img src="https://images.weserv.nl?fit=cover&h=28&mask=circle&maxage=7d&url=https%3A%2F%2Fgithub.com%2Fklauspost.png&w=28" width="28" height="28" hspace="4" valign="middle" /> [klauspost / **reedsolomon**](https://github.com/klauspost/reedsolomon)
|
||||
|
||||
Reed-Solomon Erasure Coding in Go
|
||||
|
||||
<img src="https://github.com/segmentio.png?size=24" width="24" height="24" hspace="4" valign="middle" /> [segmentio / **asm**](https://github.com/segmentio/asm)
|
||||
<img src="https://images.weserv.nl?fit=cover&h=28&mask=circle&maxage=7d&url=https%3A%2F%2Fgithub.com%2Fsegmentio.png&w=28" width="28" height="28" hspace="4" valign="middle" /> [segmentio / **asm**](https://github.com/segmentio/asm)
|
||||
|
||||
Go library providing algorithms optimized to leverage the characteristics of modern CPUs
|
||||
|
||||
<img src="https://github.com/zeebo.png?size=24" width="24" height="24" hspace="4" valign="middle" /> [zeebo / **blake3**](https://github.com/zeebo/blake3)
|
||||
<img src="https://images.weserv.nl?fit=cover&h=28&mask=circle&maxage=7d&url=https%3A%2F%2Fgithub.com%2Fzeebo.png&w=28" width="28" height="28" hspace="4" valign="middle" /> [zeebo / **blake3**](https://github.com/zeebo/blake3)
|
||||
|
||||
Pure Go implementation of BLAKE3 with AVX2 and SSE4.1 acceleration
|
||||
|
||||
<img src="https://github.com/lukechampine.png?size=24" width="24" height="24" hspace="4" valign="middle" /> [lukechampine / **blake3**](https://github.com/lukechampine/blake3)
|
||||
<img src="https://images.weserv.nl?fit=cover&h=28&mask=circle&maxage=7d&url=https%3A%2F%2Fgithub.com%2Flukechampine.png&w=28" width="28" height="28" hspace="4" valign="middle" /> [lukechampine / **blake3**](https://github.com/lukechampine/blake3)
|
||||
|
||||
A pure-Go implementation of the BLAKE3 cryptographic hash function
|
||||
|
||||
<img src="https://github.com/zeebo.png?size=24" width="24" height="24" hspace="4" valign="middle" /> [zeebo / **xxh3**](https://github.com/zeebo/xxh3)
|
||||
<img src="https://images.weserv.nl?fit=cover&h=28&mask=circle&maxage=7d&url=https%3A%2F%2Fgithub.com%2Fzeebo.png&w=28" width="28" height="28" hspace="4" valign="middle" /> [zeebo / **xxh3**](https://github.com/zeebo/xxh3)
|
||||
|
||||
XXH3 algorithm in Go
|
||||
|
||||
<img src="https://github.com/dgryski.png?size=24" width="24" height="24" hspace="4" valign="middle" /> [dgryski / **go-bloomindex**](https://github.com/dgryski/go-bloomindex)
|
||||
<img src="https://images.weserv.nl?fit=cover&h=28&mask=circle&maxage=7d&url=https%3A%2F%2Fgithub.com%2Fdgryski.png&w=28" width="28" height="28" hspace="4" valign="middle" /> [dgryski / **go-bloomindex**](https://github.com/dgryski/go-bloomindex)
|
||||
|
||||
Bloom-filter based search index
|
||||
|
||||
<img src="https://github.com/minio.png?size=24" width="24" height="24" hspace="4" valign="middle" /> [minio / **md5-simd**](https://github.com/minio/md5-simd)
|
||||
<img src="https://images.weserv.nl?fit=cover&h=28&mask=circle&maxage=7d&url=https%3A%2F%2Fgithub.com%2Fminio.png&w=28" width="28" height="28" hspace="4" valign="middle" /> [minio / **md5-simd**](https://github.com/minio/md5-simd)
|
||||
|
||||
Accelerate aggregated MD5 hashing performance up to 8x for AVX512 and 4x for AVX2. Useful for server applications that need to compute many MD5 sums in parallel.
|
||||
|
||||
<img src="https://github.com/phoreproject.png?size=24" width="24" height="24" hspace="4" valign="middle" /> [phoreproject / **bls**](https://github.com/phoreproject/bls)
|
||||
<img src="https://images.weserv.nl?fit=cover&h=28&mask=circle&maxage=7d&url=https%3A%2F%2Fgithub.com%2Fphoreproject.png&w=28" width="28" height="28" hspace="4" valign="middle" /> [phoreproject / **bls**](https://github.com/phoreproject/bls)
|
||||
|
||||
Go implementation of the BLS12-381 pairing
|
||||
|
||||
<img src="https://github.com/FiloSottile.png?size=24" width="24" height="24" hspace="4" valign="middle" /> [FiloSottile / **edwards25519**](https://github.com/FiloSottile/edwards25519)
|
||||
<img src="https://images.weserv.nl?fit=cover&h=28&mask=circle&maxage=7d&url=https%3A%2F%2Fgithub.com%2FFiloSottile.png&w=28" width="28" height="28" hspace="4" valign="middle" /> [FiloSottile / **edwards25519**](https://github.com/FiloSottile/edwards25519)
|
||||
|
||||
filippo.io/edwards25519 — A safer, faster, and more powerful low-level edwards25519 Go implementation.
|
||||
|
||||
<img src="https://github.com/lukechampine.png?size=24" width="24" height="24" hspace="4" valign="middle" /> [lukechampine / **us**](https://github.com/lukechampine/us) / **merkle/blake2b**
|
||||
<img src="https://images.weserv.nl?fit=cover&h=28&mask=circle&maxage=7d&url=https%3A%2F%2Fgithub.com%2Flukechampine.png&w=28" width="28" height="28" hspace="4" valign="middle" /> [lukechampine / **us**](https://github.com/lukechampine/us) / **merkle/blake2b**
|
||||
|
||||
An alternative interface to Sia
|
||||
|
||||
<img src="https://github.com/oasisprotocol.png?size=24" width="24" height="24" hspace="4" valign="middle" /> [oasisprotocol / **curve25519-voi**](https://github.com/oasisprotocol/curve25519-voi)
|
||||
<img src="https://images.weserv.nl?fit=cover&h=28&mask=circle&maxage=7d&url=https%3A%2F%2Fgithub.com%2Foasisprotocol.png&w=28" width="28" height="28" hspace="4" valign="middle" /> [oasisprotocol / **curve25519-voi**](https://github.com/oasisprotocol/curve25519-voi)
|
||||
|
||||
High-performance Curve25519/ristretto255 for Go
|
||||
|
||||
<img src="https://github.com/dgryski.png?size=24" width="24" height="24" hspace="4" valign="middle" /> [dgryski / **go-sip13**](https://github.com/dgryski/go-sip13)
|
||||
<img src="https://images.weserv.nl?fit=cover&h=28&mask=circle&maxage=7d&url=https%3A%2F%2Fgithub.com%2Fdgryski.png&w=28" width="28" height="28" hspace="4" valign="middle" /> [dgryski / **go-sip13**](https://github.com/dgryski/go-sip13)
|
||||
|
||||
siphash 1-3
|
||||
|
||||
<img src="https://github.com/orisano.png?size=24" width="24" height="24" hspace="4" valign="middle" /> [orisano / **wyhash**](https://github.com/orisano/wyhash)
|
||||
<img src="https://images.weserv.nl?fit=cover&h=28&mask=circle&maxage=7d&url=https%3A%2F%2Fgithub.com%2Forisano.png&w=28" width="28" height="28" hspace="4" valign="middle" /> [orisano / **wyhash**](https://github.com/orisano/wyhash)
|
||||
|
||||
A pure-Go wyhash implementation.
|
||||
|
||||
<img src="https://github.com/oasisprotocol.png?size=24" width="24" height="24" hspace="4" valign="middle" /> [oasisprotocol / **deoxysii**](https://github.com/oasisprotocol/deoxysii)
|
||||
<img src="https://images.weserv.nl?fit=cover&h=28&mask=circle&maxage=7d&url=https%3A%2F%2Fgithub.com%2Foasisprotocol.png&w=28" width="28" height="28" hspace="4" valign="middle" /> [oasisprotocol / **deoxysii**](https://github.com/oasisprotocol/deoxysii)
|
||||
|
||||
Go Deoxys-II-256-128
|
||||
|
||||
<img src="https://github.com/mmcloughlin.png?size=24" width="24" height="24" hspace="4" valign="middle" /> [mmcloughlin / **md4**](https://github.com/mmcloughlin/md4)
|
||||
<img src="https://images.weserv.nl?fit=cover&h=28&mask=circle&maxage=7d&url=https%3A%2F%2Fgithub.com%2Fmmcloughlin.png&w=28" width="28" height="28" hspace="4" valign="middle" /> [mmcloughlin / **md4**](https://github.com/mmcloughlin/md4)
|
||||
|
||||
Assembly-optimized MD4 hash algorithm in Go
|
||||
|
||||
<img src="https://github.com/dgryski.png?size=24" width="24" height="24" hspace="4" valign="middle" /> [dgryski / **go-marvin32**](https://github.com/dgryski/go-marvin32)
|
||||
<img src="https://images.weserv.nl?fit=cover&h=28&mask=circle&maxage=7d&url=https%3A%2F%2Fgithub.com%2Fdgryski.png&w=28" width="28" height="28" hspace="4" valign="middle" /> [dgryski / **go-marvin32**](https://github.com/dgryski/go-marvin32)
|
||||
|
||||
Assembly-optimized Marvin32 hash function
|
||||
|
||||
<img src="https://github.com/dgryski.png?size=24" width="24" height="24" hspace="4" valign="middle" /> [dgryski / **go-speck**](https://github.com/dgryski/go-speck)
|
||||
<img src="https://images.weserv.nl?fit=cover&h=28&mask=circle&maxage=7d&url=https%3A%2F%2Fgithub.com%2Fdgryski.png&w=28" width="28" height="28" hspace="4" valign="middle" /> [dgryski / **go-speck**](https://github.com/dgryski/go-speck)
|
||||
|
||||
SPECK cipher
|
||||
|
||||
<img src="https://github.com/dgryski.png?size=24" width="24" height="24" hspace="4" valign="middle" /> [dgryski / **go-chaskey**](https://github.com/dgryski/go-chaskey)
|
||||
<img src="https://images.weserv.nl?fit=cover&h=28&mask=circle&maxage=7d&url=https%3A%2F%2Fgithub.com%2Fdgryski.png&w=28" width="28" height="28" hspace="4" valign="middle" /> [dgryski / **go-chaskey**](https://github.com/dgryski/go-chaskey)
|
||||
|
||||
go-chaskey: an implementation of chaskey, an efficient MAC for microcontrollers
|
||||
|
||||
<img src="https://github.com/ericlagergren.png?size=24" width="24" height="24" hspace="4" valign="middle" /> [ericlagergren / **lwcrypto**](https://github.com/ericlagergren/lwcrypto) / **ascon**
|
||||
<img src="https://images.weserv.nl?fit=cover&h=28&mask=circle&maxage=7d&url=https%3A%2F%2Fgithub.com%2Fericlagergren.png&w=28" width="28" height="28" hspace="4" valign="middle" /> [ericlagergren / **lwcrypto**](https://github.com/ericlagergren/lwcrypto) / **ascon**
|
||||
|
||||
NIST Lightweight Cryptography finalists
|
||||
|
||||
<img src="https://github.com/ericlagergren.png?size=24" width="24" height="24" hspace="4" valign="middle" /> [ericlagergren / **lwcrypto**](https://github.com/ericlagergren/lwcrypto) / **grain**
|
||||
<img src="https://images.weserv.nl?fit=cover&h=28&mask=circle&maxage=7d&url=https%3A%2F%2Fgithub.com%2Fericlagergren.png&w=28" width="28" height="28" hspace="4" valign="middle" /> [ericlagergren / **lwcrypto**](https://github.com/ericlagergren/lwcrypto) / **grain**
|
||||
|
||||
NIST Lightweight Cryptography finalists
|
||||
|
||||
@@ -10,8 +10,10 @@ import (
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"log"
|
||||
"net/url"
|
||||
"os"
|
||||
"regexp"
|
||||
"strconv"
|
||||
"strings"
|
||||
"text/template"
|
||||
|
||||
@@ -166,7 +168,26 @@ func snippet(filename, start, end string) (string, error) {
|
||||
}
|
||||
|
||||
// avatar returns HTML for a Github user avatar.
|
||||
func avatar(owner string) (string, error) {
|
||||
format := `<img src="https://github.com/%s.png?size=24" width="24" height="24" hspace="4" valign="middle" />`
|
||||
return fmt.Sprintf(format, owner), nil
|
||||
func avatar(owner string, size int) (string, error) {
|
||||
// Origin avatar URL from Github.
|
||||
u := fmt.Sprintf("https://github.com/%s.png", owner)
|
||||
|
||||
// Use images.weserv.nl service to resize and apply circle mask.
|
||||
v := url.Values{}
|
||||
v.Set("url", u)
|
||||
v.Set("w", strconv.Itoa(size))
|
||||
v.Set("h", strconv.Itoa(size))
|
||||
v.Set("fit", "cover")
|
||||
v.Set("mask", "circle")
|
||||
v.Set("maxage", "7d")
|
||||
|
||||
src := url.URL{
|
||||
Scheme: "https",
|
||||
Host: "images.weserv.nl",
|
||||
RawQuery: v.Encode(),
|
||||
}
|
||||
|
||||
// Build <img> tag.
|
||||
format := `<img src="%s" width="%d" height="%d" hspace="4" valign="middle" />`
|
||||
return fmt.Sprintf(format, src.String(), size, size), nil
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Adopters
|
||||
{{ range .Packages.Ranked }}
|
||||
{{ avatar .Repository.Owner }} [{{ .Repository.Owner }} / **{{ .Repository.Name }}**]({{ .Repository.URL }})
|
||||
{{ avatar .Repository.Owner 28 }} [{{ .Repository.Owner }} / **{{ .Repository.Name }}**]({{ .Repository.URL }})
|
||||
{{- if .SubPackage }} / **{{ .SubPackage}}**{{ end }}
|
||||
|
||||
{{ .Metadata.Description }}
|
||||
|
||||
@@ -107,7 +107,7 @@ Popular projects using `avo`:
|
||||
|
||||
{{ range .Packages.Top 10 -}}
|
||||
{{ if lt .Metadata.Stars 100 }}{{break}}{{ end -}}
|
||||
{{ avatar .Repository.Owner }} [{{ .Repository.Owner }} / **{{ .Repository.Name }}**]({{ .Repository.URL }})
|
||||
{{ avatar .Repository.Owner 24 }} [{{ .Repository.Owner }} / **{{ .Repository.Name }}**]({{ .Repository.URL }})
|
||||
{{- if .SubPackage }} / **{{ .SubPackage}}**{{ end }}
|
||||
:star: {{ .Metadata.Stars }}
|
||||
> {{ .Metadata.Description }}
|
||||
|
||||
Reference in New Issue
Block a user