Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

icons: Replace fa-globe icon with a custom globe icon.

Aman Agrawal7e365f7ee321
diff --git a/static/assets/icons/globe.svg b/static/assets/icons/globe.svg
new file mode 100644
index 00000000000..669e9737a4e
--- /dev/null
+++ b/static/assets/icons/globe.svg
@@ -0,0 +1,38 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN"
+ "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
+<svg version="1.0" xmlns="http://www.w3.org/2000/svg"
+ width="512.000000pt" height="512.000000pt" viewBox="0 0 512.000000 512.000000"
+ preserveAspectRatio="xMidYMid meet">
+
+<g transform="translate(0.000000,512.000000) scale(0.100000,-0.100000)"
+fill="#000000" stroke="none">
+<path d="M2380 5114 c-19 -2 -78 -9 -130 -14 -330 -36 -695 -160 -990 -336
+-375 -224 -680 -529 -904 -904 -175 -292 -291 -632 -338 -990 -16 -123 -16
+-497 0 -620 82 -623 356 -1150 820 -1581 256 -239 575 -425 922 -539 274 -91
+491 -124 800 -124 228 0 329 9 530 50 689 141 1304 583 1674 1204 175 292 291
+632 338 990 16 123 16 497 0 620 -47 358 -163 698 -338 990 -224 375 -529 680
+-904 904 -289 173 -634 291 -980 336 -88 12 -438 21 -500 14z m281 -320 c109
+-55 219 -193 320 -399 81 -167 125 -292 184 -517 l43 -168 -648 0 -648 0 43
+168 c59 225 103 350 184 517 114 233 237 376 360 416 38 12 123 3 162 -17z
+m-695 -86 c-143 -232 -277 -596 -346 -940 l-11 -58 -495 0 c-272 0 -494 3
+-494 6 0 12 95 152 159 234 271 349 667 627 1086 760 55 17 105 33 110 35 6 2
+12 4 14 4 1 1 -9 -18 -23 -41z m1254 14 c428 -128 845 -415 1121 -772 64 -82
+159 -222 159 -234 0 -3 -222 -6 -494 -6 l-495 0 -11 58 c-69 344 -203 708
+-346 940 -16 25 -21 40 -13 38 8 -3 43 -14 79 -24z m-1664 -1334 c-7 -31 -23
+-174 -38 -338 -7 -79 -12 -283 -12 -495 0 -342 5 -428 40 -762 l7 -63 -550 0
+-550 0 -36 113 c-73 224 -104 401 -114 637 -11 296 33 570 142 883 l17 47 549
+0 549 0 -4 -22z m1704 15 c0 -5 5 -37 10 -73 59 -391 63 -993 11 -1450 l-16
+-145 -705 0 -705 0 -16 145 c-52 457 -48 1059 11 1450 5 36 10 68 10 73 0 4
+315 7 700 7 385 0 700 -3 700 -7z m1415 -40 c183 -524 192 -1014 28 -1520
+l-36 -113 -550 0 -550 0 7 63 c35 334 40 420 40 762 0 212 -5 416 -12 495 -15
+164 -31 307 -38 338 l-4 22 549 0 549 0 17 -47z m-3043 -2063 c77 -344 198
+-667 334 -888 16 -25 21 -40 13 -38 -8 3 -43 14 -79 24 -411 123 -813 393
+-1085 727 -74 91 -205 280 -205 296 0 5 216 8 497 7 l497 -3 28 -125z m1578
+123 c0 -24 -94 -364 -125 -453 -84 -243 -230 -494 -341 -586 -76 -64 -110 -78
+-184 -78 -74 0 -108 14 -184 78 -111 92 -257 343 -341 586 -31 89 -125 429
+-125 453 0 4 293 7 650 7 358 0 650 -3 650 -7z m1300 -2 c0 -4 -30 -53 -66
+-107 -302 -453 -738 -773 -1262 -928 l-54 -15 26 42 c134 217 258 545 330 872
+15 66 29 126 31 133 3 9 112 12 500 12 274 0 495 -4 495 -9z"/>
+</g>
+</svg>
diff --git a/static/js/message_view_header.js b/static/js/message_view_header.js
index c670ca20e44..3995d79faea 100644
--- a/static/js/message_view_header.js
+++ b/static/js/message_view_header.js
@@ -34,6 +34,12 @@ function make_message_view_header(filter) {
}
message_view_header.title = filter.get_title();
message_view_header.icon = filter.get_icon();
+ if (message_view_header.icon === "globe") {
+ // This is a bit hacky, but it works as a way to communicate
+ // to the HTML template that we need to use the different HTML
+ // required for the globe icon.
+ message_view_header.web_public_stream = true;
+ }
if (filter.has_operator("stream") && !filter._sub) {
message_view_header.sub_count = "0";
message_view_header.formatted_sub_count = "0";
diff --git a/static/styles/compose.css b/static/styles/compose.css
index c48fad55b74..09a512062db 100644
--- a/static/styles/compose.css
+++ b/static/styles/compose.css
@@ -133,8 +133,11 @@
#compose-globe-icon {
top: 1px;
- left: 4.5px;
- padding-right: 2px;
+ left: 3.5px;
+
+ .zulip-icon-globe {
+ font-size: 12px;
+ }
}
.message_header {
diff --git a/static/styles/left_sidebar.css b/static/styles/left_sidebar.css
index 3308773580e..13d89a3b42f 100644
--- a/static/styles/left_sidebar.css
+++ b/static/styles/left_sidebar.css
@@ -31,6 +31,12 @@ $topic_resolve_width: 13px;
font-weight: 800;
min-width: $left_col_size;
text-align: center;
+
+ .zulip-icon.zulip-icon-globe {
+ font-size: 12px;
+ position: relative;
+ top: 1px;
+ }
}
/* Ideally we'd handle hashtags using an <i> and just have a single rule here. */
diff --git a/static/styles/zulip.css b/static/styles/zulip.css
index 038bf8f8e03..9f9acd2375b 100644
--- a/static/styles/zulip.css
+++ b/static/styles/zulip.css
@@ -1088,7 +1088,12 @@ td.pointer {
.recipient-row-stream-icon {
font-size: 12px;
- line-height: 17px;
+ line-height: 12px;
+ }
+
+ .zulip-icon.zulip-icon-globe {
+ position: relative;
+ top: 1px;
}
&:hover {
@@ -1744,6 +1749,10 @@ div.focused_table {
display: none;
}
+ .zulip-icon.zulip-icon-globe {
+ font-size: 14px;
+ }
+
.sub_count,
.stream,
& > span {
diff --git a/static/templates/compose.hbs b/static/templates/compose.hbs
index 31820bc9449..c2ca696dc4b 100644
--- a/static/templates/compose.hbs
+++ b/static/templates/compose.hbs
@@ -78,7 +78,7 @@
<i class="fa fa-lock" title="{{t 'This is a private stream' }}" aria-hidden="true"></i>
</span>
<span id="compose-globe-icon">
- <i class="fa fa-globe" title="{{t 'This is a web-public stream' }}" aria-hidden="true"></i>
+ <i class="zulip-icon zulip-icon-globe" title="{{t 'This is a web-public stream' }}" aria-hidden="true"></i>
</span>
<input type="text" class="recipient_box" name="stream_message_recipient_stream" id="stream_message_recipient_stream" maxlength="30" value="" placeholder="{{t 'Stream' }}" autocomplete="off" tabindex="0" aria-label="{{t 'Stream' }}" />
<i class="fa fa-angle-right" aria-hidden="true"></i>
diff --git a/static/templates/navbar_icon_and_title.hbs b/static/templates/navbar_icon_and_title.hbs
index 50066f452ba..79e76625669 100644
--- a/static/templates/navbar_icon_and_title.hbs
+++ b/static/templates/navbar_icon_and_title.hbs
@@ -1,4 +1,6 @@
-{{#if icon}}
+{{#if web_public_stream}}
+<i class="zulip-icon zulip-icon-globe" aria-hidden="true"></i>
+{{else if icon}}
<i class="fa fa-{{icon}}" aria-hidden="true"></i>
{{/if}}
{{title}}
diff --git a/static/templates/recipient_row.hbs b/static/templates/recipient_row.hbs
index a761c15df1b..8ed0fc8eadc 100644
--- a/static/templates/recipient_row.hbs
+++ b/static/templates/recipient_row.hbs
@@ -13,7 +13,7 @@
{{/if}}
{{~#if is_web_public ~}}
- <i class="fa fa-globe recipient-row-stream-icon" title="{{t 'This is a web-public stream' }}" aria-label="{{t 'This is a web-public stream' }}"></i>
+ <i class="zulip-icon zulip-icon-globe recipient-row-stream-icon" title="{{t 'This is a web-public stream' }}" aria-label="{{t 'This is a web-public stream' }}"></i>
{{/if}}
{{~! Recipient (e.g. stream/topic or topic) ~}}
diff --git a/static/templates/stream_privacy.hbs b/static/templates/stream_privacy.hbs
index 512483864c3..1f49a3a7fa5 100644
--- a/static/templates/stream_privacy.hbs
+++ b/static/templates/stream_privacy.hbs
@@ -2,7 +2,7 @@
{{#if invite_only}}
<i class="fa fa-lock" aria-hidden="true"></i>
{{else if is_web_public}}
-<i class="fa fa-globe" aria-hidden="true"></i>
+<i class="zulip-icon zulip-icon-globe" aria-hidden="true"></i>
{{else}}
<span class="hashtag"></span>
{{/if}}
diff --git a/static/templates/stream_settings/stream_privacy_icon.hbs b/static/templates/stream_settings/stream_privacy_icon.hbs
index 9b3c22545dd..83b45cd8e72 100644
--- a/static/templates/stream_settings/stream_privacy_icon.hbs
+++ b/static/templates/stream_settings/stream_privacy_icon.hbs
@@ -5,7 +5,7 @@
</div>
{{else if is_web_public}}
<div class="large-icon" style="color: {{color}}">
- <i class="fa fa-globe" aria-hidden="true"></i>
+ <i class="zulip-icon zulip-icon-globe" aria-hidden="true"></i>
</div>
{{else}}
<div class="large-icon hash" style="color: {{color}}"></div>
diff --git a/static/templates/stream_settings/subscription_setting_icon.hbs b/static/templates/stream_settings/subscription_setting_icon.hbs
index 5036701cd94..8077d4df8d0 100644
--- a/static/templates/stream_settings/subscription_setting_icon.hbs
+++ b/static/templates/stream_settings/subscription_setting_icon.hbs
@@ -3,7 +3,7 @@
{{#if invite_only}}
<i class="fa fa-lock" aria-hidden="true"></i>
{{else if is_web_public}}
- <i class="fa fa-globe fa-lg" aria-hidden="true"></i>
+ <i class="zulip-icon zulip-icon-globe fa-lg" aria-hidden="true"></i>
{{else}}
<span class="hashtag">#</span>
{{/if}}
diff --git a/templates/zerver/help/web-public-streams.md b/templates/zerver/help/web-public-streams.md
index 18e29475ba5..a822fba9764 100644
--- a/templates/zerver/help/web-public-streams.md
+++ b/templates/zerver/help/web-public-streams.md
@@ -17,8 +17,7 @@ Zulip web application without needing to create an account.
Users who wish to post content will need to create an account in order
to do so.
-Web-public streams are indicated with a globe (<i class="fa
-fa-globe"></i>) icon.
+Web-public streams are indicated with a globe (<i class="zulip-icon zulip-icon-globe"></i>) icon.
## Enabling web-public streams in your organization
diff --git a/templates/zerver/team.html b/templates/zerver/team.html
index 457fa7bb697..7abe52a29f3 100644
--- a/templates/zerver/team.html
+++ b/templates/zerver/team.html
@@ -87,7 +87,7 @@
<div class="contributors-list">
<input id="total" type="radio" name="tabs" checked />
- <label for="total"><i class="fa fa-globe" aria-hidden="true"></i>&nbsp; Total</label>
+ <label for="total"><i class="zulip-icon zulip-icon-globe" aria-hidden="true"></i>&nbsp; Total</label>
<input id="server" type="radio" name="tabs" />
<label for="server"><i class="fa fa-server" aria-hidden="true"></i>&nbsp; Server</label>