Skip to content

Commit

Permalink
Replace unicode check with new svg icon
Browse files Browse the repository at this point in the history
A good bit of CSS was required to keep the text color changing along
with the text it is nestled within.

Also: took this opportunity to increase the contrast of the number and
verified section right under the contact name in the group members view.

FREEBIE
  • Loading branch information
scottnonnenberg committed Aug 4, 2017
1 parent 688cae6 commit 47c5142
Show file tree
Hide file tree
Showing 9 changed files with 74 additions and 4 deletions.
4 changes: 2 additions & 2 deletions background.html
Expand Up @@ -80,7 +80,7 @@ <h3>{{ welcomeToSignal }}</h3>
<span class='conversation-number'>{{ number }}</span>
{{ /number }}
{{ #isVerified }}
<span class='verified'> {{ verified }}</span>
<span class='verified'><span class='verified-icon'></span> {{ verified }}</span>
{{ /isVerified }}
</script>
<script type='text/x-tmpl-mustache' id='conversation'>
Expand Down Expand Up @@ -251,7 +251,7 @@ <h3>{{ welcomeToSignal }}</h3>
</script>
<script type='text/x-tmpl-mustache' id='contact_name_and_number'>
<h3 class='name' dir='auto'> {{ title }} </h3>
<div class='number'>{{ #isVerified }} {{ verified }} &middot;{{ /isVerified }} {{ number }}</div>
<div class='number'>{{ #isVerified }}<span class='verified-icon'></span> {{ verified }} &middot;{{ /isVerified }} {{ number }}</div>
</script>
<script type='text/x-tmpl-mustache' id='contact'>
{{> avatar }}
Expand Down
2 changes: 2 additions & 0 deletions images/verified-check.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions stylesheets/_conversation.scss
Expand Up @@ -21,6 +21,13 @@
padding: 0 5px 0 4px;
}
}
.conversation-title .verified-icon {
@include color-svg('/images/verified-check.svg', white);
display: inline-block;
width: 1.25em;
height: 1.25em;
vertical-align: text-bottom;
}

.conversation {
background-color: white;
Expand Down
8 changes: 8 additions & 0 deletions stylesheets/_global.scss
Expand Up @@ -393,6 +393,14 @@ $avatar-size: 44px;
&.not-clickable {
cursor: default;
}

.verified-icon {
@include color-svg('/images/verified-check.svg', $grey);
display: inline-block;
width: 1.25em;
height: 1.25em;
vertical-align: text-bottom;
}
}


Expand Down
3 changes: 3 additions & 0 deletions stylesheets/_index.scss
Expand Up @@ -95,6 +95,9 @@
background-color: $grey_l !important;
color: $grey_d;
border-color: rgba(0,0,0,0.05);
.verified-icon {
@include color-svg('/images/verified-check.svg', $grey_d);
}
}

.tool-bar {
Expand Down
5 changes: 5 additions & 0 deletions stylesheets/_ios.scss
Expand Up @@ -65,7 +65,12 @@ $ios-border-color: rgba(0,0,0,0.1);

.conversation-title {
line-height: $header-height;

.verified-icon {
@include color-svg('/images/verified-check.svg', #454545);
}
}

.avatar { display: none; }
}
.settings h3,
Expand Down
10 changes: 10 additions & 0 deletions stylesheets/android-dark.scss
Expand Up @@ -4,6 +4,7 @@ $grey-dark_l3: darken($grey-dark_l2, 7%);
$grey-dark_l4: darken($grey-dark_l3, 8%);
$button-dark: #ccc;
$text-dark: #CCCCCC;
$text-dark_l2: darken($text-dark, 30%);

.android-dark {
.gutter .content {
Expand Down Expand Up @@ -66,6 +67,12 @@ $text-dark: #CCCCCC;
.contact-details .name {
font-weight: 400;
}
.contact-details .number {
color: $text-dark_l2;
.verified-icon {
@include color-svg('/images/verified-check.svg', $text-dark_l2);
}
}
.group-member-list .members .contact, .new-group-update .members .contact, .attachment-previews img {
background-color: $grey-dark_l3;
border-color: $grey-dark;
Expand All @@ -82,6 +89,9 @@ $text-dark: #CCCCCC;
.inactive .conversation-header {
background-color: $grey-dark !important;
color: $text-dark;
.verified-icon {
@include color-svg('/images/verified-check.svg', $text-dark);
}
}
.sent .status {
display: inline-block;
Expand Down
35 changes: 35 additions & 0 deletions stylesheets/manifest.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions test/index.html
Expand Up @@ -94,7 +94,7 @@ <h3>{{ welcomeToSignal }}</h3>
<span class='conversation-number'>{{ number }}</span>
{{ /number }}
{{ #isVerified }}
<span class='verified'> {{ verified }}</span>
<span class='verified'><span class='verified-icon'></span> {{ verified }}</span>
{{ /isVerified }}
</script>
<script type='text/x-tmpl-mustache' id='conversation'>
Expand Down Expand Up @@ -236,7 +236,7 @@ <h3>{{ welcomeToSignal }}</h3>
</script>
<script type='text/x-tmpl-mustache' id='contact_name_and_number'>
<h3 class='name' dir='auto'> {{ title }} </h3>
<div class='number'>{{ #isVerified }} {{ verified }} &middot;{{ /isVerified }} {{ number }}</div>
<div class='number'>{{ #isVerified }}<span class='verified-icon'></span> {{ verified }} &middot;{{ /
</script>
<script type='text/x-tmpl-mustache' id='contact'>
{{> avatar }}
Expand Down

0 comments on commit 47c5142

Please sign in to comment.