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

Ui style and fixes #786

Merged
merged 20 commits into from
Mar 24, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
4d4592a
fix UI Bug #708 : change title in edit camp page
shaniqwa Mar 7, 2018
c2179bc
fix UI Bugs #711 & #712 (camp page)
shaniqwa Mar 7, 2018
f5b5d5b
fix UI Bugs #711 & #712 (camp page)
shaniqwa Mar 7, 2018
c9daaac
UI Bug fix #710 - remove publish button
shaniqwa Mar 7, 2018
52ba074
UI main navigation - remove unnecessary class 'undefined'
shaniqwa Mar 7, 2018
fca7f96
add he translations
shaniqwa Mar 7, 2018
14fd43e
edit camp - general comments and layout fix
shaniqwa Mar 7, 2018
4f28b62
minor style changes, remove underline when hovering buttons, align ch…
shaniqwa Mar 7, 2018
4d0aa12
fix top navbar style
shaniqwa Mar 8, 2018
d442d92
add moment.js to app.locals so it can be used for date formatting in …
shaniqwa Mar 8, 2018
f4f415f
add some style: to statistics on home page and members table.
shaniqwa Mar 8, 2018
0373731
fix translation, add icon to 'inactive' status
shaniqwa Mar 8, 2018
7008a81
Merge branch 'master' into ui-style-fixes
shaniqwa Mar 8, 2018
55c7542
update top nav: put all admin manage tabs under one dropdown. fix bug…
shaniqwa Mar 22, 2018
48b9c55
theme styling
shaniqwa Mar 22, 2018
fbbfba4
link to button
shaniqwa Mar 22, 2018
eabe262
layout fix
shaniqwa Mar 22, 2018
5aa0257
Merge remote-tracking branch 'midburn/master' into ui-style-fixes
shaniqwa Mar 22, 2018
0b94fd6
add theme toggle (button in footer) - new theme is now default, white…
shaniqwa Mar 23, 2018
0f2c30d
Merge branch 'ui-style-fixes' of https://github.com/Midburn/spark int…
shaniqwa Mar 23, 2018
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
6 changes: 5 additions & 1 deletion locales/en/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,9 @@
"npo_join": "Join NPO",
"whoami": "Manage Profile"
},
"top-nav": {
"manage": "Manage"
},
"footer": {
"scrolltop": "Back to top",
"visit_homepage": "Visit Midburn website",
Expand All @@ -84,7 +87,8 @@
"open_source": "Open Source",
"want_to_help": "Want to help us code?",
"toc": "Terms of Use and Privacy Policy",
"toc_link": "http://midburn.org/en/en-terms-and-privacy/"
"toc_link": "http://midburn.org/en/en-terms-and-privacy/",
"change_theme": "Change theme"
},
"whoami": {
"gender": "Gender",
Expand Down
1 change: 1 addition & 0 deletions locales/en/gate.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"gate" : "Gate",
"desc": "Manage gate entrance",
"search": "Search by ticket number / person name / email / id",
"enter_ticket": "Enter ticket",
"force_enter_ticket": "Force entrance",
Expand Down
6 changes: 5 additions & 1 deletion locales/he/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,9 @@
"npo_join": "הצטרפות לעמותה",
"whoami": "עריכת פרופיל"
},
"top-nav": {
"manage": "ניהול"
},
"footer": {
"scrolltop": "חזרה למעלה",
"visit_homepage": "בקרו באתר מידברן",
Expand All @@ -85,7 +88,8 @@
"open_source": "קוד פתוח",
"want_to_help": "רוצה לעזור לנו לקודד?",
"toc": "תנאי השימוש באתר ומדיניות פרטיות",
"toc_link": "http://midburn.org/he-terms-and-privacy/"
"toc_link": "http://midburn.org/he-terms-and-privacy/",
"change_theme": "החלף צבע"
},
"whoami": {
"gender": "מגדר",
Expand Down
1 change: 1 addition & 0 deletions locales/he/gate.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"gate" : "שער",
"desc": "ניהול כניסות לאירוע",
"search": "חיפוש באמצעות שם פרטי / שם משפחה / שם מלא / דואר אלקטרוני / מספר כרטיס / תעודת זהות",
"enter_ticket": "כניסה לאירוע",
"force_enter_ticket": "כניסה לאירוע בכוח",
Expand Down
33 changes: 33 additions & 0 deletions public/images/midburn_logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
19 changes: 18 additions & 1 deletion public/scripts/camps.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
/**
* GLOBALS
*/
$(window).load(function () {
var isLight = sessionStorage.getItem("theme");
$('body').toggleClass('light', isLight === 'light');
$("#cover").fadeOut(200);
toggleTheme();
});

$(document).ajaxStart(function () {
$('#ajax_indicator').removeClass('done').removeClass('hide').fadeIn('fast');
});
Expand All @@ -9,7 +16,7 @@ $(document).ajaxComplete(function () {
});
$(function () {
// tooltips
$('[data-toggle="tooltip"]').tooltip()
$('[data-toggle="tooltip"]').tooltip();
});

// bind Twitter Bootstrap tooltips to dynamically created elements
Expand Down Expand Up @@ -42,6 +49,16 @@ $input.keydown(function () {
clearTimeout(typingTimer);
});

// toggleTheme (default or light)
function toggleTheme() {
$('#toggleTheme').on('click', function() {
isLight = sessionStorage.getItem("theme");
isLight = isLight === '' ? 'light' : '';
$('body').toggleClass('light', isLight === 'light');
sessionStorage.setItem("theme", isLight);
});
}

function doneTyping() {
var val = $input.val(),
lang = $('body').attr('lang'),
Expand Down
13 changes: 6 additions & 7 deletions public/stylesheets/_camps.scss
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
@import url( 'https://fonts.googleapis.com/css?family=Cabin|Rubik');
@import './camps_mobile';
$card-bg: #fafafa;
$green: #24b47e;
$red: #D50000;
$teal: #26A69A;

body {
font-family: 'Cabin', sans-serif;
Expand Down Expand Up @@ -51,7 +47,6 @@ body[lang="en"] {
&:focus,
&:hover {
text-decoration: none;
color: inherit;
transform: translateY(-3px);
box-shadow: 0 7px 14px rgba(50,50,93,.1),0 3px 6px rgba(0,0,0,.08);
}
Expand Down Expand Up @@ -138,6 +133,7 @@ body[lang="en"] {
background: #6772e5;

&:hover {
color: #fff;
background: #7795f8;
}
}
Expand All @@ -147,7 +143,8 @@ body[lang="en"] {
background: $green;

&:hover {
background: #24b41e;
color: #fff;
background: $light-green;
}
}

Expand Down Expand Up @@ -203,7 +200,7 @@ body[lang="en"] .dash-panel a:after {
}

.card {
padding: 40px 40px 40px 120px;
padding: 40px;
margin-bottom: 2em;
background-color: $card-bg;
border-radius: 2px;
Expand Down Expand Up @@ -361,9 +358,11 @@ body[lang="en"] {
.camps {
// Card transition
.cards--wrapper {
border-radius: 4px;
display: block;
visibility: hidden;
background: $card-bg;
color: $card-text;
margin-bottom: 2em;
position: relative;
overflow: hidden;
Expand Down
10 changes: 9 additions & 1 deletion public/stylesheets/_colors.scss
Original file line number Diff line number Diff line change
@@ -1,11 +1,19 @@

// colors
$primary-color: #6771e5;
$primary-color-muted: #afb1e5;
$secondary-color: #ffa500;
$card-bg: #fafafa;
$card-text: black;


$dark-gray: #7F8C8D;
$gray: #95A5A6;
$light-gray: #BDC3C7;
$dark-blue: #34495E;
$blue: #2980B9;
$teal: #3ea4a6;
$green: #16A085;
$light-green: #1dd6b2;
$yellow: #F1C40F;;
$orange: #F39C12;
$red: #E74C3C;
Expand Down
4 changes: 2 additions & 2 deletions public/stylesheets/_footer.scss
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ footer {

.footer__links {
padding: 0;

text-align: center;
li {
display: inline-block;
padding: 0.2em 0.5em;
Expand All @@ -55,4 +55,4 @@ footer {
}
}
}
}
}
6 changes: 6 additions & 0 deletions public/stylesheets/_light-theme.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
body.light {
background-image: inherit;
.main {
color: black;
}
}
54 changes: 48 additions & 6 deletions public/stylesheets/main.scss
Original file line number Diff line number Diff line change
@@ -1,15 +1,33 @@
@import './colors';
@import './ui';
@import './camps';
@import './footer';
@import './colors';
@import './light-theme';

// hide this after getting theme from session storage and page load (public/scripts/camps.js)
#cover {position: fixed; height: 100%; width: 100%; top:0; left: 0; background: #ffffff; z-index:9999;}

body {
display: flex;
flex-direction: column;
min-height: 100vh;
background-image: url("https://midburn.org/wp-content/uploads/2017/01/poicamp.jpg");
background-repeat: no-repeat;
background-position: top center;
background-attachment: fixed;
background-size: cover;
}

a:hover {
text-decoration: none;
a {
color: $primary-color;
&:hover {
color: $primary-color-muted;
text-decoration: none;
}
}
*:focus {
outline: none !important;
color: inherit !important;
}

span {
Expand All @@ -18,6 +36,16 @@ span {

.main {
padding-top: 90px;
color: white;
}

.card {
background: $card-bg;
color: $card-text;
}

.text-muted {
color: $primary-color-muted;
}

.midburn_logo {
Expand All @@ -37,16 +65,30 @@ span {
margin-bottom: 6px;
}
/*NAVIGATION*/
#navbar {
padding: 0 10px 0 10px;
}

.navbar-brand {
background-size: 50px;
padding-left: 30px;
background-image: url("../images/spark_logo.png");
background-image: url("../images/midburn_logo.svg");
background-repeat: no-repeat;
background-position: 10px 15px;
background-position: -9px 12px;
color: black !important;
}

.navbar-nav>li>a {
line-height: 22px;
}
.dropdown-menu>.active>a, .dropdown-menu>.active>a:focus, .dropdown-menu>.active>a:hover {
background-color: $primary-color !important;
background-image: -webkit-linear-gradient(top, $primary-color 0, $primary-color 100%) !important;
background-image: -o-linear-gradient(top, $primary-color 0, $primary-color 100%) !important;
background-image: -webkit-gradient(linear, left top, left bottom, from($primary-color), to($primary-color)) !important;
background-image: linear-gradient(to bottom, $primary-color 0, $primary-color 100%) !important;
}


li.dropdown > ul > li > a > img,
li.dropdown > ul > li > a > span {
Expand Down Expand Up @@ -87,11 +129,11 @@ li.dropdown > ul > li > a > span {
display: table;
}
}

// center modal buttons
.swal-footer {
text-align: center;
}

// bootstrap overrides
.checkbox input[type=checkbox],
.checkbox-inline input[type=checkbox],
Expand Down
2 changes: 2 additions & 0 deletions routes/main_routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ var async = require('async');
var crypto = require('crypto');

module.exports = function (app, passport) {
// Use locals
app.locals.moment = require('moment');
// Breadcrumbs
app.use(breadcrumbs.init());

Expand Down
4 changes: 2 additions & 2 deletions routes/pages/camps_routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ var __render_camp = function (camp, req, res) {
url: '/' + req.params.lng + '/home'
},
{
name: 'camps:breadcrumbs.manage',
name: 'camps:nav_admin',
url: '/' + req.params.lng + '/camps-admin'
}]);

Expand Down Expand Up @@ -309,7 +309,7 @@ var __render_camp = function (camp, req, res) {
url: '/' + req.params.lng + '/home'
},
{
name: 'camps:breadcrumbs.manage',
name: 'camps:art_installation.nav_admin',
url: '/' + req.params.lng + '/art-admin'
}]);
if (req.user.isAdmin || req.user.isArtInstallationsAdmin) {
Expand Down
9 changes: 9 additions & 0 deletions routes/pages/events_routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,16 @@ const express = require("express");
const router = express.Router();

router.get("/", userRole.isAdmin(), (req, res) => {
req.breadcrumbs([{
name: 'breadcrumbs.home',
url: '/' + req.params.lng + '/home'
},
{
name: 'events:nav_admin',
url: '/' + req.params.lng + '/events-admin'
}]);
res.render("pages/events/index", {
breadcrumbs: req.breadcrumbs(),
t_prefix: "events:"
});
});
Expand Down
4 changes: 4 additions & 0 deletions views/includes/footer.jade
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ footer
a(href="#{t('footer.toc_link')}" target='_blank')=t('footer.toc')
li
a(href='//www.midburn.org')=t('footer.visit_homepage')
li
a(href="#" id="toggleTheme")
i.fa.fa-paint-brush.m-1(aria-hidden='true')
=t('common:footer.change_theme')

.col-xs-12.col-sm-4
ul.footer__links
Expand Down
3 changes: 2 additions & 1 deletion views/includes/layout.jade
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ head
link(rel='stylesheet', href='/node_modules/selectize.js/dist/css/selectize.default.css')
link(rel="stylesheet", href="/stylesheets/main.scss" )

body( style='direction:#{languageDir}', lang=language, dir='#{languageDir}' )
body( style='direction:#{languageDir}', lang=language, dir='#{languageDir}')
div#cover
block wrapper
//- Scripts -//
script(src='/node_modules/jquery/dist/jquery.min.js')
Expand Down
Loading