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

Using bootstrap 4 and related UI refresh #205

Merged
merged 18 commits into from
Jun 7, 2019
Merged
Show file tree
Hide file tree
Changes from 11 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
4 changes: 2 additions & 2 deletions app/components/form-navigation-buttons.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ export default Component.extend({
let renderPrevButton = this.renderPrevButton;

if (renderPrevButton) {
return ['col-xs-6', 'col-md-8'];
return ['col-6', 'col-md-8'];
} else {
return ['col-md-8', 'col-md-offset-4'];
return ['col-md-8', 'offset-md-4'];
}
}),

Expand Down
22 changes: 11 additions & 11 deletions app/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,18 @@
{{content-for "body-footer"}}

<noscript>
<div class="container-fluid">
<div id="header">
<h1 class="logo">Croodle</h1>
</div>
<div id="content">
<div class="box">
<h1>Please enable JavaScript</h1>
<p>Croodle requires JavaScript. But JavaScript is currently disabled in your browser settings or your browser does not support JavaScript. Therefore you can't use Croodle.</p>
<h2><a href="http://www.enable-javascript.com/">Click here for instructions on how to enable JavaScript.</a></h2>
</div>
<nav class="cr-navbar navbar navbar-dark">
<h1 class="cr-logo">Croodle</h1>
</nav>

