Skip to content

Commit

Permalink
Mitmekeelne sait ingliskeelse avalehega
Browse files Browse the repository at this point in the history
  • Loading branch information
boamaod committed Feb 22, 2024
1 parent 0c111df commit b7d6469
Show file tree
Hide file tree
Showing 19 changed files with 245 additions and 12 deletions.
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ gem "just-the-docs", "0.7.0" # pinned to the current release
# gem "just-the-docs" # always download the latest release

gem "jekyll-sitemap"
gem "jekyll-polyglot"
3 changes: 3 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ GEM
webrick (~> 1.7)
jekyll-include-cache (0.2.1)
jekyll (>= 3.7, < 5.0)
jekyll-polyglot (1.7.0)
jekyll (>= 4.0, >= 3.0)
jekyll-sass-converter (3.0.0)
sass-embedded (~> 1.54)
jekyll-seo-tag (2.8.0)
Expand Down Expand Up @@ -80,6 +82,7 @@ PLATFORMS

DEPENDENCIES
jekyll (~> 4.3.3)
jekyll-polyglot
jekyll-sitemap
just-the-docs (= 0.7.0)

Expand Down
18 changes: 12 additions & 6 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,21 @@ url: https://ausadvalimised.ee
logo: "/logo.svg"
favicon_ico: "/logo.svg"

lang: et
locale: et_EE
#lang: et
#locale: et_EE

aux_links:
Lähtekood: https://github.com/ausadvalimised/ausadvalimised.ee
languages: ["et", "en"]
default_lang: "et"
exclude_from_localization: ["javascript", "media", "css", "public"]
lang_from_path: true

#aux_links:
# Lähtekood: https://github.com/ausadvalimised/ausadvalimised.ee

plugins:
- jekyll-seo-tag
- jekyll-sitemap
- jekyll-polyglot

collections:
posts:
Expand All @@ -28,12 +34,12 @@ collections:
just_the_docs:
collections:
posts:
name: Uudised
name: site_news
nav_exclude: false
nav_fold: false
search_exclude: false
docs:
name: Dokumendid
name: site_docs
nav_exclude: false
nav_fold: false
search_exclude: false
Expand Down
7 changes: 7 additions & 0 deletions _data/en/i18n.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
lang_label: in English
site_footer: "Content in <a href=\"https://creativecommons.org/publicdomain/zero/1.0/\">public domain</a>, header fragment <a href=\"https://creativecommons.org/licenses/by-sa/3.0/deed.et\">CC BY-SA</a> <a href=\"https://et.wikipedia.org/wiki/Elektrooniline_h%C3%A4%C3%A4letamine_Eestis#/media/Fail:VVK-kettad.jpg\">Irve</a>, powered by <a href=\"https://github.com/just-the-docs/just-the-docs\">Just the Docs</a>."
search_label: Search the site
skip_to_main: Skip to main content
site_news: News
site_docs: Documents
site_title: Ausad Valimised
7 changes: 7 additions & 0 deletions _data/et/i18n.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
lang_label: "eesti keeles"
site_footer: "Materjalid <a href=\"https://creativecommons.org/publicdomain/zero/1.0/\">avalikuks kasutuseks</a>, päisefoto fragment <a href=\"https://creativecommons.org/licenses/by-sa/3.0/deed.et\">CC BY-SA</a> <a href=\"https://et.wikipedia.org/wiki/Elektrooniline_h%C3%A4%C3%A4letamine_Eestis#/media/Fail:VVK-kettad.jpg\">Irve</a>, mootoriks <a href=\"https://github.com/just-the-docs/just-the-docs\">Just the Docs</a>."
search_label: Otsi saidi materjalidest
skip_to_main: Hüppa põhisisu juurde
site_news: Uudised
site_docs: Dokumendid
site_title: Ausad Valimised
4 changes: 4 additions & 0 deletions _includes/head_custom.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{% for lang in site.languages %}
{% capture lang_href %}{{site.baseurl}}/{% if lang != site.default_lang %}{{ lang }}/{% endif %}{% if page.permalink_lang[lang] != '/' %}{{page.permalink_lang[lang]}}{% endif %}{% endcapture %}
<link rel="alternate" hreflang="{{ lang }}" {% static_href %}href="{{ lang_href }}"{% endstatic_href %} />
{% endfor %}
15 changes: 15 additions & 0 deletions _includes/header_custom.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<nav aria-label="Language" class="lang-nav">
<ul class="lang-nav-list">
{% for language in site.languages %}
{% if language != site.active_lang %}
<li class="lang-nav-list-item">
<a
class="site-button"
href="{% if language == site.default_lang %} {{site.baseurl}}{{page.url}} {% else %} {{site.baseurl}}/{{ language }}{{page.url}} {% endif %}"
>{{ site.data[language].i18n.lang_label }}</a
>
</li>
{% endif %}
{% endfor %}
</ul>
</nav>
2 changes: 1 addition & 1 deletion _includes/nav_footer_custom.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<footer class="site-footer">
Materjalid <a href="https://creativecommons.org/publicdomain/zero/1.0/">avalikuks kasutuseks</a>, päisefoto fragment <a href="https://creativecommons.org/licenses/by-sa/3.0/deed.et">CC BY-SA</a> <a href="https://et.wikipedia.org/wiki/Elektrooniline_h%C3%A4%C3%A4letamine_Eestis#/media/Fail:VVK-kettad.jpg">Irve</a>.
{{ site.data.i18n.site_footer }}
</footer>
2 changes: 1 addition & 1 deletion _includes/search_placeholder_custom.html
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Otsi saidi materjalidest
{{ site.data.i18n.search_label }}
32 changes: 32 additions & 0 deletions _includes/sidebar.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{%- comment -%}
Include as: {%- include components/sidebar.html -%}
Depends on: page(?), site.
Results in: HTML for the side bar.
Includes:
title.html, components/site_nav.html, nav_footer_custom.html
Overwrites:
nav_footer_custom.
Should not be cached, because nav_footer_custom.html might depend on page.
{%- endcomment -%}

