Skip to content

Commit 6660e9b

Browse files
committed
Fix the friends page for i18n
This got missed somehow in rust-lang#296 Fixes rust-lang#437
1 parent 08b9a81 commit 6660e9b

File tree

2 files changed

+72
-69
lines changed

2 files changed

+72
-69
lines changed

en-US/friends.html

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
---
2+
layout: basic
3+
title: Friends of Rust · The Rust Programming Language
4+
---
5+
6+
<div id="users">
7+
8+
<h1>Friends of Rust</h1>
9+
<h2>(Organizations running Rust in production)</h2>
10+
11+
{% for user in site.data.users %}
12+
{% assign mod = forloop.index | minus:1 | modulo:3 %}
13+
{% if mod != 0 %}
14+
{% continue %}
15+
{% endif %}
16+
17+
{% assign offset = forloop.index | minus:1 %}
18+
19+
<div class="row">
20+
{% for user in site.data.users limit:3 offset:offset %}
21+
<div class="col-md-4"
22+
id="user-logo-{{offset}}-{{forloop.index}}">
23+
<div class="user-container">
24+
<a href="{{user.url}}" rel="nofollow" alt="{{user.name}}">
25+
<img src="../user-logos/{{user.logo}}">
26+
</a>
27+
</div>
28+
<div class="details user-detail fade-out"
29+
id="user-details-{{offset}}-{{forloop.index}}">
30+
<p><em>{{user.name}}</em> : {{user.how}}</p>
31+
</div>
32+
</div>
33+
34+
<script type="text/javascript">
35+
var logo = document.getElementById("user-logo-{{offset}}-{{forloop.index}}");
36+
logo.onmouseover = function() {
37+
var allDetails = document.querySelectorAll(".user-detail");
38+
for (var i = 0; i < allDetails.length; i++) {
39+
var details = allDetails[i];
40+
details.className = details.className.replace(" fade-in", "");
41+
details.className = details.className.replace(" fade-out", "");
42+
details.className += " fade-out";
43+
}
44+
45+
var details = document.getElementById("user-details-{{offset}}-{{forloop.index}}");
46+
details.className = details.className.replace(" fade-in", "");
47+
details.className = details.className.replace(" fade-out", "");
48+
details.className += " fade-in";
49+
};
50+
51+
logo.onmouseout = function() {
52+
var details = document.getElementById("user-details-{{offset}}-{{forloop.index}}");
53+
details.className = details.className.replace(" fade-in", "");
54+
details.className = details.className.replace(" fade-out", "");
55+
details.className += " fade-out";
56+
};
57+
</script>
58+
{% endfor %}
59+
60+
</div>
61+
62+
{% endfor %}
63+
64+
<p id="user-add-info">
65+
If your organization uses Rust in production and you want it
66+
listed on this page,<br/>please
67+
<a href="https://github.com/rust-lang/rust-www/issues/new?title=New+Website+Logo%3A+[insert+name]%0A&body=To+list+your+organization%27s+logo+on+the+Rust+website%2C+fill+out+the+following+information+and+click+%22submit+new+issue%22.+Alternately%2C+you+may+edit+_data%2Fusers.yml+as+described+therein+and+submit+a+pull+request.%0D%0A%0D%0A-+Organization+name%3A+%28as+you+want+it+displayed%29%0D%0A-+Homepage+url%3A+%28homepage%2Fprimary+entry+point+for+users%29%0D%0A-+Logo+url%3A+%28svg+if+possible%2C+pngs+over+400x200px+with+transparent+backgrounds+are+also+acceptable%29%0D%0A-+How+you+are+using+Rust%3A+%28one+sentence+describing+your+use+of+Rust%29%0D%0A-+Url+describing+Rust+usage%3A+%28optional+link+to+e.g.+blog+post+explaining+how+you+use+Rust%29%0D%0A-+Organization+contact%3A+%28name+and+email.+we+may+contact+you+when+updating+this+page.+alternately+you+may+email+this+information+to+user-logos%40rust-lang.org+and+it+will+be+kept+secret%29.%0D%0A">
68+
open an issue and fill out the information requested therein</a>.
69+
</p>
70+
71+
</div>

