mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2025-12-24 20:42:43 +00:00
Merge branch 'master' into experimentalHTMLSanitization
This commit is contained in:
@@ -5,6 +5,7 @@ const createClass = require('create-react-class');
|
||||
const _ = require('lodash');
|
||||
const cx = require('classnames');
|
||||
const dedent = require('dedent-tabs').default;
|
||||
const Markdown = require('../../../shared/naturalcrit/markdown.js');
|
||||
|
||||
const CodeEditor = require('naturalcrit/codeEditor/codeEditor.jsx');
|
||||
const SnippetBar = require('./snippetbar/snippetbar.jsx');
|
||||
@@ -219,6 +220,34 @@ const Editor = createClass({
|
||||
endCh = match.index+match[0].length;
|
||||
codeMirror.markText({ line: lineNumber, ch: 0 }, { line: lineNumber, ch: endCh }, { className: 'block' });
|
||||
}
|
||||
|
||||
// Emojis
|
||||
if(line.match(/:[^\s:]+:/g)) {
|
||||
let startIndex = line.indexOf(':');
|
||||
const emojiRegex = /:[^\s:]+:/gy;
|
||||
|
||||
while (startIndex >= 0) {
|
||||
emojiRegex.lastIndex = startIndex;
|
||||
let match = emojiRegex.exec(line);
|
||||
if (match) {
|
||||
let tokens = Markdown.marked.lexer(match[0]);
|
||||
tokens = tokens[0].tokens.filter(t => t.type == 'emoji')
|
||||
if (!tokens.length)
|
||||
return;
|
||||
|
||||
let startPos = { line: lineNumber, ch: match.index };
|
||||
let endPos = { line: lineNumber, ch: match.index + match[0].length };
|
||||
|
||||
// Iterate over conflicting marks and clear them
|
||||
var marks = codeMirror.findMarks(startPos, endPos);
|
||||
marks.forEach(function(marker) {
|
||||
marker.clear();
|
||||
});
|
||||
codeMirror.markText(startPos, endPos, { className: 'emoji' });
|
||||
}
|
||||
startIndex = line.indexOf(':', Math.max(startIndex + 1, emojiRegex.lastIndex));
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
@@ -43,6 +43,16 @@
|
||||
font-weight : bold;
|
||||
color : green;
|
||||
}
|
||||
.emoji:not(.cm-comment) {
|
||||
margin-left : 2px;
|
||||
color : #360034;
|
||||
background : #ffc8ff;
|
||||
border-radius : 6px;
|
||||
font-weight : bold;
|
||||
padding-bottom : 1px;
|
||||
outline-offset : -2px;
|
||||
outline : solid 2px #ff96fc;
|
||||
}
|
||||
.superscript:not(.cm-comment) {
|
||||
font-weight : bold;
|
||||
color : goldenrod;
|
||||
|
||||
@@ -32,6 +32,7 @@
|
||||
"test:mustache-syntax:block": "jest \".*(mustache-syntax).*\" -t '^Block:.*' --verbose --noStackTrace",
|
||||
"test:mustache-syntax:injection": "jest \".*(mustache-syntax).*\" -t '^Injection:.*' --verbose --noStackTrace",
|
||||
"test:definition-lists": "jest tests/markdown/definition-lists.test.js --verbose --noStackTrace",
|
||||
"test:emojis": "jest tests/markdown/emojis.test.js --verbose --noStackTrace",
|
||||
"test:route": "jest tests/routes/static-pages.test.js --verbose",
|
||||
"phb": "node scripts/phb.js",
|
||||
"prod": "set NODE_ENV=production && npm run build",
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
"codemirror/addon/edit/closetag.js",
|
||||
"codemirror/addon/edit/trailingspace.js",
|
||||
"codemirror/addon/selection/active-line.js",
|
||||
"codemirror/addon/hint/show-hint.js",
|
||||
"moment",
|
||||
"superagent"
|
||||
]
|
||||
|
||||
82
shared/naturalcrit/codeEditor/autocompleteEmoji.js
Normal file
82
shared/naturalcrit/codeEditor/autocompleteEmoji.js
Normal file
@@ -0,0 +1,82 @@
|
||||
const diceFont = require('../../../themes/fonts/iconFonts/diceFont.js');
|
||||
const elderberryInn = require('../../../themes/fonts/iconFonts/elderberryInn.js');
|
||||
const fontAwesome = require('../../../themes/fonts/iconFonts/fontAwesome.js');
|
||||
|
||||
const emojis = {
|
||||
...diceFont,
|
||||
...elderberryInn,
|
||||
...fontAwesome
|
||||
};
|
||||
|
||||
const showAutocompleteEmoji = function(CodeMirror, editor) {
|
||||
CodeMirror.commands.autocomplete = function(editor) {
|
||||
editor.showHint({
|
||||
completeSingle : false,
|
||||
hint : function(editor) {
|
||||
const cursor = editor.getCursor();
|
||||
const line = cursor.line;
|
||||
const lineContent = editor.getLine(line);
|
||||
const start = lineContent.lastIndexOf(':', cursor.ch - 1) + 1;
|
||||
const end = cursor.ch;
|
||||
const currentWord = lineContent.slice(start, end);
|
||||
|
||||
|
||||
const list = Object.keys(emojis).filter(function(emoji) {
|
||||
return emoji.toLowerCase().indexOf(currentWord.toLowerCase()) >= 0;
|
||||
}).sort((a, b)=>{
|
||||
const lowerA = a.replace(/\d+/g, function(match) { // Temporarily convert any numbers in emoji string
|
||||
return match.padStart(4, '0'); // to 4-digits, left-padded with 0's, to aid in
|
||||
}).toLowerCase(); // sorting numbers, i.e., "d6, d10, d20", not "d10, d20, d6"
|
||||
const lowerB = b.replace(/\d+/g, function(match) { // Also make lowercase for case-insensitive alpha sorting
|
||||
return match.padStart(4, '0');
|
||||
}).toLowerCase();
|
||||
|
||||
if(lowerA < lowerB)
|
||||
return -1;
|
||||
return 1;
|
||||
}).map(function(emoji) {
|
||||
return {
|
||||
text : `${emoji}:`, // Text to output to editor when option is selected
|
||||
render : function(element, self, data) { // How to display the option in the dropdown
|
||||
const div = document.createElement('div');
|
||||
div.innerHTML = `<i class="emojiPreview ${emojis[emoji]}"></i> ${emoji}`;
|
||||
element.appendChild(div);
|
||||
}
|
||||
};
|
||||
});
|
||||
|
||||
return {
|
||||
list : list.length ? list : [],
|
||||
from : CodeMirror.Pos(line, start),
|
||||
to : CodeMirror.Pos(line, end)
|
||||
};
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
editor.on('inputRead', function(instance, change) {
|
||||
const cursor = editor.getCursor();
|
||||
const line = editor.getLine(cursor.line);
|
||||
|
||||
// Get the text from the start of the line to the cursor
|
||||
const textToCursor = line.slice(0, cursor.ch);
|
||||
|
||||
// Do not autosuggest emojis in curly span/div/injector properties
|
||||
if(line.includes('{')) {
|
||||
const curlyToCursor = textToCursor.slice(textToCursor.indexOf(`{`));
|
||||
const curlySpanRegex = /{(?=((?:[:=](?:"[\w,\-()#%. ]*"|[\w\-()#%.]*)|[^"':={}\s]*)*))\1$/g;
|
||||
|
||||
if(curlySpanRegex.test(curlyToCursor))
|
||||
return;
|
||||
}
|
||||
|
||||
// Check if the text ends with ':xyz'
|
||||
if(/:[^\s:]+$/.test(textToCursor)) {
|
||||
CodeMirror.commands.autocomplete(editor);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
module.exports = {
|
||||
showAutocompleteEmoji
|
||||
};
|
||||
@@ -5,6 +5,7 @@ const createClass = require('create-react-class');
|
||||
const _ = require('lodash');
|
||||
const cx = require('classnames');
|
||||
const closeTag = require('./close-tag');
|
||||
const autoCompleteEmoji = require('./autocompleteEmoji');
|
||||
|
||||
let CodeMirror;
|
||||
if(typeof window !== 'undefined'){
|
||||
@@ -36,6 +37,8 @@ if(typeof window !== 'undefined'){
|
||||
//XML code folding is a requirement of the auto-closing tag feature and is not enabled
|
||||
require('codemirror/addon/fold/xml-fold.js');
|
||||
require('codemirror/addon/edit/closetag.js');
|
||||
//Autocompletion
|
||||
require('codemirror/addon/hint/show-hint.js');
|
||||
|
||||
const foldCode = require('./fold-code');
|
||||
foldCode.registerHomebreweryHelper(CodeMirror);
|
||||
@@ -177,7 +180,10 @@ const CodeEditor = createClass({
|
||||
// return el;
|
||||
// }
|
||||
});
|
||||
|
||||
// Add custom behaviors (auto-close curlies and auto-complete emojis)
|
||||
closeTag.autoCloseCurlyBraces(CodeMirror, this.codeMirror);
|
||||
autoCompleteEmoji.showAutocompleteEmoji(CodeMirror, this.codeMirror);
|
||||
|
||||
// Note: codeMirror passes a copy of itself in this callback. cm === this.codeMirror. Either one works.
|
||||
this.codeMirror.on('change', (cm)=>{this.props.onChange(cm.getValue());});
|
||||
@@ -436,7 +442,7 @@ const CodeEditor = createClass({
|
||||
|
||||
render : function(){
|
||||
return <>
|
||||
<link href={`../homebrew/cm-themes/${this.props.editorTheme}.css`} type="text/css" rel='stylesheet' />
|
||||
<link href={`../homebrew/cm-themes/${this.props.editorTheme}.css`} type='text/css' rel='stylesheet' />
|
||||
<div className='codeEditor' ref='editor' style={this.props.style}/>
|
||||
</>;
|
||||
}
|
||||
|
||||
@@ -2,6 +2,11 @@
|
||||
@import (less) 'codemirror/addon/fold/foldgutter.css';
|
||||
@import (less) 'codemirror/addon/search/matchesonscrollbar.css';
|
||||
@import (less) 'codemirror/addon/dialog/dialog.css';
|
||||
@import (less) 'codemirror/addon/hint/show-hint.css';
|
||||
|
||||
//Icon fonts included so they can appear in emoji autosuggest dropdown
|
||||
@import (less) './themes/fonts/iconFonts/diceFont.less';
|
||||
@import (less) './themes/fonts/iconFonts/elderberryInn.less';
|
||||
|
||||
@keyframes sourceMoveAnimation {
|
||||
50% {background-color: red; color: white;}
|
||||
@@ -34,6 +39,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//.cm-tab {
|
||||
// background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAMCAQAAACOs/baAAAARUlEQVR4nGJgIAG8JkXxUAcCtDWemcGR1lY4MvgzCEKY7jSBjgxBDAG09UEQzAe0AMwMHrSOAwEGRtpaMIwAAAAA//8DAG4ID9EKs6YqAAAAAElFTkSuQmCC) no-repeat right;
|
||||
//}
|
||||
@@ -44,3 +50,8 @@
|
||||
// }
|
||||
//}
|
||||
}
|
||||
|
||||
.emojiPreview {
|
||||
font-size: 1.5em;
|
||||
line-height: 1.2em;
|
||||
}
|
||||
@@ -4,6 +4,13 @@ const Marked = require('marked');
|
||||
const MarkedExtendedTables = require('marked-extended-tables');
|
||||
const { markedSmartypantsLite: MarkedSmartypantsLite } = require('marked-smartypants-lite');
|
||||
const { gfmHeadingId: MarkedGFMHeadingId } = require('marked-gfm-heading-id');
|
||||
const { markedEmoji: MarkedEmojis } = require('marked-emoji');
|
||||
|
||||
//Icon fonts included so they can appear in emoji autosuggest dropdown
|
||||
const diceFont = require('../../themes/fonts/iconFonts/diceFont.js');
|
||||
const elderberryInn = require('../../themes/fonts/iconFonts/elderberryInn.js');
|
||||
const fontAwesome = require('../../themes/fonts/iconFonts/fontAwesome.js');
|
||||
|
||||
const MathParser = require('expr-eval').Parser;
|
||||
const renderer = new Marked.Renderer();
|
||||
const tokenizer = new Marked.Tokenizer();
|
||||
@@ -140,7 +147,7 @@ const mustacheSpans = {
|
||||
`${tags.classes ? ` class="${tags.classes}"` : ''}` +
|
||||
`${tags.id ? ` id="${tags.id}"` : ''}` +
|
||||
`${tags.styles ? ` style="${tags.styles}"` : ''}` +
|
||||
`${tags.attributes ? ` ${Object.entries(tags.attributes).map(([key, value]) => `${key}="${value}"`).join(' ')}` : ''}` +
|
||||
`${tags.attributes ? ` ${Object.entries(tags.attributes).map(([key, value])=>`${key}="${value}"`).join(' ')}` : ''}` +
|
||||
`>${this.parser.parseInline(token.tokens)}</span>`; // parseInline to turn child tokens into HTML
|
||||
}
|
||||
};
|
||||
@@ -196,7 +203,7 @@ const mustacheDivs = {
|
||||
`${tags.classes ? ` class="${tags.classes}"` : ''}` +
|
||||
`${tags.id ? ` id="${tags.id}"` : ''}` +
|
||||
`${tags.styles ? ` style="${tags.styles}"` : ''}` +
|
||||
`${tags.attributes ? ` ${Object.entries(tags.attributes).map(([key, value]) => `${key}="${value}"`).join(' ')}` : ''}` +
|
||||
`${tags.attributes ? ` ${Object.entries(tags.attributes).map(([key, value])=>`${key}="${value}"`).join(' ')}` : ''}` +
|
||||
`>${this.parser.parse(token.tokens)}</div>`; // parse to turn child tokens into HTML
|
||||
}
|
||||
};
|
||||
@@ -244,7 +251,7 @@ const mustacheInjectInline = {
|
||||
`${tags.classes ? ` class="${tags.classes}"` : ''}` +
|
||||
`${tags.id ? ` id="${tags.id}"` : ''}` +
|
||||
`${tags.styles ? ` style="${tags.styles}"` : ''}` +
|
||||
`${!_.isEmpty(tags.attributes) ? ` ${Object.entries(tags.attributes).map(([key, value]) => `${key}="${value}"`).join(' ')}` : ''}` +
|
||||
`${!_.isEmpty(tags.attributes) ? ` ${Object.entries(tags.attributes).map(([key, value])=>`${key}="${value}"`).join(' ')}` : ''}` +
|
||||
`${openingTag[2]}`; // parse to turn child tokens into HTML
|
||||
}
|
||||
return text;
|
||||
@@ -293,7 +300,7 @@ const mustacheInjectBlock = {
|
||||
`${tags.classes ? ` class="${tags.classes}"` : ''}` +
|
||||
`${tags.id ? ` id="${tags.id}"` : ''}` +
|
||||
`${tags.styles ? ` style="${tags.styles}"` : ''}` +
|
||||
`${!_.isEmpty(tags.attributes) ? ` ${Object.entries(tags.attributes).map(([key, value]) => `${key}="${value}"`).join(' ')}` : ''}` +
|
||||
`${!_.isEmpty(tags.attributes) ? ` ${Object.entries(tags.attributes).map(([key, value])=>`${key}="${value}"`).join(' ')}` : ''}` +
|
||||
`${openingTag[2]}`; // parse to turn child tokens into HTML
|
||||
}
|
||||
return text;
|
||||
@@ -347,10 +354,19 @@ const definitionListsSingleLine = {
|
||||
let endIndex = 0;
|
||||
const definitions = [];
|
||||
while (match = regex.exec(src)) {
|
||||
definitions.push({
|
||||
dt : this.lexer.inlineTokens(match[1].trim()),
|
||||
dd : this.lexer.inlineTokens(match[2].trim())
|
||||
});
|
||||
const originalLine = match[0]; // This line and below to handle conflict with emojis
|
||||
let firstLine = originalLine; // Remove in V4 when definitionListsInline updated to
|
||||
this.lexer.inlineTokens(firstLine.trim()) // require spaces around `::`
|
||||
.filter((t)=>t.type == 'emoji')
|
||||
.map((emoji)=>firstLine = firstLine.replace(emoji.raw, 'x'.repeat(emoji.raw.length)));
|
||||
|
||||
const newMatch = /^([^\n]*?)::([^\n]*)(?:\n|$)/ym.exec(firstLine);
|
||||
if(newMatch) {
|
||||
definitions.push({
|
||||
dt : this.lexer.inlineTokens(originalLine.slice(0, newMatch[1].length).trim()),
|
||||
dd : this.lexer.inlineTokens(originalLine.slice(newMatch[1].length + 2).trim())
|
||||
});
|
||||
} // End of emoji hack.
|
||||
endIndex = regex.lastIndex;
|
||||
}
|
||||
if(definitions.length) {
|
||||
@@ -659,11 +675,29 @@ function MarkedVariables() {
|
||||
};
|
||||
//^=====--------------------< Variable Handling >-------------------=====^//
|
||||
|
||||
// Emoji options
|
||||
// To add more icon fonts, need to do these things
|
||||
// 1) Add the font file as .woff2 to themes/fonts/iconFonts folder
|
||||
// 2) Create a .less file mapping CSS class names to the font character
|
||||
// 3) Create a .js file mapping Autosuggest names to CSS class names
|
||||
// 4) Import the .less file into shared/naturalcrit/codeEditor/codeEditor.less
|
||||
// 5) Import the .less file into themes/V3/blank.style.less
|
||||
// 6) Import the .js file to shared/naturalcrit/codeEditor/autocompleteEmoji.js and add to `emojis` object
|
||||
// 7) Import the .js file here to markdown.js, and add to `emojis` object below
|
||||
const MarkedEmojiOptions = {
|
||||
emojis : {
|
||||
...diceFont,
|
||||
...elderberryInn,
|
||||
...fontAwesome
|
||||
},
|
||||
renderer : (token)=>`<i class="${token.emoji}"></i>`
|
||||
};
|
||||
|
||||
Marked.use(MarkedVariables());
|
||||
Marked.use({ extensions: [definitionListsMultiLine, definitionListsSingleLine, superSubScripts, mustacheSpans, mustacheDivs, mustacheInjectInline] });
|
||||
Marked.use(mustacheInjectBlock);
|
||||
Marked.use({ renderer: renderer, tokenizer: tokenizer, mangle: false });
|
||||
Marked.use(MarkedExtendedTables(), MarkedGFMHeadingId(), MarkedSmartypantsLite());
|
||||
Marked.use(MarkedExtendedTables(), MarkedGFMHeadingId(), MarkedSmartypantsLite(), MarkedEmojis(MarkedEmojiOptions));
|
||||
|
||||
const nonWordAndColonTest = /[^\w:]/g;
|
||||
const cleanUrl = function (sanitize, base, href) {
|
||||
@@ -733,9 +767,9 @@ const processStyleTags = (string)=>{
|
||||
const id = _.remove(tags, (tag)=>tag.startsWith('#')).map((tag)=>tag.slice(1))[0] || null;
|
||||
const classes = _.remove(tags, (tag)=>(!tag.includes(':')) && (!tag.includes('='))).join(' ') || null;
|
||||
const attributes = _.remove(tags, (tag)=>(tag.includes('='))).map((tag)=>tag.replace(/="?([^"]*)"?/g, '="$1"'))
|
||||
?.filter(attr => !attr.startsWith('class="') && !attr.startsWith('style="') && !attr.startsWith('id="'))
|
||||
.reduce((obj, attr) => {
|
||||
let [key, value] = attr.split("=");
|
||||
?.filter((attr)=>!attr.startsWith('class="') && !attr.startsWith('style="') && !attr.startsWith('id="'))
|
||||
.reduce((obj, attr)=>{
|
||||
let [key, value] = attr.split('=');
|
||||
value = value.replace(/"/g, '');
|
||||
obj[key] = value;
|
||||
return obj;
|
||||
@@ -750,14 +784,14 @@ const processStyleTags = (string)=>{
|
||||
};
|
||||
};
|
||||
|
||||
const extractHTMLStyleTags = (htmlString)=> {
|
||||
const extractHTMLStyleTags = (htmlString)=>{
|
||||
const id = htmlString.match(/id="([^"]*)"/)?.[1] || null;
|
||||
const classes = htmlString.match(/class="([^"]*)"/)?.[1] || null;
|
||||
const styles = htmlString.match(/style="([^"]*)"/)?.[1] || null;
|
||||
const attributes = htmlString.match(/[a-zA-Z]+="[^"]*"/g)
|
||||
?.filter(attr => !attr.startsWith('class="') && !attr.startsWith('style="') && !attr.startsWith('id="'))
|
||||
.reduce((obj, attr) => {
|
||||
let [key, value] = attr.split("=");
|
||||
?.filter((attr)=>!attr.startsWith('class="') && !attr.startsWith('style="') && !attr.startsWith('id="'))
|
||||
.reduce((obj, attr)=>{
|
||||
let [key, value] = attr.split('=');
|
||||
value = value.replace(/"/g, '');
|
||||
obj[key] = value;
|
||||
return obj;
|
||||
|
||||
58
tests/markdown/emojis.test.js
Normal file
58
tests/markdown/emojis.test.js
Normal file
@@ -0,0 +1,58 @@
|
||||
const Markdown = require('naturalcrit/markdown.js');
|
||||
const dedent = require('dedent-tabs').default;
|
||||
|
||||
// Marked.js adds line returns after closing tags on some default tokens.
|
||||
// This removes those line returns for comparison sake.
|
||||
String.prototype.trimReturns = function(){
|
||||
return this.replace(/\r?\n|\r/g, '');
|
||||
};
|
||||
|
||||
const emoji = 'df_d12_2';
|
||||
|
||||
describe(`When emojis/icons are active`, ()=>{
|
||||
it('when a word is between two colons (:word:), and a matching emoji exists, it is rendered as an emoji', function() {
|
||||
const source = `:${emoji}:`;
|
||||
const rendered = Markdown.render(source).trimReturns();
|
||||
expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe(`<p><i class="df d12-2"></i></p>`);
|
||||
});
|
||||
|
||||
it('when a word is between two colons (:word:), and no matching emoji exists, it is not parsed', function() {
|
||||
const source = `:invalid:`;
|
||||
const rendered = Markdown.render(source).trimReturns();
|
||||
expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe(`<p>:invalid:</p>`);
|
||||
});
|
||||
|
||||
it('two valid emojis with no whitespace are prioritized over definition lists', function() {
|
||||
const source = `:${emoji}::${emoji}:`;
|
||||
const rendered = Markdown.render(source).trimReturns();
|
||||
expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe(`<p><i class="df d12-2"></i><i class="df d12-2"></i></p>`);
|
||||
});
|
||||
|
||||
it('definition lists that are not also part of an emoji can coexist with normal emojis', function() {
|
||||
const source = `definition :: term ${emoji}::${emoji}:`;
|
||||
const rendered = Markdown.render(source).trimReturns();
|
||||
expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe(`<dl><dt>definition</dt><dd>term df_d12_2:<i class="df d12-2"></i></dd></dl>`);
|
||||
});
|
||||
|
||||
it('A valid emoji is compatible with curly injectors', function() {
|
||||
const source = `:${emoji}:{color:blue,myClass}`;
|
||||
const rendered = Markdown.render(source).trimReturns();
|
||||
expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe(`<p><i class="df d12-2 myClass" style="color:blue;"></i></p>`);
|
||||
});
|
||||
|
||||
it('Emojis are not parsed inside of curly span CSS blocks', function() {
|
||||
const source = `{{color:${emoji} text}}`;
|
||||
const rendered = Markdown.render(source).trimReturns();
|
||||
expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe(`<span class="inline-block" style="color:df_d12_2;">text</span>`);
|
||||
});
|
||||
|
||||
it('Emojis are not parsed inside of curly div CSS blocks', function() {
|
||||
const source = dedent`{{color:${emoji}
|
||||
text
|
||||
}}`;
|
||||
const rendered = Markdown.render(source).trimReturns();
|
||||
expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe(`<div class="block" style="color:df_d12_2;"><p>text</p></div>`);
|
||||
});
|
||||
|
||||
// another test of the editor to confirm an autocomplete menu opens
|
||||
});
|
||||
@@ -1,6 +1,4 @@
|
||||
@import (less) './themes/assets/assets.less';
|
||||
@import (less) './themes/fonts/icon fonts/font-icons.less';
|
||||
@import (less) './themes/fonts/icon fonts/diceFont.less';
|
||||
|
||||
:root {
|
||||
//Colors
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
@import (less) './themes/fonts/5e/fonts.less';
|
||||
@import (less) './themes/assets/assets.less';
|
||||
@import (less) './themes/fonts/icon fonts/diceFont.less';
|
||||
@import (less) './themes/fonts/iconFonts/elderberryInn.less';
|
||||
@import (less) './themes/fonts/iconFonts/diceFont.less';
|
||||
|
||||
:root {
|
||||
//Colors
|
||||
|
||||
@@ -1,224 +0,0 @@
|
||||
/* Icon Font: Elderberry Inn */
|
||||
@font-face {
|
||||
font-family : 'Elderberry-Inn';
|
||||
font-style : normal;
|
||||
font-weight : normal;
|
||||
src : url('../../../fonts/icon fonts/Elderberry-Inn-Icons.woff2');
|
||||
}
|
||||
|
||||
.page {
|
||||
span.ei {
|
||||
display : inline-block;
|
||||
margin-right : 3px;
|
||||
font-family : 'Elderberry-Inn';
|
||||
line-height : 1;
|
||||
vertical-align : baseline;
|
||||
-moz-osx-font-smoothing : grayscale;
|
||||
-webkit-font-smoothing : antialiased;
|
||||
text-rendering : auto;
|
||||
|
||||
&.book::before { content : '\E900'; }
|
||||
&.screen::before { content : '\E901'; }
|
||||
|
||||
/* Spell levels */
|
||||
&.spell-0::before { content : '\E902'; }
|
||||
&.spell-1::before { content : '\E903'; }
|
||||
&.spell-2::before { content : '\E904'; }
|
||||
&.spell-3::before { content : '\E905'; }
|
||||
&.spell-4::before { content : '\E906'; }
|
||||
&.spell-5::before { content : '\E907'; }
|
||||
&.spell-6::before { content : '\E908'; }
|
||||
&.spell-7::before { content : '\E909'; }
|
||||
&.spell-8::before { content : '\E90A'; }
|
||||
&.spell-9::before { content : '\E90B'; }
|
||||
|
||||
/* Damage types */
|
||||
&.acid::before { content : '\E90C'; }
|
||||
&.bludgeoning::before { content : '\E90D'; }
|
||||
&.cold::before { content : '\E90E'; }
|
||||
&.fire::before { content : '\E90F'; }
|
||||
&.force::before { content : '\E910'; }
|
||||
&.lightning::before { content : '\E911'; }
|
||||
&.necrotic::before { content : '\E912'; }
|
||||
&.piercing::before { content : '\E914'; }
|
||||
&.poison::before { content : '\E913'; }
|
||||
&.psychic::before { content : '\E915'; }
|
||||
&.radiant::before { content : '\E916'; }
|
||||
&.slashing::before { content : '\E917'; }
|
||||
&.thunder::before { content : '\E918'; }
|
||||
|
||||
/* DnD Conditions */
|
||||
&.blinded::before { content : '\E919'; }
|
||||
&.charmed::before { content : '\E91A'; }
|
||||
&.deafened::before { content : '\E91B'; }
|
||||
&.exhaust-1::before { content : '\E91C'; }
|
||||
&.exhaust-2::before { content : '\E91D'; }
|
||||
&.exhaust-3::before { content : '\E91E'; }
|
||||
&.exhaust-4::before { content : '\E91F'; }
|
||||
&.exhaust-5::before { content : '\E920'; }
|
||||
&.exhaust-6::before { content : '\E921'; }
|
||||
&.frightened::before { content : '\E922'; }
|
||||
&.grappled::before { content : '\E923'; }
|
||||
&.incapacitated::before { content : '\E924'; }
|
||||
&.invisible::before { content : '\E926'; }
|
||||
&.paralyzed::before { content : '\E927'; }
|
||||
&.petrified::before { content : '\E928'; }
|
||||
&.poisoned::before { content : '\E929'; }
|
||||
&.prone::before { content : '\E92A'; }
|
||||
&.restrained::before { content : '\E92B'; }
|
||||
&.stunned::before { content : '\E92C'; }
|
||||
&.unconscious::before { content : '\E925'; }
|
||||
|
||||
/* Character Classes and Features */
|
||||
&.barbarian-rage::before { content : '\E92D'; }
|
||||
&.barbarian-reckless-attack::before { content : '\E92E'; }
|
||||
&.bardic-inspiration::before { content : '\E92F'; }
|
||||
&.cleric-channel-divinity::before { content : '\E930'; }
|
||||
&.druid-wild-shape::before { content : '\E931'; }
|
||||
&.fighter-action-surge::before { content : '\E932'; }
|
||||
&.fighter-second-wind::before { content : '\E933'; }
|
||||
&.monk-flurry-blows::before { content : '\E934'; }
|
||||
&.monk-patient-defense::before { content : '\E935'; }
|
||||
&.monk-step-of-the-wind::before { content : '\E936'; }
|
||||
&.monk-step-of-the-wind-2::before { content : '\E937'; }
|
||||
&.monk-step-of-the-wind-3::before { content : '\E938'; }
|
||||
&.monk-stunning-strike::before { content : '\E939'; }
|
||||
&.monk-stunning-strike-2::before { content : '\E939'; }
|
||||
&.paladin-divine-smite::before { content : '\E93B'; }
|
||||
&.paladin-lay-on-hands::before { content : '\E93C'; }
|
||||
&.barbarian-abilities::before { content : '\E93D'; }
|
||||
&.barbarian::before { content : '\E93E'; }
|
||||
&.bard-abilities::before { content : '\E93F'; }
|
||||
&.bard::before { content : '\E940'; }
|
||||
&.cleric-abilities::before { content : '\E941'; }
|
||||
&.cleric::before { content : '\E942'; }
|
||||
&.druid-abilities::before { content : '\E943'; }
|
||||
&.druid::before { content : '\E944'; }
|
||||
&.fighter-abilities::before { content : '\E945'; }
|
||||
&.fighter::before { content : '\E946'; }
|
||||
&.monk-abilities::before { content : '\E947'; }
|
||||
&.monk::before { content : '\E948'; }
|
||||
&.paladin-abilities::before { content : '\E949'; }
|
||||
&.paladin::before { content : '\E94A'; }
|
||||
&.ranger-abilities::before { content : '\E94B'; }
|
||||
&.ranger::before { content : '\E94C'; }
|
||||
&.rogue-abilities::before { content : '\E94D'; }
|
||||
&.rogue::before { content : '\E94E'; }
|
||||
&.sorcerer-abilities::before { content : '\E94F'; }
|
||||
&.sorcerer::before { content : '\E950'; }
|
||||
&.warlock-abilities::before { content : '\E951'; }
|
||||
&.warlock::before { content : '\E952'; }
|
||||
&.wizard-abilities::before { content : '\E953'; }
|
||||
&.wizard::before { content : '\E954'; }
|
||||
|
||||
/* Types of actions */
|
||||
&.movement::before { content : '\E955'; }
|
||||
&.action::before { content : '\E956'; }
|
||||
&.bonus-action::before { content : '\E957'; }
|
||||
&.reaction::before { content : '\E958'; }
|
||||
|
||||
/* SRD Spells */
|
||||
&.acid-arrow::before { content : '\E959'; }
|
||||
&.action-1::before { content : '\E95A'; }
|
||||
&.alter-self::before { content : '\E95B'; }
|
||||
&.alter-self-2::before { content : '\E95C'; }
|
||||
&.animal-friendship::before { content : '\E95E'; }
|
||||
&.animate-dead::before { content : '\E95F'; }
|
||||
&.animate-objects::before { content : '\E960'; }
|
||||
&.animate-objects-2::before { content : '\E961'; }
|
||||
&.bane::before { content : '\E962'; }
|
||||
&.bless::before { content : '\E963'; }
|
||||
&.blur::before { content : '\E964'; }
|
||||
&.bonus::before { content : '\E965'; }
|
||||
&.branding-smite::before { content : '\E966'; }
|
||||
&.burning-hands::before { content : '\E967'; }
|
||||
&.charm-person::before { content : '\E968'; }
|
||||
&.chill-touch::before { content : '\E969'; }
|
||||
&.cloudkill::before { content : '\E96A'; }
|
||||
&.comprehend-languages::before { content : '\E96B'; }
|
||||
&.cone-of-cold::before { content : '\E96C'; }
|
||||
&.conjure-elemental::before { content : '\E96D'; }
|
||||
&.conjure-minor-elemental::before { content : '\E96E'; }
|
||||
&.control-water::before { content : '\E96F'; }
|
||||
&.counterspell::before { content : '\E970'; }
|
||||
&.cure-wounds::before { content : '\E971'; }
|
||||
&.dancing-lights::before { content : '\E972'; }
|
||||
&.darkness::before { content : '\E973'; }
|
||||
&.detect-magic::before { content : '\E974'; }
|
||||
&.disguise-self::before { content : '\E975'; }
|
||||
&.disintegrate::before { content : '\E976'; }
|
||||
&.dispel-evil-and-good::before { content : '\E977'; }
|
||||
&.dispel-magic::before { content : '\E978'; }
|
||||
&.dominate-monster::before { content : '\E979'; }
|
||||
&.dominate-person::before { content : '\E97A'; }
|
||||
&.eldritch-blast::before { content : '\E97B'; }
|
||||
&.enlarge-reduce::before { content : '\E97C'; }
|
||||
&.entangle::before { content : '\E97D'; }
|
||||
&.faerie-fire::before { content : '\E97E'; }
|
||||
&.faerie-fire2::before { content : '\E97F'; }
|
||||
&.feather-fall::before { content : '\E980'; }
|
||||
&.find-familiar::before { content : '\E981'; }
|
||||
&.finger-of-death::before { content : '\E982'; }
|
||||
&.fireball::before { content : '\E983'; }
|
||||
&.floating-disk::before { content : '\E984'; }
|
||||
&.fly::before { content : '\E985'; }
|
||||
&.fog-cloud::before { content : '\E986'; }
|
||||
&.gaseous-form::before { content : '\E987'; }
|
||||
&.gaseous-form2::before { content : '\E988'; }
|
||||
&.gentle-repose::before { content : '\E989'; }
|
||||
&.gentle-repose2::before { content : '\E98A'; }
|
||||
&.globe-of-invulnerability::before { content : '\E98B'; }
|
||||
&.guiding-bolt::before { content : '\E98C'; }
|
||||
&.healing-word::before { content : '\E98D'; }
|
||||
&.heat-metal::before { content : '\E98E'; }
|
||||
&.hellish-rebuke::before { content : '\E98F'; }
|
||||
&.heroes-feast::before { content : '\E990'; }
|
||||
&.heroism::before { content : '\E991'; }
|
||||
&.hideous-laughter::before { content : '\E992'; }
|
||||
&.identify::before { content : '\E993'; }
|
||||
&.illusory-script::before { content : '\E994'; }
|
||||
&.inflict-wounds::before { content : '\E995'; }
|
||||
&.light::before { content : '\E996'; }
|
||||
&.longstrider::before { content : '\E997'; }
|
||||
&.mage-armor::before { content : '\E998'; }
|
||||
&.mage-hand::before { content : '\E999'; }
|
||||
&.magic-missile::before { content : '\E99A'; }
|
||||
&.mass-cure-wounds::before { content : '\E99B'; }
|
||||
&.mass-healing-word::before { content : '\E99C'; }
|
||||
&.Mending::before { content : '\E99D'; }
|
||||
&.message::before { content : '\E99E'; }
|
||||
&.Minor-illusion::before { content : '\E99F'; }
|
||||
&.movement1::before { content : '\E9A0'; }
|
||||
&.polymorph::before { content : '\E9A1'; }
|
||||
&.power-word-kill::before { content : '\E9A2'; }
|
||||
&.power-word-stun::before { content : '\E9A3'; }
|
||||
&.prayer-of-healing::before { content : '\E9A4'; }
|
||||
&.prestidigitation::before { content : '\E9A5'; }
|
||||
&.protection-from-evil-and-good::before { content : '\E9A6'; }
|
||||
&.raise-read::before { content : '\E9A7'; }
|
||||
&.raise-read2::before { content : '\E9A8'; }
|
||||
&.reaction1::before { content : '\E9A9'; }
|
||||
&.resurrection::before { content : '\E9AA'; }
|
||||
&.resurrection2::before { content : '\E9AB'; }
|
||||
&.revivify::before { content : '\E9AC'; }
|
||||
&.revivify2::before { content : '\E9AD'; }
|
||||
&.sacred-flame::before { content : '\E9AE'; }
|
||||
&.sanctuary::before { content : '\E9AF'; }
|
||||
&.scorching-ray::before { content : '\E9B0'; }
|
||||
&.sending::before { content : '\E9B1'; }
|
||||
&.shatter::before { content : '\E9B2'; }
|
||||
&.shield::before { content : '\E9B3'; }
|
||||
&.silent-image::before { content : '\E9B4'; }
|
||||
&.sleep::before { content : '\E9B5'; }
|
||||
&.speak-with-animals::before { content : '\E9B6'; }
|
||||
&.telekinesis::before { content : '\E9B7'; }
|
||||
&.true-strike::before { content : '\E9B8'; }
|
||||
&.vicious-mockery::before { content : '\E9B9'; }
|
||||
&.wall-of-fire::before { content : '\E9BA'; }
|
||||
&.wall-of-force::before { content : '\E9BB'; }
|
||||
&.wall-of-ice::before { content : '\E9BC'; }
|
||||
&.wall-of-stone::before { content : '\E9BD'; }
|
||||
&.wall-of-thorns::before { content : '\E9BE'; }
|
||||
&.wish::before { content : '\E9BF'; }
|
||||
}
|
||||
}
|
||||
96
themes/fonts/iconFonts/diceFont.js
Normal file
96
themes/fonts/iconFonts/diceFont.js
Normal file
@@ -0,0 +1,96 @@
|
||||
const diceFont = {
|
||||
'df_f' : 'df F',
|
||||
'df_f_minus' : 'df F-minus',
|
||||
'df_f_plus' : 'df F-plus',
|
||||
'df_f_zero' : 'df F-zero',
|
||||
'df_d10' : 'df d10',
|
||||
'df_d10_1' : 'df d10-1',
|
||||
'df_d10_10' : 'df d10-10',
|
||||
'df_d10_2' : 'df d10-2',
|
||||
'df_d10_3' : 'df d10-3',
|
||||
'df_d10_4' : 'df d10-4',
|
||||
'df_d10_5' : 'df d10-5',
|
||||
'df_d10_6' : 'df d10-6',
|
||||
'df_d10_7' : 'df d10-7',
|
||||
'df_d10_8' : 'df d10-8',
|
||||
'df_d10_9' : 'df d10-9',
|
||||
'df_d12' : 'df d12',
|
||||
'df_d12_1' : 'df d12-1',
|
||||
'df_d12_10' : 'df d12-10',
|
||||
'df_d12_11' : 'df d12-11',
|
||||
'df_d12_12' : 'df d12-12',
|
||||
'df_d12_2' : 'df d12-2',
|
||||
'df_d12_3' : 'df d12-3',
|
||||
'df_d12_4' : 'df d12-4',
|
||||
'df_d12_5' : 'df d12-5',
|
||||
'df_d12_6' : 'df d12-6',
|
||||
'df_d12_7' : 'df d12-7',
|
||||
'df_d12_8' : 'df d12-8',
|
||||
'df_d12_9' : 'df d12-9',
|
||||
'df_d2' : 'df d2',
|
||||
'df_d2_1' : 'df d2-1',
|
||||
'df_d2_2' : 'df d2-2',
|
||||
'df_d20' : 'df d20',
|
||||
'df_d20_1' : 'df d20-1',
|
||||
'df_d20_10' : 'df d20-10',
|
||||
'df_d20_11' : 'df d20-11',
|
||||
'df_d20_12' : 'df d20-12',
|
||||
'df_d20_13' : 'df d20-13',
|
||||
'df_d20_14' : 'df d20-14',
|
||||
'df_d20_15' : 'df d20-15',
|
||||
'df_d20_16' : 'df d20-16',
|
||||
'df_d20_17' : 'df d20-17',
|
||||
'df_d20_18' : 'df d20-18',
|
||||
'df_d20_19' : 'df d20-19',
|
||||
'df_d20_2' : 'df d20-2',
|
||||
'df_d20_20' : 'df d20-20',
|
||||
'df_d20_3' : 'df d20-3',
|
||||
'df_d20_4' : 'df d20-4',
|
||||
'df_d20_5' : 'df d20-5',
|
||||
'df_d20_6' : 'df d20-6',
|
||||
'df_d20_7' : 'df d20-7',
|
||||
'df_d20_8' : 'df d20-8',
|
||||
'df_d20_9' : 'df d20-9',
|
||||
'df_d4' : 'df d4',
|
||||
'df_d4_1' : 'df d4-1',
|
||||
'df_d4_2' : 'df d4-2',
|
||||
'df_d4_3' : 'df d4-3',
|
||||
'df_d4_4' : 'df d4-4',
|
||||
'df_d6' : 'df d6',
|
||||
'df_d6_1' : 'df d6-1',
|
||||
'df_d6_2' : 'df d6-2',
|
||||
'df_d6_3' : 'df d6-3',
|
||||
'df_d6_4' : 'df d6-4',
|
||||
'df_d6_5' : 'df d6-5',
|
||||
'df_d6_6' : 'df d6-6',
|
||||
'df_d8' : 'df d8',
|
||||
'df_d8_1' : 'df d8-1',
|
||||
'df_d8_2' : 'df d8-2',
|
||||
'df_d8_3' : 'df d8-3',
|
||||
'df_d8_4' : 'df d8-4',
|
||||
'df_d8_5' : 'df d8-5',
|
||||
'df_d8_6' : 'df d8-6',
|
||||
'df_d8_7' : 'df d8-7',
|
||||
'df_d8_8' : 'df d8-8',
|
||||
'df_dot_d6' : 'df dot-d6',
|
||||
'df_dot_d6_1' : 'df dot-d6-1',
|
||||
'df_dot_d6_2' : 'df dot-d6-2',
|
||||
'df_dot_d6_3' : 'df dot-d6-3',
|
||||
'df_dot_d6_4' : 'df dot-d6-4',
|
||||
'df_dot_d6_5' : 'df dot-d6-5',
|
||||
'df_dot_d6_6' : 'df dot-d6-6',
|
||||
'df_small_dot_d6_1' : 'df small-dot-d6-1',
|
||||
'df_small_dot_d6_2' : 'df small-dot-d6-2',
|
||||
'df_small_dot_d6_3' : 'df small-dot-d6-3',
|
||||
'df_small_dot_d6_4' : 'df small-dot-d6-4',
|
||||
'df_small_dot_d6_5' : 'df small-dot-d6-5',
|
||||
'df_small_dot_d6_6' : 'df small-dot-d6-6',
|
||||
'df_solid_small_dot_d6_1' : 'df solid-small-dot-d6-1',
|
||||
'df_solid_small_dot_d6_2' : 'df solid-small-dot-d6-2',
|
||||
'df_solid_small_dot_d6_3' : 'df solid-small-dot-d6-3',
|
||||
'df_solid_small_dot_d6_4' : 'df solid-small-dot-d6-4',
|
||||
'df_solid_small_dot_d6_5' : 'df solid-small-dot-d6-5',
|
||||
'df_solid_small_dot_d6_6' : 'df solid-small-dot-d6-6'
|
||||
};
|
||||
|
||||
module.exports = diceFont;
|
||||
@@ -3,7 +3,7 @@
|
||||
font-family : 'DiceFont';
|
||||
font-style : normal;
|
||||
font-weight : normal;
|
||||
src : url('../../../fonts/icon fonts/diceFont.woff2');
|
||||
src : url('../../../fonts/iconFonts/diceFont.woff2');
|
||||
}
|
||||
|
||||
.df {
|
||||
208
themes/fonts/iconFonts/elderberryInn.js
Normal file
208
themes/fonts/iconFonts/elderberryInn.js
Normal file
@@ -0,0 +1,208 @@
|
||||
const elderberryInn = {
|
||||
'ei_book' : 'ei book',
|
||||
'ei_screen' : 'ei screen',
|
||||
|
||||
/* Spell levels */
|
||||
'ei_spell_0' : 'ei spell-0',
|
||||
'ei_spell_1' : 'ei spell-1',
|
||||
'ei_spell_2' : 'ei spell-2',
|
||||
'ei_spell_3' : 'ei spell-3',
|
||||
'ei_spell_4' : 'ei spell-4',
|
||||
'ei_spell_5' : 'ei spell-5',
|
||||
'ei_spell_6' : 'ei spell-6',
|
||||
'ei_spell_7' : 'ei spell-7',
|
||||
'ei_spell_8' : 'ei spell-8',
|
||||
'ei_spell_9' : 'ei spell-9',
|
||||
|
||||
/* Damage types */
|
||||
'ei_acid' : 'ei acid',
|
||||
'ei_bludgeoning' : 'ei bludgeoning',
|
||||
'ei_cold' : 'ei cold',
|
||||
'ei_fire' : 'ei fire',
|
||||
'ei_force' : 'ei force',
|
||||
'ei_lightning' : 'ei lightning',
|
||||
'ei_necrotic' : 'ei necrotic',
|
||||
'ei_piercing' : 'ei piercing',
|
||||
'ei_poison' : 'ei poison',
|
||||
'ei_psychic' : 'ei psychic',
|
||||
'ei_radiant' : 'ei radiant',
|
||||
'ei_slashing' : 'ei slashing',
|
||||
'ei_thunder' : 'ei thunder',
|
||||
|
||||
/* DnD Donditions */
|
||||
'ei_blinded' : 'ei blinded',
|
||||
'ei_charmed' : 'ei charmed',
|
||||
'ei_deafened' : 'ei deafened',
|
||||
'ei_exhaust1' : 'ei exhaust-1',
|
||||
'ei_blinded' : 'ei blinded',
|
||||
'ei_exhaust2' : 'ei exhaust-2',
|
||||
'ei_exhaust3' : 'ei exhaust-3',
|
||||
'ei_exhaust4' : 'ei exhaust-4',
|
||||
'ei_exhaust5' : 'ei exhaust-5',
|
||||
'ei_exhaust6' : 'ei exhaust-6',
|
||||
'ei_frightened' : 'ei frightened',
|
||||
'ei_grappled' : 'ei grappled',
|
||||
'ei_incapacitated' : 'ei incapacitated',
|
||||
'ei_invisible' : 'ei invisible',
|
||||
'ei_paralyzed' : 'ei paralyzed',
|
||||
'ei_petrified' : 'ei petrified',
|
||||
'ei_poisoned' : 'ei poisoned',
|
||||
'ei_prone' : 'ei prone',
|
||||
'ei_restrained' : 'ei restrained',
|
||||
'ei_stunned' : 'ei stunned',
|
||||
'ei_unconscious' : 'ei unconscious',
|
||||
|
||||
/* Character Classes and Features */
|
||||
'ei_barbarian_rage' : 'ei barbarian-rage',
|
||||
'ei_barbarian_reckless_attack' : 'ei barbarian-reckless-attack',
|
||||
'ei_bardic_inspiration' : 'ei bardic-inspiration',
|
||||
'ei_cleric_channel_divinity' : 'ei cleric-channel-divinity',
|
||||
'ei_druid_wild_shape' : 'ei druid-wild-shape',
|
||||
'ei_fighter_action_surge' : 'ei fighter-action-surge',
|
||||
'ei_fighter_second_wind' : 'ei fighter-second-wind',
|
||||
'ei_monk_flurry_blows' : 'ei monk-flurry-blows',
|
||||
'ei_monk_patient_defense' : 'ei monk-patient-defense',
|
||||
'ei_monk_step_of_the_wind' : 'ei monk-step-of-the-wind',
|
||||
'ei_monk_step_of_the_wind2' : 'ei monk-step-of-the-wind-2',
|
||||
'ei_monk_step_of_the_wind3' : 'ei monk-step-of-the-wind-3',
|
||||
'ei_monk_stunning_strike' : 'ei monk-stunning-strike',
|
||||
'ei_monk_stunning_strike2' : 'ei monk-stunning-strike-2',
|
||||
'ei_paladin_divine_smite' : 'ei paladin-divine-smite',
|
||||
'ei_paladin_lay_on_hands' : 'ei paladin-lay-on-hands',
|
||||
'ei_barbarian_abilities' : 'ei barbarian-abilities',
|
||||
'ei_barbarian' : 'ei barbarian',
|
||||
'ei_bard_abilities' : 'ei bard-abilities',
|
||||
'ei_bard' : 'ei bard',
|
||||
'ei_cleric_abilities' : 'ei cleric-abilities',
|
||||
'ei_cleric' : 'ei cleric',
|
||||
'ei_druid_abilities' : 'ei druid-abilities',
|
||||
'ei_druid' : 'ei druid',
|
||||
'ei_fighter_abilities' : 'ei fighter-abilities',
|
||||
'ei_fighter' : 'ei fighter',
|
||||
'ei_monk_abilities' : 'ei monk-abilities',
|
||||
'ei_monk' : 'ei monk',
|
||||
'ei_paladin_abilities' : 'ei paladin-abilities',
|
||||
'ei_paladin' : 'ei paladin',
|
||||
'ei_ranger_abilities' : 'ei ranger-abilities',
|
||||
'ei_ranger' : 'ei ranger',
|
||||
'ei_rogue_abilities' : 'ei rogue-abilities',
|
||||
'ei_rogue' : 'ei rogue',
|
||||
'ei_sorcerer_abilities' : 'ei sorcerer-abilities',
|
||||
'ei_sorcerer' : 'ei sorcerer',
|
||||
'ei_warlock_abilities' : 'ei warlock-abilities',
|
||||
'ei_warlock' : 'ei warlock',
|
||||
'ei_wizard_abilities' : 'ei wizard-abilities',
|
||||
'ei_wizard' : 'ei wizard',
|
||||
|
||||
/* Types of actions */
|
||||
'ei_movement' : 'ei movement',
|
||||
'ei_action' : 'ei action',
|
||||
'ei_bonus_action' : 'ei bonus-action',
|
||||
'ei_reaction' : 'ei reaction',
|
||||
|
||||
/* SRD Spells */
|
||||
'ei_acid_arrow' : 'ei acid-arrow',
|
||||
'ei_action1' : 'ei action-1',
|
||||
'ei_alter_self' : 'ei alter-self',
|
||||
'ei_alter_self2' : 'ei alter-self-2',
|
||||
'ei_animal_friendship' : 'ei animal-friendship',
|
||||
'ei_animate_dead' : 'ei animate-dead',
|
||||
'ei_animate_objects' : 'ei animate-objects',
|
||||
'ei_animate_objects2' : 'ei animate-objects-2',
|
||||
'ei_bane' : 'ei bane',
|
||||
'ei_bless' : 'ei bless',
|
||||
'ei_blur' : 'ei blur',
|
||||
'ei_bonus' : 'ei bonus',
|
||||
'ei_branding_smite' : 'ei branding-smite',
|
||||
'ei_burning_hands' : 'ei burning-hands',
|
||||
'ei_charm_person' : 'ei charm-person',
|
||||
'ei_chill_touch' : 'ei chill-touch',
|
||||
'ei_cloudkill' : 'ei cloudkill',
|
||||
'ei_comprehend_languages' : 'ei comprehend-languages',
|
||||
'ei_cone_of_cold' : 'ei cone-of-cold',
|
||||
'ei_conjure_elemental' : 'ei conjure-elemental',
|
||||
'ei_conjure_minor_elemental' : 'ei conjure-minor-elemental',
|
||||
'ei_control_water' : 'ei control-water',
|
||||
'ei_counterspell' : 'ei counterspell',
|
||||
'ei_cure_wounds' : 'ei cure-wounds',
|
||||
'ei_dancing_lights' : 'ei dancing-lights',
|
||||
'ei_darkness' : 'ei darkness',
|
||||
'ei_detect_magic' : 'ei detect-magic',
|
||||
'ei_disguise_self' : 'ei disguise-self',
|
||||
'ei_disintegrate' : 'ei disintegrate',
|
||||
'ei_dispel_evil_and_good' : 'ei dispel-evil-and-good',
|
||||
'ei_dispel_magic' : 'ei dispel-magic',
|
||||
'ei_dominate_monster' : 'ei dominate-monster',
|
||||
'ei_dominate_person' : 'ei dominate-person',
|
||||
'ei_eldritch_blast' : 'ei eldritch-blast',
|
||||
'ei_enlarge_reduce' : 'ei enlarge-reduce',
|
||||
'ei_entangle' : 'ei entangle',
|
||||
'ei_faerie_fire' : 'ei faerie-fire',
|
||||
'ei_faerie_fire2' : 'ei faerie-fire2',
|
||||
'ei_feather_fall' : 'ei feather-fall',
|
||||
'ei_find_familiar' : 'ei find-familiar',
|
||||
'ei_finger_of_death' : 'ei finger-of-death',
|
||||
'ei_fireball' : 'ei fireball',
|
||||
'ei_floating_disk' : 'ei floating-disk',
|
||||
'ei_fly' : 'ei fly',
|
||||
'ei_fog_cloud' : 'ei fog-cloud',
|
||||
'ei_gaseous_form' : 'ei gaseous-form',
|
||||
'ei_gaseous_form2' : 'ei gaseous-form2',
|
||||
'ei_gentle_repose' : 'ei gentle-repose',
|
||||
'ei_gentle_repose2' : 'ei gentle-repose2',
|
||||
'ei_globe_of_invulnerability' : 'ei globe-of-invulnerability',
|
||||
'ei_guiding_bolt' : 'ei guiding-bolt',
|
||||
'ei_healing_word' : 'ei healing-word',
|
||||
'ei_heat_metal' : 'ei heat-metal',
|
||||
'ei_hellish_rebuke' : 'ei hellish-rebuke',
|
||||
'ei_heroes_feast' : 'ei heroes-feast',
|
||||
'ei_heroism' : 'ei heroism',
|
||||
'ei_hideous_laughter' : 'ei hideous-laughter',
|
||||
'ei_identify' : 'ei identify',
|
||||
'ei_illusory_script' : 'ei illusory-script',
|
||||
'ei_inflict_wounds' : 'ei inflict-wounds',
|
||||
'ei_light' : 'ei light',
|
||||
'ei_longstrider' : 'ei longstrider',
|
||||
'ei_mage_armor' : 'ei mage-armor',
|
||||
'ei_mage_hand' : 'ei mage-hand',
|
||||
'ei_magic_missile' : 'ei magic-missile',
|
||||
'ei_mass_cure_wounds' : 'ei mass-cure-wounds',
|
||||
'ei_mass_healing_word' : 'ei mass-healing-word',
|
||||
'ei_mending' : 'ei _mending',
|
||||
'ei_message' : 'ei message',
|
||||
'ei_minor_illusion' : 'ei _minor-illusion',
|
||||
'ei_movement1' : 'ei movement1',
|
||||
'ei_polymorph' : 'ei polymorph',
|
||||
'ei_power_word_kill' : 'ei power-word-kill',
|
||||
'ei_power_word_stun' : 'ei power-word-stun',
|
||||
'ei_prayer_of_healing' : 'ei prayer-of-healing',
|
||||
'ei_prestidigitation' : 'ei prestidigitation',
|
||||
'ei_protection_from_evil_and_good' : 'ei protection-from-evil-and-good',
|
||||
'ei_raise_dead' : 'ei raise-dead',
|
||||
'ei_raise_dead2' : 'ei raise-dead2',
|
||||
'ei_reaction1' : 'ei reaction1',
|
||||
'ei_resurrection' : 'ei resurrection',
|
||||
'ei_resurrection2' : 'ei resurrection2',
|
||||
'ei_revivify' : 'ei revivify',
|
||||
'ei_revivify2' : 'ei revivify2',
|
||||
'ei_sacred_flame' : 'ei sacred-flame',
|
||||
'ei_sanctuary' : 'ei sanctuary',
|
||||
'ei_scorching_ray' : 'ei scorching-ray',
|
||||
'ei_sending' : 'ei sending',
|
||||
'ei_shatter' : 'ei shatter',
|
||||
'ei_shield' : 'ei shield',
|
||||
'ei_silent_image' : 'ei silent-image',
|
||||
'ei_sleep' : 'ei sleep',
|
||||
'ei_speak_with_animals' : 'ei speak-with-animals',
|
||||
'ei_telekinesis' : 'ei telekinesis',
|
||||
'ei_true_strike' : 'ei true-strike',
|
||||
'ei_vicious_mockery' : 'ei vicious-mockery',
|
||||
'ei_wall_of_fire' : 'ei wall-of-fire',
|
||||
'ei_wall_of_force' : 'ei wall-of-force',
|
||||
'ei_wall_of_ice' : 'ei wall-of-ice',
|
||||
'ei_wall_of_stone' : 'ei wall-of-stone',
|
||||
'ei_wall_of_thorns' : 'ei wall-of-thorns',
|
||||
'ei_wish' : 'ei wish'
|
||||
};
|
||||
|
||||
module.exports = elderberryInn;
|
||||
222
themes/fonts/iconFonts/elderberryInn.less
Normal file
222
themes/fonts/iconFonts/elderberryInn.less
Normal file
@@ -0,0 +1,222 @@
|
||||
/* Icon Font: Elderberry Inn */
|
||||
@font-face {
|
||||
font-family : 'Elderberry-Inn';
|
||||
font-style : normal;
|
||||
font-weight : normal;
|
||||
src : url('../../../fonts/iconFonts/elderberryInn.woff2');
|
||||
}
|
||||
|
||||
.ei {
|
||||
display : inline-block;
|
||||
margin-right : 3px;
|
||||
font-family : 'Elderberry-Inn';
|
||||
line-height : 1;
|
||||
vertical-align : baseline;
|
||||
-moz-osx-font-smoothing : grayscale;
|
||||
-webkit-font-smoothing : antialiased;
|
||||
text-rendering : auto;
|
||||
|
||||
&.book::before { content : '\E900'; }
|
||||
&.screen::before { content : '\E901'; }
|
||||
|
||||
/* Spell levels */
|
||||
&.spell-0::before { content : '\E902'; }
|
||||
&.spell-1::before { content : '\E903'; }
|
||||
&.spell-2::before { content : '\E904'; }
|
||||
&.spell-3::before { content : '\E905'; }
|
||||
&.spell-4::before { content : '\E906'; }
|
||||
&.spell-5::before { content : '\E907'; }
|
||||
&.spell-6::before { content : '\E908'; }
|
||||
&.spell-7::before { content : '\E909'; }
|
||||
&.spell-8::before { content : '\E90A'; }
|
||||
&.spell-9::before { content : '\E90B'; }
|
||||
|
||||
/* Damage types */
|
||||
&.acid::before { content : '\E90C'; }
|
||||
&.bludgeoning::before { content : '\E90D'; }
|
||||
&.cold::before { content : '\E90E'; }
|
||||
&.fire::before { content : '\E90F'; }
|
||||
&.force::before { content : '\E910'; }
|
||||
&.lightning::before { content : '\E911'; }
|
||||
&.necrotic::before { content : '\E912'; }
|
||||
&.piercing::before { content : '\E913'; }
|
||||
&.poison::before { content : '\E914'; }
|
||||
&.psychic::before { content : '\E915'; }
|
||||
&.radiant::before { content : '\E916'; }
|
||||
&.slashing::before { content : '\E917'; }
|
||||
&.thunder::before { content : '\E918'; }
|
||||
|
||||
/* DnD Conditions */
|
||||
&.blinded::before { content : '\E919'; }
|
||||
&.charmed::before { content : '\E91A'; }
|
||||
&.deafened::before { content : '\E91B'; }
|
||||
&.exhaust-1::before { content : '\E91C'; }
|
||||
&.exhaust-2::before { content : '\E91D'; }
|
||||
&.exhaust-3::before { content : '\E91E'; }
|
||||
&.exhaust-4::before { content : '\E91F'; }
|
||||
&.exhaust-5::before { content : '\E920'; }
|
||||
&.exhaust-6::before { content : '\E921'; }
|
||||
&.frightened::before { content : '\E922'; }
|
||||
&.grappled::before { content : '\E923'; }
|
||||
&.incapacitated::before { content : '\E924'; }
|
||||
&.invisible::before { content : '\E926'; }
|
||||
&.paralyzed::before { content : '\E927'; }
|
||||
&.petrified::before { content : '\E928'; }
|
||||
&.poisoned::before { content : '\E929'; }
|
||||
&.prone::before { content : '\E92A'; }
|
||||
&.restrained::before { content : '\E92B'; }
|
||||
&.stunned::before { content : '\E92C'; }
|
||||
&.unconscious::before { content : '\E925'; }
|
||||
|
||||
/* Character Classes and Features */
|
||||
&.barbarian-rage::before { content : '\E92D'; }
|
||||
&.barbarian-reckless-attack::before { content : '\E92E'; }
|
||||
&.bardic-inspiration::before { content : '\E92F'; }
|
||||
&.cleric-channel-divinity::before { content : '\E930'; }
|
||||
&.druid-wild-shape::before { content : '\E931'; }
|
||||
&.fighter-action-surge::before { content : '\E932'; }
|
||||
&.fighter-second-wind::before { content : '\E933'; }
|
||||
&.monk-flurry-blows::before { content : '\E934'; }
|
||||
&.monk-patient-defense::before { content : '\E935'; }
|
||||
&.monk-step-of-the-wind::before { content : '\E936'; }
|
||||
&.monk-step-of-the-wind-2::before { content : '\E937'; }
|
||||
&.monk-step-of-the-wind-3::before { content : '\E938'; }
|
||||
&.monk-stunning-strike::before { content : '\E939'; }
|
||||
&.monk-stunning-strike-2::before { content : '\E939'; }
|
||||
&.paladin-divine-smite::before { content : '\E93B'; }
|
||||
&.paladin-lay-on-hands::before { content : '\E93C'; }
|
||||
&.barbarian-abilities::before { content : '\E93D'; }
|
||||
&.barbarian::before { content : '\E93E'; }
|
||||
&.bard-abilities::before { content : '\E93F'; }
|
||||
&.bard::before { content : '\E940'; }
|
||||
&.cleric-abilities::before { content : '\E941'; }
|
||||
&.cleric::before { content : '\E942'; }
|
||||
&.druid-abilities::before { content : '\E943'; }
|
||||
&.druid::before { content : '\E944'; }
|
||||
&.fighter-abilities::before { content : '\E945'; }
|
||||
&.fighter::before { content : '\E946'; }
|
||||
&.monk-abilities::before { content : '\E947'; }
|
||||
&.monk::before { content : '\E948'; }
|
||||
&.paladin-abilities::before { content : '\E949'; }
|
||||
&.paladin::before { content : '\E94A'; }
|
||||
&.ranger-abilities::before { content : '\E94B'; }
|
||||
&.ranger::before { content : '\E94C'; }
|
||||
&.rogue-abilities::before { content : '\E94D'; }
|
||||
&.rogue::before { content : '\E94E'; }
|
||||
&.sorcerer-abilities::before { content : '\E94F'; }
|
||||
&.sorcerer::before { content : '\E950'; }
|
||||
&.warlock-abilities::before { content : '\E951'; }
|
||||
&.warlock::before { content : '\E952'; }
|
||||
&.wizard-abilities::before { content : '\E953'; }
|
||||
&.wizard::before { content : '\E954'; }
|
||||
|
||||
/* Types of actions */
|
||||
&.movement::before { content : '\E955'; }
|
||||
&.action::before { content : '\E956'; }
|
||||
&.bonus-action::before { content : '\E957'; }
|
||||
&.reaction::before { content : '\E958'; }
|
||||
|
||||
/* SRD Spells */
|
||||
&.acid-arrow::before { content : '\E959'; }
|
||||
&.action-1::before { content : '\E95A'; }
|
||||
&.alter-self::before { content : '\E95B'; }
|
||||
&.alter-self-2::before { content : '\E95C'; }
|
||||
&.animal-friendship::before { content : '\E95E'; }
|
||||
&.animate-dead::before { content : '\E95F'; }
|
||||
&.animate-objects::before { content : '\E960'; }
|
||||
&.animate-objects-2::before { content : '\E961'; }
|
||||
&.bane::before { content : '\E962'; }
|
||||
&.bless::before { content : '\E963'; }
|
||||
&.blur::before { content : '\E964'; }
|
||||
&.bonus::before { content : '\E965'; }
|
||||
&.branding-smite::before { content : '\E966'; }
|
||||
&.burning-hands::before { content : '\E967'; }
|
||||
&.charm-person::before { content : '\E968'; }
|
||||
&.chill-touch::before { content : '\E969'; }
|
||||
&.cloudkill::before { content : '\E96A'; }
|
||||
&.comprehend-languages::before { content : '\E96B'; }
|
||||
&.cone-of-cold::before { content : '\E96C'; }
|
||||
&.conjure-elemental::before { content : '\E96D'; }
|
||||
&.conjure-minor-elemental::before { content : '\E96E'; }
|
||||
&.control-water::before { content : '\E96F'; }
|
||||
&.counterspell::before { content : '\E970'; }
|
||||
&.cure-wounds::before { content : '\E971'; }
|
||||
&.dancing-lights::before { content : '\E972'; }
|
||||
&.darkness::before { content : '\E973'; }
|
||||
&.detect-magic::before { content : '\E974'; }
|
||||
&.disguise-self::before { content : '\E975'; }
|
||||
&.disintegrate::before { content : '\E976'; }
|
||||
&.dispel-evil-and-good::before { content : '\E977'; }
|
||||
&.dispel-magic::before { content : '\E978'; }
|
||||
&.dominate-monster::before { content : '\E979'; }
|
||||
&.dominate-person::before { content : '\E97A'; }
|
||||
&.eldritch-blast::before { content : '\E97B'; }
|
||||
&.enlarge-reduce::before { content : '\E97C'; }
|
||||
&.entangle::before { content : '\E97D'; }
|
||||
&.faerie-fire::before { content : '\E97E'; }
|
||||
&.faerie-fire2::before { content : '\E97F'; }
|
||||
&.feather-fall::before { content : '\E980'; }
|
||||
&.find-familiar::before { content : '\E981'; }
|
||||
&.finger-of-death::before { content : '\E982'; }
|
||||
&.fireball::before { content : '\E983'; }
|
||||
&.floating-disk::before { content : '\E984'; }
|
||||
&.fly::before { content : '\E985'; }
|
||||
&.fog-cloud::before { content : '\E986'; }
|
||||
&.gaseous-form::before { content : '\E987'; }
|
||||
&.gaseous-form2::before { content : '\E988'; }
|
||||
&.gentle-repose::before { content : '\E989'; }
|
||||
&.gentle-repose2::before { content : '\E98A'; }
|
||||
&.globe-of-invulnerability::before { content : '\E98B'; }
|
||||
&.guiding-bolt::before { content : '\E98C'; }
|
||||
&.healing-word::before { content : '\E98D'; }
|
||||
&.heat-metal::before { content : '\E98E'; }
|
||||
&.hellish-rebuke::before { content : '\E98F'; }
|
||||
&.heroes-feast::before { content : '\E990'; }
|
||||
&.heroism::before { content : '\E991'; }
|
||||
&.hideous-laughter::before { content : '\E992'; }
|
||||
&.identify::before { content : '\E993'; }
|
||||
&.illusory-script::before { content : '\E994'; }
|
||||
&.inflict-wounds::before { content : '\E995'; }
|
||||
&.light::before { content : '\E996'; }
|
||||
&.longstrider::before { content : '\E997'; }
|
||||
&.mage-armor::before { content : '\E998'; }
|
||||
&.mage-hand::before { content : '\E999'; }
|
||||
&.magic-missile::before { content : '\E99A'; }
|
||||
&.mass-cure-wounds::before { content : '\E99B'; }
|
||||
&.mass-healing-word::before { content : '\E99C'; }
|
||||
&.Mending::before { content : '\E99D'; }
|
||||
&.message::before { content : '\E99E'; }
|
||||
&.Minor-illusion::before { content : '\E99F'; }
|
||||
&.movement1::before { content : '\E9A0'; }
|
||||
&.polymorph::before { content : '\E9A1'; }
|
||||
&.power-word-kill::before { content : '\E9A2'; }
|
||||
&.power-word-stun::before { content : '\E9A3'; }
|
||||
&.prayer-of-healing::before { content : '\E9A4'; }
|
||||
&.prestidigitation::before { content : '\E9A5'; }
|
||||
&.protection-from-evil-and-good::before { content : '\E9A6'; }
|
||||
&.raise-dead::before { content : '\E9A7'; }
|
||||
&.raise-dead2::before { content : '\E9A8'; }
|
||||
&.reaction1::before { content : '\E9A9'; }
|
||||
&.resurrection::before { content : '\E9AA'; }
|
||||
&.resurrection2::before { content : '\E9AB'; }
|
||||
&.revivify::before { content : '\E9AC'; }
|
||||
&.revivify2::before { content : '\E9AD'; }
|
||||
&.sacred-flame::before { content : '\E9AE'; }
|
||||
&.sanctuary::before { content : '\E9AF'; }
|
||||
&.scorching-ray::before { content : '\E9B0'; }
|
||||
&.sending::before { content : '\E9B1'; }
|
||||
&.shatter::before { content : '\E9B2'; }
|
||||
&.shield::before { content : '\E9B3'; }
|
||||
&.silent-image::before { content : '\E9B4'; }
|
||||
&.sleep::before { content : '\E9B5'; }
|
||||
&.speak-with-animals::before { content : '\E9B6'; }
|
||||
&.telekinesis::before { content : '\E9B7'; }
|
||||
&.true-strike::before { content : '\E9B8'; }
|
||||
&.vicious-mockery::before { content : '\E9B9'; }
|
||||
&.wall-of-fire::before { content : '\E9BA'; }
|
||||
&.wall-of-force::before { content : '\E9BB'; }
|
||||
&.wall-of-ice::before { content : '\E9BC'; }
|
||||
&.wall-of-stone::before { content : '\E9BD'; }
|
||||
&.wall-of-thorns::before { content : '\E9BE'; }
|
||||
&.wish::before { content : '\E9BF'; }
|
||||
}
|
||||
2054
themes/fonts/iconFonts/fontAwesome.js
Normal file
2054
themes/fonts/iconFonts/fontAwesome.js
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user