/about/: Merge with /authors, redesign page.

This adds the authors to the Zulip repository on GitHub from
/authors/ along with re-styling the page to fit the same
aesthetic as /for/open-source/ and other product-pages.
This commit is contained in:
Brock Whittaker 2017-07-26 18:05:45 -07:00 committed by Tim Abbott
parent eec26c5da6
commit 83184d5c60
9 changed files with 239 additions and 186 deletions

View File

@ -1734,7 +1734,7 @@ nav ul li.active::after {
color: #555;
}
.portico-landing.why-page .main li p {
.portico-landing.why-page .main p {
line-height: 1.8;
}

View File

@ -13,6 +13,18 @@ body {
margin: 0 auto -56px;
}
.normal {
font-weight: normal;
}
.why-page h3.normal {
font-size: 1.3em;
margin-top: 20px;
margin-bottom: 5px;
color: #888;
}
.navbar {
margin-bottom: 0px;
}
@ -578,33 +590,52 @@ a.bottom-signup-button {
table-layout: fixed;
}
.authors_row a {
.contributors .person a {
color: inherit;
}
.authors_row td {
width: 100%;
height: 100%;
height: 120px;
.contributors .person {
width: calc(33% - 20px - 2px);
display: inline-block;
vertical-align: top;
padding: 10px;
transition: box-shadow 0.3s ease-in-out;
margin: 5px 0px;
border: 1px solid #eee;
border-radius: 4px;
transition: all 0.3s ease;
}
.authors_row td:hover {
.contributors .person:hover {
border: 1px solid #bbb;
}
.contributors .person td:hover {
color: hsl(173, 100%, 24%);
box-shadow: 0px 0px 30px hsl(175, 41%, 78%);
}
.authors_row .avatar {
width: 50%;
.contributors .person .avatar {
width: 55px;
text-align: center;
display: inline-block;
vertical-align: top;
}
.authors_row .info {
.contributors .person .info {
width: 50%;
text-align: left;
display: inline-block;
vertical-align: top;
margin-left: 10px;
}
.contributors .last-updated {
color: #aaa;
font-size: 0.8em;
text-align: center;
}
.avatar_img {
@ -1315,6 +1346,10 @@ input.new-organization-button {
.app.help .sidebar.show {
transform: translateX(340px);
}
.contributors .person {
width: calc(50% - 20px - 4px);
}
}
@media (max-width: 767px) {

View File

@ -1,11 +1,36 @@
{% extends "zerver/portico.html" %}
{% block title %}
<title>Zulip: the best group chat for open source projects</title>
{% endblock %}
{% block customhead %}
{{ super() }}
<meta name="viewport" content="width=device-width, initial-scale=1.0">
{% stylesheet 'portico' %}
{% stylesheet 'landing-page' %}
{{ render_bundle('landing-page') }}
{% endblock %}
{% block portico_content %}
{% include 'zerver/landing_nav.html' %}
<div class="portico-landing why-page no-slide">
<div class="hero">
<h1 class="center">About the Zulip project</h1>
<p>Learn about the history of the Zulip project and community!</p>
</div>
<div class="main">
<div class="padded-content">
<div class="inner-content">
<h1>About Zulip</h1>
<p>
This server is an installation of version {{ zulip_version }} of
the <a href="https://zulip.org">Zulip open source group chat
the <a href="https://zulipchat.com">Zulip open source group chat
software</a>. Written in Python and using the Django web framework,
Zulip has an extensive real-time messaging featureset, including
both group and private messaging, conversation streams, powerful
@ -51,12 +76,12 @@
Zulip community welcomes new contributors from any background. The
project has an easy to install development environment, an extensive
test suite,
and <a href="http://zulip.readthedocs.io/en/latest/">over 90,000
and <a href="http://zulip.readthedocs.io/en/latest/">over 100,000
words of developer documentation</a> to make it easy for new
contributors to contribute effectively to the project.
</p>
<h3>Contributing to Zulip</h3>
<h3 class=" normal">Contributing to Zulip</h3>
<p>
If you'd like to join the Zulip community, we'd love to have you!
@ -112,13 +137,51 @@
<p>
By the end of 2015, the open source project was already going strong
with a community of dozens of developers around the world. By
late 2016, <a href="https://en.wikipedia.org/wiki/Zephyr_(protocol)">more
late 2016, <a href="https://github.com/zulip/zulip/graphs/contributors">more
than 150 people from all over the world</a> have contributed
<a href="https://github.com/zulip/zulip/pulls">almost 1000
improvements</a> to the software, and the Zulip project is moving
faster than when the original startup employed 11 full-time
engineers. As of mid-2017, those numbers have ballooned to almost
3000 pull requests written by nearly 300 developers.
<a href="https://github.com/zulip/zulip/pulls">almost
1000 pull requests</a> to the software, and the
Zulip project is moving faster than when the
original startup employed 11 full-time engineers.
As of mid-2017, those numbers have ballooned to
almost 4000 pull requests written by over 300
developers.
</p>
<div class="contributors">
<h2>Contributors</h2>
<p>
Here, we recognize the top 100 contributors to
the Zulip server project on GitHub.
</p>
{% for row in data %}
{% for group in (row[0:3], row[3:6]) %}
{% for person in group %}
{% if person %}
<div class="person">
<a class="no-style" href="https://github.com/{{ person.name }}" target="_blank">
<div class="avatar">
<img class="avatar_img" src="{{ person.avatar }}" alt="{{ _('Avatar') }}" />
</div>
<div class='info'>
<b>@{{ person.name }}</b><br />
{{ person.commits }} commits
</div>
</a>
</div>
{% endif %}
{% endfor %}
{% endfor %}
{% endfor %}
<p class="last-updated">
Statistic last updated: {{ date }}
</p>
</div>
</div>
</div>
</div>
</div>
{% endblock %}

View File

@ -1,43 +0,0 @@
{% extends "zerver/portico.html" %}
{% block portico_content %}
<div class="authors-page-header">
<i class='icon-vector-github'></i> Contributors
</div>
<div class="container">
{% for row in data %}
<div class="row">
{% for group in (row[0:2], row[2:4]) %}
<div class="span6">
{#
Using tables here is a hack to work around the inflexible bootstrap v2.1.1
grid system.
#}
<table class="authors_row">
<tr>
{% for person in group %}
<td>
{% if person %}
<a href="https://github.com/{{ person.name }}">
<div class="avatar float-left">
<img class="avatar_img" src="{{ person.avatar }}" alt="{{ _('Avatar') }}" />
</div>
<div class='info float-right'>
<b>@{{ person.name }}</b><br />
{{ person.commits }} commits
</div>
</a>
{% endif %}
</td>
{% endfor %}
</tr>
</table>
</div>
{% endfor %}
</div>
{% endfor %}
<div class="span12">
Statistic last Updated: {{ date }}
</div>
</div>
{% endblock %}

View File

@ -1,7 +1,7 @@
#!/usr/bin/env python
"""
Fetch contributors data from Github using their API, convert it to structured
JSON data for the /authors page.
JSON data for the /about page authors section.
"""
from __future__ import absolute_import, print_function
@ -88,7 +88,7 @@ def run_production():
out_contrib_data = split_by(
sorted(contribs, key=lambda k: k.get('commits'), reverse=True),
4, None
6, None
) # type: List[List[Optional[Dict[str, Union[Text, int]]]]]
out_data = dict(

View File

@ -100,7 +100,7 @@ subprocess.check_call(['cp', '-aT', 'static/locale',
os.path.join(settings.STATIC_ROOT, 'locale')],
stdout=fp, stderr=fp)
# Generate /authors page markdown
# Generate /about page markdown for authors
authors_cmd = ['./tools/update-authors-json']
if os.environ.get("TRAVIS"):
authors_cmd.append("--use-fixture")

View File

@ -137,7 +137,7 @@ class IntegrationTest(TestCase):
context['subscriptions_html'],
'<a target="_blank" href="../../#streams">streams page</a>')
class AuthorsPageTest(ZulipTestCase):
class AboutPageTest(ZulipTestCase):
def setUp(self):
# type: () -> None
""" Manual installation which did not execute `tools/provision`
@ -154,16 +154,15 @@ class AuthorsPageTest(ZulipTestCase):
def test_endpoint(self):
# type: () -> None
result = self.client_get('/authors/')
result = self.client_get('/about/')
self.assert_in_success_response(
['Contributors', 'Statistic last Updated:', 'commits',
'@timabbott'],
['Contributors', 'commits', '@timabbott'],
result
)
def test_split_by(self):
# type: () -> None
"""Utility function primarily used in authors page"""
flat_list = [1, 2, 3, 4, 5, 6, 7]
expected_result = [[1, 2], [3, 4], [5, 6], [7, None]]
self.assertEqual(split_by(flat_list, 2, None), expected_result)
flat_list = [1, 2, 3, 4, 5, 6, 7, 8, 9]
expected_result = [[1, 2, 3], [4, 5, 6], [7, 8, 9]]
self.assertEqual(split_by(flat_list, 3, None), expected_result)

View File

@ -406,7 +406,7 @@ def get_profile_backend(request, user_profile):
return json_success(result)
def authors_view(request):
def about_view(request):
# type: (HttpRequest) -> HttpResponse
with open(settings.CONTRIBUTORS_DATA) as f:
@ -414,6 +414,6 @@ def authors_view(request):
return render(
request,
'zerver/authors.html',
'zerver/about.html',
context=data,
)

View File

@ -142,7 +142,7 @@ i18n_urls = [
url(r'^integrations/doc-html/(?P<integration_name>[^/]*)$', zerver.views.integrations.integration_doc,
name="zerver.views.integrations.integration_doc"),
url(r'^integrations/(.*)', IntegrationView.as_view()),
url(r'^about/$', TemplateView.as_view(template_name='zerver/about.html')),
url(r'^about/$', zerver.views.users.about_view),
url(r'^apps/(.*)', zerver.views.home.apps_view, name='zerver.views.home.apps_view'),
url(r'^robots\.txt$', RedirectView.as_view(url='/static/robots.txt', permanent=True)),
@ -156,7 +156,6 @@ i18n_urls = [
url(r'^for/companies/$', TemplateView.as_view(template_name='zerver/for-companies.html')),
url(r'^for/working-groups-and-communities/$', TemplateView.as_view(template_name='zerver/for-working-groups-and-communities.html')),
url(r'^find_my_team/$', zerver.views.registration.find_my_team, name='zerver.views.registration.find_my_team'),
url(r'^authors/$', zerver.views.users.authors_view, name='zerver.views.users.authors_view'),
# Terms of service and privacy pages.
url(r'^terms/$', TemplateView.as_view(template_name='zerver/terms.html'), name='terms'),