Move badges from Markdown to HTML

Markdown should contain content, not HTML and JS code.

Signed-off-by: Roman Tsisyk <roman@tsisyk.com>
This commit is contained in:
Roman Tsisyk 2022-09-08 08:42:27 +03:00 committed by Alexander Borsuk
parent 2151c6e3f1
commit e5c9c53e20
10 changed files with 50 additions and 106 deletions

View file

@ -28,6 +28,10 @@ home = "Home"
news = "News"
language = "English"
support-us = "Support Us"
install-appstore = "Install Organic Maps from the AppStore"
install-googleplay = "Install Organic Maps from Google Play"
install-fdroid="Install Organic Maps from F-Droid"
install-appgallery = "Install Organic Maps from Huawei AppGallery"
[languages.tr]
[languages.tr.translations]
@ -38,6 +42,10 @@ home = "Ana Sayfa"
news = "Haberler"
language = "Türkçe"
support-us = "Bizi destekleyin"
install-appstore = "Organic Maps'i AppStore'dan İndir"
install-googleplay = "Organic Maps'i Google Play'den İndir"
install-fdroid="Organic Maps'i F-Droid'den İndir"
install-appgallery = "Organic Maps'i Huawei AppGallery'den İndir"
[languages.it]
[languages.it.translations]
@ -48,6 +56,10 @@ home = "Pagina Iniziale"
news = "Notizie"
language = "Italiano"
support-us = "Contribuisci"
install-appstore = "Installa Organic Maps dall'AppStore"
install-googleplay = "Installa Organic Maps da Google Play"
install-fdroid="Installa Organic Maps da F-Droid"
install-appgallery = "Installa Organic Maps da Huawei AppGallery"
[languages.ru]
@ -59,3 +71,7 @@ home = "Главная"
news = "Новости"
language = "Русский"
support-us = "Помочь проекту"
install-appstore = "Установить Organic Maps из Apple AppStore"
install-googleplay = "Установить Organic Maps из Google Play"
install-fdroid="Установить Organic Maps из F-Droid"
install-appgallery = "Установить Organic Maps из Huawei AppGallery"

View file

