Added basic text fields to character sheet
This commit is contained in:
@@ -96,7 +96,9 @@ var strings = [
|
|||||||
"personality",
|
"personality",
|
||||||
"ideals",
|
"ideals",
|
||||||
"bonds",
|
"bonds",
|
||||||
"flaws"
|
"flaws",
|
||||||
|
"backstory",
|
||||||
|
"notes"
|
||||||
];
|
];
|
||||||
|
|
||||||
//Data structure for the character
|
//Data structure for the character
|
||||||
@@ -126,7 +128,8 @@ Character = function(owner){
|
|||||||
canDeathSave: true
|
canDeathSave: true
|
||||||
};
|
};
|
||||||
|
|
||||||
for(var i = 0, l = string.length; i < l; i++){
|
this.strings = {};
|
||||||
|
for(var i = 0, l = strings.length; i < l; i++){
|
||||||
this.strings[strings[i]] = "";
|
this.strings[strings[i]] = "";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
display: flex;
|
display: flex;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
justify-content: space-around;
|
justify-content: space-around;
|
||||||
|
align-items: flex-start;
|
||||||
}
|
}
|
||||||
|
|
||||||
#abilityScores {
|
#abilityScores {
|
||||||
|
|||||||
@@ -12,7 +12,26 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="flexItem floatBox">
|
<div class="flexItem floatBox">
|
||||||
|
<h2>Description</h2>
|
||||||
{{> textField character=this field="description"}}
|
{{> textField character=this field="description"}}
|
||||||
</div>
|
</div>
|
||||||
|
<div class="flexItem floatBox">
|
||||||
|
<h2>Personality</h2>
|
||||||
|
{{> textField character=this field="personality"}}
|
||||||
|
<h2>Ideals</h2>
|
||||||
|
{{> textField character=this field="ideals"}}
|
||||||
|
<h2>Bonds</h2>
|
||||||
|
{{> textField character=this field="bonds"}}
|
||||||
|
<h2>Flaws</h2>
|
||||||
|
{{> textField character=this field="flaws"}}
|
||||||
|
</div>
|
||||||
|
<div class="flexItem floatBox">
|
||||||
|
<h2>Backstory</h2>
|
||||||
|
{{> textField character=this field="backstory"}}
|
||||||
|
</div>
|
||||||
|
<div class="flexItem floatBox">
|
||||||
|
<h2>Notes</h2>
|
||||||
|
{{> textField character=this field="notes"}}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -1,11 +1,8 @@
|
|||||||
#textOutput.notEditing{
|
#textOutput.notEditing{
|
||||||
cursor: default;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
#textInput {
|
.editBox {
|
||||||
width:100%;
|
min-height: 36px;
|
||||||
height:100%;
|
width: 300px;
|
||||||
box-sizing: border-box; /* For IE and modern versions of Chrome */
|
|
||||||
-moz-box-sizing: border-box; /* For Firefox */
|
|
||||||
-webkit-box-sizing: border-box;
|
|
||||||
}
|
}
|
||||||
@@ -1,8 +1,8 @@
|
|||||||
<template name="textField">
|
<template name="textField">
|
||||||
{{#if editing}}
|
{{#if editing}}
|
||||||
<div id="textInput" class={{outputClass}} contenteditable=true>{{input}}</div>
|
<div id="textInput" class="editBox {{outputClass}}" contenteditable=true>{{input}}</div>
|
||||||
{{else}}
|
{{else}}
|
||||||
<div id="textOutput" class={{outputClass}}>
|
<div id="textOutput" class="editBox {{outputClass}}">
|
||||||
{{output}}
|
{{output}}
|
||||||
</div>
|
</div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|||||||
@@ -5,4 +5,9 @@ root {
|
|||||||
body {
|
body {
|
||||||
font-family: sans-serif;
|
font-family: sans-serif;
|
||||||
background: #201500;
|
background: #201500;
|
||||||
|
}
|
||||||
|
|
||||||
|
.calculatedValue {
|
||||||
|
color: #021C33;
|
||||||
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user