Skip to content

Commit

Permalink
Merge pull request #1234 from danesjenovdan/dev
Browse files Browse the repository at this point in the history
Pulling refs/heads/dev into bosna
  • Loading branch information
LepkoQQ authored Sep 23, 2024
2 parents f437828 + 9c03c4e commit 7c80a4b
Show file tree
Hide file tree
Showing 62 changed files with 3,711 additions and 3,819 deletions.
2 changes: 1 addition & 1 deletion parlacards/build/build-locales.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import fs from 'fs-extra';
import jsYaml from 'js-yaml';
import glob from 'glob';
import * as glob from 'glob';
import { resolve, dirname, join, relative } from 'path';
import { fileURLToPath } from 'url';
import { processLocaleMarkdown } from './process-locale-markdown.js';
Expand Down
2 changes: 1 addition & 1 deletion parlacards/build/lint-card-names.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import fs from 'fs';
import path from 'path';
import glob from 'glob';
import * as glob from 'glob';
import { camelCase, upperFirst } from 'lodash-es';

const FIX_NAMES = process.argv.includes('--fix');
Expand Down
2 changes: 1 addition & 1 deletion parlacards/build/lint-locale-keys.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import fs from 'fs';
import glob from 'glob';
import * as glob from 'glob';
import jsYaml from 'js-yaml';
import { intersection, difference } from 'lodash-es';

Expand Down
2 changes: 1 addition & 1 deletion parlacards/build/lint-locale-names.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import fs from 'fs';
import path from 'path';
import glob from 'glob';
import * as glob from 'glob';

const cardNames = glob
.sync('./cards/**/card.vue')
Expand Down
2 changes: 1 addition & 1 deletion parlacards/build/lint-unused-components.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import fs from 'fs';
import path from 'path';
import glob from 'glob';
import * as glob from 'glob';

const cardsDir = path.resolve('./cards');

Expand Down
2 changes: 1 addition & 1 deletion parlacards/build/plugin-dev-serve-cards.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { existsSync, readFileSync } from 'fs';
import { resolve, dirname, join } from 'path';
import { fileURLToPath } from 'url';
import glob from 'glob';
import * as glob from 'glob';
import { groupBy, mapValues } from 'lodash-es';

const dir = dirname(fileURLToPath(import.meta.url));
Expand Down
13 changes: 8 additions & 5 deletions parlacards/build/scss-functions.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,19 @@
import * as sass from 'sass';
import { SassString } from 'sass';

