From 53b060d7b94b04a99a08e7de2fc694c348deb119 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maximilian=20Ke=C3=9Fler?= Date: Sat, 17 Sep 2022 11:20:52 +0200 Subject: [PATCH] some experiments on small cards --- onlinetichu-counter.js | 34 +++++++++++++++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) diff --git a/onlinetichu-counter.js b/onlinetichu-counter.js index a0b5d9a..a2947a5 100644 --- a/onlinetichu-counter.js +++ b/onlinetichu-counter.js @@ -44,11 +44,43 @@ function injectCounter() { border: 1px solid #000000; } + .playedCardsLayoutSmall { + position: absolute; + height: 62px; + } + + .playedCardsLayoutSmall .card { + width: 40px; + height: 60px; + border-radius: 3px; + float: left; + margin-left: -25px; + text-align: left; + box-shadow: 1px 1px 3px #555; + border: 1px solid #000000; + background-size: contain; + } + + .singleCard { + width: 40px; + height: 60px; + border-radius: 3px; + text-align: left; + box-shadow: 1px 1px 3px #555; + border: 1px solid #000000; + background-size: contain; + float: right; + } + .playedCardsLayout .card:hover { z-index: 1400; } ` + var card = document.createElement('div'); + card.className = "card c3-5 singleCard"; + document.getElementById('westPlayerName').appendChild(card); + var styleSheet = document.createElement("style") styleSheet.innerText = myStyles; console.log(styleSheet); @@ -80,7 +112,7 @@ function injectCounter() { playedCards.id = 'playedCards' + value; // playedCards.className = 'layoutPlayedCards list-unstyled col-lg-2'; // playedCards.className = 'playedCardsLayout list-unstyled'; - playedCards.className = 'playedCardsLayout list-unstyled'; + playedCards.className = 'playedCardsLayoutSmall list-unstyled'; playedCards.style.width = '160px'; playedCards.style.marginLeft = '25px'; playedCards.style.left = shift*129 + 'px';