<div class="side-bar">
<div class="site-header" role="banner">
<a href="{{ '/' | relative_url }}" class="site-title lh-tight">{% include title.html %}</a>
<button id="menu-button" class="site-button btn-reset" aria-label="Toggle menu" aria-pressed="false">
<svg viewBox="0 0 24 24" class="icon" aria-hidden="true"><use xlink:href="#svg-menu"></use></svg>
</button>
</div>

{% include_cached site_nav.html %}

{% capture nav_footer_custom %}
{%- include nav_footer_custom.html -%}
{% endcapture %}
{% if nav_footer_custom != "" %}
{{ nav_footer_custom }}
{% else %}
<footer class="site-footer">
This site uses <a href="https://github.com/just-the-docs/just-the-docs">Just the Docs</a>, a documentation theme for Jekyll.
</footer>
{% endif %}
</div>
67 changes: 67 additions & 0 deletions _includes/site_nav.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
{%- comment -%}
Include as: {%- include_cached components/site_nav.html -%}
Depends on: site.
Results in: HTML for the site-nav.
Includes:
components/nav.html
Overwrites:
pages_top_size, collections_size, collection_entry,
collection_key, collection_value, collection.
{%- endcomment -%}

<nav aria-label="Main" id="site-nav" class="site-nav">
{% assign pages_top_size = site.html_pages
| where_exp:"item", "item.title != nil"
| where_exp:"item", "item.parent == nil"
| where_exp:"item", "item.nav_exclude != true"
| size %}
{% if pages_top_size > 0 %}
{% include components/nav.html pages=site.html_pages %}
{% endif %}
{%- if site.nav_external_links -%}
<ul class="nav-list">
{%- for node in site.nav_external_links -%}
<li class="nav-list-item external">
<a href="{{ node.url | absolute_url }}" class="nav-list-link external"
{% if node.opens_in_new_tab or node.opens_in_new_tab == nil and site.nav_external_links_new_tab %}
target="_blank" rel="noopener noreferrer"
{% endif %}
>
{{ node.title }}
{% unless node.hide_icon %}<svg viewBox="0 0 24 24" aria-labelledby="svg-external-link-title"><use xlink:href="#svg-external-link"></use></svg>{% endunless %}
</a>
</li>
{%- endfor -%}
</ul>
{%- endif -%}
{% if site.just_the_docs.collections %}
{% assign collections_size = site.just_the_docs.collections | size %}
{% for collection_entry in site.just_the_docs.collections %}
{% assign collection_key = collection_entry[0] %}
{% assign collection_value = collection_entry[1] %}
{% assign collection = site[collection_key] %}
{% if collection_value.nav_exclude != true %}
{% if collections_size > 1 or pages_top_size > 0 %}
{% if collection_value.nav_fold == true %}
<ul class="nav-list nav-category-list">
<li class="nav-list-item">
{%- if collection.size > 0 -%}
<button class="nav-list-expander btn-reset" aria-label="Toggle collection {{ collection_value.name }}" aria-pressed="false">
<svg viewBox="0 0 24 24" aria-hidden="true"><use xlink:href="#svg-arrow-right"></use></svg>
</button>
{%- endif -%}
<div class="nav-category">{{ site.data.i18n.[collection_value.name] }}</div>
{% include components/nav.html pages=collection %}
</li>
</ul>
{% else %}
<div class="nav-category">{{ site.data.i18n.[collection_value.name] }}</div>
{% include components/nav.html pages=collection %}
{% endif %}
{% else %}
{% include components/nav.html pages=collection %}
{% endif %}
{% endif %}
{% endfor %}
{% endif %}
</nav>
4 changes: 2 additions & 2 deletions _includes/title.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{% if site.logo %}
<div class="site-logo" role="img" aria-label="{{ site.title }}"><div class="site-title site-title-text">{{ site.title }}</div></div>
<div class="site-logo" role="img" aria-label="{{ site.data.i18n.site_title }}"><div class="site-title site-title-text">{{ site.data.i18n.site_title }}</div></div>
{% else %}
{{ site.title }}
{{ site.data.i18n.site_title }}
{% endif %}
41 changes: 41 additions & 0 deletions _layouts/default.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
---
layout: table_wrappers
---

