Commit 482f5fab authored by Curtis Adam's avatar Curtis Adam

Add new background colors for the new card types

parent d204f993
......@@ -176,6 +176,12 @@ $themes: (
$background_difficulty1_lines: map-get($map, "background_difficulty1_lines");
$background_difficulty2_lines: map-get($map, "background_difficulty2_lines");
$background_difficulty3_lines: map-get($map, "background_difficulty3_lines");
$background_white: map-get($map, "background_white");
$background_white_lines: map-get($map, "background_white_lines");
$background_post_it: map-get($map, "background_post_it");
$background_post_it_lines: map-get($map, "background_post_it_lines");
$background_pink: map-get($map, "background_pink");
$background_pink_lines: map-get($map, "background_pink_lines");
//cardset colors
$cardset_markdeep_background: map-get($map, "cardset_markdeep_background");
$cardset_markdeep_header_border: map-get($map, "cardset_markdeep_header_border");
......@@ -986,6 +992,18 @@ $themes: (
) local !important;
}
.box-white {
background-color: $background_white !important;
}
.box-pink {
background-color: $background_pink !important;
}
.box-post-it {
background-color: $background_post_it !important;
}
.box-difficultyBlan0 {
background-color: $background_difficulty0 !important;
}
......@@ -1080,6 +1098,18 @@ $themes: (
background: darken($background_difficulty3_lines, 15%) !important;
}
.box-white-header {
background: linear-gradient(to top, $background_white_lines 0px, $background_white_lines 4px, $background_white 5px, $background_white 100%) !important;
}
.box-pink-header {
background: linear-gradient(to top, $background_pink_lines 0px, $background_pink_lines 4px, $background_pink 5px, $background_pink 100%) !important;
}
.box-post-it-header {
background: linear-gradient(to top, $background_post_it_lines 0px, $background_post_it_lines 4px, $background_post_it 5px, $background_post_it 100%) !important;
}
.box-difficultyBlank0-header, .box-difficultyLined0-header {
background: linear-gradient(to top, $background_difficulty0_lines 0px, $background_difficulty0_lines 4px, $background_difficulty0 5px, $background_difficulty0 100%) !important;
}
......
......@@ -196,6 +196,12 @@
"background_difficulty1_lines": rgba(92, 184, 92, 0.3),
"background_difficulty2_lines": rgba(91, 192, 222, 0.3),
"background_difficulty3_lines": rgba(217, 83, 79, 0.3),
"background_white": $white,
"background_white_lines": $thm_gray,
"background_post_it": lightyellow,
"background_post_it_lines": $thm_orange,
"background_pink": lightpink,
"background_pink_lines": $thm_red,
//card colors
"background_lecture": LightGoldenRodYellow,
"background_hint": LightGoldenRodYellow,
......
......@@ -198,6 +198,12 @@
"background_difficulty1_lines": rgba(92, 184, 92, 0.3),
"background_difficulty2_lines": rgba(91, 192, 222, 0.3),
"background_difficulty3_lines": rgba(217, 83, 79, 0.3),
"background_white": $white,
"background_white_lines": $thm_gray,
"background_post_it": lightyellow,
"background_post_it_lines": $thm_orange,
"background_pink": pink,
"background_pink_lines": $thm_red,
//card colors
"background_lecture": LightGoldenRodYellow,
"background_hint": WhiteSmoke,
......
......@@ -25,7 +25,7 @@ let cardTypesWhichDisplayLearningGoalInformation = [0, 5];
let cardTypesWithLecture = [0];
let cardTypesWithPresentationMode = [0, 1, 2, 3, 4, 5, 6, 7];
let cardTypesWithSwappedSides = [6];
let cardTypeWithNotesForDifficultyLevel = [2];
let cardTypesWithNotesForDifficultyLevel = [2];
let cardTypesOrder = [{cardType: 2}, {cardType: 0}, {cardType: 3}, {cardType: 6}, {cardType: 5}, {cardType: 4}, {cardType: 7}, {cardType: 1}, {cardType: 8}, {cardType: 9}, {cardType: 10}];
class CardType {
......@@ -105,7 +105,7 @@ class CardType {
}
static gotNotesForDifficultyLevel (cardType) {
return cardTypeWithNotesForDifficultyLevel.includes(cardType);
return cardTypesWithNotesForDifficultyLevel.includes(cardType);
}
static gotDictionary (cardType) {
......
......@@ -469,6 +469,14 @@ Template.registerHelper("getLearnphase", function (state) {
});
Template.registerHelper("getCardBackground", function (difficulty, cardType, backgroundStyle) {
switch (cardType) {
case 8:
return 'box-post-it';
case 9:
return 'box-pink';
case 10:
return 'box-white';
}
if (!CardType.gotDifficultyLevel(cardType)) {
if (backgroundStyle === 0) {
return 'box-difficultyLined0';
......
......@@ -8,8 +8,10 @@
<i class="card-button material-icons markdeep-center {{#if isCenterTextActive}}pressed{{/if}}">vertical_align_center</i>
<i class="card-button fa fa-sort-numeric-asc markdeep-card-order"></i>
<i class="card-button fa fa-lock markdeep-lock"></i>
<i class="card-button fa fa-paint-brush markdeep-background-style {{#if
isAlternativeBackgroundStyle}}pressed{{/if}}"></i>
{{#unless gotOneColumn}}
<i class="card-button fa fa-paint-brush markdeep-background-style {{#if
isAlternativeBackgroundStyle}}pressed{{/if}}"></i>
{{/unless}}
<i class="card-button glyphicon glyphicon-fullscreen markdeep-fullscreen {{#if
isFullscreenActive}}pressed{{/if}}"></i>
{{/if}}
......
......@@ -2,6 +2,7 @@ import {Session} from "meteor/session";
import {Template} from "meteor/templating";
import "./navigation.html";
import MarkdeepEditor from "../../api/markdeepEditor.js";
import CardType from "../../api/cardTypes";
export function isTextCentered() {
let centerTextElement = Session.get('centerTextElement');
......@@ -48,5 +49,8 @@ Template.markdeepNavigation.helpers({
},
isFullscreenActive: function () {
return Session.get('fullscreen');
},
gotOneColumn: function () {
return CardType.gotOneColumn(Session.get('cardType'));
}
});
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment