diff --git a/src/components/GeneratePage.vue b/src/components/GeneratePage.vue index b4d83f5..0fa8ea4 100644 --- a/src/components/GeneratePage.vue +++ b/src/components/GeneratePage.vue @@ -5,6 +5,36 @@

Loddgenerator

Velg hvilke farger du vil ha, fyll inn antall lodd og klikk 'generer'

+
+ + + + +
0) { for (let i = 0; i < this.numberOfBallots; i++) { - let color = Math.floor(Math.random() * 4) + 1; + let color = + randomArray[Math.floor(Math.random() * randomArray.length)]; this.colors.push(color); if (color == 1) { this.red += 1; @@ -127,7 +179,7 @@ h1 { p { text-align: center; - margin-bottom: 35px; + margin-bottom: 15px; margin-top: 0px; } @@ -136,7 +188,15 @@ p { display: flex; justify-content: center; align-items: center; - margin-bottom: 15px; + margin-bottom: 25px; +} + +.input-line label { + padding: 0 8px; + display: flex; + flex-direction: row; + justify-content: center; + align-items: center; } .top-banner { @@ -162,6 +222,29 @@ input { font-size: 1.5rem; padding: 8px; } + +input[type="checkbox"] { + display: none; +} + +label .border { + border: 1px solid #333333; + border-spacing: 2px; + margin-right: 8px; + display: flex; + justify-content: center; + align-items: center; + padding: 2px; +} + +label .checkmark { + background: none; + display: inline-block; + width: 12px; + height: 12px; + padding: 2px; +} + .container { font-family: Knowit; margin: auto; @@ -180,6 +263,11 @@ input { width: 150px; height: 150px; margin: 20px; + -webkit-mask-image: url(/../../public/assets/images/lodd.svg); + background-repeat: no-repeat; + mask-image: url(/../../public/assets/images/lodd.svg); + -webkit-mask-repeat: no-repeat; + mask-repeat: no-repeat; } button { @@ -198,19 +286,27 @@ button { flex-direction: row; justify-content: space-around; } -.green { +.green, +.input-line label:hover input#greenCheckbox ~ .border .checkmark, +.input-line label input#greenCheckbox:checked ~ .border .checkmark { background-color: #c8f9df; } -.red { +.red, +.input-line label:hover input#redCheckbox ~ .border .checkmark, +.input-line label input#redCheckbox:checked ~ .border .checkmark { background-color: #fbd7de; } -.yellow { +.yellow, +.input-line label:hover input#yellowCheckbox ~ .border .checkmark, +.input-line label input#yellowCheckbox:checked ~ .border .checkmark { background-color: #fff6d6; } -.blue { +.blue, +.input-line label:hover input#blueCheckbox ~ .border .checkmark, +.input-line label input#blueCheckbox:checked ~ .border .checkmark { background-color: #d4f2fe; }