Skip to content

Commit

Permalink
Integrate adventure import code
Browse files Browse the repository at this point in the history
  • Loading branch information
MrPrimate committed May 20, 2021
1 parent 7d6b13f commit ebe6e94
Show file tree
Hide file tree
Showing 31 changed files with 1,843 additions and 338 deletions.
8 changes: 7 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
"CONFIG": true,
"FilePicker": true,
"Folder": true,
"Macro": true,
"Playlist": true,
"game": true,
"Hooks": true,
"Item": true,
Expand All @@ -34,7 +36,11 @@
"ROUTE_PREFIX": true,
"CONST": true,
"randomID": true,
"CompendiumCollection": true
"CompendiumCollection": true,
"JSZip": true,
"Dialog": true,
"fromUuid": true,
"ForgeVTT": true
},
"parserOptions": {
"ecmaVersion": 2020,
Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# 2.0.x

* Foundry 0.8.3 support
* Integrated adventure importer tool

# 1.0.9

* Barrier Tattoos did not appear in AC calculations when not using active effects.
Expand Down
232 changes: 232 additions & 0 deletions css/adventure.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,232 @@
.ddb-adventure-import {
/* Style the buttons that are used to open and close the ddb-accordion panel */
/* Add a background color to the button if it is clicked on (add the .active class with JS), and when you move the mouse over it (hover) */
/* Style the ddb-accordion panel. Note: hidden by default */
}

.ddb-adventure-import .grid,
.ddb-adventure-import .grid-2col {
display: grid;
grid-column: span 2 / span 2;
grid-template-columns: repeat(2, minmax(0, 1fr));
gap: 10px;
margin: 10px 0;
padding: 0;
}

.ddb-adventure-import .grid-3col {
grid-column: span 3 / span 3;
grid-template-columns: repeat(3, minmax(0, 1fr));
}

.ddb-adventure-import .grid-4col {
grid-column: span 4 / span 4;
grid-template-columns: repeat(4, minmax(0, 1fr));
}

.ddb-adventure-import .grid-5col {
grid-column: span 5 / span 5;
grid-template-columns: repeat(5, minmax(0, 1fr));
}

.ddb-adventure-import .grid-6col {
grid-column: span 6 / span 6;
grid-template-columns: repeat(6, minmax(0, 1fr));
}

.ddb-adventure-import .grid-7col {
grid-column: span 7 / span 7;
grid-template-columns: repeat(7, minmax(0, 1fr));
}

.ddb-adventure-import .grid-8col {
grid-column: span 8 / span 8;
grid-template-columns: repeat(8, minmax(0, 1fr));
}

.ddb-adventure-import .grid-9col {
grid-column: span 9 / span 9;
grid-template-columns: repeat(9, minmax(0, 1fr));
}

.ddb-adventure-import .grid-10col {
grid-column: span 10 / span 10;
grid-template-columns: repeat(10, minmax(0, 1fr));
}

.ddb-adventure-import .grid-11col {
grid-column: span 11 / span 11;
grid-template-columns: repeat(11, minmax(0, 1fr));
}

.ddb-adventure-import .grid-12col {
grid-column: span 12 / span 12;
grid-template-columns: repeat(12, minmax(0, 1fr));
}

.ddb-adventure-import .flex-group-center,
.ddb-adventure-import .flex-group-left,
.ddb-adventure-import .flex-group-right {
justify-content: center;
align-items: center;
text-align: center;
padding: 5px;
border: 1px solid #999;
}

.ddb-adventure-import .flex-group-left {
justify-content: flex-start;
text-align: left;
}

.ddb-adventure-import .flex-group-right {
justify-content: flex-end;
text-align: right;
}

.ddb-adventure-import .flex-center {
align-items: center;
justify-content: center;
text-align: center;
}

.ddb-adventure-import .flex-between {
justify-content: space-between;
}

.ddb-adventure-import .ddb-accordion {
background-color: #eee;
color: #444;
cursor: pointer;
padding: 18px;
width: 100%;
text-align: left;
border: none;
outline: none;
transition: 0.4s;
}

.ddb-adventure-import .active, .ddb-adventure-import .ddb-accordion:hover {
background-color: #ccc;
}

.ddb-adventure-import .panel {
padding: 0 18px;
background-color: white;
max-height: 0;
overflow: hidden;
transition: max-height 0.2s ease-out;
}

.ddb-adventure-import .panel div {
padding-top: 10px;
padding-bottom: 15px;
}

.ddb-adventure-import .ddb-accordion::after {
content: '\02795';
/* Unicode character for "plus" sign (+) */
font-size: 13px;
color: #777;
float: right;
margin-left: 5px;
}

.ddb-adventure-import .active::after {
content: "\2796";
/* Unicode character for "minus" sign (-) */
}

.ddb-adventure-import label {
display: block;
padding-left: 15px;
text-indent: -15px;
}

.ddb-adventure-import input[type=checkbox] {
width: 20px;
height: 20px;
padding: 0;
margin: 0;
vertical-align: bottom;
position: relative;
top: 2px;
*overflow: hidden;
}

.ddb-adventure-import .import-invalid {
display: none;
}

.ddb-adventure-import .import-hidden {
visibility: hidden;
}

.ddb-adventure-import .import-progress {
background-color: #f1f1f1;
margin: 5px 0;
width: 100%;
}

.ddb-adventure-import .import-progress .import-progress-bar {
max-width: 100%;
height: 24px;
background-color: green;
text-align: center;
}

.ddb-adventure-import .import-progress .import-progress-bar span {
white-space: nowrap;
line-height: 24px;
}

.ddb-adventure-import .ddb-overlay {
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, 0.5);
position: absolute;
top: 0;
left: 0;
}