friends.html

Lines changed: 1 addition & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -1,71 +1,3 @@
11
---
2-
layout: basic
3-
title: Friends of Rust &middot; The Rust Programming Language
2+
layout: redirect
43
---
5-
6-
<div id="users">
7-
8-
<h1>Friends of Rust</h1>
9-
<h2>(Organizations running Rust in production)</h2>
10-
11-
{% for user in site.data.users %}
12-
{% assign mod = forloop.index | minus:1 | modulo:3 %}
13-
{% if mod != 0 %}
14-
{% continue %}
15-
{% endif %}
16-
17-
{% assign offset = forloop.index | minus:1 %}
18-
19-
<div class="row">
20-
{% for user in site.data.users limit:3 offset:offset %}
21-
<div class="col-md-4"
22-
id="user-logo-{{offset}}-{{forloop.index}}">
23-
<div class="user-container">
24-
<a href="{{user.url}}" rel="nofollow" alt="{{user.name}}">
25-
<img src="user-logos/{{user.logo}}">
26-
</a>
27-
</div>
28-
<div class="details user-detail fade-out"
29-
id="user-details-{{offset}}-{{forloop.index}}">
30-
<p><em>{{user.name}}</em> : {{user.how}}</p>
31-
</div>
32-
</div>
33-
34-
<script type="text/javascript">
35-
var logo = document.getElementById("user-logo-{{offset}}-{{forloop.index}}");
36-
logo.onmouseover = function() {
37-
var allDetails = document.querySelectorAll(".user-detail");
38-
for (var i = 0; i < allDetails.length; i++) {
39-
var details = allDetails[i];
40-
details.className = details.className.replace(" fade-in", "");
41-
details.className = details.className.replace(" fade-out", "");
42-
details.className += " fade-out";
43-
}
44-
45-
var details = document.getElementById("user-details-{{offset}}-{{forloop.index}}");
46-
details.className = details.className.replace(" fade-in", "");
47-
details.className = details.className.replace(" fade-out", "");
48-
details.className += " fade-in";
49-
};
50-
51-
logo.onmouseout = function() {
52-
var details = document.getElementById("user-details-{{offset}}-{{forloop.index}}");
53-
details.className = details.className.replace(" fade-in", "");
54-
details.className = details.className.replace(" fade-out", "");
55-
details.className += " fade-out";
56-
};
57-
</script>
58-
{% endfor %}
59-
60-
</div>
61-
62-
{% endfor %}
63-
64-
<p id="user-add-info">
65-
If your organization uses Rust in production and you want it
66-
listed on this page,<br/>please
67-
<a href="https://github.com/rust-lang/rust-www/issues/new?title=New+Website+Logo%3A+[insert+name]%0A&body=To+list+your+organization%27s+logo+on+the+Rust+website%2C+fill+out+the+following+information+and+click+%22submit+new+issue%22.+Alternately%2C+you+may+edit+_data%2Fusers.yml+as+described+therein+and+submit+a+pull+request.%0D%0A%0D%0A-+Organization+name%3A+%28as+you+want+it+displayed%29%0D%0A-+Homepage+url%3A+%28homepage%2Fprimary+entry+point+for+users%29%0D%0A-+Logo+url%3A+%28svg+if+possible%2C+pngs+over+400x200px+with+transparent+backgrounds+are+also+acceptable%29%0D%0A-+How+you+are+using+Rust%3A+%28one+sentence+describing+your+use+of+Rust%29%0D%0A-+Url+describing+Rust+usage%3A+%28optional+link+to+e.g.+blog+post+explaining+how+you+use+Rust%29%0D%0A-+Organization+contact%3A+%28name+and+email.+we+may+contact+you+when+updating+this+page.+alternately+you+may+email+this+information+to+user-logos%40rust-lang.org+and+it+will+be+kept+secret%29.%0D%0A">
68-
open an issue and fill out the information requested therein</a>.
69-
</p>
70-
71-
</div>

0 commit comments

Comments
 (0)