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

Enable Dope (Dark) Mode on TownSquare 🌙 #6245

Closed
wants to merge 49 commits into from
Closed
Show file tree
Hide file tree
Changes from 33 commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
371dbdc
Update index.html
molecula451 Mar 17, 2020
0a259e0
Update townsquare.js
molecula451 Mar 17, 2020
7be0c35
Update town_square.css
molecula451 Mar 17, 2020
9251e31
Update town_square.css
molecula451 Mar 17, 2020
02526c9
Update town_square.css
molecula451 Mar 19, 2020
f56aa09
Update townsquare.js
molecula451 Mar 19, 2020
1e1aff2
Update town_square.css
molecula451 Mar 20, 2020
e688437
Update town_square.css
molecula451 Mar 20, 2020
8a7721f
Update gitcoin.css
molecula451 Mar 21, 2020
9082c10
Box shadow on Dark Mode for Dope Looks
molecula451 Mar 21, 2020
b3564b7
Update town_square.css
molecula451 Mar 21, 2020
f08dcc2
Update index.html
molecula451 Mar 21, 2020
84977a1
Update townsquare.js
molecula451 Mar 22, 2020
be44753
Update townsquare.js
molecula451 Mar 24, 2020
a375c26
Update town_square.css
molecula451 Mar 24, 2020
b89c2c9
Merge branch 'master' into patch-4
molecula451 Mar 28, 2020
8a706db
Update townsquare.js
molecula451 Apr 4, 2020
81decb5
Bootstrap custom switch
molecula451 Apr 4, 2020
de0a733
remove old toggle
molecula451 Apr 7, 2020
54098a2
default background property
molecula451 Apr 8, 2020
917e281
indentation
molecula451 Apr 8, 2020
f52f8b8
switch tag and some properties
molecula451 Apr 9, 2020
b8c139e
Merge branch 'master' into patch-4
molecula451 Apr 9, 2020
31d1f6b
"not available" actions tasty dark blue as per owocki's request
molecula451 Apr 9, 2020
fdf00e6
ref link background
molecula451 Apr 9, 2020
b4ef829
Merge branch 'master' into patch-4
danlipert Apr 15, 2020
8511329
Merge branch 'master' into patch-4
danlipert Apr 15, 2020
33fb27b
Merge branch 'master' into patch-4
molecula451 Apr 19, 2020
8142975
willsputra feedback changes Explore Tribes & Create actions
molecula451 Apr 22, 2020
9ed5a6b
Popover in dark mode and some properties for octaviou
molecula451 Apr 22, 2020
ae2db15
Merge branch 'master' into patch-4
molecula451 Apr 22, 2020
ff07d8b
Merge branch 'master' into patch-4
molecula451 Apr 22, 2020
cddd372
Merge branch 'master' into patch-4
molecula451 Apr 24, 2020
9b0075d
Merge branch 'master' into patch-4
molecula451 Apr 29, 2020
2277ec9
Merge branch 'master' into patch-4
molecula451 Apr 29, 2020
6b0451d
Update town_square.css
molecula451 Apr 29, 2020
e9f6f31
Update town_square.css
molecula451 Apr 29, 2020
e21cbe3
fixing lint errors
molecula451 Apr 29, 2020
7527983
Update town_square.css
molecula451 Apr 29, 2020
44ca82e
fixing lint errors
molecula451 Apr 29, 2020
6ab35b5
lint errors
molecula451 Apr 29, 2020
e3621ff
Merge branch 'master' into patch-4
molecula451 Apr 29, 2020
a52dd55
Merge branch 'master' into patch-4
molecula451 Apr 29, 2020
ad16b6d
Merge branch 'master' into patch-4
molecula451 Apr 29, 2020
24501dc
eslint errors
molecula451 Apr 29, 2020
aa59ba3
lint errors
molecula451 Apr 29, 2020
1707b30
lint errors
molecula451 Apr 29, 2020
8dfc9c4
Merge branch 'master' into patch-4
molecula451 Apr 29, 2020
ecbc931
Merge branch 'master' into patch-4
molecula451 Apr 30, 2020
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
148 changes: 148 additions & 0 deletions app/assets/v2/css/town_square.css
Original file line number Diff line number Diff line change
Expand Up @@ -1007,6 +1007,153 @@ body.green.offer_view .announce {
}
}

