platzky 0.2.9__tar.gz → 0.2.11__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. {platzky-0.2.9 → platzky-0.2.11}/PKG-INFO +2 -1
  2. {platzky-0.2.9 → platzky-0.2.11}/platzky/config.py +1 -0
  3. platzky-0.2.11/platzky/locale/en/LC_MESSAGES/messages.po +54 -0
  4. platzky-0.2.11/platzky/locale/pl/LC_MESSAGES/messages.po +55 -0
  5. {platzky-0.2.9 → platzky-0.2.11}/platzky/platzky.py +7 -0
  6. {platzky-0.2.9 → platzky-0.2.11}/platzky/plugins/google-tag-manager/entrypoint.py +1 -0
  7. {platzky-0.2.9 → platzky-0.2.11}/platzky/static/blog.css +3 -3
  8. {platzky-0.2.9 → platzky-0.2.11}/platzky/templates/base.html +29 -4
  9. {platzky-0.2.9 → platzky-0.2.11}/pyproject.toml +1 -1
  10. {platzky-0.2.9 → platzky-0.2.11}/README.md +0 -0
  11. {platzky-0.2.9 → platzky-0.2.11}/platzky/__init__.py +0 -0
  12. {platzky-0.2.9 → platzky-0.2.11}/platzky/blog/__init__.py +0 -0
  13. {platzky-0.2.9 → platzky-0.2.11}/platzky/blog/blog.py +0 -0
  14. {platzky-0.2.9 → platzky-0.2.11}/platzky/blog/comment_form.py +0 -0
  15. {platzky-0.2.9 → platzky-0.2.11}/platzky/db/__init__.py +0 -0
  16. {platzky-0.2.9 → platzky-0.2.11}/platzky/db/db.py +0 -0
  17. {platzky-0.2.9 → platzky-0.2.11}/platzky/db/db_loader.py +0 -0
  18. {platzky-0.2.9 → platzky-0.2.11}/platzky/db/google_json_db.py +0 -0
  19. {platzky-0.2.9 → platzky-0.2.11}/platzky/db/graph_ql_db.py +0 -0
  20. {platzky-0.2.9 → platzky-0.2.11}/platzky/db/json_db.py +0 -0
  21. {platzky-0.2.9 → platzky-0.2.11}/platzky/db/json_file_db.py +0 -0
  22. {platzky-0.2.9 → platzky-0.2.11}/platzky/models.py +0 -0
  23. {platzky-0.2.9 → platzky-0.2.11}/platzky/plugin_loader.py +0 -0
  24. {platzky-0.2.9 → platzky-0.2.11}/platzky/plugins/redirections/entrypoint.py +0 -0
  25. {platzky-0.2.9 → platzky-0.2.11}/platzky/plugins/sendmail/entrypoint.py +0 -0
  26. {platzky-0.2.9 → platzky-0.2.11}/platzky/seo/seo.py +0 -0
  27. {platzky-0.2.9 → platzky-0.2.11}/platzky/templates/404.html +0 -0
  28. {platzky-0.2.9 → platzky-0.2.11}/platzky/templates/blog.html +0 -0
  29. {platzky-0.2.9 → platzky-0.2.11}/platzky/templates/body_meta.html +0 -0
  30. {platzky-0.2.9 → platzky-0.2.11}/platzky/templates/feed.xml +0 -0
  31. {platzky-0.2.9 → platzky-0.2.11}/platzky/templates/head_meta.html +0 -0
  32. {platzky-0.2.9 → platzky-0.2.11}/platzky/templates/home.html +0 -0
  33. {platzky-0.2.9 → platzky-0.2.11}/platzky/templates/page.html +0 -0
  34. {platzky-0.2.9 → platzky-0.2.11}/platzky/templates/post.html +0 -0
  35. {platzky-0.2.9 → platzky-0.2.11}/platzky/templates/robots.txt +0 -0
  36. {platzky-0.2.9 → platzky-0.2.11}/platzky/templates/sitemap.xml +0 -0
  37. {platzky-0.2.9 → platzky-0.2.11}/platzky/www_handler.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: platzky
