In the document <
head
>:
<
script
async
custom-element
=
"amp-geo"
src
"https://cdn.ampproject.org/v0/amp-geo-0.1.js"
></
>
body
amp-geo
layout=”nodisplay”></
In the <
style
amp-custom> tag:
/* defaults */
.flag { background-image: "./starsandstripes.png"; }
/* override */
.amp-iso-country-ca .flag { background-image: "./mapleleaf.png"; }
div
height=”300” width=”500” layout=”responsive” class=”flag”>
</
layout=”nodisplay”>
type
"application/json"
{
“ISOCountryGroups”: {
"soccer": [ "au", "ca", "ie", "nz", "us", "za" ],
"football": [ "unknown" ]
}
.football:after { content: 'football';}
.amp-geo-group-soccer .football:after { content: 'soccer' }
The game is called <
span
class
'football'
>!