From 83184d5c60e6281ccd7083ad9cd62f5e487c0ca2 Mon Sep 17 00:00:00 2001 From: Brock Whittaker Date: Wed, 26 Jul 2017 18:05:45 -0700 Subject: [PATCH] /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. --- static/styles/landing-page.css | 2 +- static/styles/portico.css | 55 ++++-- templates/zerver/about.html | 299 ++++++++++++++++++++------------- templates/zerver/authors.html | 43 ----- tools/update-authors-json | 4 +- tools/update-prod-static | 2 +- zerver/tests/test_docs.py | 13 +- zerver/views/users.py | 4 +- zproject/urls.py | 3 +- 9 files changed, 239 insertions(+), 186 deletions(-) delete mode 100644 templates/zerver/authors.html diff --git a/static/styles/landing-page.css b/static/styles/landing-page.css index 1d689a41d1..aa1b3c085e 100644 --- a/static/styles/landing-page.css +++ b/static/styles/landing-page.css @@ -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; } diff --git a/static/styles/portico.css b/static/styles/portico.css index 46bc4a0b99..8598271ab3 100644 --- a/static/styles/portico.css +++ b/static/styles/portico.css @@ -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) { diff --git a/templates/zerver/about.html b/templates/zerver/about.html index 7bcbdad39b..d91983272d 100644 --- a/templates/zerver/about.html +++ b/templates/zerver/about.html @@ -1,124 +1,187 @@ {% extends "zerver/portico.html" %} -{% block portico_content %} -

About Zulip

+{% block title %} +Zulip: the best group chat for open source projects +{% endblock %} -

- This server is an installation of version {{ zulip_version }} of - the Zulip open source group chat - software. 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 - search, drag-and-drop file uploads, image previews, audible - notifications, missed-message emails, markdown formatting, desktop - and mobile apps, dozens of integrations, and much, much more. -

+{% block customhead %} +{{ super() }} -

- Zulip was designed from the ground up to optimize the productivity - of discussions and real-time decision-making. Zulip's unique model - for threading topics, together with its system for tracking unread - messages, make it easy to have multiple simultaneous conversations - in the same stream. As a result, Zulip is more efficient than any - other chat product for catching up on conversations you missed while - you were away from your devices. You can read exactly the threads - that are important to you, and it feels natural to follow up on - conversations that happened while you were away. -

- -

- Zulip's vision is to create the world's best group chat software, - completely open source, so that everyone has the freedom to - customize, improve, and run their own copy of this essential piece - of collaboration infrastructure. -

- -

- Further information on the Zulip project and its - features can be found on - the Zulip open source project's - website and - the Zulip - documentation. -

- -

Zulip Community

- -

- Zulip is developed by a vibrant community of developers from around - the world. Every month, dozens of people contribute code to it, and - dozens more contribute bug reports, feedback, and translations. The - Zulip community welcomes new contributors from any background. The - project has an easy to install development environment, an extensive - test suite, - and over 90,000 - words of developer documentation to make it easy for new - contributors to contribute effectively to the project. -

- -

Contributing to Zulip

- -

- If you'd like to join the Zulip community, we'd love to have you! - Please - visit the - main Zulip project on GitHub for details on how to get involved! -

- -

Zulip history

- -

- Zulip was originally developed by Zulip, Inc., a small startup in - Cambridge, Massachusetts. Zulip, Inc. was founded by the MIT team - that previously created - Ksplice, software for - live-patching a running Linux kernel. Zulip was inspired by - the Barnowl client for - the Zephyr - protocol, and the incredible community that Zephyr supported at MIT. -

- -

- Zulip, Inc. was acquired by Dropbox in early 2014, while the product - was still in private beta. Zulip's beta - users loved - Zulip's unique user experience and continued using it, despite - the fact that the product was not being actively developed. After a - year and a half, Dropbox generously decided to release Zulip as open - source software so that Zulip's users could continue enjoying the - software. -

- -

- As a result, the first time the public had the opportunity to use - Zulip was when Dropbox - released - Zulip as open source software in late 2015. The open sourcing - announcement was very popular, staying at the top of - both Hacker - News - and the - programming subreddit for an entire day. -

- -

- Zulip was open sourced with the complete version control history - intact because 10 Zulip users visited Dropbox for a full week to - help with the technical work. The Zulip community is incredibly - grateful to both Dropbox and those enthusiastic early users for - making the Zulip open source project possible. -

- -

- 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, more - than 150 people from all over the world have contributed - almost 1000 - improvements 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. -

+ +{% stylesheet 'portico' %} +{% stylesheet 'landing-page' %} +{{ render_bundle('landing-page') }} + +{% endblock %} + +{% block portico_content %} + +{% include 'zerver/landing_nav.html' %} + +
+
+

About the Zulip project

+

Learn about the history of the Zulip project and community!

+
+
+
+
+

About Zulip

+ +

+ This server is an installation of version {{ zulip_version }} of + the Zulip open source group chat + software. 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 + search, drag-and-drop file uploads, image previews, audible + notifications, missed-message emails, markdown formatting, desktop + and mobile apps, dozens of integrations, and much, much more. +

+ +

+ Zulip was designed from the ground up to optimize the productivity + of discussions and real-time decision-making. Zulip's unique model + for threading topics, together with its system for tracking unread + messages, make it easy to have multiple simultaneous conversations + in the same stream. As a result, Zulip is more efficient than any + other chat product for catching up on conversations you missed while + you were away from your devices. You can read exactly the threads + that are important to you, and it feels natural to follow up on + conversations that happened while you were away. +

+ +

+ Zulip's vision is to create the world's best group chat software, + completely open source, so that everyone has the freedom to + customize, improve, and run their own copy of this essential piece + of collaboration infrastructure. +

+ +

+ Further information on the Zulip project and its + features can be found on + the Zulip open source project's + website and + the Zulip + documentation. +

+ +

Zulip Community

+ +

+ Zulip is developed by a vibrant community of developers from around + the world. Every month, dozens of people contribute code to it, and + dozens more contribute bug reports, feedback, and translations. The + Zulip community welcomes new contributors from any background. The + project has an easy to install development environment, an extensive + test suite, + and over 100,000 + words of developer documentation to make it easy for new + contributors to contribute effectively to the project. +

+ +

Contributing to Zulip

+ +

+ If you'd like to join the Zulip community, we'd love to have you! + Please + visit the + main Zulip project on GitHub for details on how to get involved! +

+ +

Zulip history

+ +

+ Zulip was originally developed by Zulip, Inc., a small startup in + Cambridge, Massachusetts. Zulip, Inc. was founded by the MIT team + that previously created + Ksplice, software for + live-patching a running Linux kernel. Zulip was inspired by + the Barnowl client for + the Zephyr + protocol, and the incredible community that Zephyr supported at MIT. +

+ +

+ Zulip, Inc. was acquired by Dropbox in early 2014, while the product + was still in private beta. Zulip's beta + users loved + Zulip's unique user experience and continued using it, despite + the fact that the product was not being actively developed. After a + year and a half, Dropbox generously decided to release Zulip as open + source software so that Zulip's users could continue enjoying the + software. +

+ +

+ As a result, the first time the public had the opportunity to use + Zulip was when Dropbox + released + Zulip as open source software in late 2015. The open sourcing + announcement was very popular, staying at the top of + both Hacker + News + and the + programming subreddit for an entire day. +

+ +

+ Zulip was open sourced with the complete version control history + intact because 10 Zulip users visited Dropbox for a full week to + help with the technical work. The Zulip community is incredibly + grateful to both Dropbox and those enthusiastic early users for + making the Zulip open source project possible. +

+ +

+ 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, more + than 150 people from all over the world have contributed + almost + 1000 pull requests 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. +

+ +
+

Contributors

+

+ Here, we recognize the top 100 contributors to + the Zulip server project on GitHub. +

+ + {% for row in data %} + {% for group in (row[0:3], row[3:6]) %} + {% for person in group %} + {% if person %} + + {% endif %} + {% endfor %} + {% endfor %} + {% endfor %} + +

+ Statistic last updated: {{ date }} +

+
+
+
+
+
{% endblock %} diff --git a/templates/zerver/authors.html b/templates/zerver/authors.html deleted file mode 100644 index 3b919013e9..0000000000 --- a/templates/zerver/authors.html +++ /dev/null @@ -1,43 +0,0 @@ -{% extends "zerver/portico.html" %} - -{% block portico_content %} -
- Contributors -
-
- {% for row in data %} -
- {% for group in (row[0:2], row[2:4]) %} -
- {# - Using tables here is a hack to work around the inflexible bootstrap v2.1.1 - grid system. - #} - - - {% for person in group %} - - {% endfor %} - -
- {% if person %} - -
- {{ _('Avatar') }} -
-
- @{{ person.name }}
- {{ person.commits }} commits -
-
- {% endif %} -
-
- {% endfor %} -
- {% endfor %} -
- Statistic last Updated: {{ date }} -
-
-{% endblock %} diff --git a/tools/update-authors-json b/tools/update-authors-json index 021405196d..f78313326f 100755 --- a/tools/update-authors-json +++ b/tools/update-authors-json @@ -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( diff --git a/tools/update-prod-static b/tools/update-prod-static index 28b4651474..e28b2b13c5 100755 --- a/tools/update-prod-static +++ b/tools/update-prod-static @@ -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") diff --git a/zerver/tests/test_docs.py b/zerver/tests/test_docs.py index 01b8ee0c19..6be2e8c4c8 100644 --- a/zerver/tests/test_docs.py +++ b/zerver/tests/test_docs.py @@ -137,7 +137,7 @@ class IntegrationTest(TestCase): context['subscriptions_html'], 'streams page') -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) diff --git a/zerver/views/users.py b/zerver/views/users.py index 0155a0242d..acc3a6641f 100644 --- a/zerver/views/users.py +++ b/zerver/views/users.py @@ -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, ) diff --git a/zproject/urls.py b/zproject/urls.py index 2ec8f9ed99..70aad0f44e 100644 --- a/zproject/urls.py +++ b/zproject/urls.py @@ -142,7 +142,7 @@ i18n_urls = [ url(r'^integrations/doc-html/(?P[^/]*)$', 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'),