3
- Version: 0.2.9
3
+ Version: 0.2.11
4
4
  Summary: Not only blog engine
5
5
  License: MIT
6
6
  Requires-Python: >=3.10,<4.0
@@ -9,6 +9,7 @@ Classifier: Programming Language :: Python :: 3
9
9
  Classifier: Programming Language :: Python :: 3.10
10
10
  Classifier: Programming Language :: Python :: 3.11
11
11
  Classifier: Programming Language :: Python :: 3.12
12
+ Classifier: Programming Language :: Python :: 3.13
12
13
  Requires-Dist: Flask (==3.0.3)
13
14
  Requires-Dist: Flask-Babel (>=4.0.0,<5.0.0)
14
15
  Requires-Dist: Flask-Minify (>=0.42,<0.43)
@@ -15,6 +15,7 @@ class StrictBaseModel(BaseModel):
15
15
  class LanguageConfig(StrictBaseModel):
16
16
  name: str = Field(alias="name")
17
17
  flag: str = Field(alias="flag")
18
+ country: str = Field(alias="country")
18
19
  domain: t.Optional[str] = Field(default=None, alias="domain")
19
20
 
20
21
 
@@ -0,0 +1,54 @@
1
+ # English translations for platzky.
2
+ # Copyright (C) 2024 ORGANIZATION
3
+ # This file is distributed under the same license as the platzky project.
4
+ # FIRST AUTHOR <EMAIL@ADDRESS>, 2024.
5
+ #
6
+ msgid ""
7
+ msgstr ""
8
+ "Project-Id-Version: platzky VERSION\n"
9
+ "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
10
+ "POT-Creation-Date: 2024-10-29 19:00+0100\n"
11
+ "PO-Revision-Date: 2024-10-29 19:07+0100\n"
12
+ "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
13
+ "Language: en\n"
14
+ "Language-Team: en <LL@li.org>\n"
15
+ "Plural-Forms: nplurals=2; plural=(n != 1);\n"
16
+ "MIME-Version: 1.0\n"
17
+ "Content-Type: text/plain; charset=utf-8\n"
18
+ "Content-Transfer-Encoding: 8bit\n"
19
+ "Generated-By: Babel 2.16.0\n"
20
+
21
+ #: platzky/templates/base.html:119
22
+ msgid "Link to home page"
23
+ msgstr ""
24
+
25
+ #: platzky/templates/base.html:136
26
+ msgid "Language switch icon, used to change the language of the website"
27
+ msgstr ""
28
+
29
+ #: platzky/templates/blog.html:5
30
+ msgid ""
31
+ "Find out our tips and tricks about email marketing. We prepared some soft"
32
+ " and some hard skills here. Ready to dive in?"
33
+ msgstr ""
34
+
35
+ #: platzky/templates/blog.html:7
36
+ msgid "You're interested in"
37
+ msgstr ""
38
+
39
+ #: platzky/templates/blog.html:7
40
+ msgid "We're here to serve you:"
41
+ msgstr ""
42
+
43
+ #: platzky/templates/post.html:36
44
+ msgid "Leave your comment here:"
45
+ msgstr ""
46
+
47
+ #: platzky/templates/post.html:53
48
+ msgid "Your comment has been sent for moderation"
49
+ msgstr ""
50
+
51
+ #: platzky/templates/post.html:63
52
+ msgid "said"
53
+ msgstr ""
54
+
@@ -0,0 +1,55 @@
1
+ # Polish translations for platzky.
2
+ # Copyright (C) 2024 ORGANIZATION
3
+ # This file is distributed under the same license as the platzky project.
4
+ # FIRST AUTHOR <EMAIL@ADDRESS>, 2024.
5
+ #
6
+ msgid ""
7
+ msgstr ""
8
+ "Project-Id-Version: platzky VERSION\n"
9
+ "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
10
+ "POT-Creation-Date: 2024-10-29 19:00+0100\n"
11
+ "PO-Revision-Date: 2024-10-29 19:00+0100\n"
12
+ "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
13
+ "Language: pl\n"
14
+ "Language-Team: pl <LL@li.org>\n"
15
+ "Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && "
16
+ "(n%100<10 || n%100>=20) ? 1 : 2);\n"
17
+ "MIME-Version: 1.0\n"
18
+ "Content-Type: text/plain; charset=utf-8\n"
19
+ "Content-Transfer-Encoding: 8bit\n"
20
+ "Generated-By: Babel 2.16.0\n"
21
+
22
+ #: platzky/templates/base.html:119
23
+ msgid "Link to home page"
24
+ msgstr "Link do strony głównej"
25
+
26
+ #: platzky/templates/base.html:136
27
+ msgid "Language switch icon, used to change the language of the website"
28
+ msgstr "Ikona zmiany języka, używana do zmiany języka strony"
29
+
30
+ #: platzky/templates/blog.html:5
31
+ msgid ""
32
+ "Find out our tips and tricks about email marketing. We prepared some soft"
33
+ " and some hard skills here. Ready to dive in?"
34
+ msgstr ""
35
+
36
+ #: platzky/templates/blog.html:7
37
+ msgid "You're interested in"
38
+ msgstr ""
39
+
40
+ #: platzky/templates/blog.html:7
41
+ msgid "We're here to serve you:"
42
+ msgstr ""
43
+
44
+ #: platzky/templates/post.html:36
45
+ msgid "Leave your comment here:"
46
+ msgstr "Zostaw swój komentarz tutaj:"
47
+
48
+ #: platzky/templates/post.html:53
49
+ msgid "Your comment has been sent for moderation"
50
+ msgstr "Twój komentarz został wysłany do moderacji"
51
+
52
+ #: platzky/templates/post.html:63
53
+ msgid "said"
54
+ msgstr "powiedział"
55
+
@@ -1,3 +1,4 @@
1
+ import os
1
2
  import typing as t
