Commit Graph

64 Commits

Author SHA1 Message Date
PIG208 4d3daa7ee0 portico: Add alert-box element to portico pages.
Fixes #17936 (the second time).
2021-04-26 09:28:04 -07:00
Anders Kaseorg 0868641ea4 Revert "static: Make alert-box available for portico pages."
This reverts commit a00f5dd90e (#17801).

That commit introduced a regression in the portico pages as described
in commit 85b3157b47.  Since that fix
introduced a regression of its own, we need to revert both commits for
now.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2021-04-01 15:25:23 -07:00
PIG208 a00f5dd90e static: Make alert-box available for portico pages. 2021-03-26 09:41:08 -07:00
Greg Price 6dbe84a47b portico: Add `isolated_page` context flag, to suppress site nav.
This flag allows rendering as a single isolated page, without the
navigation in header and footer that otherwise provides links to the
rest of the site.

The portico layout, including the styling of the "hero" area at top,
all remains the same.

We don't yet ever set this flag; that'll come next.
2020-01-29 11:32:27 -08:00
Anders Kaseorg fda70a5458 templates: Use just one webpack entry point per page.
Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
2019-10-28 15:53:15 -07:00
Anders Kaseorg 9b38bcc2a6 templates: Abstract render_bundle behind a Jinja2 macro.
Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
2019-09-17 16:06:33 -07:00
Priyank Patel 50b13219a3 webpack: Combine both js and css into one portico bundle.
Combines, both portico js and css into one bundle. This for now solve
the issue of an empty js bundle being generated by webpack for the
portico-styles stylesheet.
2018-04-30 10:23:39 -07:00
Armaan Ahluwalia 93ac40105f CSS: Move portico styles to webpack compilation.
static/styles/scss/portico.scss is now compiled by webpack
and supports SCSS syntax.

Changed the server-side templates to render the portico-styles
bundle instead of directly requiring the portico stylesheet. This
allows webpack to handle stylesheet compilation and minification.

We use the mini-css-extract-plugin to extract out css from the
includes in webpack and let webpacks production mode handle
minification. Currently we're not able to use it for dev mode
because it does not support HMR so we use style-loader instead.
Once the plugin supports HMR we can go on to use it for both
dev and prod.

The downside of this is that when reloading pages in the development
environment, there's an annoying flash of unstyled content :(.

It is now possible to make a change in any of the styles included
by static/styles/scss/portico.scss and see the code reload live
in the browser. This is because style-loader which we currently
use has the module.accept code built-in.
2018-04-27 09:04:50 -07:00
Tim Abbott 697fd3c69b templates: Fix duplicate inclusion of portico CSS.
Apparently, essentially every one of our landing pages extending
portico.html had two copies of portico.css included in their head
section; one from porticocustomhead (or the super of customhead) and
the other directly included.

Clean this up by removing all these duplicate inclusions of the
portico stylesheet.
2018-04-24 08:45:31 -07:00
Brock Whittaker a9a9333b2a portico: Show whether the user is logged in.
This creates a dropdown in place of the normal register/login links
you get when logged out, with an option to go to the app or log out if
that appears you click on the avatar.

A bit more work is needed to make this look really good, but it's a
great start.
2017-10-25 14:59:24 -07:00
Brock Whittaker ec43a6e718 portico: Add "porticocustomhead" block to base.html.
This adds a custom header to the base.html strictly for portico assets
that should not be overridden.
2017-10-25 14:47:54 -07:00
Brock Whittaker 5b3bd49061 portico: Enable content discrimination by platform.
This allows CSS to discriminate by platform and show particular
content; in this case showing things with the attribute
[if-zulip-desktop] content only on “ZulipElectron”.
2017-10-11 14:02:49 -07:00
Jack Zhang 182570d5f3 Deduplicate header markup for portico and portico-help templates. 2017-08-15 12:15:21 -07:00
Jack Zhang c546016964 portico: Add translations bundle to portico pages. 2017-08-10 10:21:53 -07:00
Brock Whittaker be33266f83 Make 4xx and 5xx pages full screen.
This makes the 4xx and 5xx pages full screen by changing the
`.error_page` div to be fixed and full screen height.
2017-08-08 11:58:22 -07:00
Brock Whittaker 38440d6ba4 Change product page nav and hero styling. 2017-07-17 16:12:36 -07:00
Jack Zhang c5cdede891 portico-css: Reposition header, portico-page content, and footer. 2017-07-07 15:29:43 -07:00
Tim Abbott ec6abddc38 portico: Remove obsolete code for Zulip open sourcing announcement.
This was only ever used on the old zulip.com.
2017-06-06 11:36:03 -07:00
Umair Khan ad5780c03e lint: Mark alt argument for translation. 2017-05-26 15:28:46 -07:00
Brock Whittaker 3fd3ae4199 Restyle /hello/ page.
This restyles the /hello/ page to be the new portico branding.
2017-05-09 16:31:57 -07:00
Brock Whittaker 89242da269 Remove .footer_padder in favor of proper screen tolerances.
This removes the .footer_padder element in favor of just having correct
min/max heights and margins on the footers.
2017-05-04 16:09:12 -07:00
K.Kanakhin 4891a8d850 Add default response for `terms` and `privacy` endpoints.
- Add setting for `privacy policy` template defining.
- Configure default templates for `privacy policy` and
  `terms of service` pages.
- Add route for privacy page.
- Remove condition for showing `privacy` and `terms` pages.
- Add `privacy_policy` setting to context processor.
- Add documentaion part for `privacy` and `terms` templates
  configuration.
- Add tests.

Fixes #3686.
2017-04-12 14:09:14 -07:00
adnrs96 e43f446b1e Clean portico.html to use 4 space indents. 2017-03-08 22:08:05 -08:00
Umair Khan 194ac99315 capitalization: Fix Log In. 2017-03-08 12:33:37 -08:00
adnrs96 22264d6086 Clean portico.html to use 4 space indents.
Tweaked manually by tabbott for minor formatting improvements.
2017-02-28 13:54:59 -08:00
Brock Whittaker 2592ea56bb Change portico navbar style.
This changes the portico navbar style to be in the new brand color
scheme along with removing the borders around the bottom nav bar.
2017-02-13 17:02:03 -08:00
Cynthia Lin 0efb806861 portico: Add links to 'Features' and 'User documentation' pages. 2017-02-02 12:25:58 -08:00
Rishi Gupta fdb47fc5ee find my team: Canonicalize URL route.
Change URL endpoint to use underscores, not dashes, and change name to use
the full path to the view function. See e.g. /create_realm.
2017-01-06 10:42:28 -08:00
Umair Khan f208813ea3 Add Find My Team feature. 2017-01-03 21:33:42 -08:00
Tim Abbott 0f4bbc8617 portico: Add options to disable login and about links.
This gives us a great deal more flexibility for controlling the
context of the portico footer.
2016-09-13 22:59:09 -07:00
Rishi Gupta 205fb996ec templates: Use realm_uri and server_uri settings for server URL.
The policy here is essentially:
* Pages on the central server (documentation, etc.) are server_uri.
* Pages associated with a user's realm server (anything logged-in, plus
  things like their login page) are realm_uri.
