Skip to content
This repository has been archived by the owner on Apr 8, 2020. It is now read-only.

Feature ngm theme #309

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
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
Binary file added .DS_Store
Binary file not shown.
Binary file added app/.DS_Store
Binary file not shown.
Binary file added app/views/.DS_Store
Binary file not shown.
Binary file added app/views/styles/.DS_Store
Binary file not shown.
Binary file added app/views/styles/theme-ngm/.DS_Store
Binary file not shown.
5 changes: 5 additions & 0 deletions app/views/styles/theme-ngm/_form-grid.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
@import "../../../../node_modules/enketo-core/src/sass/core/main";
@import "../../../../node_modules/enketo-core/src/sass/core/responsive";
@import "../component/widgets";
@import "../../../../node_modules/enketo-core/src/sass/core/slider";
@import "../../../../node_modules/enketo-core/src/sass/grid/main";
26 changes: 26 additions & 0 deletions app/views/styles/theme-ngm/_mixins.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
@mixin font-normal {
font-family: 'Roboto', Arial, sans-serif;
font-weight: 100;
font-style: normal;
}

@mixin font-bold {
font-family: 'Roboto', Arial, sans-serif;
font-weight: 200;
font-style: normal;
}

@mixin translate($x, $y) {
-webkit-transform: translate($x, $y);
-moz-transform: translate($x, $y);
-o-transform: translate($x, $y);
transform: translate($x, $y);
}

@mixin loader-image($loader-size) {
//background: url("/images/fading-loader.svg") 50% 50% no-repeat;
background-image: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBzdGFuZGFsb25lPSJubyI/Pgo8IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPgo8c3ZnIHhtbG5zPSJodHRwOi8vd3d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IiByPSI1IiBzdHlsZT0ib3BhY2l0eTowLjMiPgogICAgICA8YW5pbWF0ZSBhdHRyaWJ1dGVUeXBlPSJDU1MiIGF0dHJpYnV0ZU5hbWU9Im9wYWNpdHkiIGZyb209IjEiIHRvPSIwLjMiIGR1cj0iMS4ycyIgcmVwZWF0Q291bnQ9ImluZGVmaW5pdGUiIGJlZ2luPSIxLjFzIiAvPgogICAgPC9jaXJjbGU+CiAgPC9nPgo8L3N2Zz4K);
background-size: $loader-size $loader-size;
height: $loader-size;
width: $loader-size;
}
42 changes: 42 additions & 0 deletions app/views/styles/theme-ngm/_roboto.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
@font-face {
font-family: "Roboto";
src: local(Roboto Thin),
url("#{$roboto-font-path}Roboto-Thin.woff2") format("woff2"),
url("#{$roboto-font-path}Roboto-Thin.woff") format("woff"),
url("#{$roboto-font-path}Roboto-Thin.ttf") format("truetype");
font-weight: 200;
}
@font-face {
font-family: "Roboto";
src: local(Roboto Light),
url("#{$roboto-font-path}Roboto-Light.woff2") format("woff2"),
url("#{$roboto-font-path}Roboto-Light.woff") format("woff"),
url("#{$roboto-font-path}Roboto-Light.ttf") format("truetype");
font-weight: 300;
}

@font-face {
font-family: "Roboto";
src:
local(Roboto Regular),
url("#{$roboto-font-path}Roboto-Regular.woff2") format("woff2"),
url("#{$roboto-font-path}Roboto-Regular.woff") format("woff"),
url("#{$roboto-font-path}Roboto-Regular.ttf") format("truetype");
font-weight: 400;
}

@font-face {
font-family: "Roboto";
src: url("#{$roboto-font-path}Roboto-Medium.woff2") format("woff2"),
url("#{$roboto-font-path}Roboto-Medium.woff") format("woff"),
url("#{$roboto-font-path}Roboto-Medium.ttf") format("truetype");
font-weight: 500;
}

