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

Commit

Permalink
Add Russian Republics, Krais, and Oblast
Browse files Browse the repository at this point in the history
  • Loading branch information
stevenrskelton committed Feb 4, 2015
1 parent 8b6ebfb commit ca65979
Show file tree
Hide file tree
Showing 350 changed files with 261 additions and 22 deletions.
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,17 @@ _75 x 56 PNG_
![Castile and León](https://raw.githubusercontent.com/stevenrskelton/flag-icon/master/png/75/es/castile_and_león.png "Castile and León")
![La Rioja](https://raw.githubusercontent.com/stevenrskelton/flag-icon/master/png/75/es/la_rioja.png "La Rioja")

#### [Russia](http://files.stevenskelton.ca/flag-icon/examples/russia.html)
![Adygea](https://raw.githubusercontent.com/stevenrskelton/flag-icon/master/png/75/ru/adygea.png "Adygea")
![Buryatia](https://raw.githubusercontent.com/stevenrskelton/flag-icon/master/png/75/ru/buryatia.png "Buryatia")
![Chuvashia](https://raw.githubusercontent.com/stevenrskelton/flag-icon/master/png/75/ru/chuvashia.png "Chuvashia")
![Ingushetia](https://raw.githubusercontent.com/stevenrskelton/flag-icon/master/png/75/ru/ingushetia.png "Ingushetia")
![Tuva](https://raw.githubusercontent.com/stevenrskelton/flag-icon/master/png/75/ru/tuva.png "Tuva")
![Kamchatka](https://raw.githubusercontent.com/stevenrskelton/flag-icon/master/png/75/ru/kamchatka.png "Kamchatka")
![Stavropol](https://raw.githubusercontent.com/stevenrskelton/flag-icon/master/png/75/ru/stavropol.png "Stavropol")
![Belgorod](https://raw.githubusercontent.com/stevenrskelton/flag-icon/master/png/75/ru/belgorod.png "Belgorod")
![Novgorod](https://raw.githubusercontent.com/stevenrskelton/flag-icon/master/png/75/ru/novgorod.png "Novgorod")

### [NASCAR, IndyCar](http://files.stevenskelton.ca/flag-icon/examples/racing.html)
![Green](https://raw.githubusercontent.com/stevenrskelton/flag-icon/master/png/75/racing/green.png "Green")
![Yellow](https://raw.githubusercontent.com/stevenrskelton/flag-icon/master/png/75/racing/yellow.png "Yellow")
Expand Down Expand Up @@ -265,6 +276,7 @@ Attribute | Type | Default | Description
`ca` | *boolean* | `false` | ![Canada](https://raw.githubusercontent.com/stevenrskelton/flag-icon/master/png/16/country-4x3/ca.png "Canada") Canadian Province and Territory flags
`de` | *boolean* | `false` | ![Germany](https://raw.githubusercontent.com/stevenrskelton/flag-icon/master/png/16/country-4x3/de.png "Germany") German State flags
`es` | *boolean* | `false` | ![Spain](https://raw.githubusercontent.com/stevenrskelton/flag-icon/master/png/16/country-4x3/es.png "Spain") Spain Autonomous Community flags
`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
`us` | *boolean* | `false` | ![United States](https://raw.githubusercontent.com/stevenrskelton/flag-icon/master/png/16/country-4x3/us.png "United States") US State flags
`maritime` | *boolean* | `false` | Maritime and ICS flags
`racing` | *boolean* | `false` | NASCAR and IndyCar racing flags
Expand All @@ -283,6 +295,7 @@ Canada | 2:1
Germany | 5:3
Spain | 3:2
US | 3:2
Russia | 3:2
NASCAR, IndyCar | 4:3
Maritime | 1:1

Expand Down
1 change: 1 addition & 0 deletions bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
"canada",
"germany",
"spain",
"russia",
"united states"
],
"dependencies": {
Expand Down
12 changes: 6 additions & 6 deletions examples/flag-show.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<link rel="import" href="../flag-icon.html">
<link rel="import" href="json-stringify.html">
<polymer-element name="flag-show" attributes="name key endonym au br ca de es us data" noscript>
<polymer-element name="flag-show" attributes="name key endonym au br ca de es ru us data" noscript>
<template>
<style>
.show {
Expand All @@ -24,29 +24,29 @@ <h2 style="margin-bottom:0px">{{name}}</h2>
<table>
<tr>
<td>
<flag-icon key="{{key}}" au="{{au}}" br="{{br}}" ca="{{ca}}" de="{{de}}" es="{{es}}" us="{{us}}" img></flag-icon><br>
<flag-icon key="{{key}}" au="{{au}}" br="{{br}}" ca="{{ca}}" de="{{de}}" es="{{es}}" ru="{{ru}}" us="{{us}}" img></flag-icon><br>
16px
</td>
<td rowspan="3">
<flag-icon key="{{key}}" au="{{au}}" br="{{br}}" ca="{{ca}}" de="{{de}}" es="{{es}}" us="{{us}}" img width="225"></flag-icon><br>
<flag-icon key="{{key}}" au="{{au}}" br="{{br}}" ca="{{ca}}" de="{{de}}" es="{{es}}" ru="{{ru}}" us="{{us}}" img width="225"></flag-icon><br>
225px
</td>
</tr>
<tr>
<td>
<flag-icon key="{{key}}" au="{{au}}" br="{{br}}" ca="{{ca}}" de="{{de}}" es="{{es}}" us="{{us}}" img width="36"></flag-icon><br>
<flag-icon key="{{key}}" au="{{au}}" br="{{br}}" ca="{{ca}}" de="{{de}}" es="{{es}}" ru="{{ru}}" us="{{us}}" img width="36"></flag-icon><br>
36px
</td>
</tr>
<tr>
<td>
<flag-icon key="{{key}}" au="{{au}}" br="{{br}}" ca="{{ca}}" de="{{de}}" es="{{es}}" us="{{us}}" img width="75"></flag-icon><br>
<flag-icon key="{{key}}" au="{{au}}" br="{{br}}" ca="{{ca}}" de="{{de}}" es="{{es}}" ru="{{ru}}" us="{{us}}" img width="75"></flag-icon><br>
75px
</td>
</tr>
<tr>
<td colspan="2">
<flag-icon key="{{key}}" au="{{au}}" br="{{br}}" ca="{{ca}}" de="{{de}}" es="{{es}}" us="{{us}}" width="375"></flag-icon><br>
<flag-icon key="{{key}}" au="{{au}}" br="{{br}}" ca="{{ca}}" de="{{de}}" es="{{es}}" ru="{{ru}}" us="{{us}}" width="375"></flag-icon><br>
375px SVG
</td>
</tr>
Expand Down
3 changes: 2 additions & 1 deletion examples/index-links.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,10 @@
{ href:"countries.html", name:"World Countries" },
{ href:"us-states.html", name: "USA" },
{ href:"canada-australia.html", name: "Canada and Australia" },
{ href:"brazil.html", name: "Brazil" },
{ href:"germany.html", name: "Germany" },
{ href:"spain.html", name: "Spain" },
{ href:"brazil.html", name: "Brazil" },
{ href:"russia.html", name: "Russia" },
{ href:"maritime.html", name: "Maritime and ICS" },
{ href:"racing.html", name: "NASCAR and IndyCar Racing" }
]
Expand Down
29 changes: 16 additions & 13 deletions examples/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -30,36 +30,37 @@ <h1>&lt;flag-icon&gt; Demos</h1>
</th>
</tr>
<tr>
<td colspan="2">
<td colspan="2" style="padding-bottom:1em">
<input type="text" value="{{key}}" style="font-size:larger">
</td>
</tr>
<tr>
<td style="vertical-align:top;"><h4>Flag Set:</h4></td>
<td style="vertical-align:top;"><h4 style="margin-top:0">Flag Set:</h4></td>
<td>
<input type="radio" name="flagtype" value="country" onchange="classbind(this,'Canada')" checked id="country"><label for="country">Country</label><br>
<input type="radio" name="flagtype" value="us" onchange="classbind(this,'California')" id="us"><label for="us">US State</label><br>
<input type="radio" name="flagtype" value="au" onchange="classbind(this,'New South Wales')" id="au"><label for="au">Australian State</label><br>
<input type="radio" name="flagtype" value="br" onchange="classbind(this,'Rio de Janeiro')" id="ca"><label for="ca">Brazilian State</label><br>
<input type="radio" name="flagtype" value="ca" onchange="classbind(this,'Nunavut')" id="ca"><label for="ca">Canadian Province</label><br>
<input type="radio" name="flagtype" value="de" onchange="classbind(this,'Berlin')" id="de"><label for="de">German State</label><br>
<input type="radio" name="flagtype" value="au" onchange="classbind(this,'New South Wales')" id="au"><label for="au">Australian State</label><br>
<input type="radio" name="flagtype" value="es" onchange="classbind(this,'Andaluc\u00EDa')" id="es"><label for="es">Spanish Autonomy</label><br>
<input type="radio" name="flagtype" value="br" onchange="classbind(this,'Rio de Janeiro')" id="ca"><label for="ca">Brazilian State</label><br>
<input type="radio" name="flagtype" value="ru" onchange="classbind(this,'Leningrad')" id="ru"><label for="ru">Russian Region</label><br>
<input type="radio" name="flagtype" value="us" onchange="classbind(this,'California')" id="us"><label for="us">US State</label><br>
<input type="radio" name="flagtype" value="maritime" onchange="classbind(this,'alpha')" id="maritime"><label for="maritime">Maritime / ICS</label><br>
<input type="radio" name="flagtype" value="racing" onchange="classbind(this,'yellow')" id="racing"><label for="racing">NASCAR and IndyCar</label><br>
</td>
</tr>
<tr>
<td><h4>Render:</h4></td>
<td>
<input type="radio" name="render" value="png" onchange="model.img = true" id="png"><label for="png">PNG</label>
<input type="radio" name="render" value="svg" onchange="model.img = false" checked id="svg"><label for="svg">SVG</label>
<input type="radio" name="render" value="png" onchange="model.img = true" id="png"><label for="png">PNG</label>
</td>
</tr>
</table>
</div>
<div style="padding: 0 15px 0 25px;display:inline-block;">
<flag-icon key="{{key}}" width="150" img="{{img}}" data="{{data}}" aspect="{{aspect}}"
au="{{au}}" br="{{br}}" ca="{{ca}}" de="{{de}}" es="{{es}}" us="{{us}}" maritime="{{maritime}}" racing="{{racing}}"
au="{{au}}" br="{{br}}" ca="{{ca}}" de="{{de}}" es="{{es}}" ru="{{ru}}" us="{{us}}" maritime="{{maritime}}" racing="{{racing}}"
style="margin-left:30px;"></flag-icon>
<br>
<json-stringify data="{{data}}"></json-stringify>
Expand Down Expand Up @@ -109,21 +110,23 @@ <h3>Including Endonyms</h3>

<script>
function classbind(t,text){
model.us = false;
model.au = false;
model.br = false;
model.ca = false;
model.de = false;
model.au = false;
model.es = false;
model.br = false;
model.ru = false;
model.us = false;
model.maritime = false;
model.racing = false;
switch(t.value){
case 'us': model.us = true; break;
case 'au': model.au = true; break;
case 'br': model.br = true; break;
case 'ca': model.ca = true; break;
case 'de': model.de = true; break;
case 'au': model.au = true; break;
case 'es': model.es = true; break;
case 'br': model.br = true; break;
case 'ru': model.ru = true; break;
case 'us': model.us = true; break;
case 'maritime': model.maritime = true; break;
case 'racing': model.racing = true; break;
}
Expand Down
2 changes: 1 addition & 1 deletion examples/json-stringify.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<link rel="import" href="../polymer/polymer.html">
<link rel="import" href="../../polymer/polymer.html">
<polymer-element name="json-stringify" attributes="data">
<template><pre style="text-align:left">{{json}}</pre></template>
<script>
Expand Down
101 changes: 101 additions & 0 deletions examples/russia.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
<!DOCTYPE html>
<head>
<title>Country Flag Icons</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<script src="../../webcomponentsjs/webcomponents.min.js"></script>
<link rel="import" href="../flag-icon.html">
<link rel="import" href="index-links.html">
<link rel="import" href="flag-show.html">
</head>
<body unresolved>
<index-links page="russia.html"></index-links>

<h1>Russian Flags</h1>

<table style="width:700px;min-height:650px;display:block;">
<tr style="height:40px">
<th>Russian Republic</th>
<th>Endonym</th>
<th style="width:115px">ISO</th>
<th>SVG</th>
</tr>
<template id="republicflags" repeat="[[flags]]">
<tr onmouseover="changeShow('[[iso]]');">
<td><flag-icon key="[[name]]" ru img></flag-icon>[[name]]</td>
<td><flag-icon key="[[endonym]]" ru img></flag-icon> [[endonym]]</td>
<td><flag-icon key="[[iso]]" ru img></flag-icon> [[iso]]</td>
<td><flag-icon key="[[iso]]" ru></flag-icon></td>
</tr>
</template>
<tr style="height:40px">
<th>Russian Krais</th>
<th>Endonym</th>
<th>ISO</th>
<th>SVG</th>
</tr>
<template id="kraisflags" repeat="[[flags]]">
<tr onmouseover="changeShow('[[iso]]');">
<td><flag-icon key="[[name]]" ru img></flag-icon>[[name]]</td>
<td><flag-icon key="[[endonym]]" ru img></flag-icon> [[endonym]]</td>
<td><flag-icon key="[[iso]]" ru img></flag-icon> [[iso]]</td>
<td><flag-icon key="[[iso]]" ru></flag-icon></td>
</tr>
</template>
<tr style="height:40px">
<th>Russian Oblast</th>
<th>Endonym</th>
<th>ISO</th>
<th>SVG</th>
</tr>
<template id="oblastflags" repeat="[[flags]]">
<tr onmouseover="changeShow('[[iso]]');">
<td><flag-icon key="[[name]]" ru img></flag-icon>[[name]]</td>
<td><flag-icon key="[[endonym]]" ru img></flag-icon> [[endonym]]</td>
<td><flag-icon key="[[iso]]" ru img></flag-icon> [[iso]]</td>
<td><flag-icon key="[[iso]]" ru></flag-icon></td>
</tr>
</template>
</table>

<flag-show id="show"></flag-show>

<script>
var flagicon;
function head(arr){
if(typeof arr == "object"){
if(arr.length>0) return arr[0];
else return null;
} else return arr;
};
function changeShow(key){
document.getElementById('show').key = key;
var data = flagicon.ru_regions.filter(function(row){ return row.iso === key; })[0];
document.getElementById('show').ru = true;
document.getElementById('show').name = head(data.name);
document.getElementById('show').endonym = head(data.endonym);
document.getElementById('show').data = data;
}
window.addEventListener('polymer-ready', function(){
flagicon = new FlagIcon();
document.getElementById('republicflags').model = {
flags: flagicon.ru_regions.filter(function(t){
return t.type === 'Republic';
}).map(function(t){ return { name: head(t.name), iso: t.iso, endonym: head(t.endonym) }; })
};
document.getElementById('kraisflags').model = {
flags: flagicon.ru_regions.filter(function(t){
return t.type === 'Krais';
}).map(function(t){ return { name: head(t.name), iso: t.iso, endonym: head(t.endonym) }; })
};
document.getElementById('oblastflags').model = {
flags: flagicon.ru_regions.filter(function(t){
return t.type === 'Oblast';
}).map(function(t){ return { name: head(t.name), iso: t.iso, endonym: head(t.endonym) }; })
};
changeShow('RU-LEN');
});
</script>
</body>
</html>
Loading

0 comments on commit ca65979

Please sign in to comment.