@ -10,15 +10,7 @@ extra:
**Organic Maps** è un'applicazione gratuita di mappe offline per Android e iOS per viaggiatori, turisti, escursionisti e ciclisti, basata su dati crowd-sourced di **[OpenStreetMap](https://www.openstreetmap.org)**.
Si tratta di un [fork](https://it.wikipedia.org/wiki/Fork_(sviluppo_software)) open source dell'applicazione **Maps.me** (precedentemente nota come [**MapsWithMe**](https://en.wikipedia.org/wiki/Maps.me)), incentrato sulla privacy e gestito dalle stesse persone che hanno creato **MapsWithMe** nel 2011.
<p id='install'>
{{ badge(url='https://apps.apple.com/app/organic-maps/id1567437057', img='apple-appstore.svg', title="Installa Organic Maps dall'AppStore") }}
{{ badge(url='https://play.google.com/store/apps/details?id=app.organicmaps', img='googleplay.svg', title="Installa Organic Maps da Google Play") }}
{{ badge(url='https://f-droid.org/en/packages/app.organicmaps/', img='f-droid.svg', title="Installa Organic Maps da F-Droid") }}
{{ badge(url='https://appgallery.huawei.com/#/app/C104325611', img='huawei-appgallery.png', title="Installa Organic Maps da Huawei AppGallery") }}
{{ badges() }}
{{ screenshot(src='/images/screenshots/hiking.jpg', alt='Hiking') }}
{{ screenshot(src='/images/screenshots/prague.jpg', alt='Prague') }}
@ -115,20 +107,3 @@ Organic Maps è un [software open-source](https://github.com/organicmaps/organic
- Diğer kullanıcılarla tartışmak için [Telegram Grubumuza](https://t.me/OrganicMapsTR) katılın.
- Visita la nostra [pagina GitHub](https://github.com/organicmaps/organicmaps).
- Segui i nostri aggiornamenti su [Facebook](https://facebook.com/OrganicMaps), [Twitter](https://twitter.com/OrganicMapsApp), [Instagram](https://instagram.com/organicmaps.app/).
<button id='add' class='installButton'>
Installa da Google Play
</button>
<script>
// https://developers.google.com/web/fundamentals/app-install-banners/native
window.addEventListener('beforeinstallprompt', (e) => {
// Prevent Chrome 67 and earlier from automatically showing the prompt
e.preventDefault();
const add = document.getElementById('add');
add.style.display = 'block';
add.onclick = () => {
e.prompt();
}
});
</script>

View file

@ -11,15 +11,7 @@ extra:
**[OpenStreetMap](https://www.openstreetmap.org)** data.
It is a privacy-focused, open-source [fork](https://en.wikipedia.org/wiki/Fork_(software_development)) of **Maps.me** app (previously known as [**MapsWithMe**](https://en.wikipedia.org/wiki/Maps.me)), maintained by the same people who created **MapsWithMe** in 2011.
<p id='install'>
{{ badge(url='https://apps.apple.com/app/organic-maps/id1567437057', img='apple-appstore.svg', title='Install Organic Maps from the AppStore') }}
{{ badge(url='https://play.google.com/store/apps/details?id=app.organicmaps', img='googleplay.svg', title='Install Organic Maps from Google Play') }}
{{ badge(url='https://f-droid.org/en/packages/app.organicmaps/', img='f-droid.svg', title='Install Organic Maps from F-Droid') }}
{{ badge(url='https://appgallery.huawei.com/#/app/C104325611', img='huawei-appgallery.png', title='Install Organic Maps from Huawei AppGallery') }}
{{ badges() }}
{{ screenshot(src='/images/screenshots/hiking.jpg', alt='Hiking') }}
{{ screenshot(src='/images/screenshots/prague.jpg', alt='Prague') }}
@ -120,20 +112,3 @@ licensed under the Apache License 2.0.
- Visit our [GitHub page](https://github.com/organicmaps/organicmaps).
- Follow our updates in [Facebook](https://facebook.com/OrganicMaps), [Twitter](https://twitter.com/OrganicMapsApp),
[Instagram](https://instagram.com/organicmaps.app/).
<button id='add' class='installButton'>
Install from Google Play
</button>
<script>
// https://developers.google.com/web/fundamentals/app-install-banners/native
window.addEventListener('beforeinstallprompt', (e) => {
// Prevent Chrome 67 and earlier from automatically showing the prompt
e.preventDefault();
const add = document.getElementById('add');
add.style.display = 'block';
add.onclick = () => {
e.prompt();
}
});
</script>

View file

@ -12,13 +12,7 @@ extra:
<p id='install'>
{{ badge(url='https://apps.apple.com/app/organic-maps/id1567437057', img='apple-appstore.svg', title='Установить из AppStore') }}
{{ badge(url='https://play.google.com/store/apps/details?id=app.organicmaps', img='googleplay.svg', title='Установить из Google Play') }}
{{ badge(url='https://f-droid.org/en/packages/app.organicmaps/', img='f-droid.svg', title='Установить F-Droid') }}
{{ badge(url='https://appgallery.huawei.com/#/app/C104325611', img='huawei-appgallery.png', title='Установить из Huawei AppGallery') }}
{{ badges() }}
{{ screenshot(src='/images/screenshots/hiking.jpg', alt='Пеший поход') }}
{{ screenshot(src='/images/screenshots/prague.jpg', alt='Прага') }}
@ -68,20 +62,3 @@ Organic Maps развивается сообществом энтузиасто
- Поучаствуйте в [разработке](https://github.com/organicmaps/organicmaps/blob/master/docs/CONTRIBUTING.md) приложения под Android и iOS;
- Подпишитесь на нас в [Facebook](https://facebook.com/OrganicMaps), [Twitter](https://twitter.com/OrganicMapsApp) и [Instagram](https://instagram.com/organicmaps.app/).
- Расскажите своим друзьям и знакомым.
<button id='add' class='installButton'>
Установить из Google Play
</button>
<script>
// https://developers.google.com/web/fundamentals/app-install-banners/native
window.addEventListener('beforeinstallprompt', (e) => {
// Prevent Chrome 67 and earlier from automatically showing the prompt
e.preventDefault();
const add = document.getElementById('add');
add.style.display = 'block';
add.onclick = () => {
e.prompt();
}
});
</script>

View file

@ -11,15 +11,7 @@ extra:
Topluluk kaynaklı [**OpenStreetMap**](https://www.openstreetmap.org) verilerine dayanmaktadır.
Daha önce [**MapsWithMe**](https://en.wikipedia.org/wiki/Maps.me) olarak bilinen **Maps.me** uygulamasının gizlilik odaklı, açık kaynaklı bir [çatalı](https://tr.wikipedia.org/wiki/%C3%87atal_(yaz%C4%B1l%C4%B1m_geli%C5%9Ftirme)) olan Organic Maps, 2011 yılında **MapsWithMe** uygulamasını geliştiren kişiler tarafından sürdürülmektedir.
<p id='install'>
{{ badge(url='https://apps.apple.com/app/organic-maps/id1567437057', img='apple-appstore.svg', title="Organic Maps'i AppStore'dan İndir") }}
{{ badge(url='https://play.google.com/store/apps/details?id=app.organicmaps', img='googleplay.svg', title="Organic Maps'i Google Play'den İndir") }}
{{ badge(url='https://f-droid.org/en/packages/app.organicmaps/', img='f-droid.svg', title="Organic Maps'i F-Droid'den İndir") }}
{{ badge(url='https://appgallery.huawei.com/#/app/C104325611', img='huawei-appgallery.png', title="Organic Maps'i Huawei AppGallery'den İndir") }}
{{ badges() }}
{{ screenshot(src='/images/screenshots/hiking.jpg', alt='Yürüyüş') }}
{{ screenshot(src='/images/screenshots/prague.jpg', alt='Prag') }}
@ -116,20 +108,3 @@ Organic Maps, Apache License 2.0 altında lisanslanmış bir [açık kaynaklı y
- [E-posta](mailto:hello@organicmaps.app) ile bizimle iletişime geçin
- Güncellemelerimizi [Facebook](https://facebook.com/OrganicMaps), [Twitter](https://twitter.com/OrganicMapsApp) ve
- [Instagram](https://instagram.com/organicmapstr/) üzerinden takip edin.
<button id='add' class='installButton'>
Google Play'den İndir
</button>
<script>
// https://developers.google.com/web/fundamentals/app-install-banners/native
window.addEventListener('beforeinstallprompt', (e) => {
// Prevent Chrome 67 and earlier from automatically showing the prompt
e.preventDefault();
const add = document.getElementById('add');
add.style.display = 'block';
add.onclick = () => {
e.prompt();
}
});
</script>

View file

@ -119,7 +119,7 @@ footer {
}
}
.installButton {
.installPWAButton {
display: none;
position: fixed;
top: 0;

View file

@ -0,0 +1,13 @@
<!-- BEGIN OF GOOGLE NATIVE APP PROMPT -->
<!-- https://developers.google.com/web/fundamentals/app-install-banners/native -->
<button id='addPWA' class='installPWAButton'>{{ trans(key='install-googleplay', lang=lang) }}</button>
<script>
window.addEventListener('beforeinstallprompt', (e) => {
// Prevent Chrome 67 and earlier from automatically showing the prompt.
e.preventDefault();
const add = document.getElementById('addPWA');
add.style.display = 'block';
add.onclick = () => { e.prompt(); }
});
</script>
<!-- END OF GOOGLE NATIVE APP PROMPT -->

View file

@ -6,4 +6,6 @@
{{ resource.content | safe }}
{% include 'google_native_app_prompt.html' %}
{% endblock content %}

View file

@ -1,3 +0,0 @@
<span class="badge">
<a href="{{ url }}" title="{{ title }}"><img src="/images/badges/{{ img }}"></a>
</span>

View file

@ -0,0 +1,14 @@
<p id='install'>
<span class="badge">
<a href="https://apps.apple.com/app/organic-maps/id1567437057" title="{{ trans(key='install-appstore', lang=lang) }}"><img src="/images/badges/googleplay.svg"></a>
</span>
<span class="badge">
<a href="https://play.google.com/store/apps/details?id=app.organicmaps" title="{{ trans(key='install-googleplay', lang=lang) }}"><img src="/images/badges/apple-appstore.svg"></a>
</span>
<span class="badge">
<a href="https://f-droid.org/en/packages/app.organicmaps/" title="{{ trans(key='install-fdroid', lang=lang) }}"><img src="/images/badges/f-droid.svg"></a>
</span>
<span class="badge">
<a href="https://appgallery.huawei.com/#/app/C104325611" title="{{ trans(key='install-appgallery', lang=lang) }}"><img src="/images/badges/huawei-appgallery.png"></a>
</span>
</p>