mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-02-04 07:13:25 +08:00
Merge pull request #3051 from mermaid-js/3050_setTitle_rename
#3050 Renaming setTitle to setAccTitle
This commit is contained in:
commit
0fd11562bc
@ -15,9 +15,9 @@
|
|||||||
},
|
},
|
||||||
"extends": [
|
"extends": [
|
||||||
"eslint:recommended",
|
"eslint:recommended",
|
||||||
"plugin:jsdoc/recommended",
|
//"plugin:jsdoc/recommended",
|
||||||
"plugin:json/recommended",
|
"plugin:json/recommended",
|
||||||
"plugin:markdown/recommended",
|
// "plugin:markdown/recommended",
|
||||||
"plugin:prettier/recommended"
|
"plugin:prettier/recommended"
|
||||||
],
|
],
|
||||||
"plugins": ["html", "jest", "jsdoc", "json", "prettier"],
|
"plugins": ["html", "jest", "jsdoc", "json", "prettier"],
|
||||||
|
@ -9,7 +9,7 @@ export const clear = function () {
|
|||||||
description = '';
|
description = '';
|
||||||
};
|
};
|
||||||
|
|
||||||
export const setTitle = function (txt) {
|
export const setAccTitle = function (txt) {
|
||||||
title = sanitizeText(txt).replace(/^\s+/g, '');
|
title = sanitizeText(txt).replace(/^\s+/g, '');
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -26,7 +26,7 @@ export const getAccDescription = function () {
|
|||||||
};
|
};
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
setTitle,
|
setAccTitle,
|
||||||
getTitle,
|
getTitle,
|
||||||
getAccDescription,
|
getAccDescription,
|
||||||
setAccDescription,
|
setAccDescription,
|
||||||
|
@ -5,7 +5,7 @@ import common from '../common/common';
|
|||||||
import utils from '../../utils';
|
import utils from '../../utils';
|
||||||
import mermaidAPI from '../../mermaidAPI';
|
import mermaidAPI from '../../mermaidAPI';
|
||||||
import {
|
import {
|
||||||
setTitle,
|
setAccTitle,
|
||||||
getTitle,
|
getTitle,
|
||||||
getAccDescription,
|
getAccDescription,
|
||||||
setAccDescription,
|
setAccDescription,
|
||||||
@ -355,7 +355,7 @@ const setDirection = (dir) => {
|
|||||||
|
|
||||||
export default {
|
export default {
|
||||||
parseDirective,
|
parseDirective,
|
||||||
setTitle,
|
setAccTitle,
|
||||||
getTitle,
|
getTitle,
|
||||||
getAccDescription,
|
getAccDescription,
|
||||||
setAccDescription,
|
setAccDescription,
|
||||||
|
@ -263,7 +263,7 @@ statement
|
|||||||
| cssClassStatement
|
| cssClassStatement
|
||||||
| directive
|
| directive
|
||||||
| direction
|
| direction
|
||||||
| acc_title acc_title_value { $$=$2.trim();yy.setTitle($$); }
|
| acc_title acc_title_value { $$=$2.trim();yy.setAccTitle($$); }
|
||||||
| acc_descr acc_descr_value { $$=$2.trim();yy.setAccDescription($$); }
|
| acc_descr acc_descr_value { $$=$2.trim();yy.setAccDescription($$); }
|
||||||
| acc_descr_multiline_value { $$=$1.trim();yy.setAccDescription($$); }
|
| acc_descr_multiline_value { $$=$1.trim();yy.setAccDescription($$); }
|
||||||
;
|
;
|
||||||
|
@ -3,7 +3,7 @@ import mermaidAPI from '../../mermaidAPI';
|
|||||||
import * as configApi from '../../config';
|
import * as configApi from '../../config';
|
||||||
import common from '../common/common';
|
import common from '../common/common';
|
||||||
import {
|
import {
|
||||||
setTitle,
|
setAccTitle,
|
||||||
getTitle,
|
getTitle,
|
||||||
getAccDescription,
|
getAccDescription,
|
||||||
setAccDescription,
|
setAccDescription,
|
||||||
@ -93,7 +93,7 @@ export default {
|
|||||||
addRelationship,
|
addRelationship,
|
||||||
getRelationships,
|
getRelationships,
|
||||||
clear,
|
clear,
|
||||||
setTitle,
|
setAccTitle,
|
||||||
getTitle,
|
getTitle,
|
||||||
setAccDescription,
|
setAccDescription,
|
||||||
getAccDescription,
|
getAccDescription,
|
||||||
|
@ -94,8 +94,8 @@ statement
|
|||||||
}
|
}
|
||||||
| entityName BLOCK_START BLOCK_STOP { yy.addEntity($1); }
|
| entityName BLOCK_START BLOCK_STOP { yy.addEntity($1); }
|
||||||
| entityName { yy.addEntity($1); }
|
| entityName { yy.addEntity($1); }
|
||||||
| title title_value { $$=$2.trim();yy.setTitle($$); }
|
| title title_value { $$=$2.trim();yy.setAccTitle($$); }
|
||||||
| acc_title acc_title_value { $$=$2.trim();yy.setTitle($$); }
|
| acc_title acc_title_value { $$=$2.trim();yy.setAccTitle($$); }
|
||||||
| acc_descr acc_descr_value { $$=$2.trim();yy.setAccDescription($$); }
|
| acc_descr acc_descr_value { $$=$2.trim();yy.setAccDescription($$); }
|
||||||
| acc_descr_multiline_value { $$=$1.trim();yy.setAccDescription($$); }
|
| acc_descr_multiline_value { $$=$1.trim();yy.setAccDescription($$); }
|
||||||
;
|
;
|
||||||
|
@ -5,7 +5,7 @@ import common from '../common/common';
|
|||||||
import mermaidAPI from '../../mermaidAPI';
|
import mermaidAPI from '../../mermaidAPI';
|
||||||
import { log } from '../../logger';
|
import { log } from '../../logger';
|
||||||
import {
|
import {
|
||||||
setTitle,
|
setAccTitle,
|
||||||
getTitle,
|
getTitle,
|
||||||
getAccDescription,
|
getAccDescription,
|
||||||
setAccDescription,
|
setAccDescription,
|
||||||
@ -746,7 +746,7 @@ const makeUniq = (sg, allSubgraphs) => {
|
|||||||
export default {
|
export default {
|
||||||
parseDirective,
|
parseDirective,
|
||||||
defaultConfig: () => configApi.defaultConfig.flowchart,
|
defaultConfig: () => configApi.defaultConfig.flowchart,
|
||||||
setTitle,
|
setAccTitle,
|
||||||
getTitle,
|
getTitle,
|
||||||
getAccDescription,
|
getAccDescription,
|
||||||
setAccDescription,
|
setAccDescription,
|
||||||
|
@ -348,7 +348,7 @@ statement
|
|||||||
| subgraph separator document end
|
| subgraph separator document end
|
||||||
{$$=yy.addSubGraph(undefined,$3,undefined);}
|
{$$=yy.addSubGraph(undefined,$3,undefined);}
|
||||||
| direction
|
| direction
|
||||||
| acc_title acc_title_value { $$=$2.trim();yy.setTitle($$); }
|
| acc_title acc_title_value { $$=$2.trim();yy.setAccTitle($$); }
|
||||||
| acc_descr acc_descr_value { $$=$2.trim();yy.setAccDescription($$); }
|
| acc_descr acc_descr_value { $$=$2.trim();yy.setAccDescription($$); }
|
||||||
| acc_descr_multiline_value { $$=$1.trim();yy.setAccDescription($$); }
|
| acc_descr_multiline_value { $$=$1.trim();yy.setAccDescription($$); }
|
||||||
;
|
;
|
||||||
|
@ -6,7 +6,7 @@ import utils from '../../utils';
|
|||||||
import mermaidAPI from '../../mermaidAPI';
|
import mermaidAPI from '../../mermaidAPI';
|
||||||
import common from '../common/common';
|
import common from '../common/common';
|
||||||
import {
|
import {
|
||||||
setTitle,
|
setAccTitle,
|
||||||
getTitle,
|
getTitle,
|
||||||
getAccDescription,
|
getAccDescription,
|
||||||
setAccDescription,
|
setAccDescription,
|
||||||
@ -641,7 +641,7 @@ export default {
|
|||||||
getAxisFormat,
|
getAxisFormat,
|
||||||
setTodayMarker,
|
setTodayMarker,
|
||||||
getTodayMarker,
|
getTodayMarker,
|
||||||
setTitle,
|
setAccTitle,
|
||||||
getTitle,
|
getTitle,
|
||||||
setAccDescription,
|
setAccDescription,
|
||||||
getAccDescription,
|
getAccDescription,
|
||||||
|
@ -177,7 +177,7 @@ describe('when using the ganttDb', function () {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('should maintain the order in which tasks are created', function () {
|
it('should maintain the order in which tasks are created', function () {
|
||||||
ganttDb.setTitle('Project Execution');
|
ganttDb.setAccTitle('Project Execution');
|
||||||
ganttDb.setDateFormat('YYYY-MM-DD');
|
ganttDb.setDateFormat('YYYY-MM-DD');
|
||||||
ganttDb.addSection('section A section');
|
ganttDb.addSection('section A section');
|
||||||
ganttDb.addTask('Completed task', 'done, des1, 2014-01-06,2014-01-08');
|
ganttDb.addTask('Completed task', 'done, des1, 2014-01-06,2014-01-08');
|
||||||
|
@ -128,8 +128,8 @@ statement
|
|||||||
| excludes {yy.setExcludes($1.substr(9));$$=$1.substr(9);}
|
| excludes {yy.setExcludes($1.substr(9));$$=$1.substr(9);}
|
||||||
| includes {yy.setIncludes($1.substr(9));$$=$1.substr(9);}
|
| includes {yy.setIncludes($1.substr(9));$$=$1.substr(9);}
|
||||||
| todayMarker {yy.setTodayMarker($1.substr(12));$$=$1.substr(12);}
|
| todayMarker {yy.setTodayMarker($1.substr(12));$$=$1.substr(12);}
|
||||||
| title {yy.setTitle($1.substr(6));$$=$1.substr(6);}
|
| title {yy.setAccTitle($1.substr(6));$$=$1.substr(6);}
|
||||||
| acc_title acc_title_value { $$=$2.trim();yy.setTitle($$); }
|
| acc_title acc_title_value { $$=$2.trim();yy.setAccTitle($$); }
|
||||||
| acc_descr acc_descr_value { $$=$2.trim();yy.setAccDescription($$); }
|
| acc_descr acc_descr_value { $$=$2.trim();yy.setAccDescription($$); }
|
||||||
| acc_descr_multiline_value { $$=$1.trim();yy.setAccDescription($$); } | section {yy.addSection($1.substr(8));$$=$1.substr(8);}
|
| acc_descr_multiline_value { $$=$1.trim();yy.setAccDescription($$); } | section {yy.addSection($1.substr(8));$$=$1.substr(8);}
|
||||||
| clickStatement
|
| clickStatement
|
||||||
|
@ -5,7 +5,7 @@ import * as configApi from '../../config';
|
|||||||
import { getConfig } from '../../config';
|
import { getConfig } from '../../config';
|
||||||
import common from '../common/common';
|
import common from '../common/common';
|
||||||
import {
|
import {
|
||||||
setTitle,
|
setAccTitle,
|
||||||
getTitle,
|
getTitle,
|
||||||
getAccDescription,
|
getAccDescription,
|
||||||
setAccDescription,
|
setAccDescription,
|
||||||
@ -25,6 +25,7 @@ let direction = 'LR';
|
|||||||
let seq = 0;
|
let seq = 0;
|
||||||
|
|
||||||
function getId() {
|
function getId() {
|
||||||
|
// eslint-disable-line
|
||||||
return random({ length: 7 });
|
return random({ length: 7 });
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -411,7 +412,7 @@ export default {
|
|||||||
getCurrentBranch,
|
getCurrentBranch,
|
||||||
getDirection,
|
getDirection,
|
||||||
getHead,
|
getHead,
|
||||||
setTitle,
|
setAccTitle,
|
||||||
getTitle,
|
getTitle,
|
||||||
getAccDescription,
|
getAccDescription,
|
||||||
setAccDescription,
|
setAccDescription,
|
||||||
|
@ -102,7 +102,7 @@ line
|
|||||||
statement
|
statement
|
||||||
: commitStatement
|
: commitStatement
|
||||||
| mergeStatement
|
| mergeStatement
|
||||||
| acc_title acc_title_value { $$=$2.trim();yy.setTitle($$); }
|
| acc_title acc_title_value { $$=$2.trim();yy.setAccTitle($$); }
|
||||||
| acc_descr acc_descr_value { $$=$2.trim();yy.setAccDescription($$); }
|
| acc_descr acc_descr_value { $$=$2.trim();yy.setAccDescription($$); }
|
||||||
| acc_descr_multiline_value { $$=$1.trim();yy.setAccDescription($$); } | section {yy.addSection($1.substr(8));$$=$1.substr(8);}
|
| acc_descr_multiline_value { $$=$1.trim();yy.setAccDescription($$); } | section {yy.addSection($1.substr(8));$$=$1.substr(8);}
|
||||||
| branchStatement
|
| branchStatement
|
||||||
|
@ -70,7 +70,7 @@ statement
|
|||||||
:
|
:
|
||||||
| txt value { yy.addSection($1,yy.cleanupValue($2)); }
|
| txt value { yy.addSection($1,yy.cleanupValue($2)); }
|
||||||
| title title_value { $$=$2.trim();yy.setPieTitle($$); }
|
| title title_value { $$=$2.trim();yy.setPieTitle($$); }
|
||||||
| acc_title acc_title_value { $$=$2.trim();yy.setTitle($$); }
|
| acc_title acc_title_value { $$=$2.trim();yy.setAccTitle($$); }
|
||||||
| acc_descr acc_descr_value { $$=$2.trim();yy.setAccDescription($$); }
|
| acc_descr acc_descr_value { $$=$2.trim();yy.setAccDescription($$); }
|
||||||
| acc_descr_multiline_value { $$=$1.trim();yy.setAccDescription($$); } | section {yy.addSection($1.substr(8));$$=$1.substr(8);}
|
| acc_descr_multiline_value { $$=$1.trim();yy.setAccDescription($$); } | section {yy.addSection($1.substr(8));$$=$1.substr(8);}
|
||||||
| directive
|
| directive
|
||||||
|
@ -3,7 +3,7 @@ import mermaidAPI from '../../mermaidAPI';
|
|||||||
import * as configApi from '../../config';
|
import * as configApi from '../../config';
|
||||||
import common from '../common/common';
|
import common from '../common/common';
|
||||||
import {
|
import {
|
||||||
setTitle,
|
setAccTitle,
|
||||||
getTitle,
|
getTitle,
|
||||||
getAccDescription,
|
getAccDescription,
|
||||||
setAccDescription,
|
setAccDescription,
|
||||||
@ -68,7 +68,7 @@ export default {
|
|||||||
getSections,
|
getSections,
|
||||||
cleanupValue,
|
cleanupValue,
|
||||||
clear,
|
clear,
|
||||||
setTitle,
|
setAccTitle,
|
||||||
getTitle,
|
getTitle,
|
||||||
setPieTitle,
|
setPieTitle,
|
||||||
getPieTitle,
|
getPieTitle,
|
||||||
|
@ -101,7 +101,7 @@ start
|
|||||||
directive
|
directive
|
||||||
: openDirective typeDirective closeDirective
|
: openDirective typeDirective closeDirective
|
||||||
| openDirective typeDirective ':' argDirective closeDirective
|
| openDirective typeDirective ':' argDirective closeDirective
|
||||||
| acc_title acc_title_value { $$=$2.trim();yy.setTitle($$); }
|
| acc_title acc_title_value { $$=$2.trim();yy.setAccTitle($$); }
|
||||||
| acc_descr acc_descr_value { $$=$2.trim();yy.setAccDescription($$); }
|
| acc_descr acc_descr_value { $$=$2.trim();yy.setAccDescription($$); }
|
||||||
| acc_descr_multiline_value { $$=$1.trim();yy.setAccDescription($$); }
|
| acc_descr_multiline_value { $$=$1.trim();yy.setAccDescription($$); }
|
||||||
;
|
;
|
||||||
|
@ -3,7 +3,7 @@ import { log } from '../../logger';
|
|||||||
import mermaidAPI from '../../mermaidAPI';
|
import mermaidAPI from '../../mermaidAPI';
|
||||||
import common from '../common/common';
|
import common from '../common/common';
|
||||||
import {
|
import {
|
||||||
setTitle,
|
setAccTitle,
|
||||||
getTitle,
|
getTitle,
|
||||||
getAccDescription,
|
getAccDescription,
|
||||||
setAccDescription,
|
setAccDescription,
|
||||||
@ -162,7 +162,7 @@ export default {
|
|||||||
setNewReqText,
|
setNewReqText,
|
||||||
setNewReqRisk,
|
setNewReqRisk,
|
||||||
setNewReqVerifyMethod,
|
setNewReqVerifyMethod,
|
||||||
setTitle,
|
setAccTitle,
|
||||||
getTitle,
|
getTitle,
|
||||||
setAccDescription,
|
setAccDescription,
|
||||||
getAccDescription,
|
getAccDescription,
|
||||||
|
@ -138,7 +138,7 @@ statement
|
|||||||
| details_statement 'NEWLINE'
|
| details_statement 'NEWLINE'
|
||||||
| title {yy.setDiagramTitle($1.substring(6));$$=$1.substring(6);}
|
| title {yy.setDiagramTitle($1.substring(6));$$=$1.substring(6);}
|
||||||
| legacy_title {yy.setDiagramTitle($1.substring(7));$$=$1.substring(7);}
|
| legacy_title {yy.setDiagramTitle($1.substring(7));$$=$1.substring(7);}
|
||||||
| acc_title acc_title_value { $$=$2.trim();yy.setTitle($$); }
|
| acc_title acc_title_value { $$=$2.trim();yy.setAccTitle($$); }
|
||||||
| acc_descr acc_descr_value { $$=$2.trim();yy.setAccDescription($$); }
|
| acc_descr acc_descr_value { $$=$2.trim();yy.setAccDescription($$); }
|
||||||
| acc_descr_multiline_value { $$=$1.trim();yy.setAccDescription($$); }
|
| acc_descr_multiline_value { $$=$1.trim();yy.setAccDescription($$); }
|
||||||
| 'loop' restOfLine document end
|
| 'loop' restOfLine document end
|
||||||
|
@ -3,7 +3,7 @@ import * as configApi from '../../config';
|
|||||||
import { log } from '../../logger';
|
import { log } from '../../logger';
|
||||||
import { sanitizeText } from '../common/common';
|
import { sanitizeText } from '../common/common';
|
||||||
import {
|
import {
|
||||||
setTitle,
|
setAccTitle,
|
||||||
getTitle,
|
getTitle,
|
||||||
getAccDescription,
|
getAccDescription,
|
||||||
setAccDescription,
|
setAccDescription,
|
||||||
@ -417,8 +417,8 @@ export const apply = function (param) {
|
|||||||
case 'altEnd':
|
case 'altEnd':
|
||||||
addSignal(undefined, undefined, undefined, param.signalType);
|
addSignal(undefined, undefined, undefined, param.signalType);
|
||||||
break;
|
break;
|
||||||
case 'setTitle':
|
case 'setAccTitle':
|
||||||
setTitle(param.text);
|
setAccTitle(param.text);
|
||||||
break;
|
break;
|
||||||
case 'parStart':
|
case 'parStart':
|
||||||
addSignal(undefined, undefined, param.parText, param.signalType);
|
addSignal(undefined, undefined, param.parText, param.signalType);
|
||||||
@ -460,7 +460,7 @@ export default {
|
|||||||
ARROWTYPE,
|
ARROWTYPE,
|
||||||
PLACEMENT,
|
PLACEMENT,
|
||||||
addNote,
|
addNote,
|
||||||
setTitle,
|
setAccTitle,
|
||||||
setDiagramTitle,
|
setDiagramTitle,
|
||||||
apply,
|
apply,
|
||||||
setAccDescription,
|
setAccDescription,
|
||||||
|
@ -204,7 +204,7 @@ statement
|
|||||||
| note NOTE_TEXT AS ID
|
| note NOTE_TEXT AS ID
|
||||||
| directive
|
| directive
|
||||||
| direction
|
| direction
|
||||||
| acc_title acc_title_value { $$=$2.trim();yy.setTitle($$); }
|
| acc_title acc_title_value { $$=$2.trim();yy.setAccTitle($$); }
|
||||||
| acc_descr acc_descr_value { $$=$2.trim();yy.setAccDescription($$); }
|
| acc_descr acc_descr_value { $$=$2.trim();yy.setAccDescription($$); }
|
||||||
| acc_descr_multiline_value { $$=$1.trim();yy.setAccDescription($$); } ;
|
| acc_descr_multiline_value { $$=$1.trim();yy.setAccDescription($$); } ;
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@ import mermaidAPI from '../../mermaidAPI';
|
|||||||
import common from '../common/common';
|
import common from '../common/common';
|
||||||
import * as configApi from '../../config';
|
import * as configApi from '../../config';
|
||||||
import {
|
import {
|
||||||
setTitle,
|
setAccTitle,
|
||||||
getTitle,
|
getTitle,
|
||||||
getAccDescription,
|
getAccDescription,
|
||||||
setAccDescription,
|
setAccDescription,
|
||||||
@ -294,7 +294,7 @@ export default {
|
|||||||
extract,
|
extract,
|
||||||
trimColon,
|
trimColon,
|
||||||
getTitle,
|
getTitle,
|
||||||
setTitle,
|
setAccTitle,
|
||||||
getAccDescription,
|
getAccDescription,
|
||||||
setAccDescription,
|
setAccDescription,
|
||||||
};
|
};
|
||||||
|
@ -2,7 +2,7 @@ import mermaidAPI from '../../mermaidAPI';
|
|||||||
import * as configApi from '../../config';
|
import * as configApi from '../../config';
|
||||||
import common from '../common/common';
|
import common from '../common/common';
|
||||||
import {
|
import {
|
||||||
setTitle,
|
setAccTitle,
|
||||||
getTitle,
|
getTitle,
|
||||||
getAccDescription,
|
getAccDescription,
|
||||||
setAccDescription,
|
setAccDescription,
|
||||||
@ -126,7 +126,7 @@ export default {
|
|||||||
parseDirective,
|
parseDirective,
|
||||||
getConfig: () => configApi.getConfig().journey,
|
getConfig: () => configApi.getConfig().journey,
|
||||||
clear,
|
clear,
|
||||||
setTitle,
|
setAccTitle,
|
||||||
getTitle,
|
getTitle,
|
||||||
setAccDescription,
|
setAccDescription,
|
||||||
getAccDescription,
|
getAccDescription,
|
||||||
|
@ -43,7 +43,7 @@ describe('when using the journeyDb', function () {
|
|||||||
});
|
});
|
||||||
|
|
||||||
describe('tasks and actors should be added', function () {
|
describe('tasks and actors should be added', function () {
|
||||||
journeyDb.setTitle('Shopping');
|
journeyDb.setAccTitle('Shopping');
|
||||||
journeyDb.setAccDescription('A user journey for family shopping');
|
journeyDb.setAccDescription('A user journey for family shopping');
|
||||||
journeyDb.addSection('Journey to the shops');
|
journeyDb.addSection('Journey to the shops');
|
||||||
journeyDb.addTask('Get car keys', ':5:Dad');
|
journeyDb.addTask('Get car keys', ':5:Dad');
|
||||||
|
@ -73,8 +73,8 @@ directive
|
|||||||
;
|
;
|
||||||
|
|
||||||
statement
|
statement
|
||||||
: title {yy.setTitle($1.substr(6));$$=$1.substr(6);}
|
: title {yy.setAccTitle($1.substr(6));$$=$1.substr(6);}
|
||||||
| acc_title acc_title_value { $$=$2.trim();yy.setTitle($$); }
|
| acc_title acc_title_value { $$=$2.trim();yy.setAccTitle($$); }
|
||||||
| acc_descr acc_descr_value { $$=$2.trim();yy.setAccDescription($$); }
|
| acc_descr acc_descr_value { $$=$2.trim();yy.setAccDescription($$); }
|
||||||
| acc_descr_multiline_value { $$=$1.trim();yy.setAccDescription($$); }
|
| acc_descr_multiline_value { $$=$1.trim();yy.setAccDescription($$); }
|
||||||
| section {yy.addSection($1.substr(8));$$=$1.substr(8);}
|
| section {yy.addSection($1.substr(8));$$=$1.substr(8);}
|
||||||
|
@ -31,7 +31,6 @@ const themes = {
|
|||||||
export const calcThemeVariables = (theme, userOverRides) => theme.calcColors(userOverRides);
|
export const calcThemeVariables = (theme, userOverRides) => theme.calcColors(userOverRides);
|
||||||
|
|
||||||
const getStyles = (type, userStyles, options) => {
|
const getStyles = (type, userStyles, options) => {
|
||||||
//console.warn('options in styles: ', options);
|
|
||||||
return ` {
|
return ` {
|
||||||
font-family: ${options.fontFamily};
|
font-family: ${options.fontFamily};
|
||||||
font-size: ${options.fontSize};
|
font-size: ${options.fontSize};
|
||||||
|
@ -10,33 +10,15 @@ class Theme {
|
|||||||
this.background = '#f4f4f4';
|
this.background = '#f4f4f4';
|
||||||
this.darkMode = false;
|
this.darkMode = false;
|
||||||
|
|
||||||
// this.background = '#0c0c0c';
|
|
||||||
// this.darkMode = true;
|
|
||||||
this.primaryColor = '#fff4dd';
|
this.primaryColor = '#fff4dd';
|
||||||
// this.background = '#0c0c0c';
|
|
||||||
// this.primaryColor = '#1f1f00';
|
|
||||||
|
|
||||||
this.noteBkgColor = '#fff5ad';
|
this.noteBkgColor = '#fff5ad';
|
||||||
this.noteTextColor = '#333';
|
this.noteTextColor = '#333';
|
||||||
|
|
||||||
// dark
|
// dark
|
||||||
|
|
||||||
// this.primaryColor = '#034694';
|
|
||||||
// this.primaryColor = '#f2ee7e';
|
|
||||||
// this.primaryColor = '#9f33be';
|
|
||||||
// this.primaryColor = '#f0fff0';
|
|
||||||
// this.primaryColor = '#fa255e';
|
|
||||||
// this.primaryColor = '#ECECFF';
|
|
||||||
|
|
||||||
// this.secondaryColor = '#c39ea0';
|
|
||||||
// this.tertiaryColor = '#f8e5e5';
|
|
||||||
|
|
||||||
// this.secondaryColor = '#dfdfde';
|
|
||||||
// this.tertiaryColor = '#CCCCFF';
|
|
||||||
|
|
||||||
this.fontFamily = '"trebuchet ms", verdana, arial, sans-serif';
|
this.fontFamily = '"trebuchet ms", verdana, arial, sans-serif';
|
||||||
this.fontSize = '16px';
|
this.fontSize = '16px';
|
||||||
// this.updateColors();
|
|
||||||
}
|
}
|
||||||
updateColors() {
|
updateColors() {
|
||||||
// The || is to make sure that if the variable has been defiend by a user override that value is to be used
|
// The || is to make sure that if the variable has been defiend by a user override that value is to be used
|
||||||
|
Loading…
x
Reference in New Issue
Block a user