mirror of
https://github.com/stolksdorf/homebrewery.git
synced 2025-12-13 03:45:56 +00:00
emoved a ton of unsued files
This commit is contained in:
@@ -9,7 +9,8 @@
|
||||
- Made links useable in footer (thanks u/Dustfinger1 re:249)
|
||||
- Added print media queries to remove box shadow on print (thanks u/dmmagic re: 246)
|
||||
- Fixed realtime renderer not functioning if loaded with malformed html on load (thanks u/RattiganIV re:247)
|
||||
|
||||
- Removed a lot of unused files in shared
|
||||
- vitreum v4 now lets me use codemirror as a pure node dependacy
|
||||
|
||||
|
||||
### Saturday, 03/12/2016 - v2.6.0
|
||||
|
||||
@@ -32,6 +32,6 @@
|
||||
"shortid": "^2.2.4",
|
||||
"striptags": "^2.1.1",
|
||||
"superagent": "^1.6.1",
|
||||
"vitreum": "^4.0.5"
|
||||
"vitreum": "^4.0.7"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,23 +0,0 @@
|
||||
var dispatch = require('pico-flux').dispatch;
|
||||
|
||||
module.exports = {
|
||||
updateMonsterManual : function(json){
|
||||
dispatch('UDPATE_MONSTER_MANUAL', json);
|
||||
},
|
||||
addEncounter : function(){
|
||||
dispatch('ADD_ENCOUNTER');
|
||||
},
|
||||
updateEncounter : function(index, json){
|
||||
dispatch('UPDATE_ENCOUNTER', index, json);
|
||||
},
|
||||
removeEncounter : function(index){
|
||||
dispatch('REMOVE_ENCOUNTER', index);
|
||||
},
|
||||
updatePlayers : function(text){
|
||||
dispatch('UPDATE_PLAYERS', text);
|
||||
},
|
||||
selectEncounter : function(index){
|
||||
dispatch('SELECT_ENCOUNTER', index);
|
||||
},
|
||||
|
||||
}
|
||||
@@ -1,69 +0,0 @@
|
||||
var flux = require('pico-flux');
|
||||
var _ = require('lodash');
|
||||
|
||||
var defaultMonsterManual = require('naturalcrit/defaultMonsterManual.js');
|
||||
var GetRandomEncounter = require('naturalcrit/randomEncounter.js');
|
||||
|
||||
var Store = {
|
||||
selectedEncounterIndex : 0,
|
||||
encounters : JSON.parse(localStorage.getItem('encounters')) || [GetRandomEncounter()],
|
||||
monsterManual : JSON.parse(localStorage.getItem('monsterManual')) || defaultMonsterManual,
|
||||
players : localStorage.getItem('players') || 'jasper 13\nzatch 19',
|
||||
};
|
||||
|
||||
|
||||
module.exports = flux.createStore({
|
||||
UDPATE_MONSTER_MANUAL : function(json){
|
||||
Store.monsterManual = json;
|
||||
return true;
|
||||
},
|
||||
ADD_ENCOUNTER : function(){
|
||||
Store.encounters.push(GetRandomEncounter());
|
||||
return true;
|
||||
},
|
||||
UPDATE_ENCOUNTER : function(index, json){
|
||||
Store.encounters[index] = json;
|
||||
return true;
|
||||
},
|
||||
REMOVE_ENCOUNTER : function(index){
|
||||
Store.encounters.splice(index, 1);
|
||||
return true;
|
||||
},
|
||||
UPDATE_PLAYERS : function(text){
|
||||
Store.players = text;
|
||||
return true;
|
||||
},
|
||||
SELECT_ENCOUNTER : function(index){
|
||||
Store.selectedEncounterIndex = index;
|
||||
return true;
|
||||
},
|
||||
|
||||
},{
|
||||
getMonsterManual : function(){
|
||||
return Store.monsterManual;
|
||||
},
|
||||
getSelectedEncounterIndex : function(){
|
||||
return Store.selectedEncounterIndex;
|
||||
},
|
||||
getSelectedEncounter : function(){
|
||||
return Store.encounters[Store.selectedEncounterIndex];
|
||||
},
|
||||
getEncounter : function(index){
|
||||
return Store.encounters[index];
|
||||
},
|
||||
getEncounters : function(index){
|
||||
return Store.encounters;
|
||||
},
|
||||
getPlayersText : function(){
|
||||
return Store.players;
|
||||
},
|
||||
getPlayers : function(){
|
||||
return _.reduce(Store.players.split('\n'), function(r, line){
|
||||
var idx = line.lastIndexOf(' ');
|
||||
if(idx !== -1){
|
||||
r[line.substring(0, idx)] = line.substring(idx)*1;
|
||||
}
|
||||
return r;
|
||||
}, {})
|
||||
},
|
||||
})
|
||||
@@ -1,140 +0,0 @@
|
||||
module.exports = {
|
||||
goblin : {
|
||||
size : 'small',
|
||||
type : 'beast',
|
||||
alignment : 'unaligned',
|
||||
stats : {
|
||||
hp : 40,
|
||||
mov: 30,
|
||||
ac : 13,
|
||||
},
|
||||
scores : {
|
||||
str : 8,
|
||||
con : 8,
|
||||
dex : 8,
|
||||
int : 8,
|
||||
wis : 8,
|
||||
cha : 8
|
||||
},
|
||||
attr : {
|
||||
skills : ['Stealth +5'],
|
||||
lang : ['common'],
|
||||
cr : 0.25,
|
||||
},
|
||||
abilities : {
|
||||
"pack tactics" : "Does a thing",
|
||||
"fancy dance" : "dances fancy"
|
||||
},
|
||||
actions : {
|
||||
bite : {
|
||||
type : "Melee weapon attack",
|
||||
atk : "+4 to hit",
|
||||
rng : "5ft",
|
||||
target : "one target",
|
||||
dmg : "4 (1d4 + 2) piercing damage",
|
||||
desc: ""
|
||||
},
|
||||
scare : {
|
||||
uses : "1/day",
|
||||
desc : "scares you"
|
||||
}
|
||||
},
|
||||
items : ['rat on a stick']
|
||||
},
|
||||
|
||||
"Goat Slime" : {
|
||||
hp : 80,
|
||||
mov: 10,
|
||||
cr : 0.5,
|
||||
ac : 16,
|
||||
attr : {
|
||||
str : 8,
|
||||
con : 8,
|
||||
dex : 6,
|
||||
int : 4,
|
||||
wis : 8,
|
||||
cha : 8
|
||||
},
|
||||
attacks : {
|
||||
caress : {
|
||||
atk : "1d20+1",
|
||||
dmg : "3d4+1",
|
||||
type : "sensual"
|
||||
},
|
||||
},
|
||||
abilities : {
|
||||
"Agnostic Gel" : "Immune to magical damage"
|
||||
},
|
||||
items : []
|
||||
},
|
||||
"badass psycho" : {
|
||||
hp : 100,
|
||||
mov: 50,
|
||||
ac : 14,
|
||||
cr : 5,
|
||||
attr : {
|
||||
str : 17,
|
||||
con : 18,
|
||||
dex : 16,
|
||||
int : 7,
|
||||
wis : 7,
|
||||
cha : 7
|
||||
},
|
||||
attacks : {
|
||||
"throwing axe" : {
|
||||
atk : "1d20+5",
|
||||
dmg : "1d12+5",
|
||||
type : "piercing",
|
||||
rng : "30",
|
||||
notes : "returns to baddie after throw"
|
||||
},
|
||||
shoot : {
|
||||
atk : "1d20+2",
|
||||
dmg : "4d4",
|
||||
rng : "120"
|
||||
}
|
||||
},
|
||||
spells : {
|
||||
"meat popsicle" : {
|
||||
dmg : "4d6",
|
||||
uses : 8
|
||||
},
|
||||
"sanity check" : {
|
||||
dmg : "2d8+4",
|
||||
uses : 6
|
||||
}
|
||||
},
|
||||
abilities : {
|
||||
"rampage" : "when damaged, can choose to take damage from opportunity attacks for allies"
|
||||
},
|
||||
items : ['buzz_axe', 'healing_potion', 'tuna_fish']
|
||||
},
|
||||
toxicologist : {
|
||||
hp : 40,
|
||||
mov: 30,
|
||||
ac : 11,
|
||||
cr : 0.5,
|
||||
attr : {
|
||||
str : 7,
|
||||
con : 11,
|
||||
dex : 10,
|
||||
int : 18,
|
||||
wis : 15,
|
||||
cha : 7
|
||||
},
|
||||
spells : {
|
||||
"publish paper" : {
|
||||
dmg : "4d6",
|
||||
uses : 4
|
||||
},
|
||||
"tox test" : {
|
||||
heal : "2d8+4",
|
||||
uses : 6
|
||||
}
|
||||
},
|
||||
abilities : {
|
||||
"conference" : "when around more than 30 other toxicologists, consume 1 drink every 15 minutes"
|
||||
},
|
||||
items : ['grad_student', 'imposter_syndrome', 'ring']
|
||||
},
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
var React = require('react');
|
||||
|
||||
var Logo = React.createClass({
|
||||
render : function(){
|
||||
return <svg version="1.1" x="0px" y="0px" viewBox="0 0 90 112.5" enable-background="new 0 0 90 90" >
|
||||
<path d="M25.363,25.54c0,1.906,8.793,3.454,19.636,3.454c10.848,0,19.638-1.547,19.638-3.454c0-1.12-3.056-2.117-7.774-2.75 c-1.418,1.891-3.659,3.133-6.208,3.133c-2.85,0-5.315-1.547-6.67-3.833C33.617,22.185,25.363,23.692,25.363,25.54z"/><path d="M84.075,54.142c0-8.68-2.868-17.005-8.144-23.829c1.106-1.399,1.41-2.771,1.41-3.854c0-6.574-10.245-9.358-19.264-10.533 c0.209,0.706,0.359,1.439,0.359,2.215c0,0.09-0.022,0.17-0.028,0.26l0,0c-0.028,0.853-0.195,1.667-0.479,2.429 c9.106,1.282,14.508,3.754,14.508,5.63c0,2.644-10.688,6.486-27.439,6.486c-16.748,0-27.438-3.842-27.438-6.486 c0-2.542,9.904-6.183,25.559-6.459c-0.098-0.396-0.159-0.807-0.2-1.223c0.006,0,0.013,0,0.017,0 c-0.017-0.213-0.063-0.417-0.063-0.636c0-1.084,0.226-2.119,0.628-3.058c-6.788,0.129-30.846,1.299-30.846,11.376 c0,1.083,0.305,2.455,1.411,3.854c-5.276,6.823-8.145,15.149-8.145,23.829c0,11.548,5.187,20.107,14.693,25.115 c-0.902,3.146-1.391,7.056,1.111,8.181c2.626,1.178,5.364-2.139,7.111-5.005c4.73,1.261,10.13,1.923,16.161,1.923 c6.034,0,11.428-0.661,16.158-1.922c1.75,2.865,4.493,6.18,7.112,5.004c2.504-1.123,2.014-5.035,1.113-8.179 C78.889,74.249,84.075,65.689,84.075,54.142z M70.39,31.392c5.43,6.046,8.78,14,8.78,22.75c0,20.919-18.582,25.309-34.171,25.309 c-15.587,0-34.17-4.39-34.17-25.309c0-8.75,3.35-16.7,8.781-22.753c5.561,2.643,15.502,4.009,25.389,4.009 C54.886,35.397,64.829,34.031,70.39,31.392z"/><path d="M50.654,23.374c2.892,0,5.234-2.341,5.234-5.233c0-2.887-2.343-5.23-5.234-5.23c-2.887,0-5.231,2.343-5.231,5.23 C45.423,21.032,47.768,23.374,50.654,23.374z"/>
|
||||
<circle cx="62.905" cy="10.089" r="3.595"/>
|
||||
<circle cx="52.616" cy="5.048" r="2.73"/>
|
||||
</svg>
|
||||
}
|
||||
});
|
||||
|
||||
module.exports = Logo;
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,195 +0,0 @@
|
||||
var _ = require('lodash');
|
||||
|
||||
|
||||
|
||||
var getName = function(){
|
||||
return _.sample([
|
||||
"Assault of the Vampire",
|
||||
"Beyond Horror",
|
||||
"Bloodthirsty Odyssey to Saturn",
|
||||
"Claw of the Breed",
|
||||
"Curse of Samson",
|
||||
"Electrical Christmas",
|
||||
"Joseph Clark Loves",
|
||||
"Mind of the Finder",
|
||||
"Mudslide",
|
||||
"Nun of Insanity",
|
||||
"Odyssey to The Hollow Earth",
|
||||
"Reaper Battle",
|
||||
"The Bird-Man goes to The Hollow Earth",
|
||||
"The Bloodthirsty Kiss of The Decadent Bird",
|
||||
"The Diseased Assasin",
|
||||
"The Elephant-Person goes to Mars",
|
||||
"The Evil Saga of the Grizzly-Women",
|
||||
"The Octopus-Person",
|
||||
"The Whorehouse of Medusa",
|
||||
"Assignment: Sensuality, A New Beginning",
|
||||
"Avalanche 2010",
|
||||
"Body of Plague",
|
||||
"Bones of the Zombie",
|
||||
"Clone Snatchers",
|
||||
"Curse of Lizzie Borden",
|
||||
"Damnation Breakers",
|
||||
"Disease Pit",
|
||||
"Emperor Beauty",
|
||||
"Fate of The Abominable Indestructible Women",
|
||||
"Love Festival",
|
||||
"The Beta Person, Part 8",
|
||||
"The Horrible Undead Men",
|
||||
"The Inhuman People",
|
||||
"The Love of The Psychedelic Beast",
|
||||
"The Mutant Depraved",
|
||||
"The Policeman Corrupted, Part 5",
|
||||
"The Psychedelic Operation",
|
||||
"The Terrible Policewoman",
|
||||
"War Beyond El Dorado",
|
||||
"Battle of London",
|
||||
"Gold Love",
|
||||
"I Married Aladdin",
|
||||
"Johnny Walker Loves",
|
||||
"King Love",
|
||||
"Lancelot versus Dracula, The Next Generation",
|
||||
"Licentious Forest",
|
||||
"Passion Festival",
|
||||
"Passion Harvesters",
|
||||
"Sinbad meets Lizzie Borden",
|
||||
"Son of The Impossible Ant-People",
|
||||
"The Blood Ravagers",
|
||||
"The Body Fighter",
|
||||
"The Cat-Men Posessed, Chapter 2",
|
||||
"The Dog-Women from The Past",
|
||||
"The New York Sensation",
|
||||
"The Nurse Destroyed",
|
||||
"The Soulless Spy",
|
||||
"The Soulless Swindler",
|
||||
"The Terrifying Vampires",
|
||||
"Beyond Shangri-La",
|
||||
"Brood of Disease",
|
||||
"Claw of Courage",
|
||||
"Fate of The Gamma Boy, The Revenge",
|
||||
"Festival of the Controller",
|
||||
"Forest Fire",
|
||||
"Genocide!",
|
||||
"Heart of the Devil",
|
||||
"I was a Swindler for the SS",
|
||||
"I was an Executioner for the FBI",
|
||||
"Life Land",
|
||||
"She was a teenaged Annie Oakley",
|
||||
"The Blind Vigilante",
|
||||
"The Cybernetic Eternity",
|
||||
"The Diabolical Tiffany Parker",
|
||||
"The Diseased Alien",
|
||||
"The Legend of Lizzie Borden",
|
||||
"The Legless Hunter",
|
||||
"The Moscow Terror",
|
||||
"Wonder Festival"
|
||||
]);
|
||||
};
|
||||
|
||||
var getPlot = function(){
|
||||
return _.sample([
|
||||
"In a cursed galaxy, in an age of illusions, four barbarians and a conjurer battle a horde of murderers.",
|
||||
"In a wicked kingdom, in a time of war, a philosopher tries to find the cure for a deadly disease.",
|
||||
"In a godless land of terror, in a time of war and blood, a swordsman and a chemist battle evil.",
|
||||
"In a terrifying land of ghosts, a robot and a sailor try to find revenge.",
|
||||
"In a kingdom of misery, in a time of danger, two ambassadors oppose a conspiracy intent on on taking over the world.",
|
||||
"In a demon-haunted land, in a time of lost souls and suffering, a xenobiologist and an engineer oppose lawlessness.",
|
||||
"In a dark kingdom, in a time of deception and deception, a secret agent seeks an ancient treasure.",
|
||||
"In a distant galaxy, two policemans and a scientist try to find love.",
|
||||
"In a universe of prophecy and lies, in a time of wonder and warfare, a virtual reality engineer tries to stop the destruction of mankind.",
|
||||
"In a land of confusion, five monks oppose evil.",
|
||||
"In a world of prophecy and panic, in an era of mysticism and doom, a hacker battles evil.",
|
||||
"In a city of fear, a cleric and a magician hope to save the last living fertile woman.",
|
||||
"On a crime-ridden world of illusion, a prostitute seeks justice and combats an army of assasins intent on on destroying humanity.",
|
||||
"In a kingdom of demons, three businesspersons and an ambassador quest for hope and battle evil.",
|
||||
"On a planet of magic and suffering, in an era of doom, eight aliens quest for fame and combat a cabal of fallen angels intent on stealing the souls of the innocent.",
|
||||
"In a terrifying universe of lost souls, a seer hopes to save a kidnapped princess.",
|
||||
"On an infernal planet of blood, four secret agents battle a syndicate of zombies intent on on summoning an evil god.",
|
||||
"In a dark kingdom, in an age of hate, a computer programmer fights evil.",
|
||||
"In an ominous land, in an age of panic, four wanderers and a linguist search for revenge and oppose terrorism.",
|
||||
"In a universe of madness and devils, in a time of lies and danger, a mutant seeks a mysterious artifact.",
|
||||
"On an infernal planet of terror, in a time of secrets and prophecy, five dutchesses try to save a kidnapped physicist.",
|
||||
"In a galaxy of devils, in an era of virutal reality, a necromancer attempts to avert the apocalypse.",
|
||||
"In a sinful universe, in an era of enchantment and devils, two champions seek revenge.",
|
||||
"In a land of murder, a farmer hopes to solve the ultimate crime.",
|
||||
"In a barbaric kingdom of hate, three theologians and a noble seek an ancient treasure and combat a horde of undead.",
|
||||
"On a planet of chaos, in an age of magic, a student and a spirit try to find freedom and fight crime.",
|
||||
"On a barbaric planet, in an era of prophecy and wonder, two bodyguards hope to find the cure for a deadly disease.",
|
||||
"In a crime-infested galaxy, a champion and a jailer try to find the ultimate weapon and fight a horde of mages intent on on destroying humanity.",
|
||||
"In a land of prophecy and mysteries, a clone seeks hope and combats crime.",
|
||||
"In a galaxy of mysticism and pain, four secretaries and a gambler hope to stop the apocalypse.",
|
||||
"On a planet of illusion and horror, three novelists and a professor try to find vengance.",
|
||||
"In a galaxy of enchantment and hate, in a time of barbarism and danger, four tomb-robbers combat the forces of hell.",
|
||||
"In a kingdom of mysteries and agony, in an era of illusion, a rascal and a barbarian attempt to solve the ultimate crime.",
|
||||
"In a demon-haunted land of warfare, in a time of prophecy and prophecy, four farmers and a conjurer search for fame and combat a mob of aliens intent on on taking over the world.",
|
||||
"In a forbidden land, in a time of doom, two chemists and a queen hope to find the cure for a deadly disease.",
|
||||
"In a kingdom of insanity, in an age of sorcery, three cyborgs and a theologian try to find justice and combat lawlessness.",
|
||||
"In a demon-haunted city, in an age of horror, six virtual reality programmers hope to save a kidnapped occultist.",
|
||||
"In an empire of dreams and mysteries, a gigolo seeks love and opposes terrorism.",
|
||||
"On a planet of insanity, six cyborgs hope to solve the ultimate crime.",
|
||||
"On a godforsaken world of insanity, in an era of computerization, two computer programmers and a bartender try to find the cure for a deadly disease.",
|
||||
"In a crime-infested empire, a farmer fights terrorism.",
|
||||
"In a universe of ghosts, in an age of enchantment, a virtual reality engineer and a dungeon delver hope to solve the ultimate crime.",
|
||||
"In a hellish land, in a time of blood and virutal reality, a magician combats terrorism.",
|
||||
"On a wicked planet of lost souls, two princesses try to save a kidnapped fletcher.",
|
||||
"In a hellish galaxy, two magicians and a grave robber combat corrupt politicians."
|
||||
]);
|
||||
}
|
||||
|
||||
var getTwist = function(){
|
||||
return _.sample([
|
||||
"A character is shown to have a dangerous compulsion, this is revealed when someone has a psychic vision.",
|
||||
"A character suddenly falls out of love with the antagonist's twin.",
|
||||
"In order to fulfill their goals, a character must kill their true love - and they do it.",
|
||||
"Because of a time of political turmoil, the antagonist is revealed to be being manipulated by someone else",
|
||||
"Because of a tornado, the protagonist is revealed to be having their own hidden plans",
|
||||
"It's revealed that everything that is happening is in a hallucination. That's when everything becomes hilarious.",
|
||||
"We discover that, thanks to a sudden discovery, that a character has a mental illness.",
|
||||
"The antagonist discovers everyone else actually is addicted to a substance - this is due to a simple miscommunication.",
|
||||
"The antagonist thinks that everything happening a misinterpretation of something else - and this is due to being lied to by others.",
|
||||
"The antagonist discovers everyone else actually is an artifical life form.",
|
||||
"The lead suddenly reveals a witty side - which makes things much more complicated",
|
||||
"We discover that, thanks to a heartfelt confession, that a character is a clone.",
|
||||
"A string of numbers turns out to refer to a combination on a safe - which someone uses to their advantage.",
|
||||
"The alternate antagonist turns out to be the protagonist's brother.",
|
||||
"We discover that, once a specific name is analyzed, that everything is exactly what it seems - despite evidence to the contrary.",
|
||||
"A character suddenly falls in love with the antagonist - but this is due to a dangerous compulsion.",
|
||||
"Thanks to strange technology, the characters end up in the earth's future.",
|
||||
"The alternate antagonist turns out to be the alternate protagonist's father.",
|
||||
"In order to fulfill their goals, a character must betray their best friend - and they can't bring themselves to do it.",
|
||||
"The antagonist discovers everyone else actually is a demonic entity.",
|
||||
"A character suddenly falls in love with the secondary protagonist - this brings out magical gifts.",
|
||||
"The alternate protagonist turns out to be the antagonist's brother.",
|
||||
"What people think of as witchcraft is really genetic engineering.",
|
||||
"A supposedly accidental hug is actually caused by strange technology.",
|
||||
"The world is revealed to be dependent on nanotechnology.",
|
||||
"Because of a tornado, the antagonist is revealed to be being manipulated by someone else",
|
||||
"At the start of the story some money is introduced - and of course it is used by the story's end.",
|
||||
"A character is shown to have strange powers - this is revealed by a series of strange co-incidences.",
|
||||
"In order to fulfill their goals, a character must kill their aunt - and they do it.",
|
||||
"Because of a discovery, the secondary protagonist is revealed to be hallucinating."
|
||||
]);
|
||||
}
|
||||
|
||||
var getReward = function(){
|
||||
return _.sample([
|
||||
'goat sac', '10 gold', '100 gold', '101 gold', 'curved horn', 'wand of wand creation',
|
||||
'bag of hand-holding', '1 copper', 'true friendship', 'magical stick'
|
||||
], _.random(1,5)).join(', ');
|
||||
}
|
||||
|
||||
|
||||
|
||||
module.exports = function(monsterManual){
|
||||
|
||||
return {
|
||||
name : getName(),
|
||||
desc : getPlot() + ' ' + getTwist(),
|
||||
reward : getReward(),
|
||||
enemies : _.sample(_.keys(monsterManual), _.random(2,6)),
|
||||
unique : {
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,32 +0,0 @@
|
||||
var _ = require('lodash');
|
||||
|
||||
module.exports = function(notation){
|
||||
notation = notation.replace(/ /g,'');
|
||||
var parts = notation.split(/(?=[\-\+])/g);
|
||||
|
||||
return _.reduce(parts, function(r, part){
|
||||
if(!_.isNumber(r)) return r;
|
||||
var res = 0;
|
||||
var neg = false;
|
||||
if(part[0] == '-') neg = true;
|
||||
if(part[0] == '-' || part[0] == '+') part = part.substring(1);
|
||||
|
||||
//Check for dice
|
||||
if(part.indexOf('d') !== -1){
|
||||
var numDice = part.split('d')[0];
|
||||
var die = part.split('d')[1];
|
||||
|
||||
var diceRolls = _.times(numDice, function(){
|
||||
return _.random(1, die);
|
||||
});
|
||||
res = _.sum(diceRolls);
|
||||
if(numDice == 1 && die == 20){
|
||||
if(diceRolls[0] == 1) return 'Fail!';
|
||||
if(diceRolls[0] == 20) return 'Crit!';
|
||||
}
|
||||
}else{
|
||||
res = part * 1;
|
||||
}
|
||||
return r + (neg ? -res : res);
|
||||
}, 0)
|
||||
}
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 14 KiB |
@@ -1,94 +0,0 @@
|
||||
var React = require('react');
|
||||
var _ = require('lodash');
|
||||
var cx = require('classnames');
|
||||
|
||||
var JSONEditor = require('jsoneditor');
|
||||
|
||||
|
||||
var downloadFile = function(filename, text) {
|
||||
var element = document.createElement('a');
|
||||
element.setAttribute('href', 'data:text/plain;charset=utf-8,' + encodeURIComponent(text));
|
||||
element.setAttribute('download', filename);
|
||||
element.style.display = 'none';
|
||||
document.body.appendChild(element);
|
||||
element.click();
|
||||
document.body.removeChild(element);
|
||||
}
|
||||
|
||||
|
||||
var JsonFileEditor = React.createClass({
|
||||
getDefaultProps: function() {
|
||||
return {
|
||||
name : "test",
|
||||
json : {},
|
||||
onJSONChange : function(){}
|
||||
};
|
||||
},
|
||||
|
||||
getInitialState: function() {
|
||||
return {
|
||||
showEditor: false
|
||||
};
|
||||
},
|
||||
componentWillReceiveProps: function(nextProps) {
|
||||
if(JSON.stringify(nextProps.json) != JSON.stringify(this.editor.get())){
|
||||
this.editor.set(nextProps.json);
|
||||
}
|
||||
},
|
||||
componentDidMount: function() {
|
||||
this.editor = new JSONEditor(this.refs.editor, {
|
||||
change : this.handleJSONChange,
|
||||
search : false
|
||||
}, this.props.json)
|
||||
},
|
||||
|
||||
handleJSONChange : function(){
|
||||
this.props.onJSONChange(this.editor.get());
|
||||
},
|
||||
handleShowEditorClick : function(){
|
||||
this.setState({
|
||||
showEditor : !this.state.showEditor
|
||||
})
|
||||
},
|
||||
handleDownload : function(){
|
||||
downloadFile(this.props.name + '.json', JSON.stringify(this.props.json, null, '\t'));
|
||||
},
|
||||
handleUpload : function(e){
|
||||
var self = this;
|
||||
var reader = new FileReader();
|
||||
reader.onload = function() {
|
||||
self.props.onJSONChange(JSON.parse(reader.result));
|
||||
}
|
||||
reader.readAsText(e.target.files[0]);
|
||||
},
|
||||
handleUploadClick : function(){
|
||||
this.refs.uploader.click()
|
||||
},
|
||||
|
||||
renderEditor : function(){
|
||||
return <div className='jsonEditor' ref='editor' />
|
||||
},
|
||||
|
||||
|
||||
render : function(){
|
||||
var self = this;
|
||||
return(
|
||||
<div className={cx('jsonFileEditor', {'showEditor' : this.state.showEditor})}>
|
||||
<span className='name'>{this.props.name}</span>
|
||||
|
||||
<div className='controls'>
|
||||
<button className='showEditor' onClick={this.handleShowEditorClick}><i className='fa fa-edit' /></button>
|
||||
<button className='downloadJSON' onClick={this.handleDownload}><i className='fa fa-download' /></button>
|
||||
<button className='uploadJSON' onClick={this.handleUploadClick}><i className='fa fa-cloud-upload' /></button>
|
||||
</div>
|
||||
|
||||
{this.renderEditor()}
|
||||
<input type="file" id="input" onChange={this.handleUpload} ref='uploader' />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
});
|
||||
|
||||
module.exports = JsonFileEditor;
|
||||
|
||||
//<div className='remove' onClick={this.handleRemove}><i className='fa fa-times' /></div>
|
||||
@@ -1,53 +0,0 @@
|
||||
|
||||
@import (less) "./jsoneditor.css";
|
||||
.jsonFileEditor{
|
||||
position : relative;
|
||||
padding : 10px;
|
||||
&.showEditor{
|
||||
.jsonEditor{
|
||||
display : initial;
|
||||
}
|
||||
button.showEditor{
|
||||
color: @red;
|
||||
}
|
||||
}
|
||||
.jsonEditor{
|
||||
position : absolute;
|
||||
display : none;
|
||||
top : 100%;
|
||||
left : 0px;
|
||||
z-index : 1000;
|
||||
min-width : 400px;
|
||||
background-color : white;
|
||||
}
|
||||
.name{
|
||||
display : inline-block;
|
||||
font-size : 0.8em;
|
||||
font-weight : 800;
|
||||
min-width: 100px;
|
||||
}
|
||||
.controls{
|
||||
display: inline-block;
|
||||
float: right;
|
||||
|
||||
button{
|
||||
outline: none;
|
||||
border : none;
|
||||
cursor: pointer;
|
||||
background-color: transparent;
|
||||
.animate(color);
|
||||
|
||||
&:hover{
|
||||
&.showEditor{ color : @green; }
|
||||
&.downloadJSON{ color : @blue; }
|
||||
&.uploadJSON{ color : @orange; }
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
input[type="file"]{
|
||||
display : none;
|
||||
}
|
||||
}
|
||||
@@ -1,625 +0,0 @@
|
||||
.jsoneditor .field,
|
||||
.jsoneditor .value,
|
||||
.jsoneditor .readonly {
|
||||
border: 1px solid transparent;
|
||||
min-height: 16px;
|
||||
min-width: 32px;
|
||||
padding: 2px;
|
||||
margin: 1px;
|
||||
word-wrap: break-word;
|
||||
float: left;
|
||||
}
|
||||
|
||||
/* adjust margin of p elements inside editable divs, needed for Opera, IE */
|
||||
|
||||
.jsoneditor .field p,
|
||||
.jsoneditor .value p {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.jsoneditor .value {
|
||||
word-break: break-word;
|
||||
}
|
||||
|
||||
.jsoneditor .readonly {
|
||||
min-width: 16px;
|
||||
color: gray;
|
||||
}
|
||||
|
||||
.jsoneditor .empty {
|
||||
border-color: lightgray;
|
||||
border-style: dashed;
|
||||
border-radius: 2px;
|
||||
}
|
||||
|
||||
.jsoneditor .field.empty {
|
||||
background-image: url("/assets/naturalCrit/jsonFileEditor/img/jsoneditor-icons.png");
|
||||
background-position: 0 -144px;
|
||||
}
|
||||
|
||||
.jsoneditor .value.empty {
|
||||
background-image: url("/assets/naturalCrit/jsonFileEditor/img/jsoneditor-icons.png");
|
||||
background-position: -48px -144px;
|
||||
}
|
||||
|
||||
.jsoneditor .value.url {
|
||||
color: green;
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.jsoneditor a.value.url:hover,
|
||||
.jsoneditor a.value.url:focus {
|
||||
color: red;
|
||||
}
|
||||
|
||||
.jsoneditor .separator {
|
||||
padding: 3px 0;
|
||||
vertical-align: top;
|
||||
color: gray;
|
||||
}
|
||||
|
||||
.jsoneditor .field[contenteditable=true]:focus,
|
||||
.jsoneditor .field[contenteditable=true]:hover,
|
||||
.jsoneditor .value[contenteditable=true]:focus,
|
||||
.jsoneditor .value[contenteditable=true]:hover,
|
||||
.jsoneditor .field.highlight,
|
||||
.jsoneditor .value.highlight {
|
||||
background-color: #FFFFAB;
|
||||
border: 1px solid yellow;
|
||||
border-radius: 2px;
|
||||
}
|
||||
|
||||
.jsoneditor .field.highlight-active,
|
||||
.jsoneditor .field.highlight-active:focus,
|
||||
.jsoneditor .field.highlight-active:hover,
|
||||
.jsoneditor .value.highlight-active,
|
||||
.jsoneditor .value.highlight-active:focus,
|
||||
.jsoneditor .value.highlight-active:hover {
|
||||
background-color: #ffee00;
|
||||
border: 1px solid #ffc700;
|
||||
border-radius: 2px;
|
||||
}
|
||||
|
||||
.jsoneditor div.tree button {
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
border: none;
|
||||
cursor: pointer;
|
||||
background: transparent url("/assets/naturalCrit/jsonFileEditor/img/jsoneditor-icons.png");
|
||||
}
|
||||
|
||||
.jsoneditor div.tree button.collapsed {
|
||||
background-position: 0 -48px;
|
||||
}
|
||||
|
||||
.jsoneditor div.tree button.expanded {
|
||||
background-position: 0 -72px;
|
||||
}
|
||||
|
||||
.jsoneditor div.tree button.contextmenu {
|
||||
background-position: -48px -72px;
|
||||
}
|
||||
|
||||
.jsoneditor div.tree button.contextmenu:hover,
|
||||
.jsoneditor div.tree button.contextmenu:focus,
|
||||
.jsoneditor div.tree button.contextmenu.selected {
|
||||
background-position: -48px -48px;
|
||||
}
|
||||
|
||||
.jsoneditor div.tree *:focus {
|
||||
outline: none;
|
||||
}
|
||||
|
||||
.jsoneditor div.tree button:focus {
|
||||
/* TODO: nice outline for buttons with focus
|
||||
outline: #97B0F8 solid 2px;
|
||||
box-shadow: 0 0 8px #97B0F8;
|
||||
*/
|
||||
background-color: #f5f5f5;
|
||||
outline: #e5e5e5 solid 1px;
|
||||
}
|
||||
|
||||
.jsoneditor div.tree button.invisible {
|
||||
visibility: hidden;
|
||||
background: none;
|
||||
}
|
||||
|
||||
.jsoneditor {
|
||||
color: #1A1A1A;
|
||||
border: 1px solid #97B0F8;
|
||||
-moz-box-sizing: border-box;
|
||||
-webkit-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
overflow: auto;
|
||||
position: relative;
|
||||
padding: 0;
|
||||
line-height: 100%;
|
||||
}
|
||||
|
||||
.jsoneditor div.tree table.tree {
|
||||
border-collapse: collapse;
|
||||
border-spacing: 0;
|
||||
width: 100%;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.jsoneditor div.outer {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
margin: -35px 0 0 0;
|
||||
padding: 35px 0 0 0;
|
||||
-moz-box-sizing: border-box;
|
||||
-webkit-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.jsoneditor div.tree {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
position: relative;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.jsoneditor textarea.text {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
margin: 0;
|
||||
-moz-box-sizing: border-box;
|
||||
-webkit-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
border: none;
|
||||
background-color: white;
|
||||
resize: none;
|
||||
}
|
||||
|
||||
.jsoneditor tr.highlight {
|
||||
background-color: #FFFFAB;
|
||||
}
|
||||
|
||||
.jsoneditor div.tree button.dragarea {
|
||||
background: url("/assets/naturalCrit/jsonFileEditor/img/jsoneditor-icons.png") -72px -72px;
|
||||
cursor: move;
|
||||
}
|
||||
|
||||
.jsoneditor div.tree button.dragarea:hover,
|
||||
.jsoneditor div.tree button.dragarea:focus {
|
||||
background-position: -72px -48px;
|
||||
}
|
||||
|
||||
.jsoneditor tr,
|
||||
.jsoneditor th,
|
||||
.jsoneditor td {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.jsoneditor td {
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
.jsoneditor td.tree {
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
.jsoneditor .field,
|
||||
.jsoneditor .value,
|
||||
.jsoneditor td,
|
||||
.jsoneditor th,
|
||||
.jsoneditor textarea {
|
||||
font-family: droid sans mono, consolas, monospace, courier new, courier, sans-serif;
|
||||
font-size: 10pt;
|
||||
color: #1A1A1A;
|
||||
}
|
||||
/* ContextMenu - main menu */
|
||||
|
||||
.jsoneditor-contextmenu {
|
||||
position: absolute;
|
||||
z-index: 99999;
|
||||
}
|
||||
|
||||
.jsoneditor-contextmenu ul {
|
||||
position: relative;
|
||||
left: 0;
|
||||
top: 0;
|
||||
width: 124px;
|
||||
background: white;
|
||||
border: 1px solid #d3d3d3;
|
||||
box-shadow: 2px 2px 12px rgba(128, 128, 128, 0.3);
|
||||
list-style: none;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.jsoneditor-contextmenu ul li button {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
width: 124px;
|
||||
height: 24px;
|
||||
border: none;
|
||||
cursor: pointer;
|
||||
color: #4d4d4d;
|
||||
background: transparent;
|
||||
line-height: 26px;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
/* Fix button padding in firefox */
|
||||
|
||||
.jsoneditor-contextmenu ul li button::-moz-focus-inner {
|
||||
padding: 0;
|
||||
border: 0;
|
||||
}
|
||||
|
||||
.jsoneditor-contextmenu ul li button:hover,
|
||||
.jsoneditor-contextmenu ul li button:focus {
|
||||
color: #1a1a1a;
|
||||
background-color: #f5f5f5;
|
||||
outline: none;
|
||||
}
|
||||
|
||||
.jsoneditor-contextmenu ul li button.default {
|
||||
width: 92px;
|
||||
}
|
||||
|
||||
.jsoneditor-contextmenu ul li button.expand {
|
||||
float: right;
|
||||
width: 32px;
|
||||
height: 24px;
|
||||
border-left: 1px solid #e5e5e5;
|
||||
}
|
||||
|
||||
.jsoneditor-contextmenu div.icon {
|
||||
float: left;
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
border: none;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
background-image: url("/assets/naturalCrit/jsonFileEditor/img/jsoneditor-icons.png");
|
||||
}
|
||||
|
||||
.jsoneditor-contextmenu ul li button div.expand {
|
||||
float: right;
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
padding: 0;
|
||||
margin: 0 4px 0 0;
|
||||
background: url("/assets/naturalCrit/jsonFileEditor/img/jsoneditor-icons.png") 0 -72px;
|
||||
opacity: 0.4;
|
||||
}
|
||||
|
||||
.jsoneditor-contextmenu ul li button:hover div.expand,
|
||||
.jsoneditor-contextmenu ul li button:focus div.expand,
|
||||
.jsoneditor-contextmenu ul li.selected div.expand,
|
||||
.jsoneditor-contextmenu ul li button.expand:hover div.expand,
|
||||
.jsoneditor-contextmenu ul li button.expand:focus div.expand {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.jsoneditor-contextmenu .separator {
|
||||
height: 0;
|
||||
border-top: 1px solid #e5e5e5;
|
||||
padding-top: 5px;
|
||||
margin-top: 5px;
|
||||
}
|
||||
|
||||
.jsoneditor-contextmenu button.remove > .icon {
|
||||
background-position: -24px -24px;
|
||||
}
|
||||
|
||||
.jsoneditor-contextmenu button.remove:hover > .icon,
|
||||
.jsoneditor-contextmenu button.remove:focus > .icon {
|
||||
background-position: -24px 0;
|
||||
}
|
||||
|
||||
.jsoneditor-contextmenu button.append > .icon {
|
||||
background-position: 0 -24px;
|
||||
}
|
||||
|
||||
.jsoneditor-contextmenu button.append:hover > .icon,
|
||||
.jsoneditor-contextmenu button.append:focus > .icon {
|
||||
background-position: 0 0;
|
||||
}
|
||||
|
||||
.jsoneditor-contextmenu button.insert > .icon {
|
||||
background-position: 0 -24px;
|
||||
}
|
||||
|
||||
.jsoneditor-contextmenu button.insert:hover > .icon,
|
||||
.jsoneditor-contextmenu button.insert:focus > .icon {
|
||||
background-position: 0 0;
|
||||
}
|
||||
|
||||
.jsoneditor-contextmenu button.duplicate > .icon {
|
||||
background-position: -48px -24px;
|
||||
}
|
||||
|
||||
.jsoneditor-contextmenu button.duplicate:hover > .icon,
|
||||
.jsoneditor-contextmenu button.duplicate:focus > .icon {
|
||||
background-position: -48px 0;
|
||||
}
|
||||
|
||||
.jsoneditor-contextmenu button.sort-asc > .icon {
|
||||
background-position: -168px -24px;
|
||||
}
|
||||
|
||||
.jsoneditor-contextmenu button.sort-asc:hover > .icon,
|
||||
.jsoneditor-contextmenu button.sort-asc:focus > .icon {
|
||||
background-position: -168px 0;
|
||||
}
|
||||
|
||||
.jsoneditor-contextmenu button.sort-desc > .icon {
|
||||
background-position: -192px -24px;
|
||||
}
|
||||
|
||||
.jsoneditor-contextmenu button.sort-desc:hover > .icon,
|
||||
.jsoneditor-contextmenu button.sort-desc:focus > .icon {
|
||||
background-position: -192px 0;
|
||||
}
|
||||
|
||||
/* ContextMenu - sub menu */
|
||||
|
||||
.jsoneditor-contextmenu ul li .selected {
|
||||
background-color: #D5DDF6;
|
||||
}
|
||||
|
||||
.jsoneditor-contextmenu ul li {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.jsoneditor-contextmenu ul li ul {
|
||||
display: none;
|
||||
position: relative;
|
||||
left: -10px;
|
||||
top: 0;
|
||||
border: none;
|
||||
box-shadow: inset 0 0 10px rgba(128, 128, 128, 0.5);
|
||||
padding: 0 10px;
|
||||
/* TODO: transition is not supported on IE8-9 */
|
||||
-webkit-transition: all 0.3s ease-out;
|
||||
-moz-transition: all 0.3s ease-out;
|
||||
-o-transition: all 0.3s ease-out;
|
||||
transition: all 0.3s ease-out;
|
||||
}
|
||||
|
||||
|
||||
|
||||
.jsoneditor-contextmenu ul li ul li button {
|
||||
padding-left: 24px;
|
||||
}
|
||||
|
||||
.jsoneditor-contextmenu ul li ul li button:hover,
|
||||
.jsoneditor-contextmenu ul li ul li button:focus {
|
||||
background-color: #f5f5f5;
|
||||
}
|
||||
|
||||
.jsoneditor-contextmenu button.type-string > .icon {
|
||||
background-position: -144px -24px;
|
||||
}
|
||||
|
||||
.jsoneditor-contextmenu button.type-string:hover > .icon,
|
||||
.jsoneditor-contextmenu button.type-string:focus > .icon,
|
||||
.jsoneditor-contextmenu button.type-string.selected > .icon {
|
||||
background-position: -144px 0;
|
||||
}
|
||||
|
||||
.jsoneditor-contextmenu button.type-auto > .icon {
|
||||
background-position: -120px -24px;
|
||||
}
|
||||
|
||||
.jsoneditor-contextmenu button.type-auto:hover > .icon,
|
||||
.jsoneditor-contextmenu button.type-auto:focus > .icon,
|
||||
.jsoneditor-contextmenu button.type-auto.selected > .icon {
|
||||
background-position: -120px 0;
|
||||
}
|
||||
|
||||
.jsoneditor-contextmenu button.type-object > .icon {
|
||||
background-position: -72px -24px;
|
||||
}
|
||||
|
||||
.jsoneditor-contextmenu button.type-object:hover > .icon,
|
||||
.jsoneditor-contextmenu button.type-object:focus > .icon,
|
||||
.jsoneditor-contextmenu button.type-object.selected > .icon {
|
||||
background-position: -72px 0;
|
||||
}
|
||||
|
||||
.jsoneditor-contextmenu button.type-array > .icon {
|
||||
background-position: -96px -24px;
|
||||
}
|
||||
|
||||
.jsoneditor-contextmenu button.type-array:hover > .icon,
|
||||
.jsoneditor-contextmenu button.type-array:focus > .icon,
|
||||
.jsoneditor-contextmenu button.type-array.selected > .icon {
|
||||
background-position: -96px 0;
|
||||
}
|
||||
|
||||
.jsoneditor-contextmenu button.type-modes > .icon {
|
||||
background-image: none;
|
||||
width: 6px;
|
||||
}
|
||||
.jsoneditor .menu {
|
||||
width: 100%;
|
||||
height: 35px;
|
||||
padding: 2px;
|
||||
margin: 0;
|
||||
overflow: hidden;
|
||||
-moz-box-sizing: border-box;
|
||||
-webkit-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
color: #1A1A1A;
|
||||
background-color: #D5DDF6;
|
||||
border-bottom: 1px solid #97B0F8;
|
||||
}
|
||||
|
||||
.jsoneditor .menu button {
|
||||
width: 26px;
|
||||
height: 26px;
|
||||
margin: 2px;
|
||||
padding: 0;
|
||||
border-radius: 2px;
|
||||
border: 1px solid #aec0f8;
|
||||
background: #e3eaf6 url("/assets/naturalCrit/jsonFileEditor/img/jsoneditor-icons.png");
|
||||
color: #4D4D4D;
|
||||
opacity: 0.8;
|
||||
font-family: arial, sans-serif;
|
||||
font-size: 10pt;
|
||||
float: left;
|
||||
}
|
||||
|
||||
.jsoneditor .menu button:hover {
|
||||
background-color: #f0f2f5;
|
||||
}
|
||||
|
||||
.jsoneditor .menu button:focus,
|
||||
.jsoneditor .menu button:active {
|
||||
background-color: #ffffff;
|
||||
}
|
||||
|
||||
.jsoneditor .menu button:disabled {
|
||||
background-color: #e3eaf6;
|
||||
}
|
||||
|
||||
.jsoneditor .menu button.collapse-all {
|
||||
background-position: 0 -96px;
|
||||
}
|
||||
|
||||
.jsoneditor .menu button.expand-all {
|
||||
background-position: 0 -120px;
|
||||
}
|
||||
|
||||
.jsoneditor .menu button.undo {
|
||||
background-position: -24px -96px;
|
||||
}
|
||||
|
||||
.jsoneditor .menu button.undo:disabled {
|
||||
background-position: -24px -120px;
|
||||
}
|
||||
|
||||
.jsoneditor .menu button.redo {
|
||||
background-position: -48px -96px;
|
||||
}
|
||||
|
||||
.jsoneditor .menu button.redo:disabled {
|
||||
background-position: -48px -120px;
|
||||
}
|
||||
|
||||
.jsoneditor .menu button.compact {
|
||||
background-position: -72px -96px;
|
||||
}
|
||||
|
||||
.jsoneditor .menu button.format {
|
||||
background-position: -72px -120px;
|
||||
}
|
||||
|
||||
.jsoneditor .menu button.modes {
|
||||
background-image: none;
|
||||
width: auto;
|
||||
padding-left: 6px;
|
||||
padding-right: 6px;
|
||||
}
|
||||
|
||||
.jsoneditor .menu button.separator {
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
.jsoneditor .menu a {
|
||||
font-family: arial, sans-serif;
|
||||
font-size: 10pt;
|
||||
color: #97B0F8;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.jsoneditor .menu a:hover {
|
||||
color: red;
|
||||
}
|
||||
|
||||
.jsoneditor .menu a.poweredBy {
|
||||
font-size: 8pt;
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 0;
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
/* TODO: css for button:disabled is not supported by IE8 */
|
||||
.jsoneditor .search input,
|
||||
.jsoneditor .search .results {
|
||||
font-family: arial, sans-serif;
|
||||
font-size: 10pt;
|
||||
color: #1A1A1A;
|
||||
background: transparent;
|
||||
/* For Firefox */
|
||||
}
|
||||
|
||||
.jsoneditor .search {
|
||||
position: absolute;
|
||||
right: 2px;
|
||||
top: 2px;
|
||||
}
|
||||
|
||||
.jsoneditor .search .frame {
|
||||
border: 1px solid #97B0F8;
|
||||
background-color: white;
|
||||
padding: 0 2px;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.jsoneditor .search .frame table {
|
||||
border-collapse: collapse;
|
||||
}
|
||||
|
||||
.jsoneditor .search input {
|
||||
width: 120px;
|
||||
border: none;
|
||||
outline: none;
|
||||
margin: 1px;
|
||||
}
|
||||
|
||||
.jsoneditor .search .results {
|
||||
color: #4d4d4d;
|
||||
padding-right: 5px;
|
||||
line-height: 24px;
|
||||
}
|
||||
|
||||
.jsoneditor .search button {
|
||||
width: 16px;
|
||||
height: 24px;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
border: none;
|
||||
background: url("/assets/naturalCrit/jsonFileEditor/img/jsoneditor-icons.png");
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
.jsoneditor .search button:hover {
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
.jsoneditor .search button.refresh {
|
||||
width: 18px;
|
||||
background-position: -99px -73px;
|
||||
}
|
||||
|
||||
.jsoneditor .search button.next {
|
||||
cursor: pointer;
|
||||
background-position: -124px -73px;
|
||||
}
|
||||
|
||||
.jsoneditor .search button.next:hover {
|
||||
background-position: -124px -49px;
|
||||
}
|
||||
|
||||
.jsoneditor .search button.previous {
|
||||
cursor: pointer;
|
||||
background-position: -148px -73px;
|
||||
margin-right: 2px;
|
||||
}
|
||||
|
||||
.jsoneditor .search button.previous:hover {
|
||||
background-position: -148px -49px;
|
||||
}
|
||||
@@ -1,30 +0,0 @@
|
||||
var test =`
|
||||
|
||||
<div class >
|
||||
|
||||
<a>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
<span> </span>
|
||||
|
||||
<div> Hellow !!! </div></div></div></div></div></div>
|
||||
|
||||
|
||||
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
`;
|
||||
|
||||
var markdown = require('./markdown.js');
|
||||
|
||||
console.log(markdown.validate(test));
|
||||
4
todo.md
4
todo.md
@@ -14,4 +14,6 @@
|
||||
- [ ] Default node_env in configs using nconf (default to local)
|
||||
- [ ] Make a `dev.routes.js` file to store things like login and search
|
||||
- [ ] Add syntax highlighting to a `\page` line
|
||||
- [ ] Look into snapping from editor position -> renderer position
|
||||
- [ ] Look into snapping from editor position -> renderer position
|
||||
- [ ] Break the ctrl => keys into a little util
|
||||
- [ ] Add the metadata editor button back to homepage
|
||||
Reference in New Issue
Block a user