From 5d6e57b896f539836afb9f101c50b9f83ef47e3c Mon Sep 17 00:00:00 2001 From: Stefan Zermatten Date: Fri, 25 Sep 2015 12:49:48 +0200 Subject: [PATCH] Wrap cards in padded divs to make columns behave --- rpg-docs/client/style/cards.scss | 27 +++++------- .../views/character/features/features.html | 44 +++++++++++-------- .../views/character/inventory/inventory.html | 12 ++++- .../views/character/journal/journal.html | 24 +++++----- .../views/character/persona/persona.html | 18 +++++--- .../client/views/character/spells/spells.html | 10 +++-- .../stats/abilityCards/abilityCards.html | 4 +- .../character/stats/hitDice/hitDice.html | 12 ++--- .../client/views/character/stats/stats.html | 6 +++ 9 files changed, 94 insertions(+), 63 deletions(-) diff --git a/rpg-docs/client/style/cards.scss b/rpg-docs/client/style/cards.scss index 344a76a8..1b0503b3 100644 --- a/rpg-docs/client/style/cards.scss +++ b/rpg-docs/client/style/cards.scss @@ -3,17 +3,24 @@ $thickColumnWidth: 304px; $thinColumnWidth: 240px; -//Column layouts of cards +//Column layout .column-container { @include column-fill(balance); - @include column-gap(8px); + @include column-gap(0px); @include column-width($thickColumnWidth); - padding: 8px; + padding: 4px; &.thin-columns { @include column-count(4); @include column-width($thinColumnWidth); } + & > div { + padding: 4px; + //stop divs breaking over multiple columns + -webkit-column-break-inside: avoid; + page-break-inside: avoid; + break-inside: avoid; + } } //Cards @@ -21,20 +28,6 @@ $thinColumnWidth: 240px; background: white; border-radius: 2px; - .column-container & { - margin-bottom: 8px; - width: 100%; - //hack to stop flickering - -webkit-backface-visibility: hidden; - -webkit-transform: translateX(0); - //stop breaking over column divide - -webkit-column-break-inside: avoid; - page-break-inside: avoid; - break-inside: avoid; - //Fixes extra margin at top of columns - display: inline-block; - } - .top { cursor: pointer; padding: 16px; diff --git a/rpg-docs/client/views/character/features/features.html b/rpg-docs/client/views/character/features/features.html index 165bd73a..2eb7b57b 100644 --- a/rpg-docs/client/views/character/features/features.html +++ b/rpg-docs/client/views/character/features/features.html @@ -12,8 +12,9 @@ {{>resource name="sorceryPoints" title="Sorcery Points" color="teal" char=this}} {{>resource name="superiorityDice" title="Superiority Dice" color="teal" char=this}} - + +
Attacks @@ -48,8 +49,10 @@ {{/each}}
+
+
Proficiencies @@ -75,13 +78,15 @@ {{/each}}
+
{{#each features}} +
-
{{name}} @@ -94,7 +99,7 @@ {{#if canEnable}} - @@ -108,29 +113,30 @@ {{/if}} {{#if hasUses}}
- Use - Reset
{{/if}} +
{{/each}}
{{#if canEditCharacter _id}} - {{/if}} @@ -138,15 +144,16 @@ diff --git a/rpg-docs/client/views/character/inventory/inventory.html b/rpg-docs/client/views/character/inventory/inventory.html index ff90d82c..55647237 100644 --- a/rpg-docs/client/views/character/inventory/inventory.html +++ b/rpg-docs/client/views/character/inventory/inventory.html @@ -3,6 +3,7 @@
+
@@ -13,7 +14,9 @@
+
+
{{/if}} +
+
@@ -76,7 +81,9 @@ {{/each}}
+
+
@@ -95,8 +102,10 @@ {{/each}}
+
{{#each containers}} - +
+
{{/each}}
diff --git a/rpg-docs/client/views/character/journal/journal.html b/rpg-docs/client/views/character/journal/journal.html index 2f69fb6e..7a1fe7bf 100644 --- a/rpg-docs/client/views/character/journal/journal.html +++ b/rpg-docs/client/views/character/journal/journal.html @@ -3,7 +3,7 @@
-
{{/if}} -
+
-
{{/each}}
-
+
{{#each notes}} +
{{#markdown}}{{description}}{{/markdown}}
+
{{/each}}
{{#if canEditCharacter _id}} - {{/if}} - \ No newline at end of file + diff --git a/rpg-docs/client/views/character/persona/persona.html b/rpg-docs/client/views/character/persona/persona.html index b1762e50..748e9051 100644 --- a/rpg-docs/client/views/character/persona/persona.html +++ b/rpg-docs/client/views/character/persona/persona.html @@ -3,6 +3,7 @@
{{#with characterDetails}} +
{{#unless picture}} @@ -32,13 +33,15 @@
+
{{/with}} - {{> containerCard characterField "description" "Description"}} - {{> containerCard characterField "personality" "Personality Traits"}} - {{> containerCard characterField "ideals" "Ideals"}} - {{> containerCard characterField "bonds" "Bonds"}} - {{> containerCard characterField "flaws" "Flaws"}} - {{> containerCard characterField "backstory" "Background"}} +
{{> containerCard characterField "description" "Description"}}
+
{{> containerCard characterField "personality" "Personality Traits"}}
+
{{> containerCard characterField "ideals" "Ideals"}}
+
{{> containerCard characterField "bonds" "Bonds"}}
+
{{> containerCard characterField "flaws" "Flaws"}}
+
{{> containerCard characterField "backstory" "Background"}}
+
Languages @@ -49,6 +52,7 @@ {{/each}}
+
@@ -70,4 +74,4 @@
{{#markdown}}{{> UI.contentBlock}}{{/markdown}}
- \ No newline at end of file + diff --git a/rpg-docs/client/views/character/spells/spells.html b/rpg-docs/client/views/character/spells/spells.html index f6d68b4f..c657ae5e 100644 --- a/rpg-docs/client/views/character/spells/spells.html +++ b/rpg-docs/client/views/character/spells/spells.html @@ -1,9 +1,10 @@ \ No newline at end of file + diff --git a/rpg-docs/client/views/character/stats/abilityCards/abilityCards.html b/rpg-docs/client/views/character/stats/abilityCards/abilityCards.html index d044bc55..f82ffe0c 100644 --- a/rpg-docs/client/views/character/stats/abilityCards/abilityCards.html +++ b/rpg-docs/client/views/character/stats/abilityCards/abilityCards.html @@ -1,5 +1,6 @@ diff --git a/rpg-docs/client/views/character/stats/hitDice/hitDice.html b/rpg-docs/client/views/character/stats/hitDice/hitDice.html index 0cbfbab8..7e41d789 100644 --- a/rpg-docs/client/views/character/stats/hitDice/hitDice.html +++ b/rpg-docs/client/views/character/stats/hitDice/hitDice.html @@ -1,14 +1,15 @@ diff --git a/rpg-docs/client/views/character/stats/stats.html b/rpg-docs/client/views/character/stats/stats.html index afff375b..6aeff4c7 100644 --- a/rpg-docs/client/views/character/stats/stats.html +++ b/rpg-docs/client/views/character/stats/stats.html @@ -27,6 +27,7 @@ {{>hitDice name="d10HitDice" diceNum="10" char=this}} {{>hitDice name="d12HitDice" diceNum="12" char=this}} +
Saving Throws @@ -40,7 +41,9 @@ {{> skillRow name="Charisma" skill="charismaSave"}}
+
+
Skills @@ -66,11 +69,13 @@ {{> skillRow name="Survival" skill="survival"}}
+