Skip to content
This repository has been archived by the owner on Jun 3, 2024. It is now read-only.

Commit

Permalink
update link behaviour on share modal
Browse files Browse the repository at this point in the history
  • Loading branch information
jlaville committed Nov 22, 2018
1 parent 24b0f66 commit 6edf72d
Show file tree
Hide file tree
Showing 14 changed files with 1,881 additions and 1,811 deletions.
599 changes: 301 additions & 298 deletions language/message/br_FR.po

Large diffs are not rendered by default.

625 changes: 316 additions & 309 deletions language/message/de_DE.po

Large diffs are not rendered by default.

512 changes: 254 additions & 258 deletions language/message/en_GB.po

Large diffs are not rendered by default.

626 changes: 315 additions & 311 deletions language/message/es_ES.po

Large diffs are not rendered by default.

632 changes: 320 additions & 312 deletions language/message/fr_FR.po

Large diffs are not rendered by default.

628 changes: 316 additions & 312 deletions language/message/it_IT.po

Large diffs are not rendered by default.

Binary file modified public/fonts/icomoon.eot
Binary file not shown.
2 changes: 2 additions & 0 deletions public/fonts/icomoon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified public/fonts/icomoon.ttf
Binary file not shown.
Binary file modified public/fonts/icomoon.woff
Binary file not shown.
4 changes: 2 additions & 2 deletions src/modals/share.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ export default class Share {
url.select()
document.execCommand('copy')
url.blur()
await this.modal.panel.toggleClassName(.5, '#share-copy-status', 'share__copy_status--hidden')
this.modal.panel.toggleClassName(.5, '#share-copy-status', 'share__copy_status--hidden')
await this.modal.panel.addClassName(10, '#share-copy-container', 'share_copy__container--status')
this.modal.panel.removeClassName(0, '#share-copy-container', 'share_copy__container--status')
}

close () {
Expand Down
7 changes: 7 additions & 0 deletions src/scss/includes/font.scss
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@

.icon-pin_geoloc:before {
content: "\e90d";
color: #5c6f84;
}
.icon-check:before {
content: "\e91c";
}
.icon-chevron-left:before {
content: "\e913";
Expand All @@ -38,6 +42,9 @@
.icon-chevrons-right:before {
content: "\e911";
}
.icon-copy:before {
content: "\e91b";
}
.icon-corner-up-right:before {
content: "\e90f";
}
Expand Down
41 changes: 35 additions & 6 deletions src/scss/includes/modals/share.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
display: block;
width: 100%;
margin-bottom: 5px;
padding: 10px 12px;
padding: 20px 12px;
background-color: $background;
border: solid 1px $separator_color;
font-size: 14px;
Expand All @@ -26,20 +26,49 @@
padding-right: 6px;
}

.share__copy_link {
.share_copy__link {
font-size: 12px;
font-weight: bold;
color: $secondary_text;
cursor: pointer;
}

.share__copy_status {
.share_copy__status {
margin-left: 15px;
font-size: 13px;
color: $secondary_text;
color: $secondary_variant_text;
transition: color .2s;
}

.share__copy_status--hidden {
color: transparent;
.share_copy__status__icon {
font-size: 14px;
}

.share_copy__input__container {
position: relative;
}

.share_copy__container { /* show link */
position: absolute;
top: 1px;
right: 2px;

.share__copy_link {
display: block;
}

.share_copy__status {
display: none;
}
}

.share_copy__container--status {
.share_copy__link {
display: none;
}

.share_copy__status {
display: block;
}
}

16 changes: 13 additions & 3 deletions src/views/share_modal.dot
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,19 @@
<h2 class="modal__title">{{= _('Share favorite', 'share') }}</h2>

<span class="modal__subtitle">{{= _('Share link', 'share') }}</span>
<input id="share_url_data" value="{{= this.shareUrl }}" type="text"></input>
<button class="share__copy_link" {{= click(this.copy, this) }}>{{= _('COPY LINK' , 'share') }}</button>
<span id="share-copy-status" class="share__copy_status share__copy_status--hidden">{{= _('Link copied', 'share') }}</span>
<div class="share_copy__input__container" {{= click(this.copy, this) }}>
<input id="share_url_data" value="{{= this.shareUrl }}" type="text"></input>
<div class="share_copy__container" id="share-copy-container">
<button class="share_copy__link">
<i class="icon-copy"></i>
</button>
<span class="share_copy__status">
<i class="icon-check share_copy__status__icon"></i>
{{= _('Copied !', 'share') }}
</span>
</div>
</div>

<hr class="modal__hr">
<i class="share__icons icon-facebook"></i>
<a rel="noopener noreferrer" target="_blank" {{= this.openPopup() }} href="{{= this.facebookTemplate(this.shareUrl) }}" class="share__link">
Expand Down

0 comments on commit 6edf72d

Please sign in to comment.