diff --git a/index.html b/index.html index d1a8a33065f11c5d06e6ecb15e57b64f1dc02287..338a86b5622e2d9e8ef75e616e179068b6f5d84d 100644 --- a/index.html +++ b/index.html @@ -2,33 +2,16 @@ <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> - <link rel="stylesheet" href="src/node_modules/bulma/css/bulma.css"> <link rel="stylesheet" href="src/node_modules/animate.css/animate.css"> <link rel="stylesheet" href="src/node_modules/bootstrap/dist/css/bootstrap.css" integrity="" crossorigin="anonymous"> + <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.7.0/css/all.css" + integrity="sha384-lZN37f5QGtY3VHgisS14W3ExzMWZxybE1SJSEsQp9S+oqd12jhcu+A56Ebc1zFSJ" crossorigin="anonymous"> + <link href="https://fonts.googleapis.com/css2?family=Fondamento&display=swap" rel="stylesheet"> + <link href="https://fonts.googleapis.com/css2?family=Alegreya:wght@400;500&display=swap" rel="stylesheet"> + <link rel="stylesheet" href="res/Stylesheet.css"> <title>Main</title> <script src="out/main.js"></script> <style> - .MonsterIcon:hover { - fill: grey-darker; - opacity:0.5; - fill-opacity:0.5; - width:30px; - height:30px; - } - .PlayerIcon:hover { - fill: grey-darker; - opacity:0.5; - fill-opacity:0.5; - width:25px; - height:25px; - } - .ObjectIcon:hover { - fill: grey-darker; - opacity:0.5; - fill-opacity:0.5; - width:25px; - height:25px; - } </style> </head> diff --git a/out/main.js b/out/main.js index 358c4ca5960a032b607cd73572077167ae555b93..9e166c177dbcbe8c24f3856438a452e8a5d915d7 100644 --- a/out/main.js +++ b/out/main.js @@ -5632,7 +5632,7 @@ var $avh4$elm_color$Color$rgb = F3( var $author$project$Model$init = function (_v0) { return _Utils_Tuple2( { - activeTooltip: 'Tooltip', + activeTooltip: '', addCharacterIcon: $author$project$Model$DrawingInactive, bonusDamage: 0, characterId: 0, @@ -5649,6 +5649,7 @@ var $author$project$Model$init = function (_v0) { hover: false, iconText: '', maxFace: 6, + modalTabState: $rundis$elm_bootstrap$Bootstrap$Tab$initialState, mouseInIcon: false, myDrop1State: $rundis$elm_bootstrap$Bootstrap$Dropdown$initialState, objectIconList: _List_Nil, @@ -8250,6 +8251,13 @@ var $author$project$Main$update = F2( model, {tabState: state}), $elm$core$Platform$Cmd$none); + case 'ModalTabMsg': + var state = msg.a; + return _Utils_Tuple2( + _Utils_update( + model, + {modalTabState: state}), + $elm$core$Platform$Cmd$none); case 'AddCharacterIcon': var addCharacterIconMsg = msg.a; if (addCharacterIconMsg.$ === 'MouseClick') { @@ -8572,8 +8580,8 @@ var $author$project$Main$update = F2( _Utils_update( model, { - activeTooltip: 'Beschreibung', - mouseInIcon: (tooltip === 'Beschreibung') ? false : true + activeTooltip: '', + mouseInIcon: (tooltip === '') ? false : true }), $elm$core$Platform$Cmd$none); } else { @@ -8582,7 +8590,7 @@ var $author$project$Main$update = F2( model, { activeTooltip: tooltip, - mouseInIcon: (tooltip === 'Beschreibung') ? false : true + mouseInIcon: (tooltip === '') ? false : true }), $elm$core$Platform$Cmd$none); } @@ -8606,7 +8614,7 @@ var $author$project$Main$update = F2( _Utils_update( model, { - activeTooltip: 'Beschreibung', + activeTooltip: '', objectIconList: A2( $elm$core$List$filter, $author$project$Main$isNotId(id), @@ -8618,7 +8626,7 @@ var $author$project$Main$update = F2( _Utils_update( model, { - activeTooltip: 'Beschreibung', + activeTooltip: '', characterList: A2( $elm$core$List$filter, $author$project$Main$isNotId(id), @@ -8634,9 +8642,6 @@ var $author$project$Model$TabMsg = function (a) { }; var $elm$html$Html$a = _VirtualDom_node('a'); var $elm$html$Html$br = _VirtualDom_node('br'); -var $elm$html$Html$div = _VirtualDom_node('div'); -var $elm$html$Html$h1 = _VirtualDom_node('h1'); -var $elm$html$Html$h3 = _VirtualDom_node('h3'); var $elm$json$Json$Encode$string = _Json_wrap; var $elm$html$Html$Attributes$stringProperty = F2( function (key, string) { @@ -8645,6 +8650,9 @@ var $elm$html$Html$Attributes$stringProperty = F2( key, $elm$json$Json$Encode$string(string)); }); +var $elm$html$Html$Attributes$class = $elm$html$Html$Attributes$stringProperty('className'); +var $elm$html$Html$div = _VirtualDom_node('div'); +var $elm$html$Html$h1 = _VirtualDom_node('h1'); var $elm$html$Html$Attributes$href = function (url) { return A2( $elm$html$Html$Attributes$stringProperty, @@ -8656,19 +8664,18 @@ var $elm$virtual_dom$VirtualDom$text = _VirtualDom_text; var $elm$html$Html$text = $elm$virtual_dom$VirtualDom$text; var $author$project$About$aboutView = A2( $elm$html$Html$div, - _List_Nil, + _List_fromArray( + [ + $elm$html$Html$Attributes$class('aboutText') + ]), _List_fromArray( [ A2( $elm$html$Html$h1, - _List_Nil, _List_fromArray( [ - $elm$html$Html$text('Das schwarze Auge Edition 5') - ])), - A2( - $elm$html$Html$h3, - _List_Nil, + $elm$html$Html$Attributes$class('about') + ]), _List_fromArray( [ $elm$html$Html$text('Übersicht der Kampfesregeln') @@ -8678,22 +8685,22 @@ var $author$project$About$aboutView = A2( _List_Nil, _List_fromArray( [ - $elm$html$Html$text('\r\n Die wenigsten Geschichten im Pen & Paper Rollenspiel DSA kommen ohne einen Kampf aus.\r\n Die Mechanik unterscheidet sich allerdings etwas vom normalen Spielgeschehen.\r\n '), + $elm$html$Html$text('\n Die wenigsten Geschichten im Pen & Paper Rollenspiel DSA kommen ohne einen Kampf aus.\n Die Mechanik unterscheidet sich allerdings etwas vom normalen Spielgeschehen.\n '), A2($elm$html$Html$br, _List_Nil, _List_Nil), - $elm$html$Html$text('\r\n Zur Vorbereitung wird die Reihenfolge der Kämpfenden bestimmt. Dazu wird der die Initiative (INI) ausgewürfelt.\r\n Der Spielleiter würfelt für alle NSCs.\r\n '), + $elm$html$Html$text('\n Zur Vorbereitung wird die Reihenfolge der Kämpfenden bestimmt. Dazu wird der die Initiative (INI) ausgewürfelt.\n Der Spielleiter würfelt für alle NSCs.\n '), A2($elm$html$Html$br, _List_Nil, _List_Nil), - $elm$html$Html$text('\r\n Dieser Reihenfolge nach dürfen die Charaktere jetzt je einen Gegner angreifen.\r\n ') + $elm$html$Html$text('\n Dieser Reihenfolge nach dürfen die Charaktere jetzt je einen Gegner angreifen.\n ') ])), A2( $elm$html$Html$p, _List_Nil, _List_fromArray( [ - $elm$html$Html$text('\r\n Um anzugreifen muss zunächst eine Probe mit einem W20 auf den AT-Wert bestanden werden.\r\n Gleichzeitig wirft der Angegriffene auf PA oder AW. Gelingt die Probe bricht der Angriff an dieser Stelle ab.\r\n '), + $elm$html$Html$text('\n Um anzugreifen muss zunächst eine Probe mit einem W20 auf den AT-Wert bestanden werden.\n Gleichzeitig wirft der Angegriffene auf PA oder AW. Gelingt die Probe bricht der Angriff an dieser Stelle ab.\n '), A2($elm$html$Html$br, _List_Nil, _List_Nil), - $elm$html$Html$text('\r\n War der Angriff erfolgreich und die Verteidigung ein Fehlschlag wird der Schaden berechnet.\r\n Das ist die Gelegenheit den \"Angriff\"-Button zu klicken.\r\n Entsprechend der Angabe der Waffe (z.B 1W6+4) wird der Angriffswert erwürfelt.\r\n Von diesem wird der RS-Wert des Angegriffenen subtrahiert und das Ergebnis von den LeP abgezogen.\r\n '), + $elm$html$Html$text('\n War der Angriff erfolgreich und die Verteidigung ein Fehlschlag wird der Schaden berechnet.\n Das ist die Gelegenheit den \"Angriff\"-Button zu klicken.\n Entsprechend der Angabe der Waffe (z.B 1W6+4) wird der Angriffswert erwürfelt.\n Von diesem wird der RS-Wert des Angegriffenen subtrahiert und das Ergebnis von den LeP abgezogen.\n '), A2($elm$html$Html$br, _List_Nil, _List_Nil), - $elm$html$Html$text('\r\n Die Berechnung übernimmt der Manager vollständig!\r\n ') + $elm$html$Html$text('\n Die Berechnung übernimmt der Manager vollständig!\n ') ])), A2( $elm$html$Html$p, @@ -8718,179 +8725,7 @@ var $author$project$Model$CustomEnemy = {$: 'CustomEnemy'}; var $author$project$Model$ShowModal = function (a) { return {$: 'ShowModal', a: a}; }; -var $rundis$elm_bootstrap$Bootstrap$Internal$Button$Attrs = function (a) { - return {$: 'Attrs', a: a}; -}; -var $rundis$elm_bootstrap$Bootstrap$Button$attrs = function (attrs_) { - return $rundis$elm_bootstrap$Bootstrap$Internal$Button$Attrs(attrs_); -}; -var $rundis$elm_bootstrap$Bootstrap$Internal$Button$Block = {$: 'Block'}; -var $rundis$elm_bootstrap$Bootstrap$Button$block = $rundis$elm_bootstrap$Bootstrap$Internal$Button$Block; var $elm$html$Html$button = _VirtualDom_node('button'); -var $elm$core$Maybe$andThen = F2( - function (callback, maybeValue) { - if (maybeValue.$ === 'Just') { - var value = maybeValue.a; - return callback(value); - } else { - return $elm$core$Maybe$Nothing; - } - }); -var $rundis$elm_bootstrap$Bootstrap$Internal$Button$applyModifier = F2( - function (modifier, options) { - switch (modifier.$) { - case 'Size': - var size = modifier.a; - return _Utils_update( - options, - { - size: $elm$core$Maybe$Just(size) - }); - case 'Coloring': - var coloring = modifier.a; - return _Utils_update( - options, - { - coloring: $elm$core$Maybe$Just(coloring) - }); - case 'Block': - return _Utils_update( - options, - {block: true}); - case 'Disabled': - var val = modifier.a; - return _Utils_update( - options, - {disabled: val}); - default: - var attrs = modifier.a; - return _Utils_update( - options, - { - attributes: _Utils_ap(options.attributes, attrs) - }); - } - }); -var $elm$html$Html$Attributes$class = $elm$html$Html$Attributes$stringProperty('className'); -var $elm$core$Tuple$second = function (_v0) { - var y = _v0.b; - return y; -}; -var $elm$html$Html$Attributes$classList = function (classes) { - return $elm$html$Html$Attributes$class( - A2( - $elm$core$String$join, - ' ', - A2( - $elm$core$List$map, - $elm$core$Tuple$first, - A2($elm$core$List$filter, $elm$core$Tuple$second, classes)))); -}; -var $rundis$elm_bootstrap$Bootstrap$Internal$Button$defaultOptions = {attributes: _List_Nil, block: false, coloring: $elm$core$Maybe$Nothing, disabled: false, size: $elm$core$Maybe$Nothing}; -var $elm$json$Json$Encode$bool = _Json_wrap; -var $elm$html$Html$Attributes$boolProperty = F2( - function (key, bool) { - return A2( - _VirtualDom_property, - key, - $elm$json$Json$Encode$bool(bool)); - }); -var $elm$html$Html$Attributes$disabled = $elm$html$Html$Attributes$boolProperty('disabled'); -var $rundis$elm_bootstrap$Bootstrap$Internal$Button$roleClass = function (role) { - switch (role.$) { - case 'Primary': - return 'primary'; - case 'Secondary': - return 'secondary'; - case 'Success': - return 'success'; - case 'Info': - return 'info'; - case 'Warning': - return 'warning'; - case 'Danger': - return 'danger'; - case 'Dark': - return 'dark'; - case 'Light': - return 'light'; - default: - return 'link'; - } -}; -var $rundis$elm_bootstrap$Bootstrap$General$Internal$screenSizeOption = function (size) { - switch (size.$) { - case 'XS': - return $elm$core$Maybe$Nothing; - case 'SM': - return $elm$core$Maybe$Just('sm'); - case 'MD': - return $elm$core$Maybe$Just('md'); - case 'LG': - return $elm$core$Maybe$Just('lg'); - default: - return $elm$core$Maybe$Just('xl'); - } -}; -var $rundis$elm_bootstrap$Bootstrap$Internal$Button$buttonAttributes = function (modifiers) { - var options = A3($elm$core$List$foldl, $rundis$elm_bootstrap$Bootstrap$Internal$Button$applyModifier, $rundis$elm_bootstrap$Bootstrap$Internal$Button$defaultOptions, modifiers); - return _Utils_ap( - _List_fromArray( - [ - $elm$html$Html$Attributes$classList( - _List_fromArray( - [ - _Utils_Tuple2('btn', true), - _Utils_Tuple2('btn-block', options.block), - _Utils_Tuple2('disabled', options.disabled) - ])), - $elm$html$Html$Attributes$disabled(options.disabled) - ]), - _Utils_ap( - function () { - var _v0 = A2($elm$core$Maybe$andThen, $rundis$elm_bootstrap$Bootstrap$General$Internal$screenSizeOption, options.size); - if (_v0.$ === 'Just') { - var s = _v0.a; - return _List_fromArray( - [ - $elm$html$Html$Attributes$class('btn-' + s) - ]); - } else { - return _List_Nil; - } - }(), - _Utils_ap( - function () { - var _v1 = options.coloring; - if (_v1.$ === 'Just') { - if (_v1.a.$ === 'Roled') { - var role = _v1.a.a; - return _List_fromArray( - [ - $elm$html$Html$Attributes$class( - 'btn-' + $rundis$elm_bootstrap$Bootstrap$Internal$Button$roleClass(role)) - ]); - } else { - var role = _v1.a.a; - return _List_fromArray( - [ - $elm$html$Html$Attributes$class( - 'btn-outline-' + $rundis$elm_bootstrap$Bootstrap$Internal$Button$roleClass(role)) - ]); - } - } else { - return _List_Nil; - } - }(), - options.attributes))); -}; -var $rundis$elm_bootstrap$Bootstrap$Button$button = F2( - function (options, children) { - return A2( - $elm$html$Html$button, - $rundis$elm_bootstrap$Bootstrap$Internal$Button$buttonAttributes(options), - children); - }); var $rundis$elm_bootstrap$Bootstrap$Table$CellAttr = function (a) { return {$: 'CellAttr', a: a}; }; @@ -8951,6 +8786,7 @@ var $rundis$elm_bootstrap$Bootstrap$Modal$footer = F3( {attributes: attributes, children: children})) })); }); +var $elm$html$Html$h3 = _VirtualDom_node('h3'); var $rundis$elm_bootstrap$Bootstrap$Modal$Header = function (a) { return {$: 'Header', a: a}; }; @@ -9019,6 +8855,20 @@ var $elm$virtual_dom$VirtualDom$attribute = F2( _VirtualDom_noJavaScriptOrHtmlUri(value)); }); var $elm$html$Html$Attributes$attribute = $elm$virtual_dom$VirtualDom$attribute; +var $elm$core$Tuple$second = function (_v0) { + var y = _v0.b; + return y; +}; +var $elm$html$Html$Attributes$classList = function (classes) { + return $elm$html$Html$Attributes$class( + A2( + $elm$core$String$join, + ' ', + A2( + $elm$core$List$map, + $elm$core$Tuple$first, + A2($elm$core$List$filter, $elm$core$Tuple$second, classes)))); +}; var $rundis$elm_bootstrap$Bootstrap$Modal$StartClose = {$: 'StartClose'}; var $rundis$elm_bootstrap$Bootstrap$Modal$getCloseMsg = function (config_) { var _v0 = config_.withAnimation; @@ -9221,6 +9071,20 @@ var $rundis$elm_bootstrap$Bootstrap$Modal$display = F2( ]); } }); +var $rundis$elm_bootstrap$Bootstrap$General$Internal$screenSizeOption = function (size) { + switch (size.$) { + case 'XS': + return $elm$core$Maybe$Nothing; + case 'SM': + return $elm$core$Maybe$Just('sm'); + case 'MD': + return $elm$core$Maybe$Just('md'); + case 'LG': + return $elm$core$Maybe$Just('lg'); + default: + return $elm$core$Maybe$Just('xl'); + } +}; var $rundis$elm_bootstrap$Bootstrap$Modal$modalClass = function (size) { var _v0 = $rundis$elm_bootstrap$Bootstrap$General$Internal$screenSizeOption(size); if (_v0.$ === 'Just') { @@ -9423,38 +9287,177 @@ var $author$project$Model$RemoveEnemy = function (a) { var $author$project$Model$ShowAttackModal = function (a) { return {$: 'ShowAttackModal', a: a}; }; -var $rundis$elm_bootstrap$Bootstrap$Internal$Button$Coloring = function (a) { - return {$: 'Coloring', a: a}; -}; -var $rundis$elm_bootstrap$Bootstrap$Internal$Button$Danger = {$: 'Danger'}; -var $rundis$elm_bootstrap$Bootstrap$Internal$Button$Roled = function (a) { - return {$: 'Roled', a: a}; -}; -var $rundis$elm_bootstrap$Bootstrap$Button$danger = $rundis$elm_bootstrap$Bootstrap$Internal$Button$Coloring( - $rundis$elm_bootstrap$Bootstrap$Internal$Button$Roled($rundis$elm_bootstrap$Bootstrap$Internal$Button$Danger)); -var $rundis$elm_bootstrap$Bootstrap$Internal$Button$Success = {$: 'Success'}; -var $rundis$elm_bootstrap$Bootstrap$Button$success = $rundis$elm_bootstrap$Bootstrap$Internal$Button$Coloring( - $rundis$elm_bootstrap$Bootstrap$Internal$Button$Roled($rundis$elm_bootstrap$Bootstrap$Internal$Button$Success)); -var $rundis$elm_bootstrap$Bootstrap$Table$Td = function (a) { - return {$: 'Td', a: a}; +var $rundis$elm_bootstrap$Bootstrap$Internal$Button$Attrs = function (a) { + return {$: 'Attrs', a: a}; }; -var $rundis$elm_bootstrap$Bootstrap$Table$td = F2( - function (options, children) { - return $rundis$elm_bootstrap$Bootstrap$Table$Td( - {children: children, options: options}); - }); -var $rundis$elm_bootstrap$Bootstrap$Table$Row = function (a) { - return {$: 'Row', a: a}; +var $rundis$elm_bootstrap$Bootstrap$Button$attrs = function (attrs_) { + return $rundis$elm_bootstrap$Bootstrap$Internal$Button$Attrs(attrs_); }; -var $rundis$elm_bootstrap$Bootstrap$Table$tr = F2( - function (options, cells) { - return $rundis$elm_bootstrap$Bootstrap$Table$Row( - {cells: cells, options: options}); +var $elm$core$Maybe$andThen = F2( + function (callback, maybeValue) { + if (maybeValue.$ === 'Just') { + var value = maybeValue.a; + return callback(value); + } else { + return $elm$core$Maybe$Nothing; + } }); -var $author$project$FightingTool$displayCharacters = function (chars) { - return A2( - $elm$core$List$indexedMap, - F2( +var $rundis$elm_bootstrap$Bootstrap$Internal$Button$applyModifier = F2( + function (modifier, options) { + switch (modifier.$) { + case 'Size': + var size = modifier.a; + return _Utils_update( + options, + { + size: $elm$core$Maybe$Just(size) + }); + case 'Coloring': + var coloring = modifier.a; + return _Utils_update( + options, + { + coloring: $elm$core$Maybe$Just(coloring) + }); + case 'Block': + return _Utils_update( + options, + {block: true}); + case 'Disabled': + var val = modifier.a; + return _Utils_update( + options, + {disabled: val}); + default: + var attrs = modifier.a; + return _Utils_update( + options, + { + attributes: _Utils_ap(options.attributes, attrs) + }); + } + }); +var $rundis$elm_bootstrap$Bootstrap$Internal$Button$defaultOptions = {attributes: _List_Nil, block: false, coloring: $elm$core$Maybe$Nothing, disabled: false, size: $elm$core$Maybe$Nothing}; +var $elm$json$Json$Encode$bool = _Json_wrap; +var $elm$html$Html$Attributes$boolProperty = F2( + function (key, bool) { + return A2( + _VirtualDom_property, + key, + $elm$json$Json$Encode$bool(bool)); + }); +var $elm$html$Html$Attributes$disabled = $elm$html$Html$Attributes$boolProperty('disabled'); +var $rundis$elm_bootstrap$Bootstrap$Internal$Button$roleClass = function (role) { + switch (role.$) { + case 'Primary': + return 'primary'; + case 'Secondary': + return 'secondary'; + case 'Success': + return 'success'; + case 'Info': + return 'info'; + case 'Warning': + return 'warning'; + case 'Danger': + return 'danger'; + case 'Dark': + return 'dark'; + case 'Light': + return 'light'; + default: + return 'link'; + } +}; +var $rundis$elm_bootstrap$Bootstrap$Internal$Button$buttonAttributes = function (modifiers) { + var options = A3($elm$core$List$foldl, $rundis$elm_bootstrap$Bootstrap$Internal$Button$applyModifier, $rundis$elm_bootstrap$Bootstrap$Internal$Button$defaultOptions, modifiers); + return _Utils_ap( + _List_fromArray( + [ + $elm$html$Html$Attributes$classList( + _List_fromArray( + [ + _Utils_Tuple2('btn', true), + _Utils_Tuple2('btn-block', options.block), + _Utils_Tuple2('disabled', options.disabled) + ])), + $elm$html$Html$Attributes$disabled(options.disabled) + ]), + _Utils_ap( + function () { + var _v0 = A2($elm$core$Maybe$andThen, $rundis$elm_bootstrap$Bootstrap$General$Internal$screenSizeOption, options.size); + if (_v0.$ === 'Just') { + var s = _v0.a; + return _List_fromArray( + [ + $elm$html$Html$Attributes$class('btn-' + s) + ]); + } else { + return _List_Nil; + } + }(), + _Utils_ap( + function () { + var _v1 = options.coloring; + if (_v1.$ === 'Just') { + if (_v1.a.$ === 'Roled') { + var role = _v1.a.a; + return _List_fromArray( + [ + $elm$html$Html$Attributes$class( + 'btn-' + $rundis$elm_bootstrap$Bootstrap$Internal$Button$roleClass(role)) + ]); + } else { + var role = _v1.a.a; + return _List_fromArray( + [ + $elm$html$Html$Attributes$class( + 'btn-outline-' + $rundis$elm_bootstrap$Bootstrap$Internal$Button$roleClass(role)) + ]); + } + } else { + return _List_Nil; + } + }(), + options.attributes))); +}; +var $rundis$elm_bootstrap$Bootstrap$Button$button = F2( + function (options, children) { + return A2( + $elm$html$Html$button, + $rundis$elm_bootstrap$Bootstrap$Internal$Button$buttonAttributes(options), + children); + }); +var $rundis$elm_bootstrap$Bootstrap$Internal$Button$Coloring = function (a) { + return {$: 'Coloring', a: a}; +}; +var $rundis$elm_bootstrap$Bootstrap$Internal$Button$Danger = {$: 'Danger'}; +var $rundis$elm_bootstrap$Bootstrap$Internal$Button$Roled = function (a) { + return {$: 'Roled', a: a}; +}; +var $rundis$elm_bootstrap$Bootstrap$Button$danger = $rundis$elm_bootstrap$Bootstrap$Internal$Button$Coloring( + $rundis$elm_bootstrap$Bootstrap$Internal$Button$Roled($rundis$elm_bootstrap$Bootstrap$Internal$Button$Danger)); +var $elm$html$Html$i = _VirtualDom_node('i'); +var $rundis$elm_bootstrap$Bootstrap$Table$Td = function (a) { + return {$: 'Td', a: a}; +}; +var $rundis$elm_bootstrap$Bootstrap$Table$td = F2( + function (options, children) { + return $rundis$elm_bootstrap$Bootstrap$Table$Td( + {children: children, options: options}); + }); +var $rundis$elm_bootstrap$Bootstrap$Table$Row = function (a) { + return {$: 'Row', a: a}; +}; +var $rundis$elm_bootstrap$Bootstrap$Table$tr = F2( + function (options, cells) { + return $rundis$elm_bootstrap$Bootstrap$Table$Row( + {cells: cells, options: options}); + }); +var $author$project$FightingTool$displayCharacters = function (chars) { + return A2( + $elm$core$List$indexedMap, + F2( function (i, c) { var _v0 = function () { if (c.$ === 'Enemy') { @@ -9523,16 +9526,12 @@ var $author$project$FightingTool$displayCharacters = function (chars) { _List_fromArray( [ A2( - $rundis$elm_bootstrap$Bootstrap$Button$button, + $elm$html$Html$button, _List_fromArray( [ - $rundis$elm_bootstrap$Bootstrap$Button$success, - $rundis$elm_bootstrap$Bootstrap$Button$attrs( - _List_fromArray( - [ - $elm$html$Html$Events$onClick( - $author$project$Model$ShowAttackModal(i)) - ])) + $elm$html$Html$Attributes$class('metalButton'), + $elm$html$Html$Events$onClick( + $author$project$Model$ShowAttackModal(i)) ]), _List_fromArray( [ @@ -9545,21 +9544,15 @@ var $author$project$FightingTool$displayCharacters = function (chars) { _List_fromArray( [ A2( - $rundis$elm_bootstrap$Bootstrap$Button$button, + $elm$html$Html$i, _List_fromArray( [ - $rundis$elm_bootstrap$Bootstrap$Button$danger, - $rundis$elm_bootstrap$Bootstrap$Button$attrs( - _List_fromArray( - [ - $elm$html$Html$Events$onClick( - $author$project$Model$RemoveEnemy(i)) - ])) + $elm$html$Html$Attributes$class('fas fa-trash-alt'), + $elm$html$Html$Events$onClick( + $author$project$Model$RemoveEnemy(i)), + A2($elm$html$Html$Attributes$style, 'margin-top', '10%') ]), - _List_fromArray( - [ - $elm$html$Html$text('Löschen') - ])) + _List_Nil) ])) ])); } else { @@ -9632,9 +9625,6 @@ var $author$project$FightingTool$displayCharacters = function (chars) { }; var $rundis$elm_bootstrap$Bootstrap$Table$Hover = {$: 'Hover'}; var $rundis$elm_bootstrap$Bootstrap$Table$hover = $rundis$elm_bootstrap$Bootstrap$Table$Hover; -var $rundis$elm_bootstrap$Bootstrap$Internal$Button$Light = {$: 'Light'}; -var $rundis$elm_bootstrap$Bootstrap$Button$light = $rundis$elm_bootstrap$Bootstrap$Internal$Button$Coloring( - $rundis$elm_bootstrap$Bootstrap$Internal$Button$Roled($rundis$elm_bootstrap$Bootstrap$Internal$Button$Light)); var $rundis$elm_bootstrap$Bootstrap$Table$THead = function (a) { return {$: 'THead', a: a}; }; @@ -9652,8 +9642,6 @@ var $rundis$elm_bootstrap$Bootstrap$Table$simpleThead = function (cells) { A2($rundis$elm_bootstrap$Bootstrap$Table$tr, _List_Nil, cells) ])); }; -var $rundis$elm_bootstrap$Bootstrap$Table$Striped = {$: 'Striped'}; -var $rundis$elm_bootstrap$Bootstrap$Table$striped = $rundis$elm_bootstrap$Bootstrap$Table$Striped; var $rundis$elm_bootstrap$Bootstrap$Table$Inversed = {$: 'Inversed'}; var $elm$core$List$any = F2( function (isOkay, list) { @@ -10483,12 +10471,6 @@ var $rundis$elm_bootstrap$Bootstrap$Form$Input$OnInput = function (a) { var $rundis$elm_bootstrap$Bootstrap$Form$Input$onInput = function (toMsg) { return $rundis$elm_bootstrap$Bootstrap$Form$Input$OnInput(toMsg); }; -var $rundis$elm_bootstrap$Bootstrap$Internal$Button$Dark = {$: 'Dark'}; -var $rundis$elm_bootstrap$Bootstrap$Internal$Button$Outlined = function (a) { - return {$: 'Outlined', a: a}; -}; -var $rundis$elm_bootstrap$Bootstrap$Button$outlineDark = $rundis$elm_bootstrap$Bootstrap$Internal$Button$Coloring( - $rundis$elm_bootstrap$Bootstrap$Internal$Button$Outlined($rundis$elm_bootstrap$Bootstrap$Internal$Button$Dark)); var $rundis$elm_bootstrap$Bootstrap$Form$Input$Placeholder = function (a) { return {$: 'Placeholder', a: a}; }; @@ -10522,20 +10504,19 @@ var $author$project$FightingTool$viewAttackModal = function (model) { model.showAttackModal, A3( $rundis$elm_bootstrap$Bootstrap$Modal$footer, - _List_Nil, + _List_fromArray( + [ + $elm$html$Html$Attributes$class('mediumCopper') + ]), _List_fromArray( [ A2( - $rundis$elm_bootstrap$Bootstrap$Button$button, + $elm$html$Html$button, _List_fromArray( [ - $rundis$elm_bootstrap$Bootstrap$Button$attrs( - _List_fromArray( - [ - $elm$html$Html$Events$onClick( - A3($author$project$FightingTool$attack, model, model.characterId, model.damage)) - ])), - $rundis$elm_bootstrap$Bootstrap$Button$success + $elm$html$Html$Attributes$class('metalButton'), + $elm$html$Html$Events$onClick( + A3($author$project$FightingTool$attack, model, model.characterId, model.damage)) ]), _List_fromArray( [ @@ -10544,7 +10525,10 @@ var $author$project$FightingTool$viewAttackModal = function (model) { ]), A3( $rundis$elm_bootstrap$Bootstrap$Modal$body, - _List_Nil, + _List_fromArray( + [ + $elm$html$Html$Attributes$class('body') + ]), _List_fromArray( [ $rundis$elm_bootstrap$Bootstrap$Form$Input$text( @@ -10555,16 +10539,12 @@ var $author$project$FightingTool$viewAttackModal = function (model) { $rundis$elm_bootstrap$Bootstrap$Form$Input$onInput($author$project$Model$ChangeTmpDice) ])), A2( - $rundis$elm_bootstrap$Bootstrap$Button$button, + $elm$html$Html$button, _List_fromArray( [ - $rundis$elm_bootstrap$Bootstrap$Button$attrs( - _List_fromArray( - [ - $elm$html$Html$Events$onClick( - $author$project$Model$DiceAndSlice(model.tmpdice)) - ])), - $rundis$elm_bootstrap$Bootstrap$Button$outlineDark + $elm$html$Html$Attributes$class('metalButton'), + $elm$html$Html$Events$onClick( + $author$project$Model$DiceAndSlice(model.tmpdice)) ]), _List_fromArray( [ @@ -10578,11 +10558,20 @@ var $author$project$FightingTool$viewAttackModal = function (model) { ])) ]), A3( - $rundis$elm_bootstrap$Bootstrap$Modal$h3, - _List_Nil, + $rundis$elm_bootstrap$Bootstrap$Modal$header, + _List_fromArray( + [ + $elm$html$Html$Attributes$class('mediumCopper') + ]), _List_fromArray( [ - $elm$html$Html$text('Angriff') + A2( + $elm$html$Html$h3, + _List_Nil, + _List_fromArray( + [ + $elm$html$Html$text('Angriff') + ])) ]), A2( $rundis$elm_bootstrap$Bootstrap$Modal$hideOnBackdropClick, @@ -10591,84 +10580,16 @@ var $author$project$FightingTool$viewAttackModal = function (model) { $author$project$Model$CloseModal($author$project$Model$AttackModal))))))) ])); }; -var $author$project$Model$SwitchEnemyHero = function (a) { - return {$: 'SwitchEnemyHero', a: a}; +var $author$project$Model$ModalTabMsg = function (a) { + return {$: 'ModalTabMsg', a: a}; }; -var $rundis$elm_bootstrap$Bootstrap$Form$Fieldset$Config = function (a) { +var $rundis$elm_bootstrap$Bootstrap$Tab$Config = function (a) { return {$: 'Config', a: a}; }; -var $rundis$elm_bootstrap$Bootstrap$Form$Fieldset$mapOptions = F2( - function (mapper, _v0) { - var conf = _v0.a; - var options = conf.options; - return $rundis$elm_bootstrap$Bootstrap$Form$Fieldset$Config( - _Utils_update( - conf, - { - options: mapper(options) - })); - }); -var $rundis$elm_bootstrap$Bootstrap$Form$Fieldset$asGroup = $rundis$elm_bootstrap$Bootstrap$Form$Fieldset$mapOptions( - function (opts) { - return _Utils_update( - opts, - {isGroup: true}); - }); -var $rundis$elm_bootstrap$Bootstrap$Form$Radio$Checked = function (a) { - return {$: 'Checked', a: a}; -}; -var $rundis$elm_bootstrap$Bootstrap$Form$Radio$checked = function (isCheck) { - return $rundis$elm_bootstrap$Bootstrap$Form$Radio$Checked(isCheck); -}; -var $rundis$elm_bootstrap$Bootstrap$Form$Fieldset$mapConfig = F2( - function (mapper, _v0) { - var configRec = _v0.a; - return $rundis$elm_bootstrap$Bootstrap$Form$Fieldset$Config( - mapper(configRec)); - }); -var $rundis$elm_bootstrap$Bootstrap$Form$Fieldset$children = function (children_) { - return $rundis$elm_bootstrap$Bootstrap$Form$Fieldset$mapConfig( - function (conf) { - return _Utils_update( - conf, - {children: children_}); - }); -}; -var $rundis$elm_bootstrap$Bootstrap$Form$Fieldset$config = $rundis$elm_bootstrap$Bootstrap$Form$Fieldset$Config( - { - children: _List_Nil, - legend: $elm$core$Maybe$Nothing, - options: {attributes: _List_Nil, disabled: false, isGroup: false} - }); -var $rundis$elm_bootstrap$Bootstrap$Form$Radio$Radio = function (a) { - return {$: 'Radio', a: a}; -}; -var $rundis$elm_bootstrap$Bootstrap$Form$Radio$createAdvanced = F2( - function (options, label_) { - return $rundis$elm_bootstrap$Bootstrap$Form$Radio$Radio( - {label: label_, options: options}); - }); -var $rundis$elm_bootstrap$Bootstrap$Form$Radio$Label = function (a) { - return {$: 'Label', a: a}; +var $rundis$elm_bootstrap$Bootstrap$Tab$config = function (toMsg) { + return $rundis$elm_bootstrap$Bootstrap$Tab$Config( + {attributes: _List_Nil, isPill: false, items: _List_Nil, layout: $elm$core$Maybe$Nothing, toMsg: toMsg, useHash: false, withAnimation: false}); }; -var $rundis$elm_bootstrap$Bootstrap$Form$Radio$label = F2( - function (attributes, children) { - return $rundis$elm_bootstrap$Bootstrap$Form$Radio$Label( - {attributes: attributes, children: children}); - }); -var $rundis$elm_bootstrap$Bootstrap$Form$Radio$create = F2( - function (options, label_) { - return A2( - $rundis$elm_bootstrap$Bootstrap$Form$Radio$createAdvanced, - options, - A2( - $rundis$elm_bootstrap$Bootstrap$Form$Radio$label, - _List_Nil, - _List_fromArray( - [ - $elm$html$Html$text(label_) - ]))); - }); var $author$project$Model$AddEnemy = function (a) { return {$: 'AddEnemy', a: a}; }; @@ -10718,7 +10639,11 @@ var $author$project$FightingTool$customEnemy = function (model) { var ddArmor = _v0.c; return A2( $elm$html$Html$div, - _List_Nil, + _List_fromArray( + [ + A2($elm$html$Html$Attributes$style, 'margin-left', '5%'), + A2($elm$html$Html$Attributes$style, 'margin-right', '5%') + ]), _List_fromArray( [ A2( @@ -10843,16 +10768,13 @@ var $author$project$FightingTool$customEnemy = function (model) { ])), A2($elm$html$Html$br, _List_Nil, _List_Nil), A2( - $rundis$elm_bootstrap$Bootstrap$Button$button, + $elm$html$Html$button, _List_fromArray( [ - $rundis$elm_bootstrap$Bootstrap$Button$success, - $rundis$elm_bootstrap$Bootstrap$Button$attrs( - _List_fromArray( - [ - $elm$html$Html$Events$onClick( - $author$project$Model$AddEnemy(model.tmpEnemy)) - ])) + $elm$html$Html$Attributes$class('metalButton'), + A2($elm$html$Html$Attributes$style, 'position', 'right'), + $elm$html$Html$Events$onClick( + $author$project$Model$AddEnemy(model.tmpEnemy)) ]), _List_fromArray( [ @@ -10863,7 +10785,11 @@ var $author$project$FightingTool$customEnemy = function (model) { var $author$project$FightingTool$customHero = function (model) { return A2( $elm$html$Html$div, - _List_Nil, + _List_fromArray( + [ + A2($elm$html$Html$Attributes$style, 'margin-left', '5%'), + A2($elm$html$Html$Attributes$style, 'margin-right', '5%') + ]), _List_fromArray( [ A2( @@ -10925,16 +10851,12 @@ var $author$project$FightingTool$customHero = function (model) { ])), A2($elm$html$Html$br, _List_Nil, _List_Nil), A2( - $rundis$elm_bootstrap$Bootstrap$Button$button, + $elm$html$Html$button, _List_fromArray( [ - $rundis$elm_bootstrap$Bootstrap$Button$success, - $rundis$elm_bootstrap$Bootstrap$Button$attrs( - _List_fromArray( - [ - $elm$html$Html$Events$onClick( - $author$project$Model$AddEnemy(model.tmpHero)) - ])) + $elm$html$Html$Attributes$class('metalButton'), + $elm$html$Html$Events$onClick( + $author$project$Model$AddEnemy(model.tmpHero)) ]), _List_fromArray( [ @@ -11185,9 +11107,6 @@ var $rundis$elm_bootstrap$Bootstrap$Dropdown$header = function (children) { ]), children)); }; -var $rundis$elm_bootstrap$Bootstrap$Internal$Button$Primary = {$: 'Primary'}; -var $rundis$elm_bootstrap$Bootstrap$Button$primary = $rundis$elm_bootstrap$Bootstrap$Internal$Button$Coloring( - $rundis$elm_bootstrap$Bootstrap$Internal$Button$Roled($rundis$elm_bootstrap$Bootstrap$Internal$Button$Primary)); var $rundis$elm_bootstrap$Bootstrap$Dropdown$DropdownToggle = function (a) { return {$: 'DropdownToggle', a: a}; }; @@ -11552,276 +11471,342 @@ var $author$project$FightingTool$dropdownMenu = function (model) { toggleButton: A2( $rundis$elm_bootstrap$Bootstrap$Dropdown$toggle, _List_fromArray( - [$rundis$elm_bootstrap$Bootstrap$Button$primary]), + [ + $rundis$elm_bootstrap$Bootstrap$Button$attrs( + _List_fromArray( + [ + $elm$html$Html$Attributes$class('metalButton') + ])) + ]), _List_fromArray( [ - $elm$html$Html$text('Gegner') + $elm$html$Html$text('Monster') ])), toggleMsg: $author$project$Model$MyDrop1Msg }) ])); }; -var $rundis$elm_bootstrap$Bootstrap$Form$Radio$Id = function (a) { - return {$: 'Id', a: a}; -}; -var $rundis$elm_bootstrap$Bootstrap$Form$Radio$id = function (theId) { - return $rundis$elm_bootstrap$Bootstrap$Form$Radio$Id(theId); -}; -var $elm$html$Html$legend = _VirtualDom_node('legend'); -var $rundis$elm_bootstrap$Bootstrap$Form$Fieldset$legend = F2( - function (attributes, children_) { - return $rundis$elm_bootstrap$Bootstrap$Form$Fieldset$mapConfig( - function (conf) { - return _Utils_update( - conf, - { - legend: $elm$core$Maybe$Just( - A2($elm$html$Html$legend, attributes, children_)) - }); - }); - }); -var $rundis$elm_bootstrap$Bootstrap$Form$Radio$OnClick = function (a) { - return {$: 'OnClick', a: a}; +var $elm$html$Html$h5 = _VirtualDom_node('h5'); +var $rundis$elm_bootstrap$Bootstrap$Tab$Item = function (a) { + return {$: 'Item', a: a}; }; -var $rundis$elm_bootstrap$Bootstrap$Form$Radio$onClick = function (toMsg) { - return $rundis$elm_bootstrap$Bootstrap$Form$Radio$OnClick(toMsg); +var $rundis$elm_bootstrap$Bootstrap$Tab$item = function (rec) { + return $rundis$elm_bootstrap$Bootstrap$Tab$Item( + {id: rec.id, link: rec.link, pane: rec.pane}); }; -var $rundis$elm_bootstrap$Bootstrap$Form$Radio$addOption = F2( - function (opt, _v0) { - var radio_ = _v0.a; - var options = radio_.options; - return $rundis$elm_bootstrap$Bootstrap$Form$Radio$Radio( +var $rundis$elm_bootstrap$Bootstrap$Tab$items = F2( + function (items_, _v0) { + var configRec = _v0.a; + return $rundis$elm_bootstrap$Bootstrap$Tab$Config( _Utils_update( - radio_, - { - options: A2($elm$core$List$cons, opt, options) - })); + configRec, + {items: items_})); }); -var $rundis$elm_bootstrap$Bootstrap$Form$Radio$Name = function (a) { - return {$: 'Name', a: a}; +var $rundis$elm_bootstrap$Bootstrap$Tab$Link = function (a) { + return {$: 'Link', a: a}; }; -var $rundis$elm_bootstrap$Bootstrap$Form$Radio$name = function (name_) { - return $rundis$elm_bootstrap$Bootstrap$Form$Radio$Name(name_); +var $rundis$elm_bootstrap$Bootstrap$Tab$link = F2( + function (attributes, children) { + return $rundis$elm_bootstrap$Bootstrap$Tab$Link( + {attributes: attributes, children: children}); + }); +var $rundis$elm_bootstrap$Bootstrap$Tab$Pane = function (a) { + return {$: 'Pane', a: a}; }; -var $rundis$elm_bootstrap$Bootstrap$Form$Radio$applyModifier = F2( - function (modifier, options) { - switch (modifier.$) { - case 'Id': - var val = modifier.a; - return _Utils_update( - options, - { - id: $elm$core$Maybe$Just(val) - }); - case 'Checked': - var val = modifier.a; - return _Utils_update( - options, - {checked: val}); - case 'Name': - var val = modifier.a; - return _Utils_update( - options, - { - name: $elm$core$Maybe$Just(val) - }); - case 'Inline': - return _Utils_update( - options, - {inline: true}); - case 'OnClick': - var toMsg = modifier.a; - return _Utils_update( - options, - { - onClick: $elm$core$Maybe$Just(toMsg) - }); - case 'Custom': - return _Utils_update( - options, - {custom: true}); - case 'Disabled': - var val = modifier.a; - return _Utils_update( - options, - {disabled: val}); - case 'Validation': - var validation = modifier.a; - return _Utils_update( - options, - { - validation: $elm$core$Maybe$Just(validation) - }); - default: - var attrs_ = modifier.a; - return _Utils_update( - options, - { - attributes: _Utils_ap(options.attributes, attrs_) - }); +var $rundis$elm_bootstrap$Bootstrap$Tab$pane = F2( + function (attributes, children) { + return $rundis$elm_bootstrap$Bootstrap$Tab$Pane( + {attributes: attributes, children: children}); + }); +var $rundis$elm_bootstrap$Bootstrap$Tab$getActiveItem = F2( + function (_v0, configRec) { + var activeTab = _v0.a.activeTab; + if (activeTab.$ === 'Nothing') { + return $elm$core$List$head(configRec.items); + } else { + var id = activeTab.a; + return function (found) { + if (found.$ === 'Just') { + var f = found.a; + return $elm$core$Maybe$Just(f); + } else { + return $elm$core$List$head(configRec.items); + } + }( + $elm$core$List$head( + A2( + $elm$core$List$filter, + function (_v2) { + var item_ = _v2.a; + return _Utils_eq(item_.id, id); + }, + configRec.items))); } }); -var $rundis$elm_bootstrap$Bootstrap$Form$Radio$defaultOptions = {attributes: _List_Nil, checked: false, custom: false, disabled: false, id: $elm$core$Maybe$Nothing, inline: false, name: $elm$core$Maybe$Nothing, onClick: $elm$core$Maybe$Nothing, validation: $elm$core$Maybe$Nothing}; -var $elm$html$Html$Attributes$for = $elm$html$Html$Attributes$stringProperty('htmlFor'); -var $elm$html$Html$Attributes$checked = $elm$html$Html$Attributes$boolProperty('checked'); -var $elm$html$Html$Attributes$name = $elm$html$Html$Attributes$stringProperty('name'); -var $rundis$elm_bootstrap$Bootstrap$Form$Radio$toAttributes = function (options) { - return _Utils_ap( - _List_fromArray( +var $rundis$elm_bootstrap$Bootstrap$Tab$Hidden = {$: 'Hidden'}; +var $elm$html$Html$li = _VirtualDom_node('li'); +var $rundis$elm_bootstrap$Bootstrap$Tab$Start = {$: 'Start'}; +var $rundis$elm_bootstrap$Bootstrap$Tab$visibilityTransition = F2( + function (withAnimation_, visibility) { + var _v0 = _Utils_Tuple2(withAnimation_, visibility); + _v0$2: + while (true) { + if (_v0.a) { + switch (_v0.b.$) { + case 'Hidden': + var _v1 = _v0.b; + return $rundis$elm_bootstrap$Bootstrap$Tab$Start; + case 'Start': + var _v2 = _v0.b; + return $rundis$elm_bootstrap$Bootstrap$Tab$Showing; + default: + break _v0$2; + } + } else { + break _v0$2; + } + } + return $rundis$elm_bootstrap$Bootstrap$Tab$Showing; + }); +var $rundis$elm_bootstrap$Bootstrap$Tab$renderLink = F4( + function (id, active, _v0, configRec) { + var attributes = _v0.a.attributes; + var children = _v0.a.children; + var commonClasses = _List_fromArray( [ - $elm$html$Html$Attributes$classList( - _List_fromArray( - [ - _Utils_Tuple2('form-check-input', !options.custom), - _Utils_Tuple2('custom-control-input', options.custom) - ])), - $elm$html$Html$Attributes$type_('radio'), - $elm$html$Html$Attributes$disabled(options.disabled), - $elm$html$Html$Attributes$checked(options.checked) - ]), - _Utils_ap( - A2( - $elm$core$List$filterMap, - $elm$core$Basics$identity, + _Utils_Tuple2('nav-link', true), + _Utils_Tuple2('active', active) + ]); + var clickHandler = $elm$html$Html$Events$onClick( + configRec.toMsg( + $rundis$elm_bootstrap$Bootstrap$Tab$State( + { + activeTab: $elm$core$Maybe$Just(id), + visibility: A2($rundis$elm_bootstrap$Bootstrap$Tab$visibilityTransition, configRec.withAnimation && (!active), $rundis$elm_bootstrap$Bootstrap$Tab$Hidden) + }))); + var linkItem = configRec.useHash ? A2( + $elm$html$Html$a, + _Utils_ap( _List_fromArray( [ - A2($elm$core$Maybe$map, $elm$html$Html$Events$onClick, options.onClick), - A2($elm$core$Maybe$map, $elm$html$Html$Attributes$name, options.name), - A2($elm$core$Maybe$map, $elm$html$Html$Attributes$id, options.id) - ])), - options.attributes)); -}; -var $rundis$elm_bootstrap$Bootstrap$Form$Radio$view = function (_v0) { - var radio_ = _v0.a; - var opts = A3($elm$core$List$foldl, $rundis$elm_bootstrap$Bootstrap$Form$Radio$applyModifier, $rundis$elm_bootstrap$Bootstrap$Form$Radio$defaultOptions, radio_.options); - var _v1 = radio_.label; - var label_ = _v1.a; - return A2( - $elm$html$Html$div, - _List_fromArray( - [ - $elm$html$Html$Attributes$classList( + $elm$html$Html$Attributes$classList(commonClasses), + clickHandler, + $elm$html$Html$Attributes$href('#' + id) + ]), + attributes), + children) : A2( + $elm$html$Html$button, + _Utils_ap( _List_fromArray( [ - _Utils_Tuple2('form-check', !opts.custom), - _Utils_Tuple2('form-check-inline', (!opts.custom) && opts.inline), - _Utils_Tuple2('custom-control', opts.custom), - _Utils_Tuple2('custom-radio', opts.custom), - _Utils_Tuple2('custom-control-inline', opts.inline && opts.custom) - ])) - ]), - _List_fromArray( - [ - A2( - $elm$html$Html$input, - $rundis$elm_bootstrap$Bootstrap$Form$Radio$toAttributes(opts), - _List_Nil), - A2( - $elm$html$Html$label, - _Utils_ap( - label_.attributes, - _Utils_ap( - _List_fromArray( - [ - $elm$html$Html$Attributes$classList( - _List_fromArray( - [ - _Utils_Tuple2('form-check-label', !opts.custom), - _Utils_Tuple2('custom-control-label', opts.custom) - ])) - ]), - function () { - var _v2 = opts.id; - if (_v2.$ === 'Just') { - var v = _v2.a; - return _List_fromArray( - [ - $elm$html$Html$Attributes$for(v) - ]); - } else { - return _List_Nil; - } - }())), - label_.children) - ])); -}; -var $rundis$elm_bootstrap$Bootstrap$Form$Radio$radioList = F2( - function (groupName, radios) { + $elm$html$Html$Attributes$classList( + _Utils_ap( + commonClasses, + _List_fromArray( + [ + _Utils_Tuple2('btn', true), + _Utils_Tuple2('btn-link', true) + ]))), + clickHandler + ]), + attributes), + children); return A2( - $elm$core$List$map, - A2( - $elm$core$Basics$composeL, - $rundis$elm_bootstrap$Bootstrap$Form$Radio$view, - $rundis$elm_bootstrap$Bootstrap$Form$Radio$addOption( - $rundis$elm_bootstrap$Bootstrap$Form$Radio$name(groupName))), - radios); - }); -var $elm$core$List$append = F2( - function (xs, ys) { - if (!ys.b) { - return xs; - } else { - return A3($elm$core$List$foldr, $elm$core$List$cons, ys, xs); - } - }); -var $elm$html$Html$fieldset = _VirtualDom_node('fieldset'); -var $rundis$elm_bootstrap$Bootstrap$Form$Fieldset$view = function (_v0) { - var rec = _v0.a; - var options = rec.options; - return A2( - $elm$html$Html$fieldset, - _Utils_ap( + $elm$html$Html$li, _List_fromArray( [ - $elm$html$Html$Attributes$classList( - _List_fromArray( - [ - _Utils_Tuple2('form-group', options.isGroup) - ])), - $elm$html$Html$Attributes$disabled(options.disabled) + $elm$html$Html$Attributes$class('nav-item') ]), - options.attributes), - function (xs) { - return A2($elm$core$List$append, xs, rec.children); - }( + _List_fromArray( + [linkItem])); + }); +var $rundis$elm_bootstrap$Bootstrap$Tab$transitionStyles = function (opacity) { + return _List_fromArray( + [ A2( - $elm$core$Maybe$withDefault, - _List_Nil, - A2( - $elm$core$Maybe$map, - function (e) { - return _List_fromArray( - [e]); - }, - rec.legend)))); + $elm$html$Html$Attributes$style, + 'opacity', + $elm$core$String$fromInt(opacity)), + A2($elm$html$Html$Attributes$style, '-webkit-transition', 'opacity 0.15s linear'), + A2($elm$html$Html$Attributes$style, '-o-transition', 'opacity 0.15s linear'), + A2($elm$html$Html$Attributes$style, 'transition', 'opacity 0.15s linear') + ]); }; -var $author$project$FightingTool$viewCustomEnemyModal = function (model) { - var herobool = function () { - var _v1 = model.enemyHero; - if (_v1 === 'Hero') { - return true; - } else { - return false; +var $rundis$elm_bootstrap$Bootstrap$Tab$activeTabAttributes = F2( + function (_v0, configRec) { + var visibility = _v0.a.visibility; + switch (visibility.$) { + case 'Hidden': + return _List_fromArray( + [ + A2($elm$html$Html$Attributes$style, 'display', 'none') + ]); + case 'Start': + return _List_fromArray( + [ + A2($elm$html$Html$Attributes$style, 'display', 'block'), + A2($elm$html$Html$Attributes$style, 'opacity', '0') + ]); + default: + return _Utils_ap( + _List_fromArray( + [ + A2($elm$html$Html$Attributes$style, 'display', 'block') + ]), + $rundis$elm_bootstrap$Bootstrap$Tab$transitionStyles(1)); } - }(); - var enemybool = function () { - var _v0 = model.enemyHero; - if (_v0 === 'Enemy') { - return true; + }); +var $rundis$elm_bootstrap$Bootstrap$Tab$renderTabPane = F5( + function (id, active, _v0, state, configRec) { + var attributes = _v0.a.attributes; + var children = _v0.a.children; + var displayAttrs = active ? A2($rundis$elm_bootstrap$Bootstrap$Tab$activeTabAttributes, state, configRec) : _List_fromArray( + [ + A2($elm$html$Html$Attributes$style, 'display', 'none') + ]); + return A2( + $elm$html$Html$div, + _Utils_ap( + _List_fromArray( + [ + $elm$html$Html$Attributes$id(id), + $elm$html$Html$Attributes$class('tab-pane') + ]), + _Utils_ap(displayAttrs, attributes)), + children); + }); +var $rundis$elm_bootstrap$Bootstrap$Tab$tabAttributes = function (configRec) { + return _Utils_ap( + _List_fromArray( + [ + $elm$html$Html$Attributes$classList( + _List_fromArray( + [ + _Utils_Tuple2('nav', true), + _Utils_Tuple2('nav-tabs', !configRec.isPill), + _Utils_Tuple2('nav-pills', configRec.isPill) + ])) + ]), + _Utils_ap( + function () { + var _v0 = configRec.layout; + if (_v0.$ === 'Just') { + switch (_v0.a.$) { + case 'Justified': + var _v1 = _v0.a; + return _List_fromArray( + [ + $elm$html$Html$Attributes$class('nav-justified') + ]); + case 'Fill': + var _v2 = _v0.a; + return _List_fromArray( + [ + $elm$html$Html$Attributes$class('nav-fill') + ]); + case 'Center': + var _v3 = _v0.a; + return _List_fromArray( + [ + $elm$html$Html$Attributes$class('justify-content-center') + ]); + default: + var _v4 = _v0.a; + return _List_fromArray( + [ + $elm$html$Html$Attributes$class('justify-content-end') + ]); + } + } else { + return _List_Nil; + } + }(), + configRec.attributes)); +}; +var $elm$html$Html$ul = _VirtualDom_node('ul'); +var $rundis$elm_bootstrap$Bootstrap$Tab$view = F2( + function (state, _v0) { + var configRec = _v0.a; + var _v1 = A2($rundis$elm_bootstrap$Bootstrap$Tab$getActiveItem, state, configRec); + if (_v1.$ === 'Nothing') { + return A2( + $elm$html$Html$div, + _List_Nil, + _List_fromArray( + [ + A2( + $elm$html$Html$ul, + $rundis$elm_bootstrap$Bootstrap$Tab$tabAttributes(configRec), + _List_Nil), + A2( + $elm$html$Html$div, + _List_fromArray( + [ + $elm$html$Html$Attributes$class('tab-content') + ]), + _List_Nil) + ])); } else { - return false; + var currentItem = _v1.a.a; + return A2( + $elm$html$Html$div, + _List_Nil, + _List_fromArray( + [ + A2( + $elm$html$Html$ul, + $rundis$elm_bootstrap$Bootstrap$Tab$tabAttributes(configRec), + A2( + $elm$core$List$map, + function (_v2) { + var item_ = _v2.a; + return A4( + $rundis$elm_bootstrap$Bootstrap$Tab$renderLink, + item_.id, + _Utils_eq(item_.id, currentItem.id), + item_.link, + configRec); + }, + configRec.items)), + A2( + $elm$html$Html$div, + _List_fromArray( + [ + $elm$html$Html$Attributes$class('tab-content') + ]), + A2( + $elm$core$List$map, + function (_v3) { + var item_ = _v3.a; + return A5( + $rundis$elm_bootstrap$Bootstrap$Tab$renderTabPane, + item_.id, + _Utils_eq(item_.id, currentItem.id), + item_.pane, + state, + configRec); + }, + configRec.items)) + ])); } - }(); + }); +var $author$project$FightingTool$viewCustomEnemyModal = function (model) { return A2( $rundis$elm_bootstrap$Bootstrap$Modal$view, model.showCustomEnemy, A3( $rundis$elm_bootstrap$Bootstrap$Modal$footer, - _List_Nil, + _List_fromArray( + [ + $elm$html$Html$Attributes$class('mediumCopper') + ]), _List_Nil, A3( $rundis$elm_bootstrap$Bootstrap$Modal$body, - _List_Nil, + _List_fromArray( + [ + $elm$html$Html$Attributes$class('body') + ]), _List_fromArray( [ A2( @@ -11829,54 +11814,92 @@ var $author$project$FightingTool$viewCustomEnemyModal = function (model) { _List_Nil, _List_fromArray( [ - $author$project$FightingTool$dropdownMenu(model), - A2($elm$html$Html$br, _List_Nil, _List_Nil), - $rundis$elm_bootstrap$Bootstrap$Form$Fieldset$view( A2( - $rundis$elm_bootstrap$Bootstrap$Form$Fieldset$children, - A2( - $rundis$elm_bootstrap$Bootstrap$Form$Radio$radioList, - 'EnemyHero', - _List_fromArray( - [ - A2( - $rundis$elm_bootstrap$Bootstrap$Form$Radio$create, - _List_fromArray( - [ - $rundis$elm_bootstrap$Bootstrap$Form$Radio$id('enemy'), - $rundis$elm_bootstrap$Bootstrap$Form$Radio$onClick( - $author$project$Model$SwitchEnemyHero('Enemy')), - $rundis$elm_bootstrap$Bootstrap$Form$Radio$checked(enemybool) - ]), - 'Gegner'), - A2( - $rundis$elm_bootstrap$Bootstrap$Form$Radio$create, - _List_fromArray( - [ - $rundis$elm_bootstrap$Bootstrap$Form$Radio$id('hero'), - $rundis$elm_bootstrap$Bootstrap$Form$Radio$onClick( - $author$project$Model$SwitchEnemyHero('Hero')), - $rundis$elm_bootstrap$Bootstrap$Form$Radio$checked(herobool) - ]), - 'Held') - ])), - A3( - $rundis$elm_bootstrap$Bootstrap$Form$Fieldset$legend, - _List_Nil, - _List_fromArray( - [ - $elm$html$Html$text('Benutzerdefiniert: ') - ]), - $rundis$elm_bootstrap$Bootstrap$Form$Fieldset$asGroup($rundis$elm_bootstrap$Bootstrap$Form$Fieldset$config)))), - (model.enemyHero === 'Hero') ? $author$project$FightingTool$customHero(model) : ((model.enemyHero === 'Enemy') ? $author$project$FightingTool$customEnemy(model) : A2($elm$html$Html$p, _List_Nil, _List_Nil)) + $elm$html$Html$h5, + _List_Nil, + _List_fromArray( + [ + $elm$html$Html$text('Vordefiniert') + ])), + $author$project$FightingTool$dropdownMenu(model), + A2($elm$html$Html$br, _List_Nil, _List_Nil), + A2( + $elm$html$Html$h5, + _List_Nil, + _List_fromArray( + [ + $elm$html$Html$text('Benutzerdefiniert') + ])), + A2( + $rundis$elm_bootstrap$Bootstrap$Tab$view, + model.modalTabState, + A2( + $rundis$elm_bootstrap$Bootstrap$Tab$items, + _List_fromArray( + [ + $rundis$elm_bootstrap$Bootstrap$Tab$item( + { + id: 'enemy', + link: A2( + $rundis$elm_bootstrap$Bootstrap$Tab$link, + _List_Nil, + _List_fromArray( + [ + $elm$html$Html$text('Gegner') + ])), + pane: A2( + $rundis$elm_bootstrap$Bootstrap$Tab$pane, + _List_fromArray( + [ + $elm$html$Html$Attributes$class('lightCopper'), + A2($elm$html$Html$Attributes$style, 'padding', '2%') + ]), + _List_fromArray( + [ + $author$project$FightingTool$customEnemy(model) + ])) + }), + $rundis$elm_bootstrap$Bootstrap$Tab$item( + { + id: 'hero', + link: A2( + $rundis$elm_bootstrap$Bootstrap$Tab$link, + _List_Nil, + _List_fromArray( + [ + $elm$html$Html$text('Held') + ])), + pane: A2( + $rundis$elm_bootstrap$Bootstrap$Tab$pane, + _List_fromArray( + [ + $elm$html$Html$Attributes$class('lightCopper'), + A2($elm$html$Html$Attributes$style, 'padding', '2%') + ]), + _List_fromArray( + [ + $author$project$FightingTool$customHero(model) + ])) + }) + ]), + $rundis$elm_bootstrap$Bootstrap$Tab$config($author$project$Model$ModalTabMsg))) ])) ]), A3( - $rundis$elm_bootstrap$Bootstrap$Modal$h3, - _List_Nil, + $rundis$elm_bootstrap$Bootstrap$Modal$header, + _List_fromArray( + [ + $elm$html$Html$Attributes$class('mediumCopper') + ]), _List_fromArray( [ - $elm$html$Html$text('Charakter hinzufügen') + A2( + $elm$html$Html$h3, + _List_Nil, + _List_fromArray( + [ + $elm$html$Html$text('Charakter hinzufügen') + ])) ]), A2( $rundis$elm_bootstrap$Bootstrap$Modal$hideOnBackdropClick, @@ -11898,7 +11921,7 @@ var $author$project$FightingTool$body = function (model) { $rundis$elm_bootstrap$Bootstrap$Table$table( { options: _List_fromArray( - [$rundis$elm_bootstrap$Bootstrap$Table$striped, $rundis$elm_bootstrap$Bootstrap$Table$hover]), + [$rundis$elm_bootstrap$Bootstrap$Table$hover]), tbody: A2( $rundis$elm_bootstrap$Bootstrap$Table$tbody, _List_Nil, @@ -11921,17 +11944,13 @@ var $author$project$FightingTool$body = function (model) { _List_fromArray( [ A2( - $rundis$elm_bootstrap$Bootstrap$Button$button, + $elm$html$Html$button, _List_fromArray( [ - $rundis$elm_bootstrap$Bootstrap$Button$light, - $rundis$elm_bootstrap$Bootstrap$Button$block, - $rundis$elm_bootstrap$Bootstrap$Button$attrs( - _List_fromArray( - [ - $elm$html$Html$Events$onClick( - $author$project$Model$ShowModal($author$project$Model$CustomEnemy)) - ])) + $elm$html$Html$Attributes$class('metalButton'), + $elm$html$Html$Events$onClick( + $author$project$Model$ShowModal($author$project$Model$CustomEnemy)), + A2($elm$html$Html$Attributes$style, 'width', '100%') ]), _List_fromArray( [ @@ -11945,7 +11964,11 @@ var $author$project$FightingTool$body = function (model) { [ A2( $rundis$elm_bootstrap$Bootstrap$Table$th, - _List_Nil, + _List_fromArray( + [ + $rundis$elm_bootstrap$Bootstrap$Table$cellAttr( + $elm$html$Html$Attributes$class('mediumCopper')) + ]), _List_fromArray( [ $elm$html$Html$text('ID') @@ -11955,7 +11978,9 @@ var $author$project$FightingTool$body = function (model) { _List_fromArray( [ $rundis$elm_bootstrap$Bootstrap$Table$cellAttr( - $elm$html$Html$Attributes$colspan(2)) + $elm$html$Html$Attributes$colspan(2)), + $rundis$elm_bootstrap$Bootstrap$Table$cellAttr( + $elm$html$Html$Attributes$class('mediumCopper')) ]), _List_fromArray( [ @@ -11963,28 +11988,44 @@ var $author$project$FightingTool$body = function (model) { ])), A2( $rundis$elm_bootstrap$Bootstrap$Table$th, - _List_Nil, + _List_fromArray( + [ + $rundis$elm_bootstrap$Bootstrap$Table$cellAttr( + $elm$html$Html$Attributes$class('mediumCopper')) + ]), _List_fromArray( [ $elm$html$Html$text('RS') ])), A2( $rundis$elm_bootstrap$Bootstrap$Table$th, - _List_Nil, + _List_fromArray( + [ + $rundis$elm_bootstrap$Bootstrap$Table$cellAttr( + $elm$html$Html$Attributes$class('mediumCopper')) + ]), _List_fromArray( [ $elm$html$Html$text('LeP') ])), A2( $rundis$elm_bootstrap$Bootstrap$Table$th, - _List_Nil, + _List_fromArray( + [ + $rundis$elm_bootstrap$Bootstrap$Table$cellAttr( + $elm$html$Html$Attributes$class('mediumCopper')) + ]), _List_fromArray( [ $elm$html$Html$text(' ') ])), A2( $rundis$elm_bootstrap$Bootstrap$Table$th, - _List_Nil, + _List_fromArray( + [ + $rundis$elm_bootstrap$Bootstrap$Table$cellAttr( + $elm$html$Html$Attributes$class('mediumCopper')) + ]), _List_fromArray( [ $elm$html$Html$text(' ') @@ -11997,14 +12038,20 @@ var $author$project$FightingTool$body = function (model) { $author$project$FightingTool$viewAttackModal(model) ])); }; -var $rundis$elm_bootstrap$Bootstrap$Tab$Config = function (a) { - return {$: 'Config', a: a}; +var $author$project$Model$ClearCharacterList = {$: 'ClearCharacterList'}; +var $author$project$Model$Pick = {$: 'Pick'}; +var $rundis$elm_bootstrap$Bootstrap$Form$Textarea$Attrs = function (a) { + return {$: 'Attrs', a: a}; }; -var $rundis$elm_bootstrap$Bootstrap$Tab$config = function (toMsg) { - return $rundis$elm_bootstrap$Bootstrap$Tab$Config( - {attributes: _List_Nil, isPill: false, items: _List_Nil, layout: $elm$core$Maybe$Nothing, toMsg: toMsg, useHash: false, withAnimation: false}); +var $rundis$elm_bootstrap$Bootstrap$Form$Textarea$attrs = function (attrs_) { + return $rundis$elm_bootstrap$Bootstrap$Form$Textarea$Attrs(attrs_); +}; +var $rundis$elm_bootstrap$Bootstrap$Grid$Internal$RowAttrs = function (a) { + return {$: 'RowAttrs', a: a}; +}; +var $rundis$elm_bootstrap$Bootstrap$Grid$Row$attrs = function (attrs_) { + return $rundis$elm_bootstrap$Bootstrap$Grid$Internal$RowAttrs(attrs_); }; -var $author$project$Model$ClearCharacterList = {$: 'ClearCharacterList'}; var $rundis$elm_bootstrap$Bootstrap$Grid$Column = function (a) { return {$: 'Column', a: a}; }; @@ -12143,23 +12190,16 @@ var $author$project$DungeonMap$characters2rows = F2( }), $elm$core$Array$toList(chars)); }); -var $rundis$elm_bootstrap$Bootstrap$Table$Responsive = function (a) { - return {$: 'Responsive', a: a}; -}; -var $rundis$elm_bootstrap$Bootstrap$Table$responsive = $rundis$elm_bootstrap$Bootstrap$Table$Responsive($elm$core$Maybe$Nothing); var $author$project$DungeonMap$dungeonMap_MonsterList = function (model) { return A2( $elm$html$Html$div, - _List_fromArray( - [ - $elm$html$Html$Attributes$class('container') - ]), + _List_Nil, _List_fromArray( [ $rundis$elm_bootstrap$Bootstrap$Table$table( { options: _List_fromArray( - [$rundis$elm_bootstrap$Bootstrap$Table$hover, $rundis$elm_bootstrap$Bootstrap$Table$bordered, $rundis$elm_bootstrap$Bootstrap$Table$responsive]), + [$rundis$elm_bootstrap$Bootstrap$Table$hover, $rundis$elm_bootstrap$Bootstrap$Table$bordered]), tbody: A2( $rundis$elm_bootstrap$Bootstrap$Table$tbody, _List_Nil, @@ -12169,21 +12209,33 @@ var $author$project$DungeonMap$dungeonMap_MonsterList = function (model) { [ A2( $rundis$elm_bootstrap$Bootstrap$Table$th, - _List_Nil, + _List_fromArray( + [ + $rundis$elm_bootstrap$Bootstrap$Table$cellAttr( + $elm$html$Html$Attributes$class('mediumCopper')) + ]), _List_fromArray( [ $elm$html$Html$text('ID') ])), A2( $rundis$elm_bootstrap$Bootstrap$Table$th, - _List_Nil, + _List_fromArray( + [ + $rundis$elm_bootstrap$Bootstrap$Table$cellAttr( + $elm$html$Html$Attributes$class('mediumCopper')) + ]), _List_fromArray( [ $elm$html$Html$text('Name') ])), A2( $rundis$elm_bootstrap$Bootstrap$Table$th, - _List_Nil, + _List_fromArray( + [ + $rundis$elm_bootstrap$Bootstrap$Table$cellAttr( + $elm$html$Html$Attributes$class('mediumCopper')) + ]), _List_fromArray( [ $elm$html$Html$text('LeP') @@ -12194,7 +12246,6 @@ var $author$project$DungeonMap$dungeonMap_MonsterList = function (model) { }; var $author$project$Model$DragEnter = {$: 'DragEnter'}; var $author$project$Model$DragLeave = {$: 'DragLeave'}; -var $author$project$Model$Pick = {$: 'Pick'}; var $elm$file$File$decoder = _File_decoder; var $elm$json$Json$Decode$list = _Json_decodeList; var $elm$json$Json$Decode$oneOrMoreHelp = F2( @@ -12584,7 +12635,9 @@ var $elm$svg$Svg$Attributes$style = _VirtualDom_attribute('style'); var $elm$svg$Svg$text = $elm$virtual_dom$VirtualDom$text; var $elm$svg$Svg$Attributes$textAnchor = _VirtualDom_attribute('text-anchor'); var $elm$svg$Svg$text_ = $elm$svg$Svg$trustedNode('text'); +var $elm$svg$Svg$Attributes$title = _VirtualDom_attribute('title'); var $elm$core$String$toFloat = _String_toFloat; +var $elm$svg$Svg$Attributes$width = _VirtualDom_attribute('width'); var $elm$svg$Svg$Attributes$x = _VirtualDom_attribute('x'); var $elm$svg$Svg$Attributes$xlinkHref = function (value) { return A3( @@ -12633,13 +12686,13 @@ var $author$project$DungeonMap$placeIcon = function (s) { A2( $elm$core$Maybe$withDefault, 0, - $elm$core$String$toFloat(x)) - 3)), + $elm$core$String$toFloat(x)))), $elm$svg$Svg$Attributes$y( $elm$core$String$fromFloat( A2( $elm$core$Maybe$withDefault, 0, - $elm$core$String$toFloat(y)) - 0.5)), + $elm$core$String$toFloat(y)))), $elm$svg$Svg$Attributes$dominantBaseline('middle') ]), _List_fromArray( @@ -12651,25 +12704,26 @@ var $author$project$DungeonMap$placeIcon = function (s) { $elm$svg$Svg$image, _List_fromArray( [ - $elm$svg$Svg$Attributes$style('width:30px;height:30px;'), + $elm$svg$Svg$Attributes$width('50'), + $elm$svg$Svg$Attributes$height('50'), $elm$svg$Svg$Attributes$x( $elm$core$String$fromFloat( A2( $elm$core$Maybe$withDefault, 0, - $elm$core$String$toFloat(x)) - 17.5)), + $elm$core$String$toFloat(x)) - 25.5)), $elm$svg$Svg$Attributes$y( $elm$core$String$fromFloat( A2( $elm$core$Maybe$withDefault, 0, - $elm$core$String$toFloat(y)) - 17.5)), - $elm$svg$Svg$Attributes$xlinkHref('res/icons/enemy.png'), - $elm$svg$Svg$Attributes$class('MonsterIcon'), + $elm$core$String$toFloat(y)) - 24.5)), + $elm$svg$Svg$Attributes$title('MonsterIcon'), + $elm$svg$Svg$Attributes$xlinkHref('res/icons/Enemy.svg'), $elm$svg$Svg$Events$onMouseOver( A2($author$project$Model$HighlightTableRow, id, text)), $elm$svg$Svg$Events$onMouseOut( - A2($author$project$Model$HighlightTableRow, 0, 'Beschreibung')), + A2($author$project$Model$HighlightTableRow, 0, '')), $elm$svg$Svg$Events$onClick( A2($author$project$Model$DeleteIcon, iconType, id)) ]), @@ -12688,13 +12742,13 @@ var $author$project$DungeonMap$placeIcon = function (s) { A2( $elm$core$Maybe$withDefault, 0, - $elm$core$String$toFloat(x)) + 1)), + $elm$core$String$toFloat(x)))), $elm$svg$Svg$Attributes$y( $elm$core$String$fromFloat( A2( $elm$core$Maybe$withDefault, 0, - $elm$core$String$toFloat(y)) + 2.5)), + $elm$core$String$toFloat(y)))), $elm$svg$Svg$Attributes$dominantBaseline('middle') ]), _List_fromArray( @@ -12706,25 +12760,26 @@ var $author$project$DungeonMap$placeIcon = function (s) { $elm$svg$Svg$image, _List_fromArray( [ - $elm$svg$Svg$Attributes$style('width:25px;height:25px;'), + $elm$svg$Svg$Attributes$width('45'), + $elm$svg$Svg$Attributes$height('45'), $elm$svg$Svg$Attributes$x( $elm$core$String$fromFloat( A2( $elm$core$Maybe$withDefault, 0, - $elm$core$String$toFloat(x)) - 11.5)), + $elm$core$String$toFloat(x)) - 22.5)), $elm$svg$Svg$Attributes$y( $elm$core$String$fromFloat( A2( $elm$core$Maybe$withDefault, 0, - $elm$core$String$toFloat(y)) - 11.5)), - $elm$svg$Svg$Attributes$xlinkHref('res/icons/hero.png'), - $elm$svg$Svg$Attributes$class('PlayerIcon'), + $elm$core$String$toFloat(y)) - 22)), + $elm$svg$Svg$Attributes$title('ObjectIcon'), + $elm$svg$Svg$Attributes$xlinkHref('res/icons/Hero.svg'), $elm$svg$Svg$Events$onMouseOver( A2($author$project$Model$HighlightTableRow, id, text)), $elm$svg$Svg$Events$onMouseOut( - A2($author$project$Model$HighlightTableRow, 0, 'Beschreibung')), + A2($author$project$Model$HighlightTableRow, 0, '')), $elm$svg$Svg$Events$onClick( A2($author$project$Model$DeleteIcon, iconType, id)) ]), @@ -12749,7 +12804,7 @@ var $author$project$DungeonMap$placeIcon = function (s) { $elm$svg$Svg$Events$onMouseOver( $author$project$Model$ToolTipMsg(text)), $elm$svg$Svg$Events$onMouseOut( - $author$project$Model$ToolTipMsg('Beschreibung')), + $author$project$Model$ToolTipMsg('')), $elm$svg$Svg$Attributes$class('ObjectIcon'), $elm$svg$Svg$Events$onClick( A2($author$project$Model$DeleteIcon, iconType, id)) @@ -12781,7 +12836,7 @@ var $author$project$DungeonMap$placeIcon = function (s) { $elm$svg$Svg$Events$onMouseOver( $author$project$Model$ToolTipMsg(text)), $elm$svg$Svg$Events$onMouseOut( - $author$project$Model$ToolTipMsg('Beschreibung')), + $author$project$Model$ToolTipMsg('')), $elm$svg$Svg$Attributes$class('ObjectIcon'), $elm$svg$Svg$Events$onClick( A2($author$project$Model$DeleteIcon, iconType, id)) @@ -12794,7 +12849,6 @@ var $author$project$DungeonMap$placeIcon = function (s) { } }; var $elm$svg$Svg$rect = $elm$svg$Svg$trustedNode('rect'); -var $elm$svg$Svg$Attributes$width = _VirtualDom_attribute('width'); var $author$project$DungeonMap$newIconsView = function (addCharacterIcon) { if (addCharacterIcon.$ === 'DrawIcon') { var characterIcon = addCharacterIcon.a; @@ -12854,17 +12908,6 @@ var $author$project$DungeonMap$newIconsView = function (addCharacterIcon) { return _List_Nil; } }; -var $rundis$elm_bootstrap$Bootstrap$Button$onClick = function (message) { - return $rundis$elm_bootstrap$Bootstrap$Button$attrs( - _List_fromArray( - [ - A2( - $elm$html$Html$Events$preventDefaultOn, - 'click', - $elm$json$Json$Decode$succeed( - _Utils_Tuple2(message, true))) - ])); -}; var $elm$svg$Svg$svg = $elm$svg$Svg$trustedNode('svg'); var $author$project$DungeonMap$svgIconList = function (model) { return A3( @@ -12876,7 +12919,6 @@ var $author$project$DungeonMap$svgIconList = function (model) { $author$project$DungeonMap$placeIcon, _Utils_ap(model.characterList, model.objectIconList))); }; -var $elm$svg$Svg$Attributes$title = _VirtualDom_attribute('title'); var $elm$svg$Svg$Attributes$version = _VirtualDom_attribute('version'); var $elm$svg$Svg$Attributes$viewBox = _VirtualDom_attribute('viewBox'); var $author$project$DungeonMap$dungeonMap_Svg = function (model) { @@ -12884,11 +12926,10 @@ var $author$project$DungeonMap$dungeonMap_Svg = function (model) { $elm$html$Html$div, _List_fromArray( [ - $elm$html$Html$Attributes$class('container'), A2( $elm$html$Html$Attributes$style, 'border', - model.hover ? '6px dashed purple' : '6px dashed #ccc'), + model.hover ? '6px dashed #b87333' : '6px dashed #bfbfbf'), A2( $author$project$DungeonMap$hijackOn, 'dragenter', @@ -12906,21 +12947,8 @@ var $author$project$DungeonMap$dungeonMap_Svg = function (model) { _List_fromArray( [ A2( - $rundis$elm_bootstrap$Bootstrap$Button$button, - _List_fromArray( - [ - $rundis$elm_bootstrap$Bootstrap$Button$onClick($author$project$Model$Pick) - ]), - _List_fromArray( - [ - $elm$html$Html$text('Upload Map') - ])), - A2( $elm$html$Html$figure, - _List_fromArray( - [ - $elm$html$Html$Attributes$class('image') - ]), + _List_Nil, _List_fromArray( [ A2( @@ -12929,7 +12957,7 @@ var $author$project$DungeonMap$dungeonMap_Svg = function (model) { _List_fromArray( [ $elm$svg$Svg$Attributes$width('100%'), - $elm$svg$Svg$Attributes$viewBox('0 0 800 600'), + $elm$svg$Svg$Attributes$viewBox('0 0 800 550'), $elm$svg$Svg$Attributes$version('1.1') ]), $author$project$DungeonMap$mouseDrawEvents(model.addCharacterIcon)), @@ -12941,7 +12969,7 @@ var $author$project$DungeonMap$dungeonMap_Svg = function (model) { _List_fromArray( [ $elm$svg$Svg$Attributes$width('800'), - $elm$svg$Svg$Attributes$height('600'), + $elm$svg$Svg$Attributes$height('550'), $elm$svg$Svg$Attributes$title('DungeonMap'), $elm$svg$Svg$Attributes$xlinkHref( A2( @@ -12957,9 +12985,6 @@ var $author$project$DungeonMap$dungeonMap_Svg = function (model) { ])) ])); }; -var $rundis$elm_bootstrap$Bootstrap$Internal$Button$Info = {$: 'Info'}; -var $rundis$elm_bootstrap$Bootstrap$Button$info = $rundis$elm_bootstrap$Bootstrap$Internal$Button$Coloring( - $rundis$elm_bootstrap$Bootstrap$Internal$Button$Roled($rundis$elm_bootstrap$Bootstrap$Internal$Button$Info)); var $author$project$Model$ChangeIcon = function (a) { return {$: 'ChangeIcon', a: a}; }; @@ -12969,7 +12994,42 @@ var $author$project$Model$ChangeIconText = function (a) { var $author$project$Model$ColorPickerMsg = function (a) { return {$: 'ColorPickerMsg', a: a}; }; +var $rundis$elm_bootstrap$Bootstrap$Form$Radio$Checked = function (a) { + return {$: 'Checked', a: a}; +}; +var $rundis$elm_bootstrap$Bootstrap$Form$Radio$checked = function (isCheck) { + return $rundis$elm_bootstrap$Bootstrap$Form$Radio$Checked(isCheck); +}; var $rundis$elm_bootstrap$Bootstrap$Form$Radio$Custom = {$: 'Custom'}; +var $rundis$elm_bootstrap$Bootstrap$Form$Radio$Radio = function (a) { + return {$: 'Radio', a: a}; +}; +var $rundis$elm_bootstrap$Bootstrap$Form$Radio$createAdvanced = F2( + function (options, label_) { + return $rundis$elm_bootstrap$Bootstrap$Form$Radio$Radio( + {label: label_, options: options}); + }); +var $rundis$elm_bootstrap$Bootstrap$Form$Radio$Label = function (a) { + return {$: 'Label', a: a}; +}; +var $rundis$elm_bootstrap$Bootstrap$Form$Radio$label = F2( + function (attributes, children) { + return $rundis$elm_bootstrap$Bootstrap$Form$Radio$Label( + {attributes: attributes, children: children}); + }); +var $rundis$elm_bootstrap$Bootstrap$Form$Radio$create = F2( + function (options, label_) { + return A2( + $rundis$elm_bootstrap$Bootstrap$Form$Radio$createAdvanced, + options, + A2( + $rundis$elm_bootstrap$Bootstrap$Form$Radio$label, + _List_Nil, + _List_fromArray( + [ + $elm$html$Html$text(label_) + ]))); + }); var $rundis$elm_bootstrap$Bootstrap$Form$Radio$createCustom = function (options) { return $rundis$elm_bootstrap$Bootstrap$Form$Radio$create( A2($elm$core$List$cons, $rundis$elm_bootstrap$Bootstrap$Form$Radio$Custom, options)); @@ -12988,81 +13048,263 @@ var $author$project$DungeonMap$getCharIcon = function (state) { return A6($author$project$Model$ObjectIcon, 0, '', '', '', $elm$core$Maybe$Nothing, 0); } }; +var $rundis$elm_bootstrap$Bootstrap$Form$Radio$Id = function (a) { + return {$: 'Id', a: a}; +}; +var $rundis$elm_bootstrap$Bootstrap$Form$Radio$id = function (theId) { + return $rundis$elm_bootstrap$Bootstrap$Form$Radio$Id(theId); +}; var $rundis$elm_bootstrap$Bootstrap$Form$Radio$Inline = {$: 'Inline'}; var $rundis$elm_bootstrap$Bootstrap$Form$Radio$inline = $rundis$elm_bootstrap$Bootstrap$Form$Radio$Inline; var $elm$virtual_dom$VirtualDom$map = _VirtualDom_map; var $elm$html$Html$map = $elm$virtual_dom$VirtualDom$map; -var $simonh1000$elm_colorpicker$ColorPicker$markerAttrs = _List_fromArray( - [ - A2($elm$html$Html$Attributes$style, 'position', 'absolute'), - A2($elm$html$Html$Attributes$style, 'top', '1px'), - A2($elm$html$Html$Attributes$style, 'bottom', '1px'), - A2($elm$html$Html$Attributes$style, 'border', '1px solid #ddd'), - A2($elm$html$Html$Attributes$style, 'background-color', '#ffffff'), - A2($elm$html$Html$Attributes$style, 'width', '6px'), - A2($elm$html$Html$Attributes$style, 'pointer-events', 'none') - ]); -var $simonh1000$elm_colorpicker$ColorPicker$alphaMarker = function (alpha) { - var correction = 4; - var xVal = $elm$core$String$fromInt( - $elm$core$Basics$round((alpha * $simonh1000$elm_colorpicker$ColorPicker$widgetWidth) - correction)); - return A2( - $elm$html$Html$div, - A2( - $elm$core$List$cons, - A2($elm$html$Html$Attributes$style, 'left', xVal + 'px'), - $simonh1000$elm_colorpicker$ColorPicker$markerAttrs), - _List_Nil); +var $rundis$elm_bootstrap$Bootstrap$Form$Radio$OnClick = function (a) { + return {$: 'OnClick', a: a}; }; -var $simonh1000$elm_colorpicker$ColorPicker$NoOp = {$: 'NoOp'}; -var $simonh1000$elm_colorpicker$ColorPicker$bubblePreventer = A2( - $elm$html$Html$Events$stopPropagationOn, - 'click', - $elm$json$Json$Decode$succeed( - _Utils_Tuple2($simonh1000$elm_colorpicker$ColorPicker$NoOp, true))); -var $simonh1000$elm_colorpicker$ColorPicker$checkedBkgStyles = _List_fromArray( - [ - A2($elm$html$Html$Attributes$style, 'background-size', '12px 12px'), - A2($elm$html$Html$Attributes$style, 'background-position', '0 0, 0 6px, 6px -6px, -6px 0px'), - A2($elm$html$Html$Attributes$style, 'background-image', 'linear-gradient(45deg, #808080 25%, transparent 25%), linear-gradient(-45deg, #808080 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #808080 75%), linear-gradient(-45deg, transparent 75%, #808080 75%)') - ]); -var $avh4$elm_color$Color$hsl = F3( - function (h, s, l) { - return A4($avh4$elm_color$Color$hsla, h, s, l, 1.0); - }); -var $simonh1000$elm_colorpicker$ColorPicker$hueMarker = function (lastHue) { - var correction = 4; - var xVal = $elm$core$String$fromInt( - $elm$core$Basics$round((lastHue * $simonh1000$elm_colorpicker$ColorPicker$widgetWidth) - correction)); - return A2( - $elm$html$Html$div, - A2( - $elm$core$List$cons, - A2($elm$html$Html$Attributes$style, 'left', xVal + 'px'), - $simonh1000$elm_colorpicker$ColorPicker$markerAttrs), - _List_Nil); +var $rundis$elm_bootstrap$Bootstrap$Form$Radio$onClick = function (toMsg) { + return $rundis$elm_bootstrap$Bootstrap$Form$Radio$OnClick(toMsg); }; -var $simonh1000$elm_colorpicker$ColorPicker$HueSlider = {$: 'HueSlider'}; -var $simonh1000$elm_colorpicker$ColorPicker$OnMouseMove = F2( - function (a, b) { - return {$: 'OnMouseMove', a: a, b: b}; +var $rundis$elm_bootstrap$Bootstrap$Form$Radio$addOption = F2( + function (opt, _v0) { + var radio_ = _v0.a; + var options = radio_.options; + return $rundis$elm_bootstrap$Bootstrap$Form$Radio$Radio( + _Utils_update( + radio_, + { + options: A2($elm$core$List$cons, opt, options) + })); }); -var $elm$svg$Svg$defs = $elm$svg$Svg$trustedNode('defs'); -var $elm$svg$Svg$Attributes$fill = _VirtualDom_attribute('fill'); -var $elm$svg$Svg$linearGradient = $elm$svg$Svg$trustedNode('linearGradient'); -var $elm$svg$Svg$Attributes$offset = _VirtualDom_attribute('offset'); -var $elm$svg$Svg$Attributes$display = _VirtualDom_attribute('display'); -var $simonh1000$elm_colorpicker$ColorPicker$sliderStyles = _List_fromArray( - [ - $elm$svg$Svg$Attributes$width( - $elm$core$String$fromInt($simonh1000$elm_colorpicker$ColorPicker$widgetWidth)), - $elm$svg$Svg$Attributes$height('100%'), - $elm$svg$Svg$Attributes$display('block') - ]); -var $elm$svg$Svg$stop = $elm$svg$Svg$trustedNode('stop'); -var $elm$svg$Svg$Attributes$stopColor = _VirtualDom_attribute('stop-color'); -var $elm$svg$Svg$Attributes$stopOpacity = _VirtualDom_attribute('stop-opacity'); -var $simonh1000$elm_colorpicker$ColorPicker$OnClick = F2( +var $rundis$elm_bootstrap$Bootstrap$Form$Radio$Name = function (a) { + return {$: 'Name', a: a}; +}; +var $rundis$elm_bootstrap$Bootstrap$Form$Radio$name = function (name_) { + return $rundis$elm_bootstrap$Bootstrap$Form$Radio$Name(name_); +}; +var $rundis$elm_bootstrap$Bootstrap$Form$Radio$applyModifier = F2( + function (modifier, options) { + switch (modifier.$) { + case 'Id': + var val = modifier.a; + return _Utils_update( + options, + { + id: $elm$core$Maybe$Just(val) + }); + case 'Checked': + var val = modifier.a; + return _Utils_update( + options, + {checked: val}); + case 'Name': + var val = modifier.a; + return _Utils_update( + options, + { + name: $elm$core$Maybe$Just(val) + }); + case 'Inline': + return _Utils_update( + options, + {inline: true}); + case 'OnClick': + var toMsg = modifier.a; + return _Utils_update( + options, + { + onClick: $elm$core$Maybe$Just(toMsg) + }); + case 'Custom': + return _Utils_update( + options, + {custom: true}); + case 'Disabled': + var val = modifier.a; + return _Utils_update( + options, + {disabled: val}); + case 'Validation': + var validation = modifier.a; + return _Utils_update( + options, + { + validation: $elm$core$Maybe$Just(validation) + }); + default: + var attrs_ = modifier.a; + return _Utils_update( + options, + { + attributes: _Utils_ap(options.attributes, attrs_) + }); + } + }); +var $rundis$elm_bootstrap$Bootstrap$Form$Radio$defaultOptions = {attributes: _List_Nil, checked: false, custom: false, disabled: false, id: $elm$core$Maybe$Nothing, inline: false, name: $elm$core$Maybe$Nothing, onClick: $elm$core$Maybe$Nothing, validation: $elm$core$Maybe$Nothing}; +var $elm$html$Html$Attributes$for = $elm$html$Html$Attributes$stringProperty('htmlFor'); +var $elm$html$Html$Attributes$checked = $elm$html$Html$Attributes$boolProperty('checked'); +var $elm$html$Html$Attributes$name = $elm$html$Html$Attributes$stringProperty('name'); +var $rundis$elm_bootstrap$Bootstrap$Form$Radio$toAttributes = function (options) { + return _Utils_ap( + _List_fromArray( + [ + $elm$html$Html$Attributes$classList( + _List_fromArray( + [ + _Utils_Tuple2('form-check-input', !options.custom), + _Utils_Tuple2('custom-control-input', options.custom) + ])), + $elm$html$Html$Attributes$type_('radio'), + $elm$html$Html$Attributes$disabled(options.disabled), + $elm$html$Html$Attributes$checked(options.checked) + ]), + _Utils_ap( + A2( + $elm$core$List$filterMap, + $elm$core$Basics$identity, + _List_fromArray( + [ + A2($elm$core$Maybe$map, $elm$html$Html$Events$onClick, options.onClick), + A2($elm$core$Maybe$map, $elm$html$Html$Attributes$name, options.name), + A2($elm$core$Maybe$map, $elm$html$Html$Attributes$id, options.id) + ])), + options.attributes)); +}; +var $rundis$elm_bootstrap$Bootstrap$Form$Radio$view = function (_v0) { + var radio_ = _v0.a; + var opts = A3($elm$core$List$foldl, $rundis$elm_bootstrap$Bootstrap$Form$Radio$applyModifier, $rundis$elm_bootstrap$Bootstrap$Form$Radio$defaultOptions, radio_.options); + var _v1 = radio_.label; + var label_ = _v1.a; + return A2( + $elm$html$Html$div, + _List_fromArray( + [ + $elm$html$Html$Attributes$classList( + _List_fromArray( + [ + _Utils_Tuple2('form-check', !opts.custom), + _Utils_Tuple2('form-check-inline', (!opts.custom) && opts.inline), + _Utils_Tuple2('custom-control', opts.custom), + _Utils_Tuple2('custom-radio', opts.custom), + _Utils_Tuple2('custom-control-inline', opts.inline && opts.custom) + ])) + ]), + _List_fromArray( + [ + A2( + $elm$html$Html$input, + $rundis$elm_bootstrap$Bootstrap$Form$Radio$toAttributes(opts), + _List_Nil), + A2( + $elm$html$Html$label, + _Utils_ap( + label_.attributes, + _Utils_ap( + _List_fromArray( + [ + $elm$html$Html$Attributes$classList( + _List_fromArray( + [ + _Utils_Tuple2('form-check-label', !opts.custom), + _Utils_Tuple2('custom-control-label', opts.custom) + ])) + ]), + function () { + var _v2 = opts.id; + if (_v2.$ === 'Just') { + var v = _v2.a; + return _List_fromArray( + [ + $elm$html$Html$Attributes$for(v) + ]); + } else { + return _List_Nil; + } + }())), + label_.children) + ])); +}; +var $rundis$elm_bootstrap$Bootstrap$Form$Radio$radioList = F2( + function (groupName, radios) { + return A2( + $elm$core$List$map, + A2( + $elm$core$Basics$composeL, + $rundis$elm_bootstrap$Bootstrap$Form$Radio$view, + $rundis$elm_bootstrap$Bootstrap$Form$Radio$addOption( + $rundis$elm_bootstrap$Bootstrap$Form$Radio$name(groupName))), + radios); + }); +var $simonh1000$elm_colorpicker$ColorPicker$markerAttrs = _List_fromArray( + [ + A2($elm$html$Html$Attributes$style, 'position', 'absolute'), + A2($elm$html$Html$Attributes$style, 'top', '1px'), + A2($elm$html$Html$Attributes$style, 'bottom', '1px'), + A2($elm$html$Html$Attributes$style, 'border', '1px solid #ddd'), + A2($elm$html$Html$Attributes$style, 'background-color', '#ffffff'), + A2($elm$html$Html$Attributes$style, 'width', '6px'), + A2($elm$html$Html$Attributes$style, 'pointer-events', 'none') + ]); +var $simonh1000$elm_colorpicker$ColorPicker$alphaMarker = function (alpha) { + var correction = 4; + var xVal = $elm$core$String$fromInt( + $elm$core$Basics$round((alpha * $simonh1000$elm_colorpicker$ColorPicker$widgetWidth) - correction)); + return A2( + $elm$html$Html$div, + A2( + $elm$core$List$cons, + A2($elm$html$Html$Attributes$style, 'left', xVal + 'px'), + $simonh1000$elm_colorpicker$ColorPicker$markerAttrs), + _List_Nil); +}; +var $simonh1000$elm_colorpicker$ColorPicker$NoOp = {$: 'NoOp'}; +var $simonh1000$elm_colorpicker$ColorPicker$bubblePreventer = A2( + $elm$html$Html$Events$stopPropagationOn, + 'click', + $elm$json$Json$Decode$succeed( + _Utils_Tuple2($simonh1000$elm_colorpicker$ColorPicker$NoOp, true))); +var $simonh1000$elm_colorpicker$ColorPicker$checkedBkgStyles = _List_fromArray( + [ + A2($elm$html$Html$Attributes$style, 'background-size', '12px 12px'), + A2($elm$html$Html$Attributes$style, 'background-position', '0 0, 0 6px, 6px -6px, -6px 0px'), + A2($elm$html$Html$Attributes$style, 'background-image', 'linear-gradient(45deg, #808080 25%, transparent 25%), linear-gradient(-45deg, #808080 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #808080 75%), linear-gradient(-45deg, transparent 75%, #808080 75%)') + ]); +var $avh4$elm_color$Color$hsl = F3( + function (h, s, l) { + return A4($avh4$elm_color$Color$hsla, h, s, l, 1.0); + }); +var $simonh1000$elm_colorpicker$ColorPicker$hueMarker = function (lastHue) { + var correction = 4; + var xVal = $elm$core$String$fromInt( + $elm$core$Basics$round((lastHue * $simonh1000$elm_colorpicker$ColorPicker$widgetWidth) - correction)); + return A2( + $elm$html$Html$div, + A2( + $elm$core$List$cons, + A2($elm$html$Html$Attributes$style, 'left', xVal + 'px'), + $simonh1000$elm_colorpicker$ColorPicker$markerAttrs), + _List_Nil); +}; +var $simonh1000$elm_colorpicker$ColorPicker$HueSlider = {$: 'HueSlider'}; +var $simonh1000$elm_colorpicker$ColorPicker$OnMouseMove = F2( + function (a, b) { + return {$: 'OnMouseMove', a: a, b: b}; + }); +var $elm$svg$Svg$defs = $elm$svg$Svg$trustedNode('defs'); +var $elm$svg$Svg$Attributes$fill = _VirtualDom_attribute('fill'); +var $elm$svg$Svg$linearGradient = $elm$svg$Svg$trustedNode('linearGradient'); +var $elm$svg$Svg$Attributes$offset = _VirtualDom_attribute('offset'); +var $elm$svg$Svg$Attributes$display = _VirtualDom_attribute('display'); +var $simonh1000$elm_colorpicker$ColorPicker$sliderStyles = _List_fromArray( + [ + $elm$svg$Svg$Attributes$width( + $elm$core$String$fromInt($simonh1000$elm_colorpicker$ColorPicker$widgetWidth)), + $elm$svg$Svg$Attributes$height('100%'), + $elm$svg$Svg$Attributes$display('block') + ]); +var $elm$svg$Svg$stop = $elm$svg$Svg$trustedNode('stop'); +var $elm$svg$Svg$Attributes$stopColor = _VirtualDom_attribute('stop-color'); +var $elm$svg$Svg$Attributes$stopOpacity = _VirtualDom_attribute('stop-opacity'); +var $simonh1000$elm_colorpicker$ColorPicker$OnClick = F2( function (a, b) { return {$: 'OnClick', a: a, b: b}; }); @@ -13503,7 +13745,10 @@ var $author$project$DungeonMap$newObjectIconModal = function (model) { model.showObjectIconModal, A3( $rundis$elm_bootstrap$Bootstrap$Modal$footer, - _List_Nil, + _List_fromArray( + [ + $elm$html$Html$Attributes$class('mediumCopper') + ]), _List_fromArray( [ A2( @@ -13516,9 +13761,10 @@ var $author$project$DungeonMap$newObjectIconModal = function (model) { $elm$html$Html$Events$onClick( $author$project$Model$AddCharacterIcon( $author$project$Model$MouseClick( - $author$project$DungeonMap$getCharIcon(model.addCharacterIcon)))) + $author$project$DungeonMap$getCharIcon(model.addCharacterIcon)))), + $elm$html$Html$Attributes$class('metalButton'), + A2($elm$html$Html$Attributes$style, 'margin-top', '5px') ])), - $rundis$elm_bootstrap$Bootstrap$Button$success, $rundis$elm_bootstrap$Bootstrap$Button$disabled(!model.radioCheckedID) ]), _List_fromArray( @@ -13528,7 +13774,10 @@ var $author$project$DungeonMap$newObjectIconModal = function (model) { ]), A3( $rundis$elm_bootstrap$Bootstrap$Modal$body, - _List_Nil, + _List_fromArray( + [ + $elm$html$Html$Attributes$class('body') + ]), _List_fromArray( [ A2( @@ -13611,11 +13860,20 @@ var $author$project$DungeonMap$newObjectIconModal = function (model) { ])) ]), A3( - $rundis$elm_bootstrap$Bootstrap$Modal$h3, - _List_Nil, + $rundis$elm_bootstrap$Bootstrap$Modal$header, _List_fromArray( [ - $elm$html$Html$text('Neues Icon') + $elm$html$Html$Attributes$class('mediumCopper') + ]), + _List_fromArray( + [ + A2( + $elm$html$Html$h3, + _List_Nil, + _List_fromArray( + [ + $elm$html$Html$text('Neues Icon') + ])) ]), A2( $rundis$elm_bootstrap$Bootstrap$Modal$hideOnBackdropClick, @@ -13623,14 +13881,25 @@ var $author$project$DungeonMap$newObjectIconModal = function (model) { $rundis$elm_bootstrap$Bootstrap$Modal$config( $author$project$Model$CloseModal($author$project$Model$ObjectIconModal))))))); }; -var $rundis$elm_bootstrap$Bootstrap$Grid$Internal$Col = {$: 'Col'}; -var $rundis$elm_bootstrap$Bootstrap$Grid$Internal$Width = F2( - function (screenSize, columnCount) { - return {columnCount: columnCount, screenSize: screenSize}; - }); -var $rundis$elm_bootstrap$Bootstrap$General$Internal$XS = {$: 'XS'}; -var $rundis$elm_bootstrap$Bootstrap$Grid$Internal$applyColAlign = F2( - function (align_, options) { +var $rundis$elm_bootstrap$Bootstrap$Button$onClick = function (message) { + return $rundis$elm_bootstrap$Bootstrap$Button$attrs( + _List_fromArray( + [ + A2( + $elm$html$Html$Events$preventDefaultOn, + 'click', + $elm$json$Json$Decode$succeed( + _Utils_Tuple2(message, true))) + ])); +}; +var $rundis$elm_bootstrap$Bootstrap$Grid$Internal$Col = {$: 'Col'}; +var $rundis$elm_bootstrap$Bootstrap$Grid$Internal$Width = F2( + function (screenSize, columnCount) { + return {columnCount: columnCount, screenSize: screenSize}; + }); +var $rundis$elm_bootstrap$Bootstrap$General$Internal$XS = {$: 'XS'}; +var $rundis$elm_bootstrap$Bootstrap$Grid$Internal$applyColAlign = F2( + function (align_, options) { var _v0 = align_.screenSize; switch (_v0.$) { case 'XS': @@ -14522,7 +14791,7 @@ var $rundis$elm_bootstrap$Bootstrap$Form$Textarea$Value = function (a) { var $rundis$elm_bootstrap$Bootstrap$Form$Textarea$value = function (value_) { return $rundis$elm_bootstrap$Bootstrap$Form$Textarea$Value(value_); }; -var $rundis$elm_bootstrap$Bootstrap$Grid$Internal$Col4 = {$: 'Col4'}; +var $rundis$elm_bootstrap$Bootstrap$Grid$Internal$Col8 = {$: 'Col8'}; var $rundis$elm_bootstrap$Bootstrap$Grid$Internal$ColWidth = function (a) { return {$: 'ColWidth', a: a}; }; @@ -14531,13 +14800,13 @@ var $rundis$elm_bootstrap$Bootstrap$Grid$Internal$width = F2( return $rundis$elm_bootstrap$Bootstrap$Grid$Internal$ColWidth( A2($rundis$elm_bootstrap$Bootstrap$Grid$Internal$Width, size, count)); }); -var $rundis$elm_bootstrap$Bootstrap$Grid$Col$xs4 = A2($rundis$elm_bootstrap$Bootstrap$Grid$Internal$width, $rundis$elm_bootstrap$Bootstrap$General$Internal$XS, $rundis$elm_bootstrap$Bootstrap$Grid$Internal$Col4); +var $rundis$elm_bootstrap$Bootstrap$Grid$Col$xs8 = A2($rundis$elm_bootstrap$Bootstrap$Grid$Internal$width, $rundis$elm_bootstrap$Bootstrap$General$Internal$XS, $rundis$elm_bootstrap$Bootstrap$Grid$Internal$Col8); var $author$project$DungeonMap$dungeonMapView = function (model) { return A2( $elm$html$Html$section, _List_fromArray( [ - $elm$html$Html$Attributes$class('container is-widescreen') + $elm$html$Html$Attributes$class('content-box is-widescreen') ]), _List_fromArray( [ @@ -14551,12 +14820,20 @@ var $author$project$DungeonMap$dungeonMapView = function (model) { [ A2( $rundis$elm_bootstrap$Bootstrap$Grid$row, - _List_Nil, + _List_fromArray( + [ + $rundis$elm_bootstrap$Bootstrap$Grid$Row$attrs( + _List_fromArray( + [ + A2($elm$html$Html$Attributes$style, 'margin-bottom', '2%') + ])) + ]), _List_fromArray( [ A2( $rundis$elm_bootstrap$Bootstrap$Grid$col, - _List_Nil, + _List_fromArray( + [$rundis$elm_bootstrap$Bootstrap$Grid$Col$xs8]), _List_fromArray( [ $rundis$elm_bootstrap$Bootstrap$Form$Textarea$textarea( @@ -14564,32 +14841,76 @@ var $author$project$DungeonMap$dungeonMapView = function (model) { [ $rundis$elm_bootstrap$Bootstrap$Form$Textarea$rows(1), $rundis$elm_bootstrap$Bootstrap$Form$Textarea$disabled, - $rundis$elm_bootstrap$Bootstrap$Form$Textarea$value(model.activeTooltip) + $rundis$elm_bootstrap$Bootstrap$Form$Textarea$value(model.activeTooltip), + $rundis$elm_bootstrap$Bootstrap$Form$Textarea$attrs( + _List_fromArray( + [ + $elm$html$Html$Attributes$class('text-area') + ])) + ])) + ])), + A2( + $rundis$elm_bootstrap$Bootstrap$Grid$col, + _List_Nil, + _List_fromArray( + [ + A2( + $rundis$elm_bootstrap$Bootstrap$Button$button, + _List_fromArray( + [ + $rundis$elm_bootstrap$Bootstrap$Button$attrs( + _List_fromArray( + [ + $elm$html$Html$Attributes$class('metalButton'), + A2($elm$html$Html$Attributes$style, 'height', '52px'), + A2($elm$html$Html$Attributes$style, 'margin-right', '2%') + ])), + $rundis$elm_bootstrap$Bootstrap$Button$onClick($author$project$Model$Pick) + ]), + _List_fromArray( + [ + $elm$html$Html$text('Upload Map') ])), - A2($elm$html$Html$br, _List_Nil, _List_Nil), + A2( + $rundis$elm_bootstrap$Bootstrap$Button$button, + _List_fromArray( + [ + $rundis$elm_bootstrap$Bootstrap$Button$attrs( + _List_fromArray( + [ + $elm$html$Html$Attributes$class('metalButton'), + A2($elm$html$Html$Attributes$style, 'height', '52px') + ])), + $rundis$elm_bootstrap$Bootstrap$Button$onClick($author$project$Model$ClearCharacterList) + ]), + _List_fromArray( + [ + $elm$html$Html$text('Clear Map') + ])) + ])) + ])), + A2( + $rundis$elm_bootstrap$Bootstrap$Grid$row, + _List_Nil, + _List_fromArray( + [ + A2( + $rundis$elm_bootstrap$Bootstrap$Grid$col, + _List_fromArray( + [$rundis$elm_bootstrap$Bootstrap$Grid$Col$xs8]), + _List_fromArray( + [ $author$project$DungeonMap$dungeonMap_Svg(model) ])), A2( $rundis$elm_bootstrap$Bootstrap$Grid$col, - _List_fromArray( - [$rundis$elm_bootstrap$Bootstrap$Grid$Col$xs4]), + _List_Nil, _List_fromArray( [ $author$project$DungeonMap$dungeonMap_MonsterList(model) ])) ])) ])), - A2( - $rundis$elm_bootstrap$Bootstrap$Button$button, - _List_fromArray( - [ - $rundis$elm_bootstrap$Bootstrap$Button$info, - $rundis$elm_bootstrap$Bootstrap$Button$onClick($author$project$Model$ClearCharacterList) - ]), - _List_fromArray( - [ - $elm$html$Html$text('Clear Map') - ])), $author$project$DungeonMap$newObjectIconModal(model) ])); }; @@ -14598,16 +14919,13 @@ var $author$project$FightingTool$footer = A2( $elm$html$Html$footer, _List_fromArray( [ - $elm$html$Html$Attributes$class('footer animate__animated animate__fadeInUp') + $elm$html$Html$Attributes$class('footer animate__animated animate__fadeInUp page-footer') ]), _List_fromArray( [ A2( $elm$html$Html$div, - _List_fromArray( - [ - $elm$html$Html$Attributes$class('content has-text-centered') - ]), + _List_Nil, _List_fromArray( [ A2( @@ -14627,11 +14945,13 @@ var $author$project$FightingTool$footer = A2( ])) ])); var $elm$html$Html$h2 = _VirtualDom_node('h2'); +var $elm$html$Html$header = _VirtualDom_node('header'); var $author$project$FightingTool$header = A2( - $elm$html$Html$section, + $elm$html$Html$header, _List_fromArray( [ - $elm$html$Html$Attributes$class('hero is-primary is-bold animate__animated animate__fadeInDown') + $elm$html$Html$Attributes$class('header animate__animated animate__fadeInDown'), + A2($elm$html$Html$Attributes$style, 'height', '80%') ]), _List_fromArray( [ @@ -14639,15 +14959,46 @@ var $author$project$FightingTool$header = A2( $elm$html$Html$div, _List_fromArray( [ - $elm$html$Html$Attributes$class('hero-body') + $elm$html$Html$Attributes$class('grid-container') ]), _List_fromArray( [ A2( + $elm$html$Html$figure, + _List_fromArray( + [ + $elm$html$Html$Attributes$class('image animate__animated animate__rollIn') + ]), + _List_fromArray( + [ + A2( + $elm$svg$Svg$svg, + _List_fromArray( + [ + $elm$svg$Svg$Attributes$width('100%'), + A2($elm$html$Html$Attributes$style, 'margin-top', '-18%'), + A2($elm$html$Html$Attributes$style, 'margin-left', '10%') + ]), + _List_fromArray( + [ + A2( + $elm$svg$Svg$image, + _List_fromArray( + [ + $elm$svg$Svg$Attributes$width('100%'), + $elm$svg$Svg$Attributes$height('100%'), + $elm$svg$Svg$Attributes$title('Logo'), + $elm$svg$Svg$Attributes$xlinkHref('res/P&P Manager Logo 512x512px noBG.png') + ]), + _List_Nil) + ])) + ])), + A2( $elm$html$Html$div, _List_fromArray( [ - $elm$html$Html$Attributes$class('container') + $elm$html$Html$Attributes$class('item1'), + A2($elm$html$Html$Attributes$style, 'height', '80%') ]), _List_fromArray( [ @@ -14655,7 +15006,9 @@ var $author$project$FightingTool$header = A2( $elm$html$Html$h1, _List_fromArray( [ - $elm$html$Html$Attributes$class('title') + $elm$html$Html$Attributes$class('title'), + A2($elm$html$Html$Attributes$style, 'margin-left', '2%'), + A2($elm$html$Html$Attributes$style, 'margin-top', '4px') ]), _List_fromArray( [ @@ -14665,7 +15018,8 @@ var $author$project$FightingTool$header = A2( $elm$html$Html$h2, _List_fromArray( [ - $elm$html$Html$Attributes$class('subtitle') + $elm$html$Html$Attributes$class('subtitle'), + A2($elm$html$Html$Attributes$style, 'margin-left', '2%') ]), _List_fromArray( [ @@ -14674,314 +15028,15 @@ var $author$project$FightingTool$header = A2( ])) ])) ])); -var $rundis$elm_bootstrap$Bootstrap$Tab$Item = function (a) { - return {$: 'Item', a: a}; -}; -var $rundis$elm_bootstrap$Bootstrap$Tab$item = function (rec) { - return $rundis$elm_bootstrap$Bootstrap$Tab$Item( - {id: rec.id, link: rec.link, pane: rec.pane}); -}; -var $rundis$elm_bootstrap$Bootstrap$Tab$items = F2( - function (items_, _v0) { - var configRec = _v0.a; - return $rundis$elm_bootstrap$Bootstrap$Tab$Config( - _Utils_update( - configRec, - {items: items_})); - }); -var $rundis$elm_bootstrap$Bootstrap$Tab$Link = function (a) { - return {$: 'Link', a: a}; -}; -var $rundis$elm_bootstrap$Bootstrap$Tab$link = F2( - function (attributes, children) { - return $rundis$elm_bootstrap$Bootstrap$Tab$Link( - {attributes: attributes, children: children}); - }); var $rundis$elm_bootstrap$Bootstrap$Utilities$Spacing$mt3 = $elm$html$Html$Attributes$class('mt-3'); -var $rundis$elm_bootstrap$Bootstrap$Tab$Pane = function (a) { - return {$: 'Pane', a: a}; -}; -var $rundis$elm_bootstrap$Bootstrap$Tab$pane = F2( - function (attributes, children) { - return $rundis$elm_bootstrap$Bootstrap$Tab$Pane( - {attributes: attributes, children: children}); - }); -var $rundis$elm_bootstrap$Bootstrap$Tab$getActiveItem = F2( - function (_v0, configRec) { - var activeTab = _v0.a.activeTab; - if (activeTab.$ === 'Nothing') { - return $elm$core$List$head(configRec.items); - } else { - var id = activeTab.a; - return function (found) { - if (found.$ === 'Just') { - var f = found.a; - return $elm$core$Maybe$Just(f); - } else { - return $elm$core$List$head(configRec.items); - } - }( - $elm$core$List$head( - A2( - $elm$core$List$filter, - function (_v2) { - var item_ = _v2.a; - return _Utils_eq(item_.id, id); - }, - configRec.items))); - } - }); -var $rundis$elm_bootstrap$Bootstrap$Tab$Hidden = {$: 'Hidden'}; -var $elm$html$Html$li = _VirtualDom_node('li'); -var $rundis$elm_bootstrap$Bootstrap$Tab$Start = {$: 'Start'}; -var $rundis$elm_bootstrap$Bootstrap$Tab$visibilityTransition = F2( - function (withAnimation_, visibility) { - var _v0 = _Utils_Tuple2(withAnimation_, visibility); - _v0$2: - while (true) { - if (_v0.a) { - switch (_v0.b.$) { - case 'Hidden': - var _v1 = _v0.b; - return $rundis$elm_bootstrap$Bootstrap$Tab$Start; - case 'Start': - var _v2 = _v0.b; - return $rundis$elm_bootstrap$Bootstrap$Tab$Showing; - default: - break _v0$2; - } - } else { - break _v0$2; - } - } - return $rundis$elm_bootstrap$Bootstrap$Tab$Showing; - }); -var $rundis$elm_bootstrap$Bootstrap$Tab$renderLink = F4( - function (id, active, _v0, configRec) { - var attributes = _v0.a.attributes; - var children = _v0.a.children; - var commonClasses = _List_fromArray( - [ - _Utils_Tuple2('nav-link', true), - _Utils_Tuple2('active', active) - ]); - var clickHandler = $elm$html$Html$Events$onClick( - configRec.toMsg( - $rundis$elm_bootstrap$Bootstrap$Tab$State( - { - activeTab: $elm$core$Maybe$Just(id), - visibility: A2($rundis$elm_bootstrap$Bootstrap$Tab$visibilityTransition, configRec.withAnimation && (!active), $rundis$elm_bootstrap$Bootstrap$Tab$Hidden) - }))); - var linkItem = configRec.useHash ? A2( - $elm$html$Html$a, - _Utils_ap( - _List_fromArray( - [ - $elm$html$Html$Attributes$classList(commonClasses), - clickHandler, - $elm$html$Html$Attributes$href('#' + id) - ]), - attributes), - children) : A2( - $elm$html$Html$button, - _Utils_ap( - _List_fromArray( - [ - $elm$html$Html$Attributes$classList( - _Utils_ap( - commonClasses, - _List_fromArray( - [ - _Utils_Tuple2('btn', true), - _Utils_Tuple2('btn-link', true) - ]))), - clickHandler - ]), - attributes), - children); - return A2( - $elm$html$Html$li, - _List_fromArray( - [ - $elm$html$Html$Attributes$class('nav-item') - ]), - _List_fromArray( - [linkItem])); - }); -var $rundis$elm_bootstrap$Bootstrap$Tab$transitionStyles = function (opacity) { - return _List_fromArray( - [ - A2( - $elm$html$Html$Attributes$style, - 'opacity', - $elm$core$String$fromInt(opacity)), - A2($elm$html$Html$Attributes$style, '-webkit-transition', 'opacity 0.15s linear'), - A2($elm$html$Html$Attributes$style, '-o-transition', 'opacity 0.15s linear'), - A2($elm$html$Html$Attributes$style, 'transition', 'opacity 0.15s linear') - ]); -}; -var $rundis$elm_bootstrap$Bootstrap$Tab$activeTabAttributes = F2( - function (_v0, configRec) { - var visibility = _v0.a.visibility; - switch (visibility.$) { - case 'Hidden': - return _List_fromArray( - [ - A2($elm$html$Html$Attributes$style, 'display', 'none') - ]); - case 'Start': - return _List_fromArray( - [ - A2($elm$html$Html$Attributes$style, 'display', 'block'), - A2($elm$html$Html$Attributes$style, 'opacity', '0') - ]); - default: - return _Utils_ap( - _List_fromArray( - [ - A2($elm$html$Html$Attributes$style, 'display', 'block') - ]), - $rundis$elm_bootstrap$Bootstrap$Tab$transitionStyles(1)); - } - }); -var $rundis$elm_bootstrap$Bootstrap$Tab$renderTabPane = F5( - function (id, active, _v0, state, configRec) { - var attributes = _v0.a.attributes; - var children = _v0.a.children; - var displayAttrs = active ? A2($rundis$elm_bootstrap$Bootstrap$Tab$activeTabAttributes, state, configRec) : _List_fromArray( - [ - A2($elm$html$Html$Attributes$style, 'display', 'none') - ]); - return A2( - $elm$html$Html$div, - _Utils_ap( - _List_fromArray( - [ - $elm$html$Html$Attributes$id(id), - $elm$html$Html$Attributes$class('tab-pane') - ]), - _Utils_ap(displayAttrs, attributes)), - children); - }); -var $rundis$elm_bootstrap$Bootstrap$Tab$tabAttributes = function (configRec) { - return _Utils_ap( - _List_fromArray( - [ - $elm$html$Html$Attributes$classList( - _List_fromArray( - [ - _Utils_Tuple2('nav', true), - _Utils_Tuple2('nav-tabs', !configRec.isPill), - _Utils_Tuple2('nav-pills', configRec.isPill) - ])) - ]), - _Utils_ap( - function () { - var _v0 = configRec.layout; - if (_v0.$ === 'Just') { - switch (_v0.a.$) { - case 'Justified': - var _v1 = _v0.a; - return _List_fromArray( - [ - $elm$html$Html$Attributes$class('nav-justified') - ]); - case 'Fill': - var _v2 = _v0.a; - return _List_fromArray( - [ - $elm$html$Html$Attributes$class('nav-fill') - ]); - case 'Center': - var _v3 = _v0.a; - return _List_fromArray( - [ - $elm$html$Html$Attributes$class('justify-content-center') - ]); - default: - var _v4 = _v0.a; - return _List_fromArray( - [ - $elm$html$Html$Attributes$class('justify-content-end') - ]); - } - } else { - return _List_Nil; - } - }(), - configRec.attributes)); -}; -var $elm$html$Html$ul = _VirtualDom_node('ul'); -var $rundis$elm_bootstrap$Bootstrap$Tab$view = F2( - function (state, _v0) { - var configRec = _v0.a; - var _v1 = A2($rundis$elm_bootstrap$Bootstrap$Tab$getActiveItem, state, configRec); - if (_v1.$ === 'Nothing') { - return A2( - $elm$html$Html$div, - _List_Nil, - _List_fromArray( - [ - A2( - $elm$html$Html$ul, - $rundis$elm_bootstrap$Bootstrap$Tab$tabAttributes(configRec), - _List_Nil), - A2( - $elm$html$Html$div, - _List_fromArray( - [ - $elm$html$Html$Attributes$class('tab-content') - ]), - _List_Nil) - ])); - } else { - var currentItem = _v1.a.a; - return A2( - $elm$html$Html$div, - _List_Nil, - _List_fromArray( - [ - A2( - $elm$html$Html$ul, - $rundis$elm_bootstrap$Bootstrap$Tab$tabAttributes(configRec), - A2( - $elm$core$List$map, - function (_v2) { - var item_ = _v2.a; - return A4( - $rundis$elm_bootstrap$Bootstrap$Tab$renderLink, - item_.id, - _Utils_eq(item_.id, currentItem.id), - item_.link, - configRec); - }, - configRec.items)), - A2( - $elm$html$Html$div, - _List_fromArray( - [ - $elm$html$Html$Attributes$class('tab-content') - ]), - A2( - $elm$core$List$map, - function (_v3) { - var item_ = _v3.a; - return A5( - $rundis$elm_bootstrap$Bootstrap$Tab$renderTabPane, - item_.id, - _Utils_eq(item_.id, currentItem.id), - item_.pane, - state, - configRec); - }, - configRec.items)) - ])); - } - }); var $author$project$Main$view = function (model) { return A2( $elm$html$Html$div, - _List_Nil, + _List_fromArray( + [ + $elm$html$Html$Attributes$class('wrapper textFont'), + A2($elm$html$Html$Attributes$style, 'height', '100%') + ]), _List_fromArray( [ $author$project$FightingTool$header, diff --git a/res/P&P Manager Logo 512x512px noBG.png b/res/P&P Manager Logo 512x512px noBG.png new file mode 100644 index 0000000000000000000000000000000000000000..3e806c3762c196293e795cbfa62079b6d0e5ee08 Binary files /dev/null and b/res/P&P Manager Logo 512x512px noBG.png differ diff --git a/res/P&P Manager Logo Version 1 512x512px.png b/res/P&P Manager Logo Version 1 512x512px.png new file mode 100644 index 0000000000000000000000000000000000000000..c2061ec51d54766d9a353311ff102de6e0e13460 Binary files /dev/null and b/res/P&P Manager Logo Version 1 512x512px.png differ diff --git a/res/Stylesheet.css b/res/Stylesheet.css new file mode 100644 index 0000000000000000000000000000000000000000..5748fdda93754dbb6f244da351ca82cdfd5f007a --- /dev/null +++ b/res/Stylesheet.css @@ -0,0 +1,180 @@ +html { + background-color: #faf2eb; +} + +.wrapper { + min-height: 100%; + display: grid; + grid-template-rows: auto 1fr auto; + background-color: #faf2eb; +} + + +.header { + background-image: repeating-linear-gradient(to right bottom, #b87333 , #ce8a4b , #b87333 40% ); + color: white; + text-shadow: 3px 3px 6px #4d3319; + text-align: left; + padding: 10px; + margin-bottom: 1%; + font-family: 'Fondamento', cursive; + } + +.footer { + background-color: #e4be9b; + color: #666666; + text-align: center; + padding: 10px; + margin-top: 3%; +} + +.body { + background-color: #faf2eb; +} + +.textFont { + font-family: 'Alegreya', serif; +} + +.grid-container { + display: grid; + grid-gap: 2%; + grid-template-columns: 7% auto; + height: 15%; +} + +.item1 { + border-left: #8c5826; + border-left-style: double; + border-width: 5px; + height: 75%; +} + +.mediumCopper { + background-color: #e4be9b +} + +.lightCopper{ + background-color: #efd8c3; +} + +.fas:hover { + font-weight: 900; + color: #acacac; +} + +.btn:focus, .btn.focus { + border: 0; + box-shadow: 0 0 0 0.1rem #acacac; +} + +.nav-tabs .nav-link.active, +.nav-tabs .nav-item.show .nav-link { + background-color: #efd8c3; + border-color: #dee2e6 #dee2e6 #fff; + color: black; +} + +.btn-link:hover { + color: black; +} + +.btn-link { + font-weight: 400; + color: #495057; + text-decoration: none; +} + +.btn { + background-color: #e4be9b; +} + +tr:nth-child(even) {background-color: white;} +tr:nth-child(odd) {background-color: #faf2eb;} + +.metalButton { + background-image: repeating-linear-gradient(to right bottom, #999999, #acacac , #999999 40% ); + border-radius: 8px; + padding: 8px 28px; + color: white; + text-align: center; + text-decoration: none; + text-shadow: 2px 2px 5px #404040; + font-size: 1rem; + } + +.metalButton:hover{ + background-image: repeating-linear-gradient(to right bottom, #acacac , #999999 10%, #acacac 40% ); + color: black; +} + +.metalButton:disabled { + background-color: #acacac; +} + +.PlayerIcon { + fill: black; + stroke: red; + stroke-width: 2; + fill-opacity:0; +} + +.PlayerIcon:hover { + fill: grey-darker; + opacity:0.5; + fill-opacity:0.5; + width:25px; + height:25px; +} + +.MonsterIcon { + fill: black; + stroke: red; + stroke-width: 2; + fill-opacity:0; +} + +.MonsterIcon:hover { + fill: grey-darker; + opacity:0.5; + fill-opacity:0.5; + width:30px; + height:30px; +} + +.ObjectIcon:hover { + fill: grey-darker; + opacity:0.5; + fill-opacity:0.5; + width:25px; + height:25px; +} + +.aboutText { + padding-left: 5%; + padding-right: 5%; +} + +h1.about { + padding-top: 2%; + font-variant: small-caps; +} + +.content-box { + margin-right: 20px; + margin-left: 20px; + padding: 15px; +} + +.form-control:disabled, .form-control[readonly] { + color: black; + background-color: #e4be9b; +} + +.map-table { + border: 2px solid #bfbfbf; +} + +figure { + margin: 0 0 0 0; +} \ No newline at end of file diff --git a/res/Stysheet.css b/res/Stysheet.css new file mode 100644 index 0000000000000000000000000000000000000000..3c7f93a0e49894530c22f53efba497897621b742 --- /dev/null +++ b/res/Stysheet.css @@ -0,0 +1,136 @@ +html { + background-color: #faf2eb; +} + +.wrapper { + min-height: 100%; + display: grid; + grid-template-rows: auto 1fr auto; + background-color: #faf2eb; +} + + +.header { + background-image: repeating-linear-gradient(to right bottom, #b87333 , #ce8a4b , #b87333 40% ); + color: white; + text-shadow: 3px 3px 6px #4d3319; + text-align: left; + padding: 10px; + margin-bottom: 1%; + font-family: 'Fondamento', cursive; + } + +.footer { + background-color: #e4be9b; + color: #666666; + text-align: center; + padding: 10px; + margin-top: 3%; +} + +.body { + background-color: #faf2eb; + max-width: 100%; +} +.colored-header-footer{ + background-color: #e4be9b; +} + +.textFont { + font-family: 'Alegreya', serif; +} + +.grid-container { + display: grid; + grid-gap: 2%; + grid-template-columns: 7% auto; + height: 15%; +} + +.item1 { + border-left: #8c5826; + border-left-style: double; + border-width: 5px; + height: 75%; + width: 100%; +} + +.th { + background-color: #e4be9b +} + +.tr { + background-color: #faf2eb; +} + +tr:nth-child(even) {background-color: white;} + +.metalButton { + background-image: repeating-linear-gradient(to right bottom, #acacac , #bfbfbf , #acacac 40% ); + border-radius: 8px; + padding: 8px 28px; + color: white !important; + text-align: center; + text-decoration: none; + text-shadow: 2px 2px 5px #404040; + font-size: 1rem; + } + +.metalButton:hover{ + background-image: repeating-linear-gradient(to right bottom, #acacac , #bfbfbf 10%, #acacac 40% ); +} + + +.MonsterIcon:hover { + fill: grey-darker; + opacity:0.5; + fill-opacity:0.5; + width:30px; + height:30px; + cursor: pointer; +} +.PlayerIcon:hover { + fill: grey-darker; + opacity:0.5; + fill-opacity:0.5; + width:25px; + height:25px; + cursor: pointer; +} +.ObjectIcon:hover { + fill: grey-darker; + opacity:0.5; + fill-opacity:0.5; + width:25px; + height:25px; + cursor: pointer; +} + +.content-box { + margin-right: 20px; + margin-left: 20px; + padding: 15px; +} + +.text-area { + color: #666666 !important; + background-color: #e4be9b !important; +} + +.map-buttons { + width: 120px; +} + +.map-table { + border: 2px solid #bfbfbf !important; +} + +.aboutText { + padding-left: 5%; + padding-right: 5%; +} + +h1.about { + padding-top: 2%; + font-variant: small-caps; +} \ No newline at end of file diff --git a/res/icons/Enemy.svg b/res/icons/Enemy.svg index 9a8125bd834184ae33902760191553fbc2645f63..97f127f11c238161fec1bb626871e1de50833d9e 100644 --- a/res/icons/Enemy.svg +++ b/res/icons/Enemy.svg @@ -7,13 +7,13 @@ xmlns="http://www.w3.org/2000/svg" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" - sodipodi:docname="Enemy.svg" - inkscape:version="1.0 (4035a4fb49, 2020-05-01)" - id="svg8" - version="1.1" - viewBox="0 0 210 297" + width="210mm" height="297mm" - width="210mm"> + viewBox="0 0 210 297" + version="1.1" + id="svg8" + inkscape:version="1.0 (1.0+r73+1)" + sodipodi:docname="Enemy.svg"> <defs id="defs2"> <inkscape:path-effect @@ -24,36 +24,10 @@ mode="free" lpeversion="1" is_visible="true" - id="path-effect902" - center_point="117.73467,392.80998" - end_point="-440.49472,371.74" - start_point="682.02498,371.73" - effect="mirror_symmetry" /> - <inkscape:path-effect - split_items="false" - oposite_fuse="false" - fuse_paths="false" - discard_orig_path="false" - mode="free" - lpeversion="1" - is_visible="true" - id="path-effect900" + id="path-effect41" center_point="375.77734,243.61817" - end_point="375.77734,371.73633" - start_point="375.77734,115.5" - effect="mirror_symmetry" /> - <inkscape:path-effect - split_items="false" - oposite_fuse="false" - fuse_paths="false" - discard_orig_path="true" - mode="free" - lpeversion="1" - is_visible="true" - id="path-effect898" - center_point="375.77734,243.61817" - end_point="375.77734,371.73633" - start_point="113.38477,243.61817" + end_point="0,371.74" + start_point="1000000,115.5" effect="mirror_symmetry" /> <inkscape:path-effect split_items="false" @@ -63,58 +37,33 @@ mode="free" lpeversion="1" is_visible="true" - id="path-effect896" + id="path-effect39" center_point="375.77734,243.61817" end_point="375.77734,371.73633" start_point="375.77734,115.5" effect="mirror_symmetry" /> </defs> <sodipodi:namedview - inkscape:window-maximized="1" - inkscape:window-y="-8" - inkscape:window-x="54" - inkscape:window-height="1057" - inkscape:window-width="1858" - inkscape:guide-bbox="true" - showguides="true" - showgrid="false" - inkscape:document-rotation="0" - inkscape:current-layer="layer1" - inkscape:document-units="mm" - inkscape:cy="257.17517" - inkscape:cx="188.17045" - inkscape:zoom="0.98994949" - inkscape:pageshadow="2" - inkscape:pageopacity="0.0" - borderopacity="1.0" - bordercolor="#666666" + id="base" pagecolor="#ffffff" - id="base"> - <sodipodi:guide - id="guide856" - orientation="1,0" - position="104.76966,300.4745" /> - <sodipodi:guide - id="guide858" - orientation="0,-1" - position="186.28686,198.64481" /> - <sodipodi:guide - id="guide875" - orientation="0,-1" - position="135.50565,233.38985" /> - <sodipodi:guide - id="guide877" - orientation="0,-1" - position="141.65285,246.21879" /> - <sodipodi:guide - id="guide879" - orientation="1,0" - position="64.679224,261.72043" /> - <sodipodi:guide - id="guide881" - orientation="1,0" - position="51.04848,306.88897" /> - </sodipodi:namedview> + bordercolor="#666666" + borderopacity="1.0" + inkscape:pageopacity="0.0" + inkscape:pageshadow="2" + inkscape:zoom="0.49497475" + inkscape:cx="396.85039" + inkscape:cy="480.44764" + inkscape:document-units="mm" + inkscape:current-layer="layer1" + inkscape:document-rotation="0" + showgrid="false" + showguides="true" + inkscape:guide-bbox="true" + inkscape:window-width="1680" + inkscape:window-height="994" + inkscape:window-x="0" + inkscape:window-y="0" + inkscape:window-maximized="1" /> <metadata id="metadata5"> <rdf:RDF> @@ -123,20 +72,21 @@ <dc:format>image/svg+xml</dc:format> <dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> - <dc:title></dc:title> + <dc:title /> </cc:Work> </rdf:RDF> </metadata> <g - id="layer1" + inkscape:label="Ebene 1" inkscape:groupmode="layer" - inkscape:label="Ebene 1"> + id="layer1"> <path inkscape:original-d="M 241.75391,115.5 A 151.1811,151.1811 0 0 1 113.38477,238.68359 151.1811,151.1811 0 0 1 192.82031,371.73633 H 375.77734 V 198.6543 A 151.1811,151.1811 0 0 1 241.75391,115.5 Z" - inkscape:path-effect="#path-effect896;#path-effect902" - transform="matrix(0,-0.26458333,0.26458333,0,6.8191918,198.30782)" - d="m 241.75391,115.5 c -11.54227,64.55777 -63.39055,114.3116 -128.36914,123.18359 48.92289,26.37659 79.42754,77.47054 79.43554,133.05077 -0.007,55.58023 -30.51075,106.67472 -79.43317,133.05218 64.97875,8.87083 116.82791,58.62374 128.37134,123.1813 25.52932,-50.67279 77.28272,-82.78426 134.02194,-83.15668 56.73924,0.3704 108.49379,32.48002 134.02492,83.15191 11.54112,-64.55798 63.38851,-114.31273 128.36694,-123.18588 -48.92241,-26.37521 -79.42773,-77.46712 -79.43791,-133.04609 0.009,-55.57897 30.5136,-106.67143 79.43554,-133.04751 C 573.19132,229.8116 521.34304,180.05777 509.80077,115.5 484.27055,166.17234 432.51657,198.28289 375.77734,198.6543 319.03811,198.28289 267.28413,166.17234 241.75391,115.5 Z" - style="fill:#1a1a1a;fill-opacity:0;stroke:black;stroke-width:33;stroke-opacity:1" - id="rect10" /> + inkscape:path-effect="#path-effect39;#path-effect41" + inkscape:connector-curvature="0" + id="rect10" + style="fill:none;fill-opacity:0;fill-rule:nonzero;stroke:#000000;stroke-width:33;stroke-opacity:1" + d="m 241.75391,115.5 c -11.54227,64.55777 -63.39055,114.3116 -128.36914,123.18359 48.91005,26.36967 79.41153,77.44371 79.43553,133.007 0.004,55.56329 -30.47083,106.65296 -79.36736,133.0477 64.98313,8.83868 116.8569,58.56594 128.43226,123.11778 25.50425,-50.68541 77.24176,-82.82248 133.98079,-83.22297 56.73942,0.34233 108.50984,32.42635 134.06603,83.0856 11.50919,-64.56367 63.33196,-114.34407 128.30599,-123.24936 -48.89603,-26.32978 -79.41685,-77.34557 -79.50356,-132.87251 0.0583,-55.52698 30.55292,-106.5584 79.43546,-132.91324 C 573.19132,229.8116 521.34304,180.05777 509.80077,115.5 484.27055,166.17234 432.51657,198.28289 375.77734,198.6543 319.03811,198.28289 267.28413,166.17234 241.75391,115.5 Z" + transform="matrix(0,-0.26458333,0.26458333,0,6.6596801,247.93407)" /> </g> </svg> diff --git a/res/icons/Hero.svg b/res/icons/Hero.svg index 7feacbf07abf390bfa8db1826a71d49e65b4df70..7b07db574e3087f1e6f98271034b0eff1ac0519a 100644 --- a/res/icons/Hero.svg +++ b/res/icons/Hero.svg @@ -8,7 +8,7 @@ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" sodipodi:docname="Hero.svg" - inkscape:version="1.0 (6e3e5246a0, 2020-05-07)" + inkscape:version="0.92.5 (2060ec1f9f, 2020-04-08)" id="svg8" version="1.1" viewBox="0 0 210 297" @@ -131,16 +131,16 @@ </defs> <sodipodi:namedview inkscape:window-maximized="1" - inkscape:window-y="27" - inkscape:window-x="72" - inkscape:window-height="704" - inkscape:window-width="1294" + inkscape:window-y="0" + inkscape:window-x="0" + inkscape:window-height="994" + inkscape:window-width="1680" showgrid="false" inkscape:document-rotation="0" inkscape:current-layer="layer1" inkscape:document-units="mm" inkscape:cy="562.58602" - inkscape:cx="400" + inkscape:cx="-52.857143" inkscape:zoom="0.35" inkscape:pageshadow="2" inkscape:pageopacity="0.0" @@ -160,7 +160,7 @@ <dc:format>image/svg+xml</dc:format> <dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> - <dc:title></dc:title> + <dc:title /> </cc:Work> </rdf:RDF> </metadata> @@ -169,8 +169,9 @@ inkscape:groupmode="layer" inkscape:label="Ebene 1"> <path - d="M 68.806218,35.482623 A 39.999999,39.999999 0 0 1 28.806076,75.482765 v 69.999865 a 39.999999,39.999999 0 0 1 40.000142,40.00014 h 69.999862 a 39.999999,39.999999 0 0 1 40.00014,-40.00014 V 75.482765 A 39.999999,39.999999 0 0 1 138.80608,35.482623 Z" - style="fill:none;stroke-width:10;opacity:1;stroke:black;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:none" - id="rect1039" /> + d="M 70.00007,73.499927 A 39.999999,39.999999 0 0 1 29.999928,113.50007 v 69.99986 a 39.999999,39.999999 0 0 1 40.000142,40.00014 h 69.99986 a 39.999999,39.999999 0 0 1 40.00014,-40.00014 V 113.50007 A 39.999999,39.999999 0 0 1 139.99993,73.499927 Z" + style="opacity:1;fill:none;stroke:#000000;stroke-width:10;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + id="rect1039" + inkscape:connector-curvature="0" /> </g> </svg> diff --git a/src/About.elm b/src/About.elm index 963c97023d9b633bea8f30d720a9b7255f5d30d4..381b8345e1c92c404cc980604e30c4920f05b007 100644 --- a/src/About.elm +++ b/src/About.elm @@ -6,9 +6,8 @@ import Html.Attributes as Attr exposing (class) import Model exposing (..) aboutView : Html Msg aboutView = - div[] - [ Html.h1 [] [ text "Das schwarze Auge Edition 5" ] - , Html.h3 [] [ text "Übersicht der Kampfesregeln"] + div[ class "aboutText" ] + [ Html.h1 [class "about"] [ text "Übersicht der Kampfesregeln"] , Html.p [] [ text """ diff --git a/src/DungeonMap.elm b/src/DungeonMap.elm index 23bc87128dda558fa3b199aa487f8171a25cfb54..166c1678930dd7eeaa90cef66db288b3a8a3180d 100644 --- a/src/DungeonMap.elm +++ b/src/DungeonMap.elm @@ -11,6 +11,7 @@ import Svg.Events import Json.Decode import Bootstrap.Grid as Grid import Bootstrap.Grid.Col as Col +import Bootstrap.Grid.Row as Row import Bootstrap.Table as Table import Bootstrap.Button as Button import Bootstrap.Modal as Modal @@ -27,40 +28,50 @@ import Model exposing (..) dungeonMapView : Model -> Html Msg dungeonMapView model = - Html.section [ class "container is-widescreen" ] + Html.section [ class "content-box is-widescreen" ] [ div [ class "section" ] - [ Grid.row [] - [ Grid.col [] - [ Textarea.textarea - [ Textarea.rows 1 - , Textarea.disabled - , Textarea.value model.activeTooltip - ] - , Html.br [] [] - , dungeonMap_Svg model - ] - , Grid.col [ Col.xs4 ] - [ dungeonMap_MonsterList model - ] - ] - ] - , Button.button [ Button.info, Button.onClick ClearCharacterList ] [ text "Clear Map" ] - , newObjectIconModal model + [ Grid.row [ Row.attrs <| [style "margin-bottom" "2%"] ] + [ Grid.col [ Col.xs8 ] + [ Textarea.textarea + [ Textarea.rows 1 + , Textarea.disabled + , Textarea.value model.activeTooltip + , Textarea.attrs [ class "text-area" ] + ] + ] + , Grid.col [ ] + [ Button.button + [ Button.attrs [ class "metalButton", style "height" "52px", style "margin-right" "2%" ] + , Button.onClick Pick ] + [ text "Upload Map" ] + , Button.button + [ Button.attrs [ class "metalButton", style "height" "52px" ] + , Button.onClick ClearCharacterList ] + [ text "Clear Map" ] + ] + ] + , Grid.row [ ] + [ Grid.col [ Col.xs8 ] [ dungeonMap_Svg model ] + , Grid.col [] [ dungeonMap_MonsterList model] + ] + ] + , newObjectIconModal model ] dungeonMap_MonsterList : Model -> Html Msg dungeonMap_MonsterList model = - div [ class "container" ] - [ Table.table { options = [ Table.hover, Table.bordered, Table.responsive ] + div [ ] + [ Table.table { options = [ Table.hover, Table.bordered ] , thead = Table.simpleThead - [ Table.th [] [ Html.text "ID" ] - , Table.th [] [ Html.text "Name" ] - , Table.th [] [ Html.text "LeP" ] + [ Table.th [Table.cellAttr <| class "mediumCopper"] [ Html.text "ID" ] + , Table.th [Table.cellAttr <| class "mediumCopper"] [ Html.text "Name" ] + , Table.th [Table.cellAttr <| class "mediumCopper"] [ Html.text "LeP" ] ] , tbody = Table.tbody [] <| characters2rows model.enemy model.highlightedTableRow } + ] characters2rows : Array.Array Character -> Int -> List (Table.Row Msg) @@ -90,20 +101,24 @@ characters2rows chars highlighted = dungeonMap_Svg : Model -> Html Msg dungeonMap_Svg model = - div [ class "container" - , style "border" (if model.hover then "6px dashed purple" else "6px dashed #ccc") + div [ style "border" (if model.hover then "6px dashed #b87333" else "6px dashed #bfbfbf") , hijackOn "dragenter" (Json.Decode.succeed DragEnter) , hijackOn "dragover" (Json.Decode.succeed DragEnter) , hijackOn "dragleave" (Json.Decode.succeed DragLeave) , hijackOn "drop" dropDecoder ] - [ Button.button [ Button.onClick Pick ] [ text "Upload Map" ] - , Html.figure [ class "image" ] + [ Html.figure [ ] [ Svg.svg - ([ SvgAtt.width "100%", SvgAtt.viewBox "0 0 800 600", SvgAtt.version "1.1" ] + ([ SvgAtt.width "100%", SvgAtt.viewBox "0 0 800 550", SvgAtt.version "1.1" ] ++ mouseDrawEvents model.addCharacterIcon ) - ([ Svg.image [ SvgAtt.width "800", SvgAtt.height "600", SvgAtt.title "DungeonMap", SvgAtt.xlinkHref (Maybe.withDefault "" (List.head model.previews)) ] [] ] + ([ Svg.image + [ SvgAtt.width "800" + , SvgAtt.height "550" + , SvgAtt.title "DungeonMap" + , SvgAtt.xlinkHref (Maybe.withDefault "" (List.head model.previews)) + ] [] + ] ++ svgIconList model ++ newIconsView model.addCharacterIcon ) @@ -114,8 +129,10 @@ newObjectIconModal : Model -> Html Msg newObjectIconModal model = Modal.config (CloseModal ObjectIconModal) |> Modal.hideOnBackdropClick True - |> Modal.h3 [] [ text "Neues Icon" ] - |> Modal.body [] + |> Modal.header [class "mediumCopper"] + [ Html.h3 [][text "Neues Icon"] + ] + |> Modal.body [class "body"] [ div [] [ div [] ( Radio.radioList "customradiogroup" @@ -141,10 +158,9 @@ newObjectIconModal model = ) ] ] - |> Modal.footer [] + |> Modal.footer [class "mediumCopper"] [ Button.button - [ Button.attrs [onClick <| AddCharacterIcon (MouseClick (getCharIcon model.addCharacterIcon)) ] - , Button.success + [ Button.attrs [onClick <| AddCharacterIcon (MouseClick (getCharIcon model.addCharacterIcon)), class "metalButton", style "margin-top" "5px" ] , Button.disabled (model.radioCheckedID==0) ] [ text "Icon hinzufügen" ] @@ -183,38 +199,40 @@ placeIcon s = case iconType of "monster" -> [ Svg.text_ [ SvgAtt.textAnchor "middle" - , SvgAtt.x (String.fromFloat (Maybe.withDefault 0 (String.toFloat x) - 3)) - , SvgAtt.y (String.fromFloat (Maybe.withDefault 0 (String.toFloat y) - 0.5)) + , SvgAtt.x (String.fromFloat (Maybe.withDefault 0 (String.toFloat x))) + , SvgAtt.y (String.fromFloat (Maybe.withDefault 0 (String.toFloat y))) , SvgAtt.dominantBaseline "middle" ] [ Svg.text (String.fromInt id) ] , Svg.image - [ SvgAtt.style "width:30px;height:30px;" - , SvgAtt.x (String.fromFloat (Maybe.withDefault 0 (String.toFloat x) - 17.5)) - , SvgAtt.y (String.fromFloat (Maybe.withDefault 0 (String.toFloat y) - 17.5)) - , SvgAtt.xlinkHref ("res/icons/enemy.png") - , SvgAtt.class "MonsterIcon" + [ SvgAtt.width "50" + , SvgAtt.height "50" + , SvgAtt.x (String.fromFloat (Maybe.withDefault 0 (String.toFloat x) - 25.5)) + , SvgAtt.y (String.fromFloat (Maybe.withDefault 0 (String.toFloat y) - 24.5)) + , SvgAtt.title "MonsterIcon" + , SvgAtt.xlinkHref "res/icons/Enemy.svg" , Svg.Events.onMouseOver (HighlightTableRow id text) - , Svg.Events.onMouseOut (HighlightTableRow 0 "Beschreibung") + , Svg.Events.onMouseOut (HighlightTableRow 0 "") , Svg.Events.onClick (DeleteIcon iconType id) ] [] ] "player" -> [ Svg.text_ [ SvgAtt.textAnchor "middle" - , SvgAtt.x (String.fromFloat (Maybe.withDefault 0 (String.toFloat x) + 1)) - , SvgAtt.y (String.fromFloat (Maybe.withDefault 0 (String.toFloat y) + 2.5)) + , SvgAtt.x (String.fromFloat (Maybe.withDefault 0 (String.toFloat x))) + , SvgAtt.y (String.fromFloat (Maybe.withDefault 0 (String.toFloat y))) , SvgAtt.dominantBaseline "middle" ] [ Svg.text (String.fromInt id) ] , Svg.image - [ SvgAtt.style "width:25px;height:25px;" - , SvgAtt.x (String.fromFloat (Maybe.withDefault 0 (String.toFloat x) - 11.5)) - , SvgAtt.y (String.fromFloat (Maybe.withDefault 0 (String.toFloat y) - 11.5)) - , SvgAtt.xlinkHref ("res/icons/hero.png") - , SvgAtt.class "PlayerIcon" + [ SvgAtt.width "45" + , SvgAtt.height "45" + , SvgAtt.x (String.fromFloat (Maybe.withDefault 0 (String.toFloat x) - 22.5)) + , SvgAtt.y (String.fromFloat (Maybe.withDefault 0 (String.toFloat y) - 22)) + , SvgAtt.title "ObjectIcon" + , SvgAtt.xlinkHref "res/icons/Hero.svg" , Svg.Events.onMouseOver (HighlightTableRow id text) - , Svg.Events.onMouseOut (HighlightTableRow 0 "Beschreibung") + , Svg.Events.onMouseOut (HighlightTableRow 0 "") , Svg.Events.onClick (DeleteIcon iconType id) ] [] ] @@ -228,7 +246,7 @@ placeIcon s = , SvgAtt.r "10" , SvgAtt.style (buildCustomObjectIconStyle color) , Svg.Events.onMouseOver (ToolTipMsg text) - , Svg.Events.onMouseOut (ToolTipMsg "Beschreibung") + , Svg.Events.onMouseOut (ToolTipMsg "") , SvgAtt.class "ObjectIcon" , Svg.Events.onClick (DeleteIcon iconType id) ] @@ -242,7 +260,7 @@ placeIcon s = , SvgAtt.y (String.fromFloat (Maybe.withDefault 0 (String.toFloat y) - 11.5)) , SvgAtt.xlinkHref (getIconPath typeID) , Svg.Events.onMouseOver (ToolTipMsg text) - , Svg.Events.onMouseOut (ToolTipMsg "Beschreibung") + , Svg.Events.onMouseOut (ToolTipMsg "") , SvgAtt.class "ObjectIcon" , Svg.Events.onClick (DeleteIcon iconType id) ] [] diff --git a/src/FightingTool.elm b/src/FightingTool.elm index 0bb0bab360a2f44973e0e1c23aa96e692c0188f0..12fe040715d8b1c05582d8f9a6cc05d6f279dd59 100644 --- a/src/FightingTool.elm +++ b/src/FightingTool.elm @@ -3,8 +3,10 @@ module FightingTool exposing (..) --elm Packages import Html exposing (Html, div, text, h1, h2, p) -import Html.Attributes as Attr exposing (class) +import Html.Attributes as Attr exposing (class,style) import Html.Events exposing (onClick) +import Svg +import Svg.Attributes as SvgAtt import Json.Decode import Bootstrap.Modal as Modal import Bootstrap.Button as Button @@ -14,6 +16,8 @@ import Bootstrap.Form as Form import Bootstrap.Form.Radio as Radio import Bootstrap.Form.Fieldset as Fieldset import Bootstrap.Form.Input as Input +import Bootstrap.Tab as Tab +import Bootstrap.Utilities.Spacing as Spacing import Array import Array.Extra as Array import Random @@ -27,26 +31,25 @@ body model = div [] [ div [] [ Table.table - { options = [ Table.striped, Table.hover ] + { options = [Table.hover ] , thead = Table.simpleThead - [ Table.th [] [ text "ID" ] - , Table.th [ Table.cellAttr <| Attr.colspan 2 ] [ text "Name" ] - , Table.th [] [ text "RS" ] - , Table.th [] [ text "LeP"] - , Table.th [] [ text " "] - , Table.th [] [ text " "] + [ Table.th [Table.cellAttr <| class "mediumCopper"] [ text "ID" ] + , Table.th [Table.cellAttr <| Attr.colspan 2 , Table.cellAttr <| class "mediumCopper"] [ text "Name" ] + , Table.th [Table.cellAttr <| class "mediumCopper"] [ text "RS" ] + , Table.th [Table.cellAttr <| class "mediumCopper"] [ text "LeP"] + , Table.th [Table.cellAttr <| class "mediumCopper"] [ text " "] + , Table.th [Table.cellAttr <| class "mediumCopper"] [ text " "] ] , tbody = Table.tbody [] (displayCharacters model.enemy ++ [Table.tr [] [ Table.td[Table.cellAttr <| Attr.colspan 10] -- naja um sicher zu gehen - [ Button.button - [ Button.light - , Button.block - , Button.attrs [onClick <| ShowModal CustomEnemy ] - ] - [ text "+"] + [ Html.button + [ class "metalButton" + , onClick <| ShowModal CustomEnemy + , style "width" "100%" + ][text "+"] ] ] ] @@ -60,19 +63,24 @@ body model = header : Html Msg header = - Html.section [class "hero is-primary is-bold animate__animated animate__fadeInDown"] - [ div [class "hero-body"] - [ div [class "container"] - [ h1 [class "title"] [text "Pen & Paper Manager"] - , h2 [class "subtitle"] [text "Für \"Das schwarze Auge\" Version 5"] + Html.header [class "header animate__animated animate__fadeInDown", style "height" "80%"] + [ div [class "grid-container"] + [ Html.figure [ class "image animate__animated animate__rollIn"] + [ Svg.svg + [ SvgAtt.width "100%", style "margin-top" "-18%", style "margin-left" "10%"] + [ Svg.image [ SvgAtt.width "100%", SvgAtt.height "100%", SvgAtt.title "Logo", SvgAtt.xlinkHref "res/P&P Manager Logo 512x512px noBG.png" ] [] ] + ] + , div [class "item1", style "height" "80%"] + [ h1 [class "title", style "margin-left" "2%", style "margin-top" "4px"] [text "Pen & Paper Manager"] + , h2 [class "subtitle", style "margin-left" "2%"] [text "Für \"Das schwarze Auge\" Version 5"] + ] ] ] - ] footer : Html Msg footer = - Html.footer [class "footer animate__animated animate__fadeInUp"] - [ div [class "content has-text-centered"] + Html.footer [class "footer animate__animated animate__fadeInUp page-footer"] + [ div [] [ Html.p [] [ text "Entwickelt von Laura Spilling, Stefan Kranz, Marcus Gagelmann und Alexander Kampf" ] , Html.p [] [ text "Einführung in das World Wide Web" ] ] @@ -90,29 +98,29 @@ viewAttackModal model = div [] [ Modal.config (CloseModal AttackModal) |> Modal.hideOnBackdropClick True - |> Modal.h3 [] [ text "Angriff" ] - |> Modal.body [] + |> Modal.header [class "mediumCopper"] + [ Html.h3 [][text "Angriff"] + ] + |> Modal.body [class "body"] [ Input.text [ Input.value model.dice , Input.placeholder "1W6+0" , Input.onInput ChangeTmpDice ] - , Button.button - [ Button.attrs [onClick (DiceAndSlice model.tmpdice) ] - , Button.outlineDark - ] - [ text "Schaden würfeln" ] + , Html.button + [ class "metalButton" + , onClick (DiceAndSlice model.tmpdice) + ] [ text "Schaden würfeln" ] , Input.number [ insideInput , Input.onInput ChangeDamage ] ] - |> Modal.footer [] - [ Button.button - [ Button.attrs [onClick <| attack model model.characterId model.damage] - , Button.success - ] - [ text "Schaden zufügen" ] + |> Modal.footer [class "mediumCopper"] + [ Html.button + [ class "metalButton" + , onClick <| attack model model.characterId model.damage + ] [ text "Schaden zufügen" ] ] |> Modal.view model.showAttackModal ] @@ -125,54 +133,39 @@ viewCustomEnemyModal model = just works the way it is. It will probably be put in a modal in the future. -} - let - enemybool = - case model.enemyHero of - "Enemy" -> True - _ -> False - herobool = - case model.enemyHero of - "Hero" -> True - _ -> False - - - in - Modal.config (CloseModal CustomEnemy) - |> Modal.hideOnBackdropClick True - |> Modal.h3 [] [ text "Charakter hinzufügen" ] - |> Modal.body [] [ - div [] - [ dropdownMenu model - , Html.br [] [] - , Fieldset.config - |> Fieldset.asGroup - |> Fieldset.legend [] [ text "Benutzerdefiniert: " ] - |> Fieldset.children - ( Radio.radioList "EnemyHero" - [ Radio.create - [ Radio.id "enemy" - , Radio.onClick <| SwitchEnemyHero "Enemy" - , Radio.checked enemybool - ] "Gegner" - , Radio.create - [ Radio.id "hero" - , Radio.onClick <| SwitchEnemyHero "Hero" - , Radio.checked herobool - ] "Held" - ] - ) - |> Fieldset.view - , if model.enemyHero == "Hero" - then customHero model - else if model.enemyHero == "Enemy" - then customEnemy model - else p [][] + Modal.config (CloseModal CustomEnemy) + |> Modal.hideOnBackdropClick True + |> Modal.header [class "mediumCopper"] + [ Html.h3 [][text "Charakter hinzufügen"] ] + |> Modal.body [ class "body"] + [ div [] + [ Html.h5 [][text "Vordefiniert"] + , dropdownMenu model + , Html.br [] [] + , Html.h5 [][text "Benutzerdefiniert"] + , Tab.config ModalTabMsg + |> Tab.items + [ Tab.item + { id = "enemy" + , link = Tab.link [] [ text "Gegner" ] + , pane = + Tab.pane [ class "lightCopper" , style "padding" "2%"] + [ customEnemy model ] + } + , Tab.item + { id = "hero" + , link = Tab.link [] [ text "Held" ] + , pane = + Tab.pane [ class "lightCopper" , style "padding" "2%"] + [ customHero model ] + } ] + |> Tab.view model.modalTabState ] - |> Modal.footer [] [] + ] + |> Modal.footer [class "mediumCopper"] [] |> Modal.view model.showCustomEnemy - parseEnemy : Json.Decode.Decoder Character parseEnemy = Json.Decode.map4 (\n h m s -> Enemy n h m s "") @@ -211,16 +204,17 @@ displayCharacters chars = , Table.td[][text <| String.fromInt armor] , Table.td[][text <| String.fromInt health] , Table.td[] - [ Button.button - [ Button.success - , Button.attrs [onClick <| ShowAttackModal i]] + [ Html.button + [ class "metalButton" + , onClick <| ShowAttackModal i] [ text "Angriff"] ] , Table.td[] - [ Button.button - [ Button.danger - , Button.attrs [onClick <| RemoveEnemy i ] ] - [ text "Löschen"] + [ Html.i + [class "fas fa-trash-alt" + , onClick <| RemoveEnemy i + , style "margin-top" "10%" + ] [] ] ] Hero _ _ -> @@ -296,7 +290,7 @@ dropdownMenu model = { options = [ Dropdown.dropRight ] , toggleMsg = MyDrop1Msg , toggleButton = - Dropdown.toggle [ Button.primary ] [ text "Gegner" ] + Dropdown.toggle [Button.attrs [class "metalButton"]] [ text "Monster" ] , items = -- give a name to the LoadEnemy method and it will pull up the corresponding JSON [ Dropdown.header [ text "Kulturschaffender"] @@ -339,7 +333,7 @@ customEnemy model = Hero _ _ -> (Input.placeholder "", Input.placeholder "", Input.placeholder "") in - div [] + div [style "margin-left" "5%", style "margin-right" "5%"] [ Form.label [] [text "Name:"] , Input.text [Input.onInput (\n -> @@ -402,15 +396,16 @@ customEnemy model = , ddArmor ] , Html.br [] [] - , Button.button - [ Button.success - , Button.attrs [ onClick <| AddEnemy model.tmpEnemy ] - ] [ text "Hinzufügen"] + , Html.button + [ class "metalButton" + , style "position" "right" + , onClick <| AddEnemy model.tmpEnemy ] + [ text "Hinzufügen"] ] customHero : Model -> Html Msg customHero model = - div [] + div [style "margin-left" "5%", style "margin-right" "5%"] [ Form.label [] [text "Name"] , Input.text [Input.onInput (\n -> @@ -435,8 +430,8 @@ customHero model = UpdateTmp <| Hero name (Maybe.withDefault 0 <| String.toInt a) )] , Html.br [] [] - , Button.button - [ Button.success - , Button.attrs [ onClick <| AddEnemy model.tmpHero ] - ] [ text "Hinzufügen"] + , Html.button + [class "metalButton" + , onClick <| AddEnemy model.tmpHero ] + [text "Hinzufügen"] ] diff --git a/src/Main.elm b/src/Main.elm index 29a30ab6fa1c2a8d69870bb99c3894b444693bde..ca650c9f726526f58c50671ab902ce7c9cc77b93 100644 --- a/src/Main.elm +++ b/src/Main.elm @@ -5,6 +5,7 @@ module Main exposing (main) import Browser import Http import Html exposing (Html, div, text) +import Html.Attributes import Bootstrap.Utilities.Spacing as Spacing exposing (mt3) import Bootstrap.Modal as Modal import Bootstrap.Tab as Tab @@ -143,6 +144,11 @@ update msg model = , Cmd.none ) + ModalTabMsg state -> + ( { model | modalTabState = state } + , Cmd.none + ) + AddCharacterIcon addCharacterIconMsg -> case addCharacterIconMsg of MouseClick characterIcon -> @@ -265,13 +271,13 @@ update msg model = ToolTipMsg tooltip -> case tooltip of - "" -> ( { model | activeTooltip = "Beschreibung" - , mouseInIcon = (if tooltip=="Beschreibung" then False else True) } + "" -> ( { model | activeTooltip = "" + , mouseInIcon = (if tooltip=="" then False else True) } , Cmd.none ) _ -> ( { model | activeTooltip = tooltip - , mouseInIcon = (if tooltip=="Beschreibung" then False else True) } + , mouseInIcon = (if tooltip=="" then False else True) } , Cmd.none ) @@ -286,7 +292,7 @@ update msg model = case iconType of "object" -> ( { model | objectIconList = List.filter (isNotId id) model.objectIconList - , activeTooltip = "Beschreibung" } + , activeTooltip = "" } , Cmd.none ) @@ -294,13 +300,13 @@ update msg model = _ -> ( { model | characterList = List.filter (isNotId id) model.characterList , highlightedTableRow = 0 - , activeTooltip = "Beschreibung" } + , activeTooltip = "" } , Cmd.none ) view : Model -> Html Msg view model = - div [] + div [Html.Attributes.class "wrapper textFont", Html.Attributes.style "height" "100%"] [ header , Tab.config TabMsg |> Tab.items diff --git a/src/Model.elm b/src/Model.elm index 9a435f8184341e06804052e6359fd7f1ca6673dd..3eae4eaa8f8b0f037154f9b86cb1c321cd41252f 100644 --- a/src/Model.elm +++ b/src/Model.elm @@ -26,6 +26,7 @@ type alias Model = , dieFace : Int , maxFace : Int , tabState : Tab.State + , modalTabState : Tab.State , characterList : List CharacterIcon , objectIconList : List CharacterIcon , addCharacterIcon : AddCharacterIconState @@ -62,6 +63,7 @@ init _ = , dieFace = 0 , maxFace = 6 , tabState = Tab.initialState + , modalTabState = Tab.initialState , characterList = [] , objectIconList = [] , addCharacterIcon = DrawingInactive @@ -78,7 +80,7 @@ init _ = , colorPicker = ColorPicker.empty , colour = Color.rgb 255 0 0 , radioCheckedID = 0 - , activeTooltip = "Tooltip" + , activeTooltip = "" , highlightedTableRow = 0 , mouseInIcon = False } @@ -105,6 +107,7 @@ type Msg | ChangeDamage String-- Will eventually be useless after refactor, I just have to get a better feel for let and in | DoNothing -- does nothing (yes, this IS necessary) | TabMsg Tab.State + | ModalTabMsg Tab.State | AddCharacterIcon AddCharacterIconMsg | ClearCharacterList | DiceAndSlice String