Skip to content
This repository was archived by the owner on Sep 21, 2022. It is now read-only.

Commit ca65979

Browse files
Add Russian Republics, Krais, and Oblast
1 parent 8b6ebfb commit ca65979

File tree

350 files changed

+261
-22
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

350 files changed

+261
-22
lines changed

README.md

+13
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,17 @@ _75 x 56 PNG_
163163
![Castile and León](https://raw.githubusercontent.com/stevenrskelton/flag-icon/master/png/75/es/castile_and_león.png "Castile and León")
164164
![La Rioja](https://raw.githubusercontent.com/stevenrskelton/flag-icon/master/png/75/es/la_rioja.png "La Rioja")
165165

166+
#### [Russia](http://files.stevenskelton.ca/flag-icon/examples/russia.html)
167+
![Adygea](https://raw.githubusercontent.com/stevenrskelton/flag-icon/master/png/75/ru/adygea.png "Adygea")
168+
![Buryatia](https://raw.githubusercontent.com/stevenrskelton/flag-icon/master/png/75/ru/buryatia.png "Buryatia")
169+
![Chuvashia](https://raw.githubusercontent.com/stevenrskelton/flag-icon/master/png/75/ru/chuvashia.png "Chuvashia")
170+
![Ingushetia](https://raw.githubusercontent.com/stevenrskelton/flag-icon/master/png/75/ru/ingushetia.png "Ingushetia")
171+
![Tuva](https://raw.githubusercontent.com/stevenrskelton/flag-icon/master/png/75/ru/tuva.png "Tuva")
172+
![Kamchatka](https://raw.githubusercontent.com/stevenrskelton/flag-icon/master/png/75/ru/kamchatka.png "Kamchatka")
173+
![Stavropol](https://raw.githubusercontent.com/stevenrskelton/flag-icon/master/png/75/ru/stavropol.png "Stavropol")
174+
![Belgorod](https://raw.githubusercontent.com/stevenrskelton/flag-icon/master/png/75/ru/belgorod.png "Belgorod")
175+
![Novgorod](https://raw.githubusercontent.com/stevenrskelton/flag-icon/master/png/75/ru/novgorod.png "Novgorod")
176+
166177
### [NASCAR, IndyCar](http://files.stevenskelton.ca/flag-icon/examples/racing.html)
167178
![Green](https://raw.githubusercontent.com/stevenrskelton/flag-icon/master/png/75/racing/green.png "Green")
168179
![Yellow](https://raw.githubusercontent.com/stevenrskelton/flag-icon/master/png/75/racing/yellow.png "Yellow")
@@ -265,6 +276,7 @@ Attribute | Type | Default | Description
265276
`ca` | *boolean* | `false` | ![Canada](https://raw.githubusercontent.com/stevenrskelton/flag-icon/master/png/16/country-4x3/ca.png "Canada") Canadian Province and Territory flags
266277
`de` | *boolean* | `false` | ![Germany](https://raw.githubusercontent.com/stevenrskelton/flag-icon/master/png/16/country-4x3/de.png "Germany") German State flags
267278
`es` | *boolean* | `false` | ![Spain](https://raw.githubusercontent.com/stevenrskelton/flag-icon/master/png/16/country-4x3/es.png "Spain") Spain Autonomous Community flags
279+
`ru` | *boolean* | `false` | ![Russia](https://raw.githubusercontent.com/stevenrskelton/flag-icon/master/png/16/country-4x3/ru.png "Russia") Russian Republics, Krais, and Oblast flags
268280
`us` | *boolean* | `false` | ![United States](https://raw.githubusercontent.com/stevenrskelton/flag-icon/master/png/16/country-4x3/us.png "United States") US State flags
269281
`maritime` | *boolean* | `false` | Maritime and ICS flags
270282
`racing` | *boolean* | `false` | NASCAR and IndyCar racing flags
@@ -283,6 +295,7 @@ Canada | 2:1
283295
Germany | 5:3
284296
Spain | 3:2
285297
US | 3:2
298+
Russia | 3:2
286299
NASCAR, IndyCar | 4:3
287300
Maritime | 1:1
288301

bower.json

+1
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
"canada",
3737
"germany",
3838
"spain",
39+
"russia",
3940
"united states"
4041
],
4142
"dependencies": {

examples/flag-show.html

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<link rel="import" href="../flag-icon.html">
22
<link rel="import" href="json-stringify.html">
3-
<polymer-element name="flag-show" attributes="name key endonym au br ca de es us data" noscript>
3+
<polymer-element name="flag-show" attributes="name key endonym au br ca de es ru us data" noscript>
44
<template>
55
<style>
66
.show {
@@ -24,29 +24,29 @@ <h2 style="margin-bottom:0px">{{name}}</h2>
2424
<table>
2525
<tr>
2626
<td>
27-
<flag-icon key="{{key}}" au="{{au}}" br="{{br}}" ca="{{ca}}" de="{{de}}" es="{{es}}" us="{{us}}" img></flag-icon><br>
27+
<flag-icon key="{{key}}" au="{{au}}" br="{{br}}" ca="{{ca}}" de="{{de}}" es="{{es}}" ru="{{ru}}" us="{{us}}" img></flag-icon><br>
2828
16px
2929
</td>
3030
<td rowspan="3">
31-
<flag-icon key="{{key}}" au="{{au}}" br="{{br}}" ca="{{ca}}" de="{{de}}" es="{{es}}" us="{{us}}" img width="225"></flag-icon><br>
31+
<flag-icon key="{{key}}" au="{{au}}" br="{{br}}" ca="{{ca}}" de="{{de}}" es="{{es}}" ru="{{ru}}" us="{{us}}" img width="225"></flag-icon><br>
3232
225px
3333
</td>
3434
</tr>
3535
<tr>
3636
<td>
37-
<flag-icon key="{{key}}" au="{{au}}" br="{{br}}" ca="{{ca}}" de="{{de}}" es="{{es}}" us="{{us}}" img width="36"></flag-icon><br>
37+
<flag-icon key="{{key}}" au="{{au}}" br="{{br}}" ca="{{ca}}" de="{{de}}" es="{{es}}" ru="{{ru}}" us="{{us}}" img width="36"></flag-icon><br>
3838
36px
3939
</td>
4040
</tr>
4141
<tr>
4242
<td>
43-
<flag-icon key="{{key}}" au="{{au}}" br="{{br}}" ca="{{ca}}" de="{{de}}" es="{{es}}" us="{{us}}" img width="75"></flag-icon><br>
43+
<flag-icon key="{{key}}" au="{{au}}" br="{{br}}" ca="{{ca}}" de="{{de}}" es="{{es}}" ru="{{ru}}" us="{{us}}" img width="75"></flag-icon><br>
4444
75px
4545
</td>
4646
</tr>
4747
<tr>
4848
<td colspan="2">
49-
<flag-icon key="{{key}}" au="{{au}}" br="{{br}}" ca="{{ca}}" de="{{de}}" es="{{es}}" us="{{us}}" width="375"></flag-icon><br>
49+
<flag-icon key="{{key}}" au="{{au}}" br="{{br}}" ca="{{ca}}" de="{{de}}" es="{{es}}" ru="{{ru}}" us="{{us}}" width="375"></flag-icon><br>
5050
375px SVG
5151
</td>
5252
</tr>

examples/index-links.html

+2-1
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,10 @@
2525
{ href:"countries.html", name:"World Countries" },
2626
{ href:"us-states.html", name: "USA" },
2727
{ href:"canada-australia.html", name: "Canada and Australia" },
28+
{ href:"brazil.html", name: "Brazil" },
2829
{ href:"germany.html", name: "Germany" },
2930
{ href:"spain.html", name: "Spain" },
30-
{ href:"brazil.html", name: "Brazil" },
31+
{ href:"russia.html", name: "Russia" },
3132
{ href:"maritime.html", name: "Maritime and ICS" },
3233
{ href:"racing.html", name: "NASCAR and IndyCar Racing" }
3334
]

examples/index.html

+16-13
Original file line numberDiff line numberDiff line change
@@ -30,36 +30,37 @@ <h1>&lt;flag-icon&gt; Demos</h1>
3030
</th>
3131
</tr>
3232
<tr>
33-
<td colspan="2">
33+
<td colspan="2" style="padding-bottom:1em">
3434
<input type="text" value="{{key}}" style="font-size:larger">
3535
</td>
3636
</tr>
3737
<tr>
38-
<td style="vertical-align:top;"><h4>Flag Set:</h4></td>
38+
<td style="vertical-align:top;"><h4 style="margin-top:0">Flag Set:</h4></td>
3939
<td>
4040
<input type="radio" name="flagtype" value="country" onchange="classbind(this,'Canada')" checked id="country"><label for="country">Country</label><br>
41-
<input type="radio" name="flagtype" value="us" onchange="classbind(this,'California')" id="us"><label for="us">US State</label><br>
41+
<input type="radio" name="flagtype" value="au" onchange="classbind(this,'New South Wales')" id="au"><label for="au">Australian State</label><br>
42+
<input type="radio" name="flagtype" value="br" onchange="classbind(this,'Rio de Janeiro')" id="ca"><label for="ca">Brazilian State</label><br>
4243
<input type="radio" name="flagtype" value="ca" onchange="classbind(this,'Nunavut')" id="ca"><label for="ca">Canadian Province</label><br>
4344
<input type="radio" name="flagtype" value="de" onchange="classbind(this,'Berlin')" id="de"><label for="de">German State</label><br>
44-
<input type="radio" name="flagtype" value="au" onchange="classbind(this,'New South Wales')" id="au"><label for="au">Australian State</label><br>
4545
<input type="radio" name="flagtype" value="es" onchange="classbind(this,'Andaluc\u00EDa')" id="es"><label for="es">Spanish Autonomy</label><br>
46-
<input type="radio" name="flagtype" value="br" onchange="classbind(this,'Rio de Janeiro')" id="ca"><label for="ca">Brazilian State</label><br>
46+
<input type="radio" name="flagtype" value="ru" onchange="classbind(this,'Leningrad')" id="ru"><label for="ru">Russian Region</label><br>
47+
<input type="radio" name="flagtype" value="us" onchange="classbind(this,'California')" id="us"><label for="us">US State</label><br>
4748
<input type="radio" name="flagtype" value="maritime" onchange="classbind(this,'alpha')" id="maritime"><label for="maritime">Maritime / ICS</label><br>
4849
<input type="radio" name="flagtype" value="racing" onchange="classbind(this,'yellow')" id="racing"><label for="racing">NASCAR and IndyCar</label><br>
4950
</td>
5051
</tr>
5152
<tr>
5253
<td><h4>Render:</h4></td>
5354
<td>
54-
<input type="radio" name="render" value="png" onchange="model.img = true" id="png"><label for="png">PNG</label>
5555
<input type="radio" name="render" value="svg" onchange="model.img = false" checked id="svg"><label for="svg">SVG</label>
56+
<input type="radio" name="render" value="png" onchange="model.img = true" id="png"><label for="png">PNG</label>
5657
</td>
5758
</tr>
5859
</table>
5960
</div>
6061
<div style="padding: 0 15px 0 25px;display:inline-block;">
6162
<flag-icon key="{{key}}" width="150" img="{{img}}" data="{{data}}" aspect="{{aspect}}"
62-
au="{{au}}" br="{{br}}" ca="{{ca}}" de="{{de}}" es="{{es}}" us="{{us}}" maritime="{{maritime}}" racing="{{racing}}"
63+
au="{{au}}" br="{{br}}" ca="{{ca}}" de="{{de}}" es="{{es}}" ru="{{ru}}" us="{{us}}" maritime="{{maritime}}" racing="{{racing}}"
6364
style="margin-left:30px;"></flag-icon>
6465
<br>
6566
<json-stringify data="{{data}}"></json-stringify>
@@ -109,21 +110,23 @@ <h3>Including Endonyms</h3>
109110

110111
<script>
111112
function classbind(t,text){
112-
model.us = false;
113+
model.au = false;
114+
model.br = false;
113115
model.ca = false;
114116
model.de = false;
115-
model.au = false;
116117
model.es = false;
117-
model.br = false;
118+
model.ru = false;
119+
model.us = false;
118120
model.maritime = false;
119121
model.racing = false;
120122
switch(t.value){
121-
case 'us': model.us = true; break;
123+
case 'au': model.au = true; break;
124+
case 'br': model.br = true; break;
122125
case 'ca': model.ca = true; break;
123126
case 'de': model.de = true; break;
124-
case 'au': model.au = true; break;
125127
case 'es': model.es = true; break;
126-
case 'br': model.br = true; break;
128+
case 'ru': model.ru = true; break;
129+
case 'us': model.us = true; break;
127130
case 'maritime': model.maritime = true; break;
128131
case 'racing': model.racing = true; break;
129132
}

examples/json-stringify.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<link rel="import" href="../polymer/polymer.html">
1+
<link rel="import" href="../../polymer/polymer.html">
22
<polymer-element name="json-stringify" attributes="data">
33
<template><pre style="text-align:left">{{json}}</pre></template>
44
<script>

examples/russia.html

+101
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
<!DOCTYPE html>
2+
<head>
3+
<title>Country Flag Icons</title>
4+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
5+
<meta charset="utf-8">
6+
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
7+
<script src="../../webcomponentsjs/webcomponents.min.js"></script>
8+
<link rel="import" href="../flag-icon.html">
9+
<link rel="import" href="index-links.html">
10+
<link rel="import" href="flag-show.html">
11+
</head>
12+
<body unresolved>
13+
<index-links page="russia.html"></index-links>
14+
15+
<h1>Russian Flags</h1>
16+
17+
<table style="width:700px;min-height:650px;display:block;">
18+
<tr style="height:40px">
19+
<th>Russian Republic</th>
20+
<th>Endonym</th>
21+
<th style="width:115px">ISO</th>
22+
<th>SVG</th>
23+
</tr>
24+
<template id="republicflags" repeat="[[flags]]">
25+
<tr onmouseover="changeShow('[[iso]]');">
26+
<td><flag-icon key="[[name]]" ru img></flag-icon>[[name]]</td>
27+
<td><flag-icon key="[[endonym]]" ru img></flag-icon> [[endonym]]</td>
28+
<td><flag-icon key="[[iso]]" ru img></flag-icon> [[iso]]</td>
29+
<td><flag-icon key="[[iso]]" ru></flag-icon></td>
30+
</tr>
31+
</template>
32+
<tr style="height:40px">
33+
<th>Russian Krais</th>
34+
<th>Endonym</th>
35+
<th>ISO</th>
36+
<th>SVG</th>
37+
</tr>
38+
<template id="kraisflags" repeat="[[flags]]">
39+
<tr onmouseover="changeShow('[[iso]]');">
40+
<td><flag-icon key="[[name]]" ru img></flag-icon>[[name]]</td>
41+
<td><flag-icon key="[[endonym]]" ru img></flag-icon> [[endonym]]</td>
42+
<td><flag-icon key="[[iso]]" ru img></flag-icon> [[iso]]</td>
43+
<td><flag-icon key="[[iso]]" ru></flag-icon></td>
44+
</tr>
45+
</template>
46+
<tr style="height:40px">
47+
<th>Russian Oblast</th>
48+
<th>Endonym</th>
49+
<th>ISO</th>
50+
<th>SVG</th>
51+
</tr>
52+
<template id="oblastflags" repeat="[[flags]]">
53+
<tr onmouseover="changeShow('[[iso]]');">
54+
<td><flag-icon key="[[name]]" ru img></flag-icon>[[name]]</td>
55+
<td><flag-icon key="[[endonym]]" ru img></flag-icon> [[endonym]]</td>
56+
<td><flag-icon key="[[iso]]" ru img></flag-icon> [[iso]]</td>
57+
<td><flag-icon key="[[iso]]" ru></flag-icon></td>
58+
</tr>
59+
</template>
60+
</table>
61+
62+
<flag-show id="show"></flag-show>
63+
64+
<script>
65+
var flagicon;
66+
function head(arr){
67+
if(typeof arr == "object"){
68+
if(arr.length>0) return arr[0];
69+
else return null;
70+
} else return arr;
71+
};
72+
function changeShow(key){
73+
document.getElementById('show').key = key;
74+
var data = flagicon.ru_regions.filter(function(row){ return row.iso === key; })[0];
75+
document.getElementById('show').ru = true;
76+
document.getElementById('show').name = head(data.name);
77+
document.getElementById('show').endonym = head(data.endonym);
78+
document.getElementById('show').data = data;
79+
}
80+
window.addEventListener('polymer-ready', function(){
81+
flagicon = new FlagIcon();
82+
document.getElementById('republicflags').model = {
83+
flags: flagicon.ru_regions.filter(function(t){
84+
return t.type === 'Republic';
85+
}).map(function(t){ return { name: head(t.name), iso: t.iso, endonym: head(t.endonym) }; })
86+
};
87+
document.getElementById('kraisflags').model = {
88+
flags: flagicon.ru_regions.filter(function(t){
89+
return t.type === 'Krais';
90+
}).map(function(t){ return { name: head(t.name), iso: t.iso, endonym: head(t.endonym) }; })
91+
};
92+
document.getElementById('oblastflags').model = {
93+
flags: flagicon.ru_regions.filter(function(t){
94+
return t.type === 'Oblast';
95+
}).map(function(t){ return { name: head(t.name), iso: t.iso, endonym: head(t.endonym) }; })
96+
};
97+
changeShow('RU-LEN');
98+
});
99+
</script>
100+
</body>
101+
</html>

0 commit comments

Comments
 (0)