2016-08-13 16:37:45 -07:00
Rishi Gupta 902a7fbfe9 Change relative paths to absolute paths when we don't want the subdomain.
Changes relative path to an absolute path (that doesn't contain the
subdomain) for various links to
/create_realm, /api, /apps, /integrations, /hello, /terms, and the logged
out / (the Zulip in the upper left corner of portico)

I typically left links internal to the relevant pages (e.g. a link from
integrations.html to a subpage of integrations/) as relative links, and
changed external links from within the app to the absolute path (e.g. the
link to integrations from the gear menu).
2016-08-13 16:27:36 -07:00
acrefoot b7ccf64c79 Move Zulip's TOS to TERMS_OF_SERVICE markdown file.
This reimplements zulip.com/terms using the new markdown system.
2016-07-29 20:47:42 -07:00
acrefoot e568dbc76f Add TERMS_OF_SERVICE setting.
This new setting allows the server administrator to add a custom
Terms of Service page by supplying the path to a markdown file.

Also adds a test.
2016-07-29 20:47:31 -07:00
Tomasz Kolek 971939caba Fix extra footer bullet in portico.html when register_link_disabled.
Fixes: #1462.
2016-07-29 08:51:09 -07:00
Tim Abbott 82f78621dd settings: Extract CUSTOM_LOGO_URL. 2016-07-19 15:28:41 -07:00
Tim Abbott de679a23c9 settings: Extract settings.REGISTER_LINK_DISABLED. 2016-07-19 15:28:41 -07:00
Umair Khan 043ae8ad65 Upgrade to Django-Pipeline==1.6.8. 2016-07-09 07:09:55 -07:00
Vishnu Ks ad1c3894d9 Add interface for creating new realms.
This is controlled by settings.OPEN_REALM_CREATION; if that setting is
off, this feature doesn't do anything.
2016-06-17 16:15:28 -07:00
Umair Khan 5359e6b0d4 Convert Zulip to use Jinja2 templates.
This results in a substantial performance improvement for all of
Zulip's backend templates.