2
3
  import urllib.parse
3
4
 
@@ -24,6 +25,10 @@ class Engine(Flask):
24
25
  self.notifiers = []
25
26
  self.dynamic_body = ""
26
27
  self.dynamic_head = ""
28
+ directory = os.path.dirname(os.path.realpath(__file__))
29
+ locale_dir = os.path.join(directory, "locale")
30
+ config.translation_directories.append(locale_dir)
31
+
27
32
  babel_translation_directories = ";".join(config.translation_directories)
28
33
  self.babel = Babel(
29
34
  self,
@@ -94,10 +99,12 @@ def create_engine(config: Config, db) -> Engine:
94
99
  def utils():
95
100
  locale = app.get_locale()
96
101
  flag = lang.flag if (lang := config.languages.get(locale)) is not None else ""
102
+ country = lang.country if (lang := config.languages.get(locale)) is not None else ""
97
103
  return {
98
104
  "app_name": config.app_name,
99
105
  "languages": languages_dict(config.languages),
100
106
  "current_flag": flag,
107
+ "current_lang_country": country,
101
108
  "current_language": locale,
102
109
  "url_link": url_link,
103
110
  "menu_items": app.db.get_menu_items(),
@@ -20,6 +20,7 @@ def process(app, plugin_config):
20
20
  <noscript><iframe src="https://www.googletagmanager.com/ns.html?id="""
21
21
  + gtm_id
22
22
  + """
23
+ "
23
24
  height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
24
25
  <!-- End Google Tag Manager (noscript) -->
25
26
  """
@@ -107,7 +107,7 @@ img::-moz-selection {
107
107
  background: transparent;
108
108
  }
109
109
  #mainNav .navbar-brand {
110
- padding: 10px 20px;
110
+ padding: 0px 20px;
111
111
  color: #000;
112
112
  }
113
113
  #mainNav .navbar-brand:focus, #mainNav .navbar-brand:hover {
@@ -179,7 +179,7 @@ header.masthead .overlay {
179
179
  header.masthead .page-heading,
180
180
  header.masthead .post-heading,
181
181
  header.masthead .site-heading {
182
- padding: 200px 0 150px;
182
+ padding: 100px 0 85px;
183
183
  color: white;
184
184
  }
185
185
 
@@ -187,7 +187,7 @@ header.masthead .site-heading {
187
187
  header.masthead .page-heading,
188
188
  header.masthead .post-heading,
189
189
  header.masthead .site-heading {
190
- padding: 200px 0;
190
+ padding: 100px 0;
191
191
  }
192
192
  }
193
193
 
@@ -1,10 +1,12 @@
1
1
  <!doctype html>
2
- <html lang="{{ current_language }}">
2
+ <html lang="{{ current_language }}-{{ current_lang_country }}">
3
3
  <head>
4
4
  {% include "head_meta.html" %}
5
5
  {% block head_meta %}{% endblock %}
6
6
  {{ dynamic_head | safe }}
7
7
 
8
+
9
+
8
10
  <title>{% block title %}{{app_name}}{% endblock %}</title>
9
11
  <meta name="description" content=" {% block description %} {% endblock %} ">
10
12
  <style>
@@ -49,6 +51,26 @@
49
51
  max-width: 80vw;
50
52
  overflow-y: auto;
51
53
  color: white;
54
+ inline-size: 80vw;
55
+ overflow-wrap: break-word;
56
+ z-index: 999999999;
57
+ }
58
+
59
+ @media only screen and (min-width: 768px) {
60
+ #left-panel {
61
+ inline-size: calc(100vw * 0.1666666667);
62
+ }
63
+
64
+ .language-indicator-text {
65
+ color: white;
66
+ font-weight: normal;
67
+ }
68
+
69
+ #languages-menu {
70
+ background-color: {{ secondary_color }};
71
+ padding: 5px 10px;
72
+ border-radius: 5px;
73
+ color: white;
52
74
  }