@font-face {
font-family: "Roboto";
src: url("#{$roboto-font-path}Roboto-Bold.woff2") format("woff2"),
url("#{$roboto-font-path}Roboto-Bold.woff") format("woff"),
url("#{$roboto-font-path}Roboto-Bold.ttf") format("truetype");
font-weight: 700;
}
41 changes: 41 additions & 0 deletions app/views/styles/theme-ngm/_style.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
/***************
HTML Styles
***************/

.or h3 {
border-bottom: 1px solid #e0e0e0 !important;
}

.or h4 {
margin-bottom: 20px;
border-bottom: 1px solid #e0e0e0 !important;
}

.required-subtle {
top: 0px;
right: 5px;
}

.question .question-label {
color: #000000 !important;
}

.focus > .question-label {
font-weight: 300 !important;
color: $input-highlight !important;
}

input[type=text]:focus:not([readonly]),
input[type=password]:focus:not([readonly]),
input[type=email]:focus:not([readonly]),
input[type=url]:focus:not([readonly]),
input[type=time]:focus:not([readonly]),
input[type=date]:focus:not([readonly]),
input[type=datetime-local]:focus:not([readonly]),
input[type=tel]:focus:not([readonly]),
input[type=number]:focus:not([readonly]),
input[type=search]:focus:not([readonly]),
textarea.materialize-textarea:focus:not([readonly]) {
border-bottom: 1px solid $input-highlight !important;
box-shadow: 0 1px 0 0 $input-highlight !important;
}
42 changes: 42 additions & 0 deletions app/views/styles/theme-ngm/_variables.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
/** GRID THEME **/

$font-size-base: 16px;
$roboto-font-path: "/fonts/roboto/" !default;

// colors
$brand-primary-color: #ee6e73;
$brand-secondary-color: none;
$radiocheck-unchecked-color: #666666;
$radiocheck-checked-color: #009688;
$question-bg: white;
$question-hover-bg: none;
$question-focus-bg: none;
$input-highlight: #009688;
$input-bg: transparent;

// grid
$default-grid-width: 4;
$max-columns: 10;
$grid-border: none;

// questions
$question-margin: 0;
$q-pad-top: 6px;
$q-pad-right: 6px;
$q-pad-bottom: 13px;
$q-pad-left: 6px;
$question-padding: $q-pad-top $q-pad-right $q-pad-bottom $q-pad-left;

// notes
$note-border-radius: 0;

// general form elements
$groupline: #bbbbbb;
$line: 3px solid $groupline;
$input-height: 34px;
$input-min-width: 0.2 * 720px;
$input-max-width: 80%;

// reponsiveness
$max-content-width: 1100px;
$main-breakpoint: $max-content-width;
1 change: 1 addition & 0 deletions app/views/styles/theme-ngm/theme-ngm.print.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
@import "../../../../node_modules/enketo-core/src/sass/grid/grid-print";
42 changes: 42 additions & 0 deletions app/views/styles/theme-ngm/theme-ngm.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@

// variables
@import "variables";
@import "../../../../node_modules/enketo-core/src/sass/core/variables";

// fonts
@import "roboto";

// mixins, in the right order
@import "../../../../node_modules/enketo-core/src/sass/core/mixins";
@import "../../../../node_modules/enketo-core/src/sass/formhub/mixins";
@import "../../../../node_modules/enketo-core/src/sass/grid/mixins";
@import "mixins";

// reset
@import "../../../../node_modules/enketo-core/src/sass/core/reset";

// common styles
@import "../component/common";

// utilities
@import "../../../../node_modules/enketo-core/src/sass/core/utilities";

// icons
@import "../component/icons";

// buttons
@import "../component/buttons";

// layout
@import "../../../../node_modules/enketo-core/src/sass/core/layout";
@import "../../../../node_modules/enketo-core/src/sass/core/pages";

// components
@import "../component/side-slider";
@import "form-grid";
@import "../component/form_header";
@import "../component/form_footer";


// custom style overrides
@import "style";
Loading