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).
This commit is contained in:
Rishi Gupta
2016-08-12 14:15:56 -07:00
committed by Tim Abbott
parent dff43fcc5e
commit 902a7fbfe9
7 changed files with 16 additions and 16 deletions

View File

@@ -359,7 +359,7 @@ function finale(skip) {
if (page_params.prompt_for_invites) {
alert_contents = "<i class='icon-vector-heart alert-icon'></i>It's lonely in here! <a href='#invite-user' data-toggle='modal'>Invite some users</a>.";
} else {
alert_contents = "<i class='icon-vector-desktop alert-icon'></i>What's better than " + page_params.product_name + " in your browser? The <a href='/apps' target='_blank'>"+ page_params.product_name + " desktop app</a>!";
alert_contents = "<i class='icon-vector-desktop alert-icon'></i>What's better than " + page_params.product_name + " in your browser? The <a href='" + page_params.server_uri + "/apps' target='_blank'>"+ page_params.product_name + " desktop app</a>!";
}
show_app_alert(alert_contents);
@@ -384,7 +384,7 @@ function finale(skip) {
if (stream_data.in_home_view(page_params.notifications_stream)) {
send_delayed_stream_message(page_params.notifications_stream, "welcome", "Practice sending sending some messages here, or starting a new topic.", 15);
send_delayed_stream_message(page_params.notifications_stream, page_params.product_name + " tips", "Here's a message on a new topic: `" + page_params.product_name + " tips`.\n\nAs you settle into " + page_params.product_name + ", customize your account and notifications on your [Settings page](#settings).", 30);
send_delayed_stream_message(page_params.notifications_stream, page_params.product_name + " tips", "You might also enjoy:\n\n* Our lightweight !modal_link(#markdown-help, message formatting) (including emoji! :thumbsup:)\n* !modal_link(#keyboard-shortcuts, Keyboard shortcuts)\n* [Desktop and mobile apps](/apps)", 40);
send_delayed_stream_message(page_params.notifications_stream, page_params.product_name + " tips", "You might also enjoy:\n\n* Our lightweight !modal_link(#markdown-help, message formatting) (including emoji! :thumbsup:)\n* !modal_link(#keyboard-shortcuts, Keyboard shortcuts)\n* [Desktop and mobile apps](" + page_params.server_uri + "/apps)", 40);
}
if (work_stream !== undefined) {

View File

@@ -308,8 +308,8 @@
<div class="bot-settings-form">
{{#tr this}}
<p class="bot-settings-note">Looking for our <a href="/integrations" target="_blank">Integrations</a>
or <a href="/api" target="_blank">API</a> documentation?</p>
<p class="bot-settings-note">Looking for our <a href="{{ server_uri }}/integrations" target="_blank">Integrations</a>
or <a href="{{ server_uri }}/api" target="_blank">API</a> documentation?</p>
{{/tr}}
<ol id="bots_list">

View File

@@ -39,7 +39,7 @@ the registration flow has its own (nearly identical) copy of the fields below in
#}
<input id="id_terms" class="required" type="checkbox" name="terms"
{% if form.terms.value() %}checked="checked"{% endif %} />
{{ _("I agree to the") }} <a href="/terms">{{ _("Terms of Service") }}</a>.
{{ _("I agree to the") }} <a href="{{ external_uri_scheme }}{{ external_host }}/terms">{{ _("Terms of Service") }}</a>.
</label>
{% if form.terms.errors %}
{% for error in form.terms.errors %}

View File

@@ -138,13 +138,13 @@
<div class="feature-block left">
<i class="icon-vector-mobile-phone icon-vector-3x feature-icon"></i>
<h4>{% trans %}Mobile apps{% endtrans %}</h4>
<p>{% trans %}Check Zulip on the go with native <a href="/apps">iOS and
<p>{% trans %}Check Zulip on the go with native <a href="{{ external_uri_scheme }}{{ external_host }}/apps">iOS and
Android apps</a>{% endtrans %}.</p>
</div>
<div class="feature-block">
<i class="icon-vector-desktop icon-vector-3x feature-icon"></i>
<h4>{% trans %}Desktop apps{% endtrans %}</h4>
<p>{% trans %}Prefer Zulip in its own window and rich, OS-level notifications?
Enjoy <a href="/apps">Zulip on your desktop</a>{% endtrans %}.</p>
Enjoy <a href="{{ external_uri_scheme }}{{ external_host }}/apps">Zulip on your desktop</a>{% endtrans %}.</p>
</div>
{% endblock %}

View File

@@ -71,17 +71,17 @@
</li>
<li class="divider"></li>
<li title="Desktop & mobile apps">
<a href="/apps" target="_blank" role="button">
<a href="{{ external_uri_scheme }}{{ external_host }}/apps" target="_blank" role="button">
<i class="icon-vector-desktop"></i> {{ _('Desktop & mobile apps') }}
</a>
</li>
<li title="Integrations">
<a href="/integrations" target="_blank" role="button">
<a href="{{ external_uri_scheme }}{{ external_host }}/integrations" target="_blank" role="button">
<i class="icon-vector-github"></i> {{ _('Integrations') }}
</a>
</li>
<li title="API documentation">
<a href="/api" target="_blank" role="button">
<a href="{{ external_uri_scheme }}{{ external_host }}/api" target="_blank" role="button">
<i class="icon-vector-sitemap"></i> {{ _('API documentation') }}
</a>
</li>

View File

@@ -16,9 +16,9 @@
<div class="column-left">
<div>
{% if custom_logo_url %}
<a class="brand logo" href="/"><img src="{{ custom_logo_url }}" class="portico-logo" alt="Zulip" content="Zulip" /></a>
<a class="brand logo" href="{{ external_uri_scheme }}{{ external_host }}/"><img src="{{ custom_logo_url }}" class="portico-logo" alt="Zulip" content="Zulip" /></a>
{% else %}
<a class="brand logo" href="/"><img src="/static/images/logo/zulipcornerlogo@2x.png" class="portico-simple-logo" alt="Zulip" content="Zulip" /></a>
<a class="brand logo" href="{{ external_uri_scheme }}{{ external_host }}/"><img src="/static/images/logo/zulipcornerlogo@2x.png" class="portico-simple-logo" alt="Zulip" content="Zulip" /></a>
{% endif %}
</div>
</div>
@@ -52,10 +52,10 @@
<div class="footer">
<div class="footer-main">
<ul class="footer-navigation">
<li><a href="/hello">{{ _('About') }}</a></li>
<li><a href="{{ external_uri_scheme }}{{ external_host }}/hello">{{ _('About') }}</a></li>
{% if terms_of_service %}
<li><span class="little-bullet">·</span></li>
<li><a href="/terms">{{ _('Legal') }}</a></li>
<li><a href="{{ external_uri_scheme }}{{ external_host }}/terms">{{ _('Legal') }}</a></li>
{% endif %}
<li><span class="little-bullet">·</span></li>
<li><a href="{{login_url}}">{{ _('Log in') }}</a></li>
@@ -70,7 +70,7 @@
</li>
<li>
{% if open_realm_creation %}
<a href="/create_realm">{{ _('Create new organization') }}</a>
<a href="{{ external_uri_scheme }}{{ external_host }}/create_realm">{{ _('Create new organization') }}</a>
{% endif %}
</li>
{% endif %}

View File

@@ -106,7 +106,7 @@ Form is validated both client-side using jquery-validate (see signup.js) and ser
#}
<input id="id_terms" class="required" type="checkbox" name="terms"
{% if form.terms.value() %}checked="checked"{% endif %} />
{{ _('I agree to the') }} <a href="/terms" target="_blank">{{ _('Terms of Service') }}</a>.
{{ _('I agree to the') }} <a href="{{ external_uri_scheme }}{{ external_host }}/terms" target="_blank">{{ _('Terms of Service') }}</a>.
</label>
{% if form.terms.errors %}
{% for error in form.terms.errors %}