Changes in templates:
- Change `block.super` to `super()`.
- Remove `load` tag because Jinja2 doesn't support it.
- Use `minified_js()|safe` instead of `{% minified_js %}`.
- Use `compressed_css()|safe` instead of `{% compressed_css %}`.
- `forloop.first` -> `loop.first`.
- Use `{{ csrf_input }}` instead of `{% csrf_token %}`.
- Use `{# ... #}` instead of `{% comment %}`.
- Use `url()` instead of `{% url %}`.
- Use `_()` instead of `{% trans %}` because in Jinja `trans` is a block tag.
- Use `{% trans %}` instead of `{% blocktrans %}`.
- Use `{% raw %}` instead of `{% verbatim %}`.

Changes in tools:
- Check for `trans` block in `check-templates` instead of `blocktrans`

Changes in backend:
- Create custom `render_to_response` function which takes `request` objects
  instead of `RequestContext` object. There are two reasons to do this:
    1. `RequestContext` is not compatible with Jinja2
    2. `RequestContext` in `render_to_response` is deprecated.
- Add Jinja2 related support files in zproject/jinja2 directory. It
  includes a custom backend and a template renderer, compressors for js
  and css and Jinja2 environment handler.
- Enable `slugify` and `pluralize` filters in Jinja2 environment.

Fixes #620.
2016-05-09 09:55:18 -07:00
Ahmed Shibani 4f29cfee9e Mark strings for translation in templates/zerver
In order to enable internationalization support in Zulip, and to use
Django internationalization tools, all strings in Zulip frontend needs
to be marked for translation.
2015-11-03 23:06:31 -08:00
Allen Rabinovich d6a41b4fe3 Add announcement of open sourcing to certain zulip.com pages. 2015-09-25 12:07:55 -07:00
Tim Abbott 51841d5bcb Fix terms of service and Dropbox logo on website.
(imported from commit 29c838fbd3aa495bb85b730b134b31f544de7a8b)
2015-08-22 14:33:15 -07:00
David Roe f79adf830f deployed => production
(imported from commit 2d7b0a7a73b0c84b32634a88af1e0d666139d4ff)
2015-08-21 10:33:35 -07:00
Anders Kaseorg bded0d9d54 Remove corporate beta signup form
(imported from commit 1b3a0cd8a59a124905fa4cbd3121a78d23aeb3a2)
2015-08-20 18:40:34 -07:00
David Roe dedc83e5dd Switch links on login page to the register page in Dev VM.
(imported from commit 16e285b2d8f3c5124eaef0b20aa1097d4a1934d0)
2015-08-19 22:24:53 -07:00
David Roe 81d0f7c172 Switch copyright clause on signup page to link to /hello.
(imported from commit 77b711acf017a3b17da8fe4e167f2f9263e6cf19)
2015-08-18 10:52:28 -07:00
David Roe 147304c676 Remove +Dropbox from login logo
(imported from commit f4f811ae33122d5fd2f226ec45f2ca7bd759a148)
2015-08-18 10:52:09 -07:00
Zev Benjamin 2c760ae735 Remove mixpanel
(imported from commit 9b6cc58ee9be483db8bf2d2eaaaecabc14f821e4)
2015-02-06 13:59:30 -08:00
Allen Rabinovich 0b44b7eb4c Switch to a Zulip+Dropbox logo in the header
(imported from commit bbd36b362f4480c83455981fce1c05faca5acabe)
2014-04-16 22:24:35 -07:00