Taxonomies migration progress

Signed-off-by: S. Kozyr <s.trump@gmail.com>
This commit is contained in:
Sergiy Kozyr 2023-10-06 14:03:21 +03:00
parent 6be7c6c5b8
commit aaee830519
Signed by: strump
GPG key ID: C622E5563CAC205D
14 changed files with 225 additions and 72 deletions

View file

@ -15,6 +15,10 @@ build_search_index = false
ignored_content = [".DS_Store"]
taxonomies = [
{name = "faq", feed = false},
]
[markdown]
external_links_target_blank = true

View file

@ -0,0 +1,15 @@
---
title: "F.A.Q. - Android"
description: "Frequently asked questions for Organic Maps application"
weight: 1000
taxonomies:
faq: ["Android"]
extra:
question: What's the difference between F-Droid and Google Play versions of tha app?
---
F-Droid version comes without [Google Play Services](https://en.wikipedia.org/wiki/Google_Play_Services). These Services improve location accuracy using nearest cell towers and wifi hotspots if internet connection is available. F-Droid version uses only device GPS sensor.
With OrganicMaps from Google Play you can disable Google Play Services for location search in app settings.

View file

@ -0,0 +1,18 @@
---
title: "F.A.Q. - Android"
description: "Frequently asked questions for Organic Maps application"
weight: 1000
taxonomies:
faq: ["Android"]
extra:
question: Why OrganicMaps is slow on my device, UI is laggy, and it crashes randomly?
---
Most likely you configured to store maps data on SD card. Usually switchable SD cards in Android phones are slow and unreliable.
Change OrganicMaps config to store maps data in internal storage. Open Settings → Save maps to → Internal private storage.
Or you can replace SD card with faster one to improve map performance.

View file

@ -0,0 +1,16 @@
---
title: "F.A.Q. - Android"
description: "Frequently asked questions for Organic Maps application"
weight: 1000
taxonomies:
faq: ["Android"]
extra:
question: How to enable logs?
---
If you want to report a bug then additional app logs could help locate a problem.
To get useful logs go to Settings → Enable logging. After that do action to reproduce the problem.
Finally tap on icon with OrganicMaps icon on main screen and press "Report a bug" button.
Don't forget to disable logging after reporting.

View file

@ -0,0 +1,16 @@
---
title: "F.A.Q. - Android"
description: "Frequently asked questions for Organic Maps application"
weight: 1000
taxonomies:
faq: ["Android"]
extra:
question: What Android version can run OrganicMaps?
---
You need at leat Android 5 to run the app. All devices with latest Android can run OrganicMaps. If you want to use AndroidAuto then minimal version is Android 6+.
OrganicMaps can work on devices with Google Services installed and without Google support.

View file

@ -0,0 +1,13 @@
---
title: "F.A.Q. - Android"
description: "Frequently asked questions for Organic Maps application"
weight: 1000
taxonomies:
faq: ["Android"]
extra:
question: What if app crashes on start?
---
You need to enable Android WebView component.

View file

@ -1,41 +0,0 @@
---
title: "F.A.Q. - Android"
description: "Frequently asked questions for Organic Maps application"
weight: 1000
extra:
menu_title: F.A.Q. - Android
---
### What Android version can run OrganicMaps?
You need at leat Android 5 to run the app. All devices with latest Android can run OrganicMaps. If you want to use AndroidAuto then minimal version is Android 6+.
OrganicMaps can work on devices with Google Services installed and without Google support.
### What's the difference between F-Droid and Google Play versions of tha app?
F-Droid version comes without [Google Play Services](https://en.wikipedia.org/wiki/Google_Play_Services). These Services improve location accuracy using nearest cell towers and wifi hotspots if internet connection is available. F-Droid version uses only device GPS sensor.
With OrganicMaps from Google Play you can disable Google Play Services for location search in app settings.
### Why OrganicMaps is slow on my device, UI is laggy, and it crashes randomly?
Most likely you configured to store maps data on SD card. Usually switchable SD cards in Android phones are slow and unreliable.
Change OrganicMaps config to store maps data in internal storage. Open Settings → Save maps to → Internal private storage.
Or you can replace SD card with faster one to improve map performance.
### How to enable logs?
If you want to report a bug then additional app logs could help locate a problem. To get useful logs go to Settings → Enable logging. After that do action to reproduce the problem. Finally tap on icon with OrganicMaps icon on main screen and press "Report a bug" button. Don't forget to disable logging after reporting.
### What if app crashes on start?
You need to enable Android WebView component.
{{ references() }}
[github]: https://github.com/organicmaps/organicmaps
[license]: http://www.apache.org/licenses/LICENSE-2.0
[copyright]: https://github.com/organicmaps/organicmaps/blob/master/data/copyright.html

View file

@ -1,25 +0,0 @@
---
title: "F.A.Q."
description: "Frequently asked questions for Organic Maps application"
weight: 1000
extra:
menu_title: F.A.Q.
---
[General questions](general) - who created Organic Maps, what's our goal, useful links
[Map questions](map) - how to use map, gestures, updating and editing
[Routing questions](routing) - how to build routes, detour settings, compas calibration
[Android questions](android) - android versions support, android specific behaviours
[iPhone questions](ios) - iOS specific questions
[Bookmarks and tracks questions](bookmarks) - how to use bookmarks, import tracks and backup your marks
[Voice instructions](tts) - how to enable voice instructions, TTS settings on device
[github]: https://github.com/organicmaps/organicmaps
[license]: http://www.apache.org/licenses/LICENSE-2.0
[copyright]: https://github.com/organicmaps/organicmaps/blob/master/data/copyright.html

View file

@ -13,7 +13,9 @@
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, viewport-fit=cover">
{% block meta_description %}
<meta name="description" content="{{ resource.description }}">
{% endblock %}
{% block rss %}
<link rel="alternate" type="application/rss+xml" title="RSS" href="{{ get_url(path="rss.xml", trailing_slash=false) }}">

58
templates/faq/list.html Normal file
View file

@ -0,0 +1,58 @@
{%- set resource = taxonomy %}
<!DOCTYPE html>
{%- set rtl_langs = ["ar", "arc", "dv", "fa", "ha", "he", "khw", "ks", "ku", "ps", "ur", "yi"] -%}
<html lang="{{ lang }}" {%- if lang in rtl_langs -%} dir="rtl" {%- endif -%}>
<head>
<meta charset="utf-8">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, viewport-fit=cover">
<meta name="description" content="">
<link rel="canonical" href="{{ config.base_url | safe }}{{ taxonomy.name }}">
<meta property="og:url" content="{{ current_url | safe }}">
<meta property="og:type" content="website">
<meta property="og:title" content="((Title))">
<meta property="og:description" content="{{ taxonomy.name }}">
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:title" content="((Title))">
<meta name="twitter:description" content="{{ taxonomy.name }}">
<meta name="apple-itunes-app" content="app-id=1567437057">
<meta name="wikidata" content="Q107078602">
<meta name="generator" content="Zola">
<link href="{{ get_url(path="main.css", cachebust=true) }}" rel="stylesheet" type="text/css">
<title>{{ taxonomy.name }}</title>
</head>
<body>
<header>
{% include 'top_menu.html' %}
(( __tera_context ))
</header>
<main>
<h1>F.A.Q.</h1>
{%- for term in terms -%}
<p><a href="{{term.permalink}}">{{term.name}} questions</a></p>
{%- endfor -%}
</main>
<footer>
((bottom_menu.html))
<p>
<span>© 2023 <a href="mailto:legal@organicmaps.app">Organic Maps OÜ</a>, reg. code 16225385</span>
<span>Harju maakond, Tallinn, Kesklinna linnaosa, Rävala pst 8-810, 10143, Estonia</span>
</p>
</footer>
</body>
</html>

60
templates/faq/single.html Normal file
View file

@ -0,0 +1,60 @@
{%- set resource = term %}
<!DOCTYPE html>
{%- set rtl_langs = ["ar", "arc", "dv", "fa", "ha", "he", "khw", "ks", "ku", "ps", "ur", "yi"] -%}
<html lang="{{ lang }}" {%- if lang in rtl_langs -%} dir="rtl" {%- endif -%}>
<head>
<meta charset="utf-8">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, viewport-fit=cover">
<meta name="description" content="">
<link rel="canonical" href="{{ config.base_url | safe }}/{{ term.path }}">
<meta property="og:url" content="{{ current_url | safe }}">
<meta property="og:type" content="website">
<meta property="og:title" content="((Title))">
<meta property="og:description" content="{{ term.name }}">
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:title" content="((Title))">
<meta name="twitter:description" content="{{ taxonomy.name }}">
<meta name="apple-itunes-app" content="app-id=1567437057">
<meta name="wikidata" content="Q107078602">
<meta name="generator" content="Zola">
<link href="{{ get_url(path="main.css", cachebust=true) }}" rel="stylesheet" type="text/css">
<title>{{ term.name }}</title>
</head>
<body>
<header>
{% include 'top_menu.html' %}
(( __tera_context ))
</header>
<main>
{% block content %}
{%- for page in term.pages -%}
<h3>{{ page.extra | get(key="question", default="Question") }}</h3>
{{ page.content | safe }}
{%- endfor -%}
{% endblock %}
</main>
<footer>
((bottom_menu.html))
<p>
<span>© 2023 <a href="mailto:legal@organicmaps.app">Organic Maps OÜ</a>, reg. code 16225385</span>
<span>Harju maakond, Tallinn, Kesklinna linnaosa, Rävala pst 8-810, 10143, Estonia</span>
</p>
</footer>
</body>
</html>

View file

@ -6,7 +6,8 @@
}
</script>
<!-- Hidden checkbox is used for pure CSS toggle menu. -->
{% if resource.translations | length > 1 %}
{% set translations = resource | get(key="translations", default=[]) %}
{% if translations | length > 1 %}
<input type="checkbox" id="lang-menu-trigger" class="lang-menu-trigger" />
{% endif %}
<label class="no-print" for="lang-menu-trigger">
@ -14,7 +15,7 @@
</label>
<ul class="lang-menu no-print" role="navigation">
{% for translation in resource.translations | sort(attribute="lang") %}
{% for translation in translations | sort(attribute="lang") %}
{% if lang != translation.lang %}
<li class="lang-menu-item" role="menuitem">
<a class="lang-menu-link" onclick="return onLanguageClick('{{ translation.lang }}');" href="{{ translation.permalink | replace(from=config.base_url, to="") | safe }}">

11
templates/single.html Normal file
View file

@ -0,0 +1,11 @@
{% extends "index.html" %}
{% block title %}<title>Duniter | {{term.name}}</title>{% endblock title %}
{% block content %}
<main id="accueil" class="w3-container w3-content page w3-padding-64">
{%- for page in term.pages -%}
<a href="{{page.permalink}}"> {{page.title}} </a><br>
{%- endfor -%}
</main>
{% endblock content %}

View file

@ -9,7 +9,6 @@
get_section(path="news/_index.md"),
get_page(path="donate/index.md"),
get_page(path="support-us/index.md"),
get_page(path="faq/index.md")
] %}
{% set translated = page.translations | filter(attribute='lang', value=lang) | first %}
{% if translated %}
@ -19,13 +18,19 @@
{% set page = get_page(path=translated.path) %}
{% endif %}
{% endif %}
<span class="top_menu_{{ page.path | split(pat="/") | reverse | nth(n=1) }} top_menu_item{% if page.path != resource.path %}">
<a href="{{ page.permalink | replace(from=config.base_url, to="") | safe }}">{% else %}_active">{% endif %}
<span class="top_menu_{{ page.path | split(pat="/") | reverse | nth(n=1) }} top_menu_item{% if resource.path is defined and page.path == resource.path %}_active">{% else %}">
<a href="{{ page.permalink | replace(from=config.base_url, to="") | safe }}">{% endif %}
<span>{{ page.extra.menu_title }}</span>
{%- if page.path != resource.path %}</a>{% endif %}
{%- if resource.path is undefined or page.path != resource.path %}</a>{% endif %}
</span>
{% endfor %}
<span class="top_menu_faq top_menu_item">
<a href="{{ get_taxonomy(kind="faq") | get(key="permalink") }}">
<span>F.A.Q.</span>
</a>
</span>
<span class="top_menu_item">
<a href="https://github.com/organicmaps/organicmaps" target="_blank" class="top_menu_github">
<span>GitHub</span>