.ddb-adventure-import .ddb-working {
color: white;
position: absolute;
top: 50%;
left: 50%;
font-size: 135px;
transform: translateX(-50%) translateY(-50%);
}

.ddb-adventure-import .ddb-working i {
transform: rotate(360deg);
-webkit-animation: roll 3s infinite;
animation: roll 3s infinite;
}

@-webkit-keyframes roll {
0% {
transform: rotate(0);
}
100% {
transform: rotate(360deg);
}
}

@keyframes roll {
0% {
transform: rotate(0);
}
100% {
transform: rotate(360deg);
}
}

.ddb-adventure-import .warnings {
margin: 10px 0;
}

.ddb-adventure-import .warnings h3 {
color: #910000;
font-weight: bold;
}
4 changes: 4 additions & 0 deletions css/default.css
Original file line number Diff line number Diff line change
Expand Up @@ -93,3 +93,7 @@ div.journal-sheet section.window-content div.rolltable span.rolltable-link {
h2.task-name.error {
color: red;
}

li.context-item i.active {
color: #c5b631;
}
89 changes: 82 additions & 7 deletions css/journal.css
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,17 @@ blockquote.adventure-read-aloud-text {
z-index: -1;
}

aside.vrgtr-flowchart--1 {
background-image: url(https://media.dndbeyond.com/compendium-images/vrgtr/U9mBj5XfiTD1mHie/flowchart-box-01.png);
}
aside.vrgtr-flowchart {
text-align: center;
background-size: 100% 100%;
background-repeat: no-repeat;
padding: 30px 20% !important;
margin: 0px 0px;
}

.Core-Styles_Core-Metadata, .Serif-Character-Style_Inline-Subhead-Serif, .Serif-Character-Style_Italic-Serif, .Serif-Character-Style_Inline-Subhead-Serif, .Sans-Serif-Character-Styles_Italic-Sans-Serif, .Sans-Serif-Character-Styles_Bold-Italic-Sans-Serif, .Serif-Character-Style_Bold-Italic-Serif {
font-style: italic;
}
Expand All @@ -231,13 +242,77 @@ blockquote.adventure-read-aloud-text {
font-weight: bold;
}

aside.vrgtr-flowchart--1 {
background-image: url(https://media.dndbeyond.com/compendium-images/vrgtr/U9mBj5XfiTD1mHie/flowchart-box-01.png);
.Basic-Text-Frame {
clear: both;
position: relative;
box-shadow: 0 0 5px #979aa4;
border: 1px solid #d4d0ce;
background: #ffffff66;
padding: 10px;
margin: 10px 0 10px 0;
}
aside.vrgtr-flowchart {

.Stat-Block-Styles_Stat-Block-Title {
font-size: 18px !important;
font-family: "Roboto Condensed", Roboto, Helvetica, sans-serif;
text-transform: uppercase;
font-weight: bold;
line-height: 1.4 !important;
margin-bottom: 0 !important;
margin-top: 0 !important;
}

.Stat-Block-Styles_Stat-Block-Metadata {
font-style: italic;
font-size: 14px !important;
line-height: 1.4 !important;
margin-bottom: 8px !important;
}

.Stat-Block-Styles_Stat-Block-Data,
.Stat-Block-Styles_Stat-Block-Data-Last,
.Stat-Block-Styles_Stat-Block-Body,
.Stat-Block-Styles_Stat-Block-Hanging,
.Stat-Block-Styles_Stat-Block-Hanging-Last,
.Stat-Block-Styles_Stat-Block-Body-Last--apply-before-heading- {
font-size: 14px !important;
line-height: 1.4 !important;
margin-bottom: 10px !important;
}

.stat-block-ability-scores {
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
-webkit-flex-wrap: wrap;
-ms-flex-wrap: wrap;
flex-wrap: wrap;
border-top: 2px solid #bc0f0f;
border-bottom: 2px solid #bc0f0f;
margin: 10px 0;
}

.stat-block-ability-scores-stat {
width: 33.33333%;
padding: 10px 5px;
text-align: center;
background-size: 100% 100%;
background-repeat: no-repeat;
padding: 30px 20% !important;
margin: 0px 0px;
}

.stat-block-ability-scores-stat {
width: 16.66667%;
}

.stat-block-ability-scores-heading {
font-weight: bold;
}

.stat-block-ability-scores-modifier {
margin-left: 5px;
}

.Stat-Block-Styles_Stat-Block-Heading,
.Stat-Block-Styles_Stat-Block-Heading--after-last-bar- {
font-size: 16px !important;
font-weight: bold;
font-family: "Roboto Condensed", Roboto, Helvetica, sans-serif;
}
Loading

0 comments on commit ebe6e94

Please sign in to comment.