From 39f3b5877c4ee3c424dbd290a2d601b3b78ee54e Mon Sep 17 00:00:00 2001 From: Laura <L.Spilling@web.de> Date: Sun, 12 Jul 2020 11:39:48 +0200 Subject: [PATCH] Auto stash before merge of "style" and "origin/style" --- index.html | 26 +- out/main.js | 350 ++++----------------------- res/{Stysheet.css => Stylesheet.css} | 31 ++- src/DungeonMap.elm | 94 ++----- src/FightingTool.elm | 24 +- 5 files changed, 94 insertions(+), 431 deletions(-) rename res/{Stysheet.css => Stylesheet.css} (83%) diff --git a/index.html b/index.html index 51cc518..ecd9401 100644 --- a/index.html +++ b/index.html @@ -2,36 +2,14 @@ <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="res/Stysheet.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 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 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 bc772a2..274f7b0 100644 --- a/out/main.js +++ b/out/main.js @@ -9645,12 +9645,6 @@ var $rundis$elm_bootstrap$Bootstrap$Table$hover = $rundis$elm_bootstrap$Bootstra 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$RowAttr = function (a) { - return {$: 'RowAttr', a: a}; -}; -var $rundis$elm_bootstrap$Bootstrap$Table$rowAttr = function (attr_) { - return $rundis$elm_bootstrap$Bootstrap$Table$RowAttr(attr_); -}; var $rundis$elm_bootstrap$Bootstrap$Table$THead = function (a) { return {$: 'THead', a: a}; }; @@ -10532,7 +10526,7 @@ var $author$project$FightingTool$viewAttackModal = function (model) { $rundis$elm_bootstrap$Bootstrap$Modal$footer, _List_fromArray( [ - $elm$html$Html$Attributes$class('colored-header-footer') + $elm$html$Html$Attributes$class('mediumCopper') ]), _List_fromArray( [ @@ -10587,7 +10581,7 @@ var $author$project$FightingTool$viewAttackModal = function (model) { $rundis$elm_bootstrap$Bootstrap$Modal$header, _List_fromArray( [ - $elm$html$Html$Attributes$class('colored-header-footer') + $elm$html$Html$Attributes$class('mediumCopper') ]), _List_fromArray( [ @@ -11670,6 +11664,7 @@ var $rundis$elm_bootstrap$Bootstrap$Tab$activeTabAttributes = F2( ]), $rundis$elm_bootstrap$Bootstrap$Tab$transitionStyles(1)); } +<<<<<<< Updated upstream }); var $rundis$elm_bootstrap$Bootstrap$Tab$renderTabPane = F5( function (id, active, _v0, state, configRec) { @@ -11682,6 +11677,21 @@ var $rundis$elm_bootstrap$Bootstrap$Tab$renderTabPane = F5( return A2( $elm$html$Html$div, _Utils_ap( +======= + }(); + return A2( + $rundis$elm_bootstrap$Bootstrap$Modal$view, + model.showCustomEnemy, + A3( + $rundis$elm_bootstrap$Bootstrap$Modal$footer, + _List_fromArray( + [ + $elm$html$Html$Attributes$class('mediumCopper') + ]), + _List_Nil, + A3( + $rundis$elm_bootstrap$Bootstrap$Modal$body, +>>>>>>> Stashed changes _List_fromArray( [ $elm$html$Html$Attributes$id(id), @@ -11813,7 +11823,7 @@ var $author$project$FightingTool$viewCustomEnemyModal = function (model) { $rundis$elm_bootstrap$Bootstrap$Modal$footer, _List_fromArray( [ - $elm$html$Html$Attributes$class('colored-header-footer') + $elm$html$Html$Attributes$class('mediumCopper') ]), _List_Nil, A3( @@ -11898,7 +11908,7 @@ var $author$project$FightingTool$viewCustomEnemyModal = function (model) { $rundis$elm_bootstrap$Bootstrap$Modal$header, _List_fromArray( [ - $elm$html$Html$Attributes$class('colored-header-footer') + $elm$html$Html$Attributes$class('mediumCopper') ]), _List_fromArray( [ @@ -11940,11 +11950,7 @@ var $author$project$FightingTool$body = function (model) { [ A2( $rundis$elm_bootstrap$Bootstrap$Table$tr, - _List_fromArray( - [ - $rundis$elm_bootstrap$Bootstrap$Table$rowAttr( - $elm$html$Html$Attributes$class('tr')) - ]), + _List_Nil, _List_fromArray( [ A2( @@ -11984,7 +11990,7 @@ var $author$project$FightingTool$body = function (model) { _List_fromArray( [ $rundis$elm_bootstrap$Bootstrap$Table$cellAttr( - $elm$html$Html$Attributes$class('th')) + $elm$html$Html$Attributes$class('mediumCopper')) ]), _List_fromArray( [ @@ -11997,7 +12003,7 @@ var $author$project$FightingTool$body = function (model) { $rundis$elm_bootstrap$Bootstrap$Table$cellAttr( $elm$html$Html$Attributes$colspan(2)), $rundis$elm_bootstrap$Bootstrap$Table$cellAttr( - $elm$html$Html$Attributes$class('th')) + $elm$html$Html$Attributes$class('mediumCopper')) ]), _List_fromArray( [ @@ -12008,7 +12014,7 @@ var $author$project$FightingTool$body = function (model) { _List_fromArray( [ $rundis$elm_bootstrap$Bootstrap$Table$cellAttr( - $elm$html$Html$Attributes$class('th')) + $elm$html$Html$Attributes$class('mediumCopper')) ]), _List_fromArray( [ @@ -12019,7 +12025,7 @@ var $author$project$FightingTool$body = function (model) { _List_fromArray( [ $rundis$elm_bootstrap$Bootstrap$Table$cellAttr( - $elm$html$Html$Attributes$class('th')) + $elm$html$Html$Attributes$class('mediumCopper')) ]), _List_fromArray( [ @@ -12030,7 +12036,7 @@ var $author$project$FightingTool$body = function (model) { _List_fromArray( [ $rundis$elm_bootstrap$Bootstrap$Table$cellAttr( - $elm$html$Html$Attributes$class('th')) + $elm$html$Html$Attributes$class('mediumCopper')) ]), _List_fromArray( [ @@ -12041,7 +12047,7 @@ var $author$project$FightingTool$body = function (model) { _List_fromArray( [ $rundis$elm_bootstrap$Bootstrap$Table$cellAttr( - $elm$html$Html$Attributes$class('th')) + $elm$html$Html$Attributes$class('mediumCopper')) ]), _List_fromArray( [ @@ -12074,8 +12080,6 @@ var $author$project$Model$AddCharacterIcon = function (a) { var $author$project$Model$MouseDraw = function (a) { return {$: 'MouseDraw', a: a}; }; -<<<<<<< HEAD -======= var $rundis$elm_bootstrap$Bootstrap$Table$RowAttr = function (a) { return {$: 'RowAttr', a: a}; }; @@ -12091,7 +12095,6 @@ var $rundis$elm_bootstrap$Bootstrap$Table$RoledRow = function (a) { var $rundis$elm_bootstrap$Bootstrap$Internal$Role$Secondary = {$: 'Secondary'}; var $rundis$elm_bootstrap$Bootstrap$Table$rowSecondary = $rundis$elm_bootstrap$Bootstrap$Table$RoledRow( $rundis$elm_bootstrap$Bootstrap$Table$Roled($rundis$elm_bootstrap$Bootstrap$Internal$Role$Secondary)); ->>>>>>> dev var $author$project$DungeonMap$stopBubbling = function (msg) { return A2( $elm$html$Html$Events$stopPropagationOn, @@ -12201,8 +12204,6 @@ 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 $rundis$elm_bootstrap$Bootstrap$Table$Striped = {$: 'Striped'}; -var $rundis$elm_bootstrap$Bootstrap$Table$striped = $rundis$elm_bootstrap$Bootstrap$Table$Striped; var $author$project$DungeonMap$dungeonMap_MonsterList = function (model) { return A2( $elm$html$Html$div, @@ -12492,275 +12493,12 @@ var $author$project$DungeonMap$getColor = function (object) { var n = object.d; return $elm$core$Maybe$Nothing; default: -<<<<<<< HEAD - return ''; - } -}; -var $elm$svg$Svg$Attributes$id = _VirtualDom_attribute('id'); -var $elm$svg$Svg$Attributes$r = _VirtualDom_attribute('r'); -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( - _VirtualDom_attributeNS, - 'http://www.w3.org/1999/xlink', - 'xlink:href', - _VirtualDom_noJavaScriptUri(value)); -}; -var $elm$svg$Svg$Attributes$y = _VirtualDom_attribute('y'); -var $author$project$DungeonMap$placeIcon = F5( - function (iconType, id, x, y, color) { - switch (iconType) { - case 'monster': - return _List_fromArray( - [ - A2( - $elm$svg$Svg$image, - _List_fromArray( - [ - $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)) - 25.5)), - $elm$svg$Svg$Attributes$y( - $elm$core$String$fromFloat( - A2( - $elm$core$Maybe$withDefault, - 0, - $elm$core$String$toFloat(y)) - 24.5)), - $elm$svg$Svg$Attributes$title('MonsterIcon'), - $elm$svg$Svg$Attributes$xlinkHref('res/icons/Enemy.svg') - ]), - _List_Nil), - A2( - $elm$svg$Svg$text_, - _List_fromArray( - [ - $elm$svg$Svg$Attributes$textAnchor('middle'), - $elm$svg$Svg$Attributes$x( - $elm$core$String$fromFloat( - A2( - $elm$core$Maybe$withDefault, - 0, - $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)))), - $elm$svg$Svg$Attributes$dominantBaseline('middle') - ]), - _List_fromArray( - [ - $elm$svg$Svg$text( - $elm$core$String$fromInt(id)) - ])) - ]); - case 'player': - return _List_fromArray( - [ - A2( - $elm$svg$Svg$image, - _List_fromArray( - [ - $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)) - 22.5)), - $elm$svg$Svg$Attributes$y( - $elm$core$String$fromFloat( - A2( - $elm$core$Maybe$withDefault, - 0, - $elm$core$String$toFloat(y)) - 22)), - $elm$svg$Svg$Attributes$title('ObjectIcon'), - $elm$svg$Svg$Attributes$xlinkHref('res/icons/Hero.svg') - ]), - _List_Nil), - A2( - $elm$svg$Svg$text_, - _List_fromArray( - [ - $elm$svg$Svg$Attributes$textAnchor('middle'), - $elm$svg$Svg$Attributes$x( - $elm$core$String$fromFloat( - A2( - $elm$core$Maybe$withDefault, - 0, - $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)))), - $elm$svg$Svg$Attributes$dominantBaseline('middle') - ]), - _List_fromArray( - [ - $elm$svg$Svg$text( - $elm$core$String$fromInt(id)) - ])) - ]); - case 'object': - var _v1 = $author$project$DungeonMap$getIconPath(id); - if (_v1 === 'custom') { - return _List_fromArray( - [ - A2( - $elm$svg$Svg$circle, - _List_fromArray( - [ - $elm$svg$Svg$Attributes$id( - $elm$core$String$fromInt(id)), - $elm$svg$Svg$Attributes$cx(x), - $elm$svg$Svg$Attributes$cy(y), - $elm$svg$Svg$Attributes$r('10'), - $elm$svg$Svg$Attributes$style( - $author$project$DungeonMap$buildCustomObjectIconStyle(color)) - ]), - _List_Nil) - ]); - } else { - return _List_fromArray( - [ - A2( - $elm$svg$Svg$image, - _List_fromArray( - [ - $elm$svg$Svg$Attributes$width('25'), - $elm$svg$Svg$Attributes$height('25'), - $elm$svg$Svg$Attributes$x( - $elm$core$String$fromFloat( - A2( - $elm$core$Maybe$withDefault, - 0, - $elm$core$String$toFloat(x)) - 11.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$title('ObjectIcon'), - $elm$svg$Svg$Attributes$xlinkHref( - $author$project$DungeonMap$getIconPath(id)) - ]), - _List_Nil) - ]); - } - default: - return _List_Nil; - } - }); -var $elm$svg$Svg$rect = $elm$svg$Svg$trustedNode('rect'); -var $author$project$DungeonMap$newIconsView = function (addCharacterIcon) { - if (addCharacterIcon.$ === 'DrawIcon') { - var characterIcon = addCharacterIcon.a; - switch (characterIcon.$) { - case 'ObjectIcon': - var i = characterIcon.a; - var x = characterIcon.b; - var y = characterIcon.c; - var t = characterIcon.d; - var c = characterIcon.e; - return _List_Nil; - case 'PlayerIcon': - var i = characterIcon.a; - var x = characterIcon.b; - var y = characterIcon.c; - return _Utils_ap( - A5($author$project$DungeonMap$placeIcon, 'player', i, x, y, $elm$core$Maybe$Nothing), - _List_fromArray( - [ - A2( - $elm$svg$Svg$rect, - _List_fromArray( - [ - $elm$svg$Svg$Attributes$width('800'), - $elm$svg$Svg$Attributes$height('600'), - $elm$svg$Svg$Attributes$x('0'), - $elm$svg$Svg$Attributes$y('0'), - $elm$svg$Svg$Attributes$style('fill:blue;stroke:pink;stroke-width:5;fill-opacity:0.1;stroke-opacity:0.9') - ]), - _List_Nil) - ])); - default: - var i = characterIcon.a; - var x = characterIcon.b; - var y = characterIcon.c; - return _Utils_ap( - A5($author$project$DungeonMap$placeIcon, 'monster', i, x, y, $elm$core$Maybe$Nothing), - _List_fromArray( - [ - A2( - $elm$svg$Svg$rect, - _List_fromArray( - [ - $elm$svg$Svg$Attributes$width('800'), - $elm$svg$Svg$Attributes$height('600'), - $elm$svg$Svg$Attributes$x('0'), - $elm$svg$Svg$Attributes$y('0'), - $elm$svg$Svg$Attributes$style('fill:blue;stroke:pink;stroke-width:5;fill-opacity:0.1;stroke-opacity:0.9') - ]), - _List_Nil) - ])); - } - } else { - 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$getColor = function (object) { - switch (object.$) { - case 'MonsterIcon': - var i = object.a; - var x = object.b; - var y = object.c; - return $elm$core$Maybe$Nothing; - case 'PlayerIcon': - var i = object.a; - var x = object.b; - var y = object.c; - return $elm$core$Maybe$Nothing; - default: -======= ->>>>>>> dev var i = object.a; var x = object.b; var y = object.c; var t = object.d; var c = object.e; -<<<<<<< HEAD -======= var ident = object.f; ->>>>>>> dev return c; } }; @@ -12903,7 +12641,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( @@ -12952,13 +12692,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( @@ -12970,21 +12710,22 @@ 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( @@ -13007,13 +12748,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( @@ -13025,21 +12766,22 @@ 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( @@ -13113,7 +12855,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; @@ -13195,7 +12936,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) { diff --git a/res/Stysheet.css b/res/Stylesheet.css similarity index 83% rename from res/Stysheet.css rename to res/Stylesheet.css index 1b8eecd..1e4614f 100644 --- a/res/Stysheet.css +++ b/res/Stylesheet.css @@ -30,12 +30,7 @@ html { .body { background-color: #faf2eb; - max-width: 100%; -} - -.colored-header-footer{ - background-color: #e4be9b; -} +} .textFont { font-family: 'Alegreya', serif; @@ -53,18 +48,20 @@ html { border-left-style: double; border-width: 5px; height: 75%; - width: 100%; } -.th { +.mediumCopper { background-color: #e4be9b } -.tr { - background-color: #faf2eb; +.nav-tabs .nav-link.active, +.nav-tabs .nav-item.show .nav-link { + background-color: #e4be9b; + border-color: #dee2e6 #dee2e6 #fff; } tr:nth-child(even) {background-color: white;} +tr:nth-child(odd) {background-color: #faf2eb;} .metalButton { background-image: repeating-linear-gradient(to right bottom, #acacac , #bfbfbf , #acacac 40% ); @@ -95,16 +92,26 @@ tr:nth-child(even) {background-color: white;} fill-opacity:0; } +.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; } - -.MonsterIcon:hover { +.ObjectIcon:hover { fill: grey-darker; opacity:0.5; fill-opacity:0.5; + width:25px; + height:25px; } .aboutText { diff --git a/src/DungeonMap.elm b/src/DungeonMap.elm index 29f952e..4f97d60 100644 --- a/src/DungeonMap.elm +++ b/src/DungeonMap.elm @@ -183,17 +183,18 @@ 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.onClick (DeleteIcon iconType id) @@ -202,17 +203,18 @@ placeIcon s = "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.onClick (DeleteIcon iconType id) @@ -321,70 +323,6 @@ getObjectText object = ObjectIcon i x y t c ident -> t - -placeIcon : String -> Int -> String -> String -> Maybe Color.Color -> List (Svg.Svg Msg) -placeIcon iconType id x y color = - case iconType of - "monster" -> - [ Svg.image - [ 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.text_ [ SvgAtt.textAnchor "middle" - , 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) ] - ] - - "player" -> - [ Svg.image - [ 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.text_ [ SvgAtt.textAnchor "middle" - , 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) ] - ] - - "object" -> - case getIconPath id of - "custom" -> [ Svg.circle - [ SvgAtt.id (String.fromInt id) - , SvgAtt.cx x - , SvgAtt.cy y - , SvgAtt.r "10" - , SvgAtt.style (buildCustomObjectIconStyle color) - ] - [] - ] - - - _ -> [ Svg.image - [ SvgAtt.width "25" - , SvgAtt.height "25" - , 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.title "ObjectIcon" - , SvgAtt.xlinkHref (getIconPath id) - ] [] - ] - - _ -> - [] - buildCustomObjectIconStyle : Maybe Color.Color -> String buildCustomObjectIconStyle color = "stroke:black;stroke-width:4;fill:" ++ (Color.toCssString (Maybe.withDefault Color.black color)) diff --git a/src/FightingTool.elm b/src/FightingTool.elm index f9c3b1c..81ee582 100644 --- a/src/FightingTool.elm +++ b/src/FightingTool.elm @@ -33,17 +33,17 @@ body model = [ Table.table { options = [Table.hover ] , thead = Table.simpleThead - [ Table.th [Table.cellAttr <| class "th"] [ text "ID" ] - , Table.th [ Table.cellAttr <| Attr.colspan 2 , Table.cellAttr <| class "th"] [ text "Name" ] - , Table.th [Table.cellAttr <| class "th"] [ text "RS" ] - , Table.th [Table.cellAttr <| class "th"] [ text "LeP"] - , Table.th [Table.cellAttr <| class "th"] [ text " "] - , Table.th [Table.cellAttr <| class "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.rowAttr <| class "tr"] + [Table.tr [] [ Table.td[Table.cellAttr <| Attr.colspan 10] -- naja um sicher zu gehen [ Button.button [ Button.light @@ -99,7 +99,7 @@ viewAttackModal model = div [] [ Modal.config (CloseModal AttackModal) |> Modal.hideOnBackdropClick True - |> Modal.header [class "colored-header-footer"] + |> Modal.header [class "mediumCopper"] [ Html.h3 [][text "Angriff"] ] |> Modal.body [class "body"] @@ -117,7 +117,7 @@ viewAttackModal model = , Input.onInput ChangeDamage ] ] - |> Modal.footer [class "colored-header-footer"] + |> Modal.footer [class "mediumCopper"] [ Html.button [ class "metalButton" , onClick <| attack model model.characterId model.damage @@ -136,7 +136,7 @@ viewCustomEnemyModal model = -} Modal.config (CloseModal CustomEnemy) |> Modal.hideOnBackdropClick True - |> Modal.header [class "colored-header-footer"] + |> Modal.header [class "mediumCopper"] [ Html.h3 [][text "Charakter hinzufügen"] ] |> Modal.body [ class "body"] [ div [] @@ -164,8 +164,8 @@ viewCustomEnemyModal model = |> Tab.view model.modalTabState ] ] - |> Modal.footer [class "colored-header-footer"] [] - |> Modal.view model.showCustomEnemy + |> Modal.footer [class "mediumCopper"] [] + |> Modal.view model.showCustomEnemy parseEnemy : Json.Decode.Decoder Character parseEnemy = -- GitLab