platzky 0.2.10__py3-none-any.whl → 0.2.12__py3-none-any.whl

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.
platzky/config.py CHANGED
@@ -42,6 +42,7 @@ class Config(StrictBaseModel):
42
42
  )
43
43
  debug: bool = Field(default=False, alias="DEBUG")
44
44
  testing: bool = Field(default=False, alias="TESTING")
45
+ feature_flags: t.Optional[dict[str, bool]] = Field(default_factory=dict, alias="FEATURE_FLAGS")
45
46
 
46
47
  @classmethod
47
48
  def model_validate(
@@ -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
+
platzky/platzky.py CHANGED
@@ -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,
@@ -5,6 +5,8 @@
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,9 +51,16 @@
49
51
  max-width: 80vw;
50
52
  overflow-y: auto;
51
53
  color: white;
54
+ inline-size: 80vw;
55
+ overflow-wrap: break-word;
52
56
  z-index: 999999999;
53
57
  }
54
58
 
59
+ @media only screen and (min-width: 768px) {
60
+ #left-panel {
61
+ inline-size: calc(100vw * 0.1666666667);
62
+ }
63
+
55
64
  .language-indicator-text {
56
65
  color: white;
57
66
  font-weight: normal;
@@ -106,7 +115,8 @@
106
115
  <i class="fas fa-sliders-h"></i>
107
116
  </button>
108
117
  {% endif %}
109
- <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>
110
120
  <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav"
111
121
  aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
112
122
  <i class="fas fa-bars"></i>
@@ -123,7 +133,7 @@
123
133
  <li class="nav-item dropdown">
124
134
  <div id="language-dropdown" class="btn-group">
125
135
  <button type="button" class="nav-link dropdown-toggle btn btn-link" id="languages-menu" role="button"
126
- 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")}}">
127
137
  <span class="language-indicator-text">{{ current_language }}</i>
128
138
  <i class="fi fi-{{ current_flag }}"></i>
129
139
  </button>
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: platzky
3
- Version: 0.2.10
3
+ Version: 0.2.12
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)
@@ -2,7 +2,7 @@ platzky/__init__.py,sha256=cEAqMh-FU8mbfCzFQaWMhKX4lDjoxDiQ9S4hTNsSOMg,160
2
2
  platzky/blog/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
3
3
  platzky/blog/blog.py,sha256=caBUewnwd6QrJDv20m4JDfDDjiVu7hM0AJnoTyCdwM4,3009
4
4
  platzky/blog/comment_form.py,sha256=4lkNJ_S_2DZmJBbz-NPDqahvy2Zz5AGNH2spFeGIop4,513
5
- platzky/config.py,sha256=zJhUEKdnO5YelO2uvcYnW4xc2uW1kU87KdlDpx01CCs,2246
5
+ platzky/config.py,sha256=M3gmZI9yI-ThgmTA4RKsAPcnJwJjcWhXipYzq3hO-Hk,2346
6
6
  platzky/db/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
7
7
  platzky/db/db.py,sha256=SayR69Nxs9aGMfYumLyLIH0LVLVmwiQt9WAICq59gng,2709
8
8
  platzky/db/db_loader.py,sha256=CuEiXxhIa4bFMm0vi7ugzm7j3WycilGRKCU6smgIImE,905
@@ -10,8 +10,10 @@ platzky/db/google_json_db.py,sha256=IgfCER7oJ4I_WD4TjhvFFL0voUj6EfeoaVWdoEcHTdA,
10
10
  platzky/db/graph_ql_db.py,sha256=aIqRxPV-Txr5MY2-qVALby9fHyIvWgvSz2t24M9SNRI,7343
11
11
  platzky/db/json_db.py,sha256=AtZoTcM6S2ZHo19rxkCi4h4E4INGieZ4W6H5O2iormA,3246
12
12
  platzky/db/json_file_db.py,sha256=UQ8TadELmqOzj_tgNfmzhtCkDkMAgcB9vaUy0GQXUY4,1010