export default {
'get-parlassets-url()': () => {
return new sass.types.String(process.env.VITE_PARLASSETS_URL ?? '');
return new SassString(process.env.VITE_PARLASSETS_URL ?? '');
},
'fs-readFile($filePath)': () => {
return new sass.types.String('');
// this is only used in parlassets, noop here for compile compatibility
return new SassString('');
},
'encode-svg($svg)': () => {
return new sass.types.String('');
// this is only used in parlassets, noop here for compile compatibility
return new SassString('');
},
'str-replace($str, $find: "", $replace: "")': () => {
return new sass.types.String('');
// this is only used in parlassets, noop here for compile compatibility
return new SassString('');
},
};
3 changes: 2 additions & 1 deletion parlacards/build/vite.config.build.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { defineConfig, loadEnv } from 'vite';
import { fileURLToPath } from 'url';
import { readFileSync } from 'fs';
import { resolve, dirname } from 'path';
import glob from 'glob';
import * as glob from 'glob';
import vue from '@vitejs/plugin-vue';
import virtual from '@rollup/plugin-virtual';
import scssFunctions from './scss-functions.js';
Expand Down Expand Up @@ -80,6 +80,7 @@ export default defineConfig(({ mode }) => {
css: {
preprocessorOptions: {
scss: {
api: 'modern-compiler',
functions: scssFunctions,
},
},
Expand Down
1 change: 1 addition & 0 deletions parlacards/build/vite.config.dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ export default defineConfig(({ mode }) => {
css: {
preprocessorOptions: {
scss: {
api: 'modern-compiler',
functions: scssFunctions,
},
},
Expand Down
74 changes: 36 additions & 38 deletions parlacards/cards/_components/Ballot.vue
Original file line number Diff line number Diff line change
Expand Up @@ -65,44 +65,50 @@ export default {
@import 'parlassets/scss/colors';

.ballot {
text-decoration: none;
background: $background;
color: $font-default;
display: block;
margin: 7px 0 8px;
min-height: 90px;
padding: 10px 14px;
position: relative;

@include respond-to(desktop) {
display: flex;
margin: 10px 0;
}

text-decoration: none;

&:hover {
text-decoration: none;
background-color: $link-hover-background;
color: $link;
}

background: $background;
color: $font-default;
display: block;
margin: 7px 0 8px;
min-height: 90px;
padding: 10px 14px;
position: relative;

.disunion {
display: flex;
flex-direction: column;
justify-content: center;
text-align: center;

@include respond-to(mobile) {
padding-bottom: 10px;
}

@include respond-to(desktop) {
padding-right: 16px;
}

display: flex;

flex-direction: column;
justify-content: center;
text-align: center;
}

.name {
border-bottom: 1px solid $font-placeholder;
border-top: 1px solid $font-placeholder;
font-family: 'Roboto Slab', 'Times New Roman', serif;
font-size: 11px;
font-weight: 300;
line-height: 1.45em;
padding: 10px 0;

@include respond-to(desktop) {
border-bottom: none;
border-top: none;
Expand All @@ -114,28 +120,12 @@ export default {
padding: 5px 20px;
}

border-bottom: 1px solid $font-placeholder;
border-top: 1px solid $font-placeholder;
font-family: 'Roboto Slab', 'Times New Roman', serif;
font-size: 11px;
font-weight: 300;
line-height: 1.45em;
padding: 10px 0;

p {
margin: 0;
}
}

.outcome {
@include respond-to(desktop) {
border-left: 1px solid $font-placeholder;
justify-content: left;
padding: 0 0 0 16px;
width: 136px;
margin-right: 16px;
}

align-items: center;
display: flex;
justify-content: center;
Expand All @@ -146,6 +136,14 @@ export default {
text-transform: uppercase;
padding: 10px 0 0;

@include respond-to(desktop) {
border-left: 1px solid $font-placeholder;
justify-content: left;
padding: 0 0 0 16px;
width: 136px;
margin-right: 16px;
}

@include respond-to(mobile) {
margin: 0 15px;
}
Expand Down Expand Up @@ -194,12 +192,6 @@ export default {
}

.icon {
@include show-for(desktop);

@include respond-to(mobile) {
margin: 0 auto;
}

background-position: center;
background-repeat: no-repeat;
background-size: contain;
Expand All @@ -212,6 +204,12 @@ export default {
align-items: center;
height: 42px;

@include show-for(desktop);

@include respond-to(mobile) {
margin: 0 auto;
}

&.for {
background-image: url('#{get-parlassets-url()}/icons/g_za_v2.svg');
}
Expand Down
7 changes: 6 additions & 1 deletion parlacards/cards/_components/BarChart.vue
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ export default {
.column-label {
margin-right: 15px;
&:not(.flexible) {
flex: 1;
}
Expand All @@ -131,6 +132,7 @@ export default {
margin-bottom: -5px;
font-size: 16px;
font-weight: 300;
@include respond-to(mobile) {
font-size: 14px;
}
Expand All @@ -140,18 +142,21 @@ export default {
height: 40px;
margin-right: 10px;
width: 40px;
@include show-for('above-limbo', inline);
}
}
}
}
.progress_number {
line-height: 27px;
@include respond-to(mobile) {
display: none;
}
line-height: 27px;
}
.progress.hugebar {
height: 27px;
}
Expand Down
3 changes: 2 additions & 1 deletion parlacards/cards/_components/BlueButtonList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,13 @@ export default {
@import 'parlassets/scss/colors';
.blue-button-list {
@include show-for(desktop, flex);
list-style: none;
margin-top: 14px;
margin-bottom: 0;
padding: 0;
@include show-for(desktop, flex);
&-item {
align-items: center;
border-left: 1px solid $font-placeholder;
Expand Down
1 change: 1 addition & 0 deletions parlacards/cards/_components/Govor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ export default {
height: 40px;
width: 40px;
border-radius: 50%;
object-fit: cover;
}
}
Expand Down
Loading

0 comments on commit 7c80a4b

Please sign in to comment.