/* Toggle Switch Dope Mode */

#dopeSwitch {
position: relative;
display: inline-block;
}

.dark {
background-color: rgb(23, 7, 61);
}

.dark .bg-white {
background-color: #2b2642!important;
box-shadow: 60px!important;
}

.dark .bg-lightblue {
background-color: #2b2642!important;
box-shadow: 60px!important;
}

.dark .grey {
color: #fff!important;
}

.dark .tip_activity {
background-color: black!important;
}

.dark .activity_stream {
color: #fff!important;
}

.dark .activity_stream .activity_comments .comment_container.filled {
background-color: #877cab42!important;
}

.dark .activity_stream .activity_comments .activity_comments_main_comment {
color: #fff!important;
border-top: 2px solid #346698!important;
}

.dark .textarea.form__input {
color: #fff!important;
}

.dark .font-body {
color: #fff!important;
}

.dark .form-control {
background-color: #282440!important;
}

.dark #status {
background-color: #282440;
}

.dark .form__input {
background-color: #282440;
color: #fff!important;
}

.dark .townsquare_nav-list .nav-item .nav-link {
color: #fff;
}

.dark .townsquare_block-header {
color: #fff;
}

.dark .font-caption {
color: #fff!important;
}

.dark .activity_stream .box {
border-bottom: 1px solid #312979;
box-shadow: 1px -5px #312979;
border-radius: 10px;
}

.dark .poll_choices.answered div span {
color: #fff!important;
}

.dark .poll_choices div p {
color: #fff!important;
background-color: black!important;
}

.dark .activity_stream .comment_row .activity_comments_main {
border-top: #8ab2b2!important;
}

.dark .poll_choices div.vote {
background-color: #232342!important;
}

.dark .poll_choices.answered div.vote {
border: 1px solid #262661!important;
}

.dark #status .btn-group-toggle .btn-radio {
background-color: black!important;
}

.dark .poll_choices.answered div.vote {
background-color: black!important;
}

.dark .action:hover {
background-color: black!important;
}

.dark .border {
border: 1px solid #346698!important;
}

.dark #new_activity_notifier {
background-color: #262661!important;
border-bottom: 1px solid #262661!important;
}


.dark #status .btn-group-toggle .btn-radio {
background-color: #2b3358!important;
}

.dark .empty {
background-color: #201a40;
}

.dark #reflink {
background-color: #201a40;
}

.dark a {
color: #567AFF;
}

.dark popover-body {
color: #dde5ee;
}

.dark popover-user-card {
background-color: #201a40;
}

.promo .logo {
height: 55px;
Expand Down Expand Up @@ -1052,3 +1199,4 @@ body.green.offer_view .announce {
.promo .close-promo i {
font-weight: 100;
}

20 changes: 20 additions & 0 deletions app/assets/v2/js/pages/townsquare.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,26 @@ $(document).ready(function() {
document.location.href = get_redir_location($('.nav-link.active').data('slug'));
}, 10);
});

// Enables Dope Mode
$('body').toggleClass(localStorage.toggled);

$('#dopeSwitch').on("click",function(event) {
if (localStorage.toggled != 'dark') {
$('body').toggleClass('dark', true)
localStorage.toggled = 'dark';
} else {
$('body').toggleClass('dark', false)
localStorage.toggled = '';
}

});

if (!$('body').hasClass('dark', false)) {
$('#dopeSwitch').prop('checked', false)
} else {
$('#dopeSwitch').prop('checked', true)
}

// toggles the daily email sender
$('body').on('change', '#receive_daily_offers_in_inbox', function(e) {
Expand Down
6 changes: 6 additions & 0 deletions app/townsquare/templates/townsquare/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,12 @@
</div>
</div>
</div>
<div>
molecula451 marked this conversation as resolved.
Show resolved Hide resolved
<div class="custom-control custom-switch">
molecula451 marked this conversation as resolved.
Show resolved Hide resolved
<input type="checkbox" class="custom-control-input" id="dopeSwitch">
<label class="custom-control-label" for="dopeSwitch">Dope mode</label>
</div>
</div>

{% include 'shared/analytics.html' %}
{% include 'shared/footer_scripts.html' with slim=1 %}
Expand Down