mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2026-01-13 08:42:42 +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{
|
ul:first-of-type{
|
||||||
margin-top : -0.5em;
|
margin-top : -0.5em;
|
||||||
margin-bottom : 0.5em;
|
margin-bottom : 0.5em;
|
||||||
padding-left : 1em;
|
|
||||||
text-indent : -1em;
|
|
||||||
list-style-type : none;
|
list-style-type : none;
|
||||||
&+p{
|
&+p{
|
||||||
text-indent : 0em;
|
text-indent : 0em;
|
||||||
@@ -15,36 +14,49 @@
|
|||||||
.monster{
|
.monster{
|
||||||
.breakAvoid();
|
.breakAvoid();
|
||||||
.pseudoBorder();
|
.pseudoBorder();
|
||||||
padding : 10px 5px;
|
.pseudoShadow();
|
||||||
table{
|
padding : 17px 14px;
|
||||||
color : @headerText;
|
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){
|
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{
|
&:before{
|
||||||
top : 10px;
|
top : 8px;
|
||||||
right : 0px;
|
right : 7px;
|
||||||
bottom : 10px;
|
bottom : 19px;
|
||||||
left : 0px;
|
left : 7px;
|
||||||
//background-color : @monsterStatBackground;
|
background-color : #FDF1DC;
|
||||||
//border-image-outset : 25px 17px;
|
border-image-slice : 8;
|
||||||
border-image-slice : 10;
|
|
||||||
border-image-source : @monsterBorder;
|
border-image-source : @monsterBorder;
|
||||||
border-image-width : 47px;
|
border-image-width : 8px;
|
||||||
|
}
|
||||||
|
&.wide{
|
||||||
|
column-count : 2;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.note{
|
.note{
|
||||||
.useSansSerif();
|
.useSansSerif();
|
||||||
.breakAvoid();
|
.breakAvoid();
|
||||||
.pseudoBorder();
|
.pseudoBorder();
|
||||||
|
.pseudoShadow();
|
||||||
margin : 9px 0px;
|
margin : 9px 0px;
|
||||||
padding : 17px 5px;
|
padding : 17px 17px;
|
||||||
&:before{
|
&:before{
|
||||||
top : 9px;
|
top : 9px;
|
||||||
right : 0px;
|
right : 9px;
|
||||||
bottom : 9px;
|
bottom : 19px;
|
||||||
left : 0px;
|
left : 9px;
|
||||||
background-color : @green;
|
background-color : @green;
|
||||||
border-width : 11px;
|
border-width : 11px;
|
||||||
border-image-outset : 9px 0px;
|
border-image-outset : 9px 0px;
|
||||||
|
|||||||
@@ -6,6 +6,8 @@
|
|||||||
@monsterBorder : url('/assets/homebrewery/phb_style/img/monster_border.png');
|
@monsterBorder : url('/assets/homebrewery/phb_style/img/monster_border.png');
|
||||||
@noteBorder : url('/assets/homebrewery/phb_style/img/note_border.png');
|
@noteBorder : url('/assets/homebrewery/phb_style/img/note_border.png');
|
||||||
@descriptiveBorder : url('/assets/homebrewery/phb_style/img/desc_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');
|
@phbBG : url('/assets/homebrewery/phb_style/img/phb_bg.jpg');
|
||||||
@darkBG : url('/assets/homebrewery/phb_style/img/phb_dark_bg.jpg');
|
@darkBG : url('/assets/homebrewery/phb_style/img/phb_dark_bg.jpg');
|
||||||
|
|||||||
@@ -7,13 +7,32 @@
|
|||||||
&:before{
|
&:before{
|
||||||
content : '';
|
content : '';
|
||||||
position : absolute;
|
position : absolute;
|
||||||
z-index : -1;
|
z-index : -2;
|
||||||
box-sizing : border-box;
|
box-sizing : border-box;
|
||||||
border-style : solid;
|
border-style : solid;
|
||||||
border-image-repeat : round;
|
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(){
|
.useSansSerif(){
|
||||||
font-family : ScalySans;
|
font-family : ScalySans;
|
||||||
|
|||||||
@@ -2,6 +2,39 @@ const _ = require('lodash');
|
|||||||
const Data = require('./random.data.js');
|
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 = {
|
module.exports = {
|
||||||
monster : ()=>{
|
monster : ()=>{
|
||||||
|
|
||||||
@@ -21,15 +54,18 @@ module.exports = {
|
|||||||
|
|
||||||
|STR|DEX|CON|INT|WIS|CHA|
|
|STR|DEX|CON|INT|WIS|CHA|
|
||||||
|:---:|:---:|:---:|:---:|:---:|:---:|
|
|:---:|:---:|:---:|:---:|:---:|:---:|
|
||||||
${stats}
|
${getStats()}
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
- **Condition Immunities** " + genList(["groggy", "swagged", "weak-kneed", "buzzed", "groovy", "melancholy", "drunk"], 3),
|
${getAttributes()}
|
||||||
- **Senses** passive Perception " + _.random(3, 20),
|
|
||||||
- **Languages** " + genList(["Common", "Pottymouth", "Gibberish", "Latin", "Jive"], 2),
|
|
||||||
- **Challenge** " + _.random(0, 15) + " (" + _.random(10,10000)+ " XP)",
|
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
Abilities
|
||||||
|
|
||||||
|
|
||||||
|
### Actions
|
||||||
|
|
||||||
}}`
|
}}`
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,8 @@ const _ = require('lodash');
|
|||||||
|
|
||||||
const Data = {
|
const Data = {
|
||||||
rand : (name, max = 1, min = 1)=>{
|
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 : [
|
titles : [
|
||||||
|
|||||||
Reference in New Issue
Block a user