<!DOCTYPE html>

<html lang="{{ site.active_lang | default: 'en-US' }}">
{% include head.html %}
<body>
<a class="skip-to-main" href="#main-content">{{ site.data.i18n.skip_to_main }}</a>
{% include icons/icons.html %}
{% include sidebar.html %}
<div class="main" id="top">
{% include components/header.html %}
<div class="main-content-wrap">
{% include components/breadcrumbs.html %}
<div id="main-content" class="main-content">
<main>
{% if site.heading_anchors != false %}
{% include vendor/anchor_headings.html html=content beforeHeading="true" anchorBody="<svg viewBox=\"0 0 16 16\" aria-hidden=\"true\"><use xlink:href=\"#svg-link\"></use></svg>" anchorClass="anchor-heading" anchorAttrs="aria-labelledby=\"%html_id%\"" %}
{% else %}
{{ content }}
{% endif %}

{% if page.has_children == true and page.has_toc != false %}
{% include components/children_nav.html %}
{% endif %}
</main>
{% include components/footer.html %}
</div>
</div>
{% if site.search_enabled != false %}
{% include components/search_footer.html %}
{% endif %}
</div>

{% if site.mermaid %}
{% include components/mermaid.html %}
{% endif %}
</body>
</html>
2 changes: 1 addition & 1 deletion _posts/2023-03-31-vaatlejate-yhisavaldus.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ Pöördumine on avaldatud veebiaadressil [vaatlejad.github.io](https://vaatlejad

## Viited

* [Pöördumise täistekst](/docs/yhisavaldus2023/)
* [Pöördumise täistekst](/docs/yhisavaldus2023/)
24 changes: 24 additions & 0 deletions _sass/custom/_header_custom.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
.lang-nav {
height: 100%;
overflow-x: auto;
@include fs-3;

.lang-nav-list {
display: flex;
height: 100%;
padding: 0;
margin: 0;
list-style: none;
}

.lang-nav-list-item {
display: inline-block;
height: 100%;
padding: 0;
margin: 0;
}

@include mq(md) {
padding-right: $gutter-spacing-sm;
}
}
8 changes: 7 additions & 1 deletion _sass/custom/custom.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
@import "./header_custom";

.aux-nav {
@include fs-3;
}

.site-title-text {
padding-left: 3.5rem;
color: $body-text-color;
Expand All @@ -15,4 +21,4 @@
rgba($feedback-color, 0) 100%
);
color: $body-heading-color;
}
}
14 changes: 14 additions & 0 deletions index.en.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
title: Who are we?
description: Our goal is free and democratic elections, in which the ascertaining of the results is fair and observable, while keeping the content of the vote private. We strive to ensure fair elections without possibilities for manipulation.
image: /media/VVK-kettad2.jpeg
lang: en
permalink: /
layout: home
---

The objective of [Fair Elections Estonia](https://ariregister.rik.ee/est/company/80339095/) is to ensure free and democratic elections in the Republic of Estonia, for which the ascertaining of the results is fair and observable, while keeping content of the ballot private to each voter.

In pursuit of this objective, we gather and share the expertise of both local and international election observers, support and advocate for election observers in safeguarding their common interests, and invite everybody interested in ensuring the integrity of democratic elections to join us in our efforts.

As of February 2024 the board of the NGO consists of [Märt Põder](https://gafgaf.infoaed.ee/en), [Oudekki Loone](https://en.wikipedia.org/wiki/Oudekki_Loone) and [Heldur-Valdek Seeder](https://valdekseeder.blogspot.com/).
2 changes: 2 additions & 0 deletions index.md → index.et.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
title: Kes me oleme?
description: Meie eesmärk on vabad ja demokraatlikud valimised, mille tulemuste kujunemine on aus ning vaadeldav — kuid valija hääl jääb ainult tema enda teada. Töötame selle nimel, et valimised oleks ausad ja pettused välistatud.
image: /media/VVK-kettad2.jpeg
lang: et
permalink: /
layout: home
---

Expand Down
4 changes: 4 additions & 0 deletions index_en_sitemap_hack.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
permalink: /en
nav_exclude: true
---

0 comments on commit b7d6469

Please sign in to comment.