13
+ platzky/locale/en/LC_MESSAGES/messages.po,sha256=WaZGlFAegKRq7CSz69dWKic-mKvQFhVvssvExxNmGaU,1400
14
+ platzky/locale/pl/LC_MESSAGES/messages.po,sha256=sUPxMKDeEOoZ5UIg94rGxZD06YVWiAMWIby2XE51Hrc,1624
13
15
  platzky/models.py,sha256=-IIlyeLzACeTUpzuzvzJYxtT57E6wRiERoRgXJYMMtY,1502
14
- platzky/platzky.py,sha256=0Dgx7XdwJW0R3wVGg44JuvsoDafMuRHoJuTslbFOzlY,4708
16
+ platzky/platzky.py,sha256=tqCqGp-DCeyLuUcwD8RzyZiZ40SpMtRL_mhvS2xDXnc,4896
15
17
  platzky/plugin_loader.py,sha256=KYLDSEd_hseAgBuSbikerU_IFx-YmcYK5UwYw7kla2E,1106
16
18
  platzky/plugins/google-tag-manager/entrypoint.py,sha256=Z4npXtmCdrSuUG_ZvFdPhUZg5QcwIPGQWj9Uw9dcm8A,1021
17
19
  platzky/plugins/redirections/entrypoint.py,sha256=yoqHsRLqRALdICs5_UMSREkfEo1Lbsjj9tqEA7dsseg,1555
@@ -19,7 +21,7 @@ platzky/plugins/sendmail/entrypoint.py,sha256=16GszfLaYhVUSuCdL4SPVKYN9-mONp-hK5
19
21
  platzky/seo/seo.py,sha256=N_MmAA4KJZmmrDUh0hYNtD8ycOwpNKow4gVSAv8V3N4,2631
20
22
  platzky/static/blog.css,sha256=TrppzgQbj4UtuTufDCdblyNTVAqgIbhD66Cziyv_xnY,7893
21
23
  platzky/templates/404.html,sha256=EheoLSWylOscLH8FmcMA4c6Jw14i5HkSvE_GXzGIrUo,78
22
- platzky/templates/base.html,sha256=Qptra-3pElumq0xuYErdyV35QDBQkRGmWF74_buXDfA,4869
24
+ platzky/templates/base.html,sha256=mRlJJ65QbnB8VOFmbgBfPz6dhmwOnbntjrXwUsQDu1U,5184
23
25
  platzky/templates/blog.html,sha256=aPl-DzLX85bHv7tN8UjlABR086PUJ9IGlGbIBioFHGA,1281
24
26
  platzky/templates/body_meta.html,sha256=bRHG_BF-jloBLXASrpJVO6hDfpzq3MqMpJTXt9fLHJk,323
25
27
  platzky/templates/feed.xml,sha256=I9cz7vnxx-TfbLIDHFXfrC3S2Nt9B6PrWf3u4zSIi78,863
@@ -30,6 +32,6 @@ platzky/templates/post.html,sha256=GSgjIZsOQKtNx3cEbquSjZ5L4whPnG6MzRyoq9k4B8Q,1
30
32
  platzky/templates/robots.txt,sha256=2_j2tiYtYJnzZUrANiX9pvBxyw5Dp27fR_co18BPEJ0,116
31
33
  platzky/templates/sitemap.xml,sha256=iIJZ91_B5ZuNLCHsRtsGKZlBAXojOTP8kffqKLacgvs,578
32
34
  platzky/www_handler.py,sha256=pF6Rmvem1sdVqHD7z3RLrDuG-CwAqfGCti50_NPsB2w,725
33
- platzky-0.2.10.dist-info/METADATA,sha256=ANwGZHe0wn3ofx-l2TsiCZjxGSVOsNSPQ7-5k6foVvI,1592
34
- platzky-0.2.10.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
35
- platzky-0.2.10.dist-info/RECORD,,
35
+ platzky-0.2.12.dist-info/METADATA,sha256=XWU3ZXH5SMPVsF3X38JWtuK4nykS5fm8u7EtsTFTyDc,1643
36
+ platzky-0.2.12.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
37
+ platzky-0.2.12.dist-info/RECORD,,
@@ -1,4 +1,4 @@
1
1
  Wheel-Version: 1.0
2
- Generator: poetry-core 1.9.0
2
+ Generator: poetry-core 1.9.1
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any