Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #2155 - add thanks.jst msg #2278

Merged
merged 1 commit into from
Mar 21, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion webcompat/static/css/src/button.css
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

.button {
display: inline-block;
padding: 12px 23px;
padding: var(--button-primary-padding);
color: inherit;
border: 0;
border-radius: 5px;
Expand All @@ -25,6 +25,12 @@
color: var(--color-bg-page);
}

.button-thanks {
margin-right: 10px;
padding: var(--button-thanks-padding);
text-decoration: none;
}

.button:hover,
.button-primary:hover,
.button-secondary:hover {
Expand Down
8 changes: 8 additions & 0 deletions webcompat/static/css/src/notification-bar.css
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,11 @@
border-bottom-color: var(--color-error);
color: var(--color-bg-box);
}

.notification-thanks {
position: static;
z-index: unset;
line-height: unset;
text-align: unset;
height: unset;
}
2 changes: 2 additions & 0 deletions webcompat/static/css/src/variables.css
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
--unit-modul-l: calc(910px - var(--unit-space)); /* x3 grid unit */
--unit-modul-m: calc(2 / 3 * var(--unit-modul-l) - var(--unit-space)); /* x2 grid unit */
--unit-modul-s: calc(1 / 3 * var(--unit-modul-l) - var(--unit-space)); /* x1 grid unit */
--button-primary-padding: 12px 23px;
--button-thanks-padding: 7px 10px;
--color-bg-page: rgba(250, 250, 250, 1); /* #fafafa; */
--color-bg-box: rgba(255, 255, 255, 1); /* #ffffff */
--color-bg-comment-header: rgba(245, 245, 245, 1); /* #f5f5f5 */
Expand Down
4 changes: 2 additions & 2 deletions webcompat/static/js/lib/flash-message.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,10 @@ var FlashMessageView = Backbone.View.extend({
},
showThanks: function(opts) {
var buildTemplate = wcTmpl["issue/thanks.jst"];
this.$el.addClass("is-active notification-thanks");
this.$el.addClass("is-active notification-thanks grid-cell x3");
this.$el
.html(buildTemplate({ number: opts.message }))
.insertBefore("#js-Issue-information")
.insertBefore(".js-Issue")
.show();
},
hide: function() {
Expand Down
13 changes: 7 additions & 6 deletions webcompat/templates/issue/thanks.jst
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
<script type="text/template">
<h4>Thanks for reporting an issue!</h4>
<p>You're helping us make the web a better place to work and play.</p>
<p>Tell your friends about the bug you just filed:</p>
<a class="wc-Button wc-Button--action"
<section>
<h4 class="headline-1">Thanks for reporting an issue!</h4>
<p>You're helping us make the web a better place to work and play. Tell your friends about the bug you just filed:</p>
<a class="button button-primary button-thanks"
href="https://twitter.com/intent/tweet?text=<%- encodeURIComponent("I just filed a bug on the internet:") %>&url=<%- encodeURIComponent("https://webcompat.com/issues/") %><%= number %>&via=webcompat"
target="_blank">Share on Twitter</a>
<a class="wc-Button wc-Button--action"
<a class="button button-primary button-thanks"
href="https://facebook.com/sharer/sharer.php?u=<%- encodeURIComponent("https://webcompat.com/issues/") %><%= number %>"
target="_blank">Share on Facebook</a>
</script>
</section>
</script>