<main role="main" class="container cr-main">
<div class="alert alert-danger" role="alert">
<h2>Please enable JavaScript!</h2>
<p>JavaScript is currently disabled in your browser settings or your browser does not support JavaScript.</p>
<p>Croodle requires JavaScript. Therefore to use Croodle, you must first enable JavaScript.</p>
<a class="btn btn-outline-dark btn-lg" href="http://www.enable-javascript.com/">Click here for instructions on how to enable JavaScript.</a>
</div>
</div>
</main>
</noscript>
</body>
</html>
1 change: 1 addition & 0 deletions app/locales/ca/translations.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ export default {
'poll.input.newUserName.label': 'Nom',
'poll.input.newUserName.placeholder': 'El teu nom',
'poll.link.copied': 'Enllaç copiat al porta-retalls.',
'poll.link.copy-label': 'Copia l\'enllaç al porta-retalls',
'poll.link.selected': 'Enllaç seleccionat. Premeu Command + C per copiar.',
'poll.modal.timezoneDiffers.title': 'En quines zones horàries s\'han de presentar les dates?',
'poll.modal.timezoneDiffers.body': 'L\'enquesta es va crear per a una zona horària diferent de la vostra hora local. En quines zones horàries s\'han de presentar les dates?',
Expand Down
1 change: 1 addition & 0 deletions app/locales/de/translations.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ export default {
'poll.input.newUserName.label': 'Name',
'poll.input.newUserName.placeholder': 'Dein Name',
'poll.link.copied': 'Link in die Zwischenablage kopiert.',
'poll.link.copy-label': 'Kopiere Link in die Zwischenablage',
'poll.link.selected': 'Link markiert. Drücke Steuerung + C zum Kopieren.',
'poll.modal.timezoneDiffers.title': 'In welcher Zeitzone sollen die Daten angezeigt werden?',
'poll.modal.timezoneDiffers.body': 'Die Umfrage wurde für eine Zeitzone angelegt, die von deiner lokalen Zeit abweicht. In welcher Zeitzone sollen die Daten angezeigt werden?',
Expand Down
1 change: 1 addition & 0 deletions app/locales/en/translations.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ export default {
'poll.input.newUserName.label': 'Name',
'poll.input.newUserName.placeholder': 'Your Name',
'poll.link.copied': 'Link copied to clipboard.',
'poll.link.copy-label': 'Copy link to clipboard',
sappor0 marked this conversation as resolved.
Show resolved Hide resolved
'poll.link.selected': 'Link selected. Press Command+C to copy.',
'poll.modal.timezoneDiffers.title': 'In which time zones should the dates be presented?',
'poll.modal.timezoneDiffers.body': 'The poll was created for a time zone which differs from your local time. In which time zones should the dates be presented?',
Expand Down
1 change: 1 addition & 0 deletions app/locales/es/translations.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ export default {
'poll.input.newUserName.label': 'Nombre',
'poll.input.newUserName.placeholder': 'Tu nombre',
'poll.link.copied': 'Enlace copiado al portapapeles.',
'poll.link.copy-label': 'Copiar enlace al portapapeles',
'poll.link.selected': 'Enlace seleccionado. Presiona Comando+C para copiarlo.',
'poll.modal.timezoneDiffers.title': '¿Que zona horaria deseas utilizar para mostrar los datos?',
'poll.modal.timezoneDiffers.body': 'La encuesta ha sido configurada para una zona horaria distinta de tu hora local. ¿Con qué zona horaria debería mostrarse la información?',
Expand Down
1 change: 1 addition & 0 deletions app/locales/it/translations.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ export default {
'poll.input.newUserName.label': 'Nome',
'poll.input.newUserName.placeholder': 'Il tuo nome',
'poll.link.copied': 'Il link è stato copiato.',
'poll.link.copy-label': 'Copia il link negli appunti',
'poll.link.selected': 'Link selezionato. Preme Command+C per copiarlo.',
'poll.modal.timezoneDiffers.title': 'In quale fuso orario devono essere presentate le date?',
'poll.modal.timezoneDiffers.body': 'Il sondaggio è stato creato per un fuso orario diverso dal tuo. In quali orari devono essere presentate le date?',
Expand Down
24 changes: 24 additions & 0 deletions app/styles/_bootstrap-tweaking.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
// We don't want the extra space added to jumbotron at larger screen sizes.
.jumbotron {
@include media-breakpoint-up(sm) {
padding: $jumbotron-padding $jumbotron-padding;
}
}

.sr-only {
padding: 0 !important;
}

.tab-pane {
padding-top: map-get($spacers, 4);
}

.navbar-dark .custom-select {
background-color: gray("900");
color: gray("500");
border: $custom-select-border-width solid gray("500");
}

h3, .h3 {
margin-top: map-get($spacers, 5);
}
45 changes: 15 additions & 30 deletions app/styles/_calendar.scss
Original file line number Diff line number Diff line change
@@ -1,35 +1,20 @@
@import "ember-power-calendar";

@media only screen and (max-width: $screen-sm-min) {
.ember-power-calendar {
@include ember-power-calendar($cell-size: 63px);
}
.ember-power-calendar {
@include ember-power-calendar(30px);
width: 100%;
}

@media only screen and (min-width: $screen-sm-min) {
.ember-power-calendar {
@include ember-power-calendar($cell-size: 47px);

float:left;

&:first-child {
margin-right: 10px;
}
}

.ember-power-calendar ~ .help-block {
clear: both;
}
.ember-power-calendar .ember-power-calendar-day,
.ember-power-calendar .ember-power-calendar-weekday {
max-width: none;
width: auto;
max-height: none;
height: auto;
margin: 1px;
}

@media only screen and (min-width: $screen-md-min) {
.ember-power-calendar {
@include ember-power-calendar($cell-size: 40px);
}
}

@media only screen and (min-width: $screen-lg-min) {
.ember-power-calendar {
@include ember-power-calendar($cell-size: 50px);
}
.ember-power-calendar .ember-power-calendar-weekdays,
.ember-power-calendar .ember-power-calendar-week {
height: 3em;
display: flex;
justify-content: space-around;
}
26 changes: 26 additions & 0 deletions app/styles/_generic-croodle-styles.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
.cr-navbar {
background: map-get($theme-colors, dark);
}

.cr-logo {
font-size: $font-size-base;
margin-bottom: 0;
// This is needed for cases when the h1 does not contain a link, like when JS
// is disabled.
color: $body-bg;
}

.cr-main {
padding-top: map-get($spacers, 5);
}

.cr-claim {
margin-bottom: map-get($spacers, 4);
}

.cr-hide-on-mobile {
display: none;
@include media-breakpoint-up(md) {
display: block;
}
}
7 changes: 7 additions & 0 deletions app/styles/_option-menu.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
.cr-option-menu {
margin-top: map-get($spacers, 2);

&__button {
margin-right: map-get($spacers, 2);
}
}
14 changes: 14 additions & 0 deletions app/styles/_poll-link.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
.cr-poll-link {
&__link {
position: relative;
overflow-x: scroll;
background: gray("200");
padding: map-get($spacers, 3) map-get($spacers, 3) 3em map-get($spacers, 3);
}

&__copy-btn {
position: absolute;
bottom: 0;
left: 0;
}
}
98 changes: 98 additions & 0 deletions app/styles/_steps.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
$steps-border-width: 5px;

.cr-steps-top-nav {
margin-bottom: map-get($spacers, 5);

flex-direction: column;
width: 100%;

@include media-breakpoint-up(md) {
flex-direction: row;
width: auto;
}

&__button {
text-align: left;
border-width: 0;
border-left-width: $steps-border-width;

&:not(:first-child) {
margin-left: 0 !important;
}

@include media-breakpoint-up(md) {
text-align: inherit;
border-left: 0;
border-right: 0;
}
&:not(:disabled) {
border-left-color: gray("300");
@include media-breakpoint-up(md) {
border-bottom: $steps-border-width solid gray("300");
}
}
&.is-active {
border-left-color: theme-color-level("primary", 2);
@include media-breakpoint-up(md) {
border-bottom: $steps-border-width solid theme-color-level("primary", 2);
}
}
}
}

$bottom-nav-height: 5.5em;

.cr-form-wrapper {
padding-bottom: $bottom-nav-height;
@include media-breakpoint-up(md) {
padding-bottom: 0;
}
}

.cr-steps-bottom-nav {
margin-top: map-get($spacers, 4);
padding-top: map-get($spacers, 4);
padding-bottom: map-get($spacers, 4);
border-top: 2px solid gray("100");
background: $body-bg;
height: $bottom-nav-height;
z-index: 9;
position: fixed;
bottom: 0;
left: $grid-gutter-width / 2;
right: $grid-gutter-width / 2;

@include media-breakpoint-up(md) {
margin-top: map-get($spacers, 5);
padding-top: map-get($spacers, 5);
padding-bottom: map-get($spacers, 5);
background: transparent;
position: static;
bottom: auto;
left: auto;
right: 0;
}

&__button {
width: 100%;
display: flex;
flex-direction: row;
align-items: center;
@include media-breakpoint-up(md) {
width: auto;
}
}
&__prev-button .cr-steps-bottom-nav__label {
margin-left: map-get($spacers, 3);
}
&__next-button .cr-steps-bottom-nav__label {
margin-right: map-get($spacers, 3);
}

&__next-button {
justify-content: flex-end;
@include media-breakpoint-up(md) {
justify-content: normal;
}
}
}
9 changes: 9 additions & 0 deletions app/styles/_variable-overrides.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
$icon-font-path: '../open-iconic/font/fonts/';

$enable-rounded: false;

$font-family-base: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;

$jumbotron-padding: 2rem;

$btn-disabled-opacity: 0.45;
Loading