Skip to content

Commit

Permalink
Merge pull request #274 from billalxcode/billalxcode/flags-country-pl…
Browse files Browse the repository at this point in the history
…ugin

Added additional flag components
  • Loading branch information
alfianchii committed Nov 1, 2023
2 parents 141ea88 + 7cd27ae commit 845f77f
Show file tree
Hide file tree
Showing 260 changed files with 3,340 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/assets/scss/_mazer.scss
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
2.18 Icons
2.19 Comment
2.20 Placeholder
2.21 Flag
4. Pages
4.0 Layout
4.1 Auth
Expand Down Expand Up @@ -105,6 +106,9 @@
// - 2.20 Placeholder
@import "./components/placeholders";

// - 2.21 Flag
@import "./components/flag";

// - 4.0 Layout
@import "./layouts/main.scss";

Expand Down
2 changes: 2 additions & 0 deletions src/assets/scss/_variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ $alert-colors: (
),
) !default;

$assets-path: '/assets' !default;

// $btn-colors uses $theme-colors background color by default
$btn-colors: (
primary: (
Expand Down
61 changes: 61 additions & 0 deletions src/assets/scss/components/_flag.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
// Original assets: https://github.com/hampusborgos/country-flags

$countries: (
'ad', 'ae', 'af', 'ag', 'ai', 'al', 'am', 'ao', 'aq', 'ar', 'as', 'at', 'au', 'aw', 'ax', 'az', 'ba', 'bb', 'bd', 'be', 'bf', 'bg', 'bh', 'bi',
'bj', 'bl', 'bm', 'bn', 'bo', 'bq', 'br', 'bs', 'bt', 'bv', 'bw', 'by', 'bz', 'ca', 'cc', 'cd', 'cf', 'cg', 'ch', 'ci', 'ck', 'cl', 'cm', 'cn',
'co', 'cr', 'cu', 'cv', 'cw', 'cx', 'cy', 'cz', 'de', 'dj', 'dk', 'dm', 'do', 'dz', 'ec', 'ee', 'eg', 'eh', 'er', 'es', 'et', 'eu', 'fi', 'fj',
'fk', 'fm', 'fo', 'fr', 'ga', 'gb-eng', 'gb-nir', 'gb-sct', 'gb-wls', 'gb', 'gd', 'ge', 'gf', 'gg', 'gh', 'gi', 'gl', 'gm', 'gn', 'gp', 'gq',
'gr', 'gs', 'gt', 'gu', 'gw', 'gy', 'hk', 'hm', 'hn', 'hr', 'ht', 'hu', 'id', 'ie', 'il', 'im', 'in', 'io', 'iq', 'ir', 'is', 'it', 'je', 'jm',
'jo', 'jp', 'ke', 'kg', 'kh', 'ki', 'km', 'kn', 'kp', 'kr', 'kw', 'ky', 'kz', 'la', 'lb', 'lc', 'li', 'lk', 'lr', 'ls', 'lt', 'lu', 'lv', 'ly',
'ma', 'mc', 'md', 'me', 'mf', 'mg', 'mh', 'mk', 'ml', 'mm', 'mn', 'mo', 'mp', 'mq', 'mr', 'ms', 'mt', 'mu', 'mv', 'mw', 'mx', 'my', 'mz', 'na',
'nc', 'ne', 'nf', 'ng', 'ni', 'nl', 'no', 'np', 'nr', 'nu', 'nz', 'om', 'pa', 'pe', 'pf', 'pg', 'ph', 'pk', 'pl', 'pm', 'pn', 'pr', 'ps', 'pt',
'pw', 'py', 'qa', 're', 'ro', 'rs', 'ru', 'rw', 'sa', 'sb', 'sc', 'sd', 'se', 'sg', 'sh', 'si', 'sj', 'sk', 'sl', 'sm', 'sn', 'so', 'sr', 'ss',
'st', 'sv', 'sx', 'sy', 'sz', 'tc', 'td', 'tf', 'tg', 'th', 'tj', 'tk', 'tl', 'tm', 'tn', 'to', 'tr', 'tt', 'tv', 'tw', 'tz', 'ua', 'ug', 'um',
'us', 'uy', 'uz', 'va', 'vc', 've', 'vg', 'vi', 'vn', 'vu', 'wf', 'ws', 'xk', 'ye', 'yt', 'za', 'zm', 'zw'
);

$sizes: (
'sm': (
size: 24px
),
'md': (
size: 32px
),
'md2': (
size: 40px
),
'lg': (
size: 48px
),
'xl': (
size: 60px
),
'2xl': (
size: 120px
),
'3xl': (
size: 180px
)
);

.flag {
position: relative;
display: inline-block;
height: 32px;
aspect-ratio: 1.33333;
background-repeat: no-repeat;
background-size: cover;
background-position: center;
}

@each $country in $countries {
.flag-country-#{$country} {
background-image: url("/assets/static/images/flags/#{$country}.svg");
}
}

@each $flag-size, $size in $sizes {
.flag-#{$flag-size} {
height: map-get($map: $size, $key: size);
}
}
154 changes: 154 additions & 0 deletions src/assets/static/images/flags/ad.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions src/assets/static/images/flags/ae.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions src/assets/static/images/flags/af.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions src/assets/static/images/flags/ag.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions src/assets/static/images/flags/ai.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions src/assets/static/images/flags/al.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions src/assets/static/images/flags/am.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions src/assets/static/images/flags/ao.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 845f77f

Please sign in to comment.