Skip to content

Commit f16b88c

Browse files
adrien-fbwplotka
authored andcommitted
website: add sponsor section on homepage (#1062)
1 parent 3b6a73b commit f16b88c

File tree

7 files changed

+74
-5
lines changed

7 files changed

+74
-5
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,4 @@ data/
2020

2121
website/public/
2222
website/docs-pre-processed/
23+
!website/data

docs/contributing/how-to-contribute-to-docs.md

+16-2
Original file line numberDiff line numberDiff line change
@@ -63,12 +63,26 @@ Keep `menu` the same as sub-directory the file is in. This will help to manage a
6363

6464
Show new menu section in main page by changing `website/layouts/_default/baseof.html` file.
6565

66+
## Logos
67+
68+
If your company is using Thanos in production, we'd love to showcase your company's logo on our page. Add yourself in [`website/data/sponsors.yml`](/website/data/sponsors.yml) like so:
69+
70+
```yml
71+
- name: My Awesome Company
72+
url: https://wwww.company.com
73+
logo: company.png
74+
```
75+
76+
Copy your company's logo in `website/static/logos`, and make sure it follows these rules:
77+
78+
* Rectangle shape
79+
* Greyscale is prefered but color is fine
80+
* Keep it under 50KB
81+
6682
## Testing
6783

6884
Every PR is building website and on success it shows the link to preview.
6985

70-
Alternatively you can run `make web-serve` to serve and preview the website locally.
71-
7286
## Deployment.
7387

7488
We use [Netlify](https://www.netlify.com/) for hosting. We are using Open Source license (PRO). Thanks Netlify for this!

website/data/sponsors.yml

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
---
2+
3+
sponsors: []

website/layouts/_default/single.html

+3-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@
55
{{ template "_default/sidemenu.html" . }}
66
</div>
77
<div class="col-12 col-lg-9">
8-
{{ replace .Content "<table>" "<table class='table table-striped'>" | safeHTML }}
8+
{{ $content := replace .Content "<table>" "<table class='table table-striped'>" }}
9+
{{ $content = $content | replaceRE "(<h[1-4] id=\"([^\"]+)\".+)(</h[1-9]+>)" `${1} <a href="#${2}" class="header-anchor" aria-label="Header Anchor">#</a> ${3}` }}
10+
{{ $content | safeHTML}}
911
</div>
1012
</div>
1113
</div>

website/layouts/index.html

+32-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,38 @@ <h4 class="font-weight-bold">Downsampling & Compaction</h4>
5252
</div>
5353
</div>
5454
</div>
55-
<div class="container-fluid">
55+
<div class="container py-5">
56+
<div class="row">
57+
<div class="col-12"><h3 class="text-center">Founded by</h3></div>
58+
</div>
59+
<div class="row">
60+
<div class="col-4 col-xl-2 offset-4 offset-xl-5 py-3">
61+
<div class="img-sponsor">
62+
<a href="https://improbable.io" rel="nofollow" target="_blank"><img src="{{ "/logos/improbable.png" | relURL }}" class="img-fluid" alt="Improbable"></a>
63+
</div>
64+
</div>
65+
</div>
66+
<div class="row">
67+
<div class="col-12"><h3 class="text-center">Used by</h3></div>
68+
</div>
69+
<div class="row">
70+
{{ range $sponsor := $.Site.Data.sponsors.sponsors }}
71+
{{ if $sponsor.logo }}
72+
<div class="col-4 col-xl-2 py-3">
73+
<div class="img-sponsor">
74+
<a href="{{ $sponsor.url }}" rel="nofollow" target="_blank"><img src="{{ (printf "/logos/%s" $sponsor.logo) | relURL }}" alt="{{ $sponsor.name }}"></a>
75+
</div>
76+
</div>
77+
{{ end }}
78+
{{ end }}
79+
<div class="col-4 col-xl-2 py-3">
80+
<div class="img-sponsor">
81+
<a class="text-muted" href="{{ "contributing/how-to-contribute-to-docs.md#logos" | relURL }}">Your Company</a>
82+
</div>
83+
</div>
84+
</div>
85+
</div>
86+
<div class="container-fluid bg-light">
5687
<div class="row py-5">
5788
<div class="col text-center">
5889
<h3 class="color-purple">Join the community !</h3>

website/static/logos/improbable.png

38.2 KB
Loading

website/static/main.css

+19-1
Original file line numberDiff line numberDiff line change
@@ -49,4 +49,22 @@ pre {
4949

5050
.list-group-item-thanos:hover {
5151
color: #6D41FF;
52-
}
52+
}
53+
54+
.img-sponsor {
55+
padding: 1rem;
56+
background-color: #fff;
57+
border: 1px solid #dee2e6;
58+
border-radius: .25rem;
59+
height: 75px;
60+
display: flex;
61+
align-items: center;
62+
justify-content: center;
63+
}
64+
65+
.img-sponsor img {
66+
width: 100%;
67+
}
68+
69+
.header-anchor { font-size: 100%; visibility: hidden;}
70+
h1:hover a, h2:hover a, h3:hover a, h4:hover a { visibility: visible}

0 commit comments

Comments
 (0)