From 526b0f1d9fe46bb408803eccb7b2958e661d2428 Mon Sep 17 00:00:00 2001 From: Riernar Date: Thu, 21 Jan 2021 22:53:44 +0100 Subject: [PATCH] Fixed tabs not working on firefox (recoded) --- Ars_Magica_5th/Ars_Magica_5th.css | 195 ++++++++++----------------- Ars_Magica_5th/Ars_Magica_5th.html | 59 ++++++-- Ars_Magica_5th/Readme.md | 74 ++++++++-- Ars_Magica_5th/documentation.md | 3 + Ars_Magica_5th/parts/__init__.py | 10 ++ Ars_Magica_5th/parts/translations.py | 3 +- Ars_Magica_5th/requirements.txt | 2 + Ars_Magica_5th/template.html | 54 ++++++-- Ars_Magica_5th/translation.json | 3 + 9 files changed, 242 insertions(+), 161 deletions(-) create mode 100644 Ars_Magica_5th/documentation.md create mode 100644 Ars_Magica_5th/requirements.txt diff --git a/Ars_Magica_5th/Ars_Magica_5th.css b/Ars_Magica_5th/Ars_Magica_5th.css index 440cfc5f38..bcaaf3a9f4 100644 --- a/Ars_Magica_5th/Ars_Magica_5th.css +++ b/Ars_Magica_5th/Ars_Magica_5th.css @@ -85,74 +85,77 @@ input[type=number]::-webkit-outer-spin-button { margin: 0; } - - div.sheet-padding { padding-left: 5px; padding-right: 5px; } + +.sheet-buttonbar { + display: flex; + flex-direction: row; + flex-wrap: nowrap; + justify-content: space-between; + align-items: flex-end; + padding: 5px 0 0 0; + background: transparent; +} +.sheet-navbuttons, +.sheet-functions { + display: flex; + flex-wrap: nowrap; + align-items: flex-end; + flex: 1 0 33%; +} +.sheet-navbuttons { + text-align: left; +} +.sheet-functions { + text-align: right; + justify-content: flex-end; +} + div.sheet-tab-content { - display: none; + display: none; } -input.sheet-tab1:checked ~ div.sheet-tab1, -input.sheet-tab2:checked ~ div.sheet-tab2, -input.sheet-tab3:checked ~ div.sheet-tab3, -input.sheet-tab4:checked ~ div.sheet-tab4, -input.sheet-tab5:checked ~ div.sheet-tab5, -input.sheet-tab6:checked ~ div.sheet-tab6, -input.sheet-tab7:checked ~ div.sheet-tab7 { - display:block; +.sheet-tabstoggle[value="character"] ~ div.sheet-tab1, +.sheet-tabstoggle[value="abilities"] ~ div.sheet-tab2, +.sheet-tabstoggle[value="magic"] ~ div.sheet-tab3, +.sheet-tabstoggle[value="combat"] ~ div.sheet-tab4, +.sheet-tabstoggle[value="spells"] ~ div.sheet-tab5, +.sheet-tabstoggle[value="doc"] ~ div.sheet-tab6 { + display: block; } -input.sheet-tab { - width: 130px; - height: 20px; - position: relative; - left: 6px; - margin: 0px ; - cursor: pointer; - z-index: 1; - border-radius: 5px 5px 5px 5px; - -} - -input.sheet-tab:before -{ - content: attr(title); +.sheet-tabbutton { font-family: 'Uncial Antiqua', cursive; color:white; text-shadow:0px 0px 0.5em black; - text-align: center; - display:block; - - background: #fff; - background-image: url('https://raw.githubusercontent.com/Roll20/roll20-character-sheets/master/Ars_Magica_5th/images/metalbar.jpg'); - - - width: 130px; - height: 20px; font-size: 16px; font-weight:700; + + background: transparent; + background-image: url('https://raw.githubusercontent.com/Roll20/roll20-character-sheets/master/Ars_Magica_5th/images/metalbar.jpg'); + + padding: 1px 12px 1px; + height: 20px; border-radius: 5px 5px 0px 0px ; - border:1px solid black; - } -input.sheet-tab:checked:before -{ +.sheet-tabbutton:hover, +.sheet-tabstoggle[value="character"] ~ .sheet-buttonbar > .sheet-navbuttons > button.sheet-tabbutton[name="act_character"], +.sheet-tabstoggle[value="abilities"] ~ .sheet-buttonbar > .sheet-navbuttons > button.sheet-tabbutton[name="act_abilities"], +.sheet-tabstoggle[value="magic"] ~ .sheet-buttonbar > .sheet-navbuttons > button.sheet-tabbutton[name="act_magic"], +.sheet-tabstoggle[value="combat"] ~ .sheet-buttonbar > .sheet-navbuttons > button.sheet-tabbutton[name="act_combat"], +.sheet-tabstoggle[value="spells"] ~ .sheet-buttonbar > .sheet-navbuttons > button.sheet-tabbutton[name="act_spells"], +.sheet-tabstoggle[value="doc"] ~ .sheet-buttonbar > .sheet-navbuttons > button.sheet-tabbutton[name="act_doc"] { background: #dcdcdc; background-image:url(https://raw.githubusercontent.com/Roll20/roll20-character-sheets/master/Ars_Magica_5th/images/metalbar_dark.jpg); text-shadow:0px 0px 0.5em black,0px 0px 0.5em black; } -input.sheet-tab:not(:first-child):before -{ - border-left: none; -} - div.sheet-tab-content { font-size: 14px; width: 835px; @@ -174,6 +177,7 @@ div.sheet-top_bar { margin-right:auto; margin-left:auto; } + /*=======================End of tabs=======================*/ /*----------- End of Font Face -------------*/ /*----------- Banner -------------*/ @@ -968,101 +972,55 @@ button.sheet-critical:before { display: none; } -button.sheet-botch[type=roll] { +.charsheet button.sheet-reroll[type=roll], +.charsheet button.sheet-botch[type=roll], +.charsheet button.sheet-critical[type=roll] +{ font-family: 'Uncial Antiqua', cursive; color:white; text-shadow:0px 0px 0.5em black; text-align: center; display: inline-block; - - background: #fff; - background: -moz-linear-gradient(to top, #651f1f, #651f1f, #ee3f2f); - background: -webkit-linear-gradient(to top, #651f1f, #651f1f, #ee3f2f); - background: -ms-linear-gradient(to top, #651f1f, #651f1f, #ee3f2f); - background: -o-linear-gradient(to top, #651f1f, #651f1f, #ee3f2f); - background: linear-gradient(to top, #651f1f, #651f1f, #ee3f2f); - + width: 70px; height: 20px; font-size: 16px; line-height:18px; font-weight:700; border-radius: 8px 8px 2px 2px; - margin-right: 0px; - margin-left: 8px; + margin: 0px; border:2px solid black; } -button.sheet-reroll[type=roll] { - font-family: 'Uncial Antiqua', cursive; - color:white; - text-shadow:0px 0px 0.5em black; - text-align: center; - display: inline-block; - + +button.sheet-reroll[type=roll] { background: #fff; background: -moz-linear-gradient(to top, #356e7A, #205a66, #169E9C); background: -webkit-linear-gradient(to top, #356e7A, #205a66, #169E9C); background: -ms-linear-gradient(to top, #356e7A, #205a66, #169E9C); background: -o-linear-gradient(to top, #356e7A, #205a66, #169E9C); background: linear-gradient(to top, #356e7A, #205a66, #169E9C); - - width: 70px; - height: 20px; - font-size: 16px; - line-height:18px; - font-weight:700; - border-radius: 8px 8px 2px 2px; - margin-left: 0px; - - border:2px solid black; +} +button.sheet-botch[type=roll] { + background: #fff; + background: -moz-linear-gradient(to top, #651f1f, #651f1f, #ee3f2f); + background: -webkit-linear-gradient(to top, #651f1f, #651f1f, #ee3f2f); + background: -ms-linear-gradient(to top, #651f1f, #651f1f, #ee3f2f); + background: -o-linear-gradient(to top, #651f1f, #651f1f, #ee3f2f); + background: linear-gradient(to top, #651f1f, #651f1f, #ee3f2f); } button.sheet-critical[type=roll] { - font-family: 'Uncial Antiqua', cursive; - color:white; - text-shadow:0px 0px 0.5em black; - - text-align: center; - display: inline-block; - background: #fff; background: -moz-linear-gradient(to top, #916a08, #785807, #DAA520); background: -webkit-linear-gradient(to top, #916a08, #785807, #DAA520); background: -ms-linear-gradient(to top, #916a08, #785807, #DAA520); background: -o-linear-gradient(to top, #916a08, #785807, #DAA520); background: linear-gradient(to top, #916a08, #785807, #DAA520); - - width: 70px; - height: 20px; - font-size: 16px; - line-height:18px; - font-weight:700; - border-radius: 8px 8px 2px 2px; - margin-left: 0px; - - border:2px solid black; } -button.sheet-botch:hover { - background: #fff; - background: -moz-linear-gradient(to top, #a00e0e, #bb1a11, #ec2513); - background: -webkit-linear-gradient(to top, #a00e0e, #bb1a11, #ec2513); - background: -ms-linear-gradient(to top, #a00e0e, #bb1a11, #ec2513); - background: -o-linear-gradient(to top, #a00e0e, #bb1a11, #ec2513); - background: linear-gradient(to top, #a00e0e, #bb1a11, #ec2513); -} -button.sheet-botch:active { - background: #fff; - background: -moz-linear-gradient(to top, #a00e0e, #bb1a11, #ec2513); - background: -webkit-linear-gradient(to top, #a00e0e, #bb1a11, #ec2513); - background: -ms-linear-gradient(to top, #a00e0e, #bb1a11, #ec2513); - background: -o-linear-gradient(to top, #a00e0e, #bb1a11, #ec2513); - background: linear-gradient(to top, #a00e0e, #bb1a11, #ec2513); -} - -button.sheet-reroll:hover { +button.sheet-reroll:hover, button.sheet-reroll:active { background: #fff; background: -moz-linear-gradient(to top, #0e969e, #297080, #2ebaee); background: -webkit-linear-gradient(to top, #0e969e, #297080, #2ebaee); @@ -1070,24 +1028,15 @@ button.sheet-reroll:hover { background: -o-linear-gradient(to top, #0e969e, #297080, #2ebaee); background: linear-gradient(to top, #0e969e, #297080, #2ebaee); } -button.sheet-reroll:active { +button.sheet-botch:hover, button.sheet-botch:active { background: #fff; - background: -moz-linear-gradient(to top, #0e969e, #297080, #2ebaee); - background: -webkit-linear-gradient(to top, #0e969e, #297080, #2ebaee); - background: -ms-linear-gradient(to top, #0e969e, #297080, #2ebaee); - background: -o-linear-gradient(to top, #0e969e, #297080, #2ebaee); - background: linear-gradient(to top, #0e969e, #297080, #2ebaee); + background: -moz-linear-gradient(to top, #a00e0e, #bb1a11, #ec2513); + background: -webkit-linear-gradient(to top, #a00e0e, #bb1a11, #ec2513); + background: -ms-linear-gradient(to top, #a00e0e, #bb1a11, #ec2513); + background: -o-linear-gradient(to top, #a00e0e, #bb1a11, #ec2513); + background: linear-gradient(to top, #a00e0e, #bb1a11, #ec2513); } - -button.sheet-critical:hover { - background: #fff; - background: -moz-linear-gradient(to top, #daa520, #B8860B, #FFD700); - background: -webkit-linear-gradient(to top, #daa520, #B8860B, #FFD700); - background: -ms-linear-gradient(to top, #daa520, #B8860B, #FFD700); - background: -o-linear-gradient(to top, #daa520, #B8860B, #FFD700); - background: linear-gradient(to top, #daa520, #B8860B, #FFD700); -} -button.sheet-critical:active { +button.sheet-critical:hover, button.sheet-critical:active { background: #fff; background: -moz-linear-gradient(to top, #daa520, #B8860B, #FFD700); background: -webkit-linear-gradient(to top, #daa520, #B8860B, #FFD700); diff --git a/Ars_Magica_5th/Ars_Magica_5th.html b/Ars_Magica_5th/Ars_Magica_5th.html index c88d741fd3..97af7727c6 100644 --- a/Ars_Magica_5th/Ars_Magica_5th.html +++ b/Ars_Magica_5th/Ars_Magica_5th.html @@ -45,17 +45,27 @@ + +
+
+
+ + + + + + +
+
+ + + +
+
+
- - - - - - - - -
- + +
@@ -382,7 +392,8 @@
- + +
@@ -528,7 +539,8 @@
- + +
@@ -1039,7 +1051,8 @@
- + +
@@ -1302,7 +1315,8 @@
- + +
@@ -1386,6 +1400,15 @@ +
+

+ Sheet Documentation +

+

+ TODO +

+
+
@@ -1710,6 +1733,14 @@