mirror of
https://github.com/stolksdorf/homebrewery.git
synced 2025-12-28 23:41:30 +00:00
Shadows now being drawn as a :after element. Beauty
This commit is contained in:
BIN
shared/homebrewery/phb_style/img/note_border - Copy.png
Normal file
BIN
shared/homebrewery/phb_style/img/note_border - Copy.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 530 B |
BIN
shared/homebrewery/phb_style/img/note_border.pdn
Normal file
BIN
shared/homebrewery/phb_style/img/note_border.pdn
Normal file
Binary file not shown.
BIN
shared/homebrewery/phb_style/img/note_border_shadow.png
Normal file
BIN
shared/homebrewery/phb_style/img/note_border_shadow.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.2 KiB |
BIN
shared/homebrewery/phb_style/img/shadow_border.pdn
Normal file
BIN
shared/homebrewery/phb_style/img/shadow_border.pdn
Normal file
Binary file not shown.
BIN
shared/homebrewery/phb_style/img/shadow_border.png
Normal file
BIN
shared/homebrewery/phb_style/img/shadow_border.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.0 KiB |
@@ -4,8 +4,7 @@
|
||||
ul:first-of-type{
|
||||
margin-top : -0.5em;
|
||||
margin-bottom : 0.5em;
|
||||
padding-left : 1em;
|
||||
text-indent : -1em;
|
||||
|
||||
list-style-type : none;
|
||||
&+p{
|
||||
text-indent : 0em;
|
||||
@@ -15,36 +14,49 @@
|
||||
.monster{
|
||||
.breakAvoid();
|
||||
.pseudoBorder();
|
||||
padding : 10px 5px;
|
||||
table{
|
||||
color : @headerText;
|
||||
.pseudoShadow();
|
||||
padding : 17px 14px;
|
||||
table:nth-of-type(1){
|
||||
margin-bottom : 0.4em;
|
||||
margin-top : 0.4em;
|
||||
color : @crimson;
|
||||
tbody tr { background-color: transparent };
|
||||
}
|
||||
ul:nth-of-type(1),ul:nth-of-type(2){
|
||||
background-color : red;
|
||||
list-style: none;
|
||||
padding-left : 1em;
|
||||
text-indent : -1em;
|
||||
margin-bottom : 0.5em;
|
||||
strong{
|
||||
color : @crimson;
|
||||
}
|
||||
}
|
||||
&:before{
|
||||
top : 10px;
|
||||
right : 0px;
|
||||
bottom : 10px;
|
||||
left : 0px;
|
||||
//background-color : @monsterStatBackground;
|
||||
//border-image-outset : 25px 17px;
|
||||
border-image-slice : 10;
|
||||
top : 8px;
|
||||
right : 7px;
|
||||
bottom : 19px;
|
||||
left : 7px;
|
||||
background-color : #FDF1DC;
|
||||
border-image-slice : 8;
|
||||
border-image-source : @monsterBorder;
|
||||
border-image-width : 47px;
|
||||
border-image-width : 8px;
|
||||
}
|
||||
&.wide{
|
||||
column-count : 2;
|
||||
}
|
||||
}
|
||||
.note{
|
||||
.useSansSerif();
|
||||
.breakAvoid();
|
||||
.pseudoBorder();
|
||||
.pseudoShadow();
|
||||
margin : 9px 0px;
|
||||
padding : 17px 5px;
|
||||
padding : 17px 17px;
|
||||
&:before{
|
||||
top : 9px;
|
||||
right : 0px;
|
||||
bottom : 9px;
|
||||
left : 0px;
|
||||
right : 9px;
|
||||
bottom : 19px;
|
||||
left : 9px;
|
||||
background-color : @green;
|
||||
border-width : 11px;
|
||||
border-image-outset : 9px 0px;
|
||||
|
||||
@@ -6,6 +6,8 @@
|
||||
@monsterBorder : url('/assets/homebrewery/phb_style/img/monster_border.png');
|
||||
@noteBorder : url('/assets/homebrewery/phb_style/img/note_border.png');
|
||||
@descriptiveBorder : url('/assets/homebrewery/phb_style/img/desc_border.png');
|
||||
@shadowBorder : url('/assets/homebrewery/phb_style/img/shadow_border.png');
|
||||
|
||||
|
||||
@phbBG : url('/assets/homebrewery/phb_style/img/phb_bg.jpg');
|
||||
@darkBG : url('/assets/homebrewery/phb_style/img/phb_dark_bg.jpg');
|
||||
|
||||
@@ -7,13 +7,32 @@
|
||||
&:before{
|
||||
content : '';
|
||||
position : absolute;
|
||||
z-index : -1;
|
||||
z-index : -2;
|
||||
box-sizing : border-box;
|
||||
border-style : solid;
|
||||
border-image-repeat : round;
|
||||
}
|
||||
}
|
||||
|
||||
.pseudoShadow(){
|
||||
position : relative;
|
||||
&:after{
|
||||
content : '';
|
||||
position : absolute;
|
||||
z-index : -1;
|
||||
box-sizing : border-box;
|
||||
top : 4px;
|
||||
right : 0px;
|
||||
bottom : 10px;
|
||||
left : 0px;
|
||||
border-style : solid;
|
||||
border-image-repeat : round;
|
||||
border-image-slice : 13 13;
|
||||
border-image-source : @shadowBorder;
|
||||
border-image-width : 11px;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.useSansSerif(){
|
||||
font-family : ScalySans;
|
||||
|
||||
@@ -2,6 +2,39 @@ const _ = require('lodash');
|
||||
const Data = require('./random.data.js');
|
||||
|
||||
|
||||
const getStats = function(){
|
||||
return '|' + _.times(6, function(){
|
||||
const num = _.random(1,20);
|
||||
const mod = Math.ceil(num/2 - 5)
|
||||
return num + " (" + (mod >= 0 ? '+'+mod : mod ) + ")"
|
||||
}).join('|') + '|';
|
||||
}
|
||||
|
||||
const getAttributes = ()=>{
|
||||
|
||||
|
||||
|
||||
|
||||
return `
|
||||
- **Saving Throws**
|
||||
- **Condition Immunities** " + genList(["groggy", "swagged", "weak-kneed", "buzzed", "groovy", "melancholy", "drunk"], 3),
|
||||
- **Senses** passive Perception " + _.random(3, 20),
|
||||
- **Languages** ${Data.rand(["Common", "Pottymouth", "Gibberish", "Latin", "Jive"], 2).join(', ')}
|
||||
- **Challenge** ${_.random(0, 15)} (${_.random(10,10000)} XP)
|
||||
`;
|
||||
|
||||
}
|
||||
|
||||
const getAbilities = ()=>{
|
||||
|
||||
}
|
||||
|
||||
const getActions = ()=>{
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
module.exports = {
|
||||
monster : ()=>{
|
||||
|
||||
@@ -21,15 +54,18 @@ module.exports = {
|
||||
|
||||
|STR|DEX|CON|INT|WIS|CHA|
|
||||
|:---:|:---:|:---:|:---:|:---:|:---:|
|
||||
${stats}
|
||||
${getStats()}
|
||||
|
||||
---
|
||||
|
||||
- **Condition Immunities** " + genList(["groggy", "swagged", "weak-kneed", "buzzed", "groovy", "melancholy", "drunk"], 3),
|
||||
- **Senses** passive Perception " + _.random(3, 20),
|
||||
- **Languages** " + genList(["Common", "Pottymouth", "Gibberish", "Latin", "Jive"], 2),
|
||||
- **Challenge** " + _.random(0, 15) + " (" + _.random(10,10000)+ " XP)",
|
||||
${getAttributes()}
|
||||
|
||||
---
|
||||
|
||||
Abilities
|
||||
|
||||
|
||||
### Actions
|
||||
|
||||
}}`
|
||||
|
||||
|
||||
@@ -2,7 +2,8 @@ const _ = require('lodash');
|
||||
|
||||
const Data = {
|
||||
rand : (name, max = 1, min = 1)=>{
|
||||
return _.sampleSize(Data[name], _.random(min, max));
|
||||
const data = (Data[name] ? Data[name] : name);
|
||||
return _.sampleSize(data, _.random(min, max));
|
||||
},
|
||||
|
||||
titles : [
|
||||
|
||||
Reference in New Issue
Block a user