53
75
 
54
76
  .offcanvas-lg.offcanvas-start {
@@ -68,6 +90,7 @@
68
90
  .dropdown-menu {
69
91
  z-index: 1;
70
92
  }
93
+
71
94
  .btn {
72
95
  padding: 0;
73
96
  }
@@ -86,13 +109,14 @@
86
109
  {% endblock %}
87
110
  <div class="container-fluid d-flex flex-column h-100 g-0">
88
111
  <div class="row header-row bg-light g-0">
89
- <nav class="navbar navbar-expand-lg navbar-light p-3" id="mainNav">
112
+ <nav class="navbar navbar-expand-lg navbar-light px-3 py-1" id="mainNav">
90
113
  {% if self.left_panel() %}
91
114
  <button class="navbar-toggler" type="button" data-bs-toggle="offcanvas" data-bs-target="#left-panel" aria-label="Toggle left panel">
92
115
  <i class="fas fa-sliders-h"></i>
93
116
  </button>
94
117
  {% endif %}
95
- <a class="navbar-brand" href="/">{% if logo_url %}<img src="{{ logo_url }}" alt="{{ app_name }} logo" class="logo">{% else %}{{_(app_name)}}{% endif %}</a>
118
+
119
+ <a class="navbar-brand" href="/" aria-label="{{_("Link to home page")}}">{% if logo_url %}<img src="{{ logo_url }}" alt="{{ app_name }} logo" class="logo">{% else %}{{_(app_name)}}{% endif %}</a>
96
120
  <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav"
97
121
  aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
98
122
  <i class="fas fa-bars"></i>
@@ -109,7 +133,8 @@
109
133
  <li class="nav-item dropdown">
110
134
  <div id="language-dropdown" class="btn-group">
111
135
  <button type="button" class="nav-link dropdown-toggle btn btn-link" id="languages-menu" role="button"
112
- data-bs-toggle="dropdown" aria-expanded="false">
136
+ data-bs-toggle="dropdown" aria-expanded="false" aria-label="{{ _("Language switch icon, used to change the language of the website")}}">
137
+ <span class="language-indicator-text">{{ current_language }}</i>
113
138
  <i class="fi fi-{{ current_flag }}"></i>
114
139
  </button>
115
140
  <ul class="dropdown-menu dropdown-menu-end" aria-labelledby="languages-menu">
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "platzky"
3
- version = "0.2.9"
3
+ version = "0.2.11"
4
4
  description = "Not only blog engine"
5
5
  authors = []
6
6
  license = "MIT"
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes