Skip to content

Commit 3452034

Browse files
committed
🎄 refactor!: refactor code, remove unused libraries, update HTML structure
- Refactored multiple files across the project. - Removed unused libraries to clean up the codebase. - Improved HTML structure for better maintainability. - Migrated translation management to Weblate, replacing the old system.
1 parent 78bd3b1 commit 3452034

12 files changed

+242
-330
lines changed

‎templates/aim.html

+10-10
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
{% extends 'base.html' %}
22
{% set section = 'aim' %}
33
{% block head %}
4-
<title>Aim</title>
4+
<title>Aim</title>
55
{% endblock %}
66
{% block body %}
7-
<div id='aim'>
8-
<h2 class="text-center titles">The Aim</h2>
9-
<div>
10-
<ul>
11-
<li>Education</li>
12-
<li>Ecosystem</li>
13-
<li>Events</li>
14-
</ul>
7+
<div id="aim">
8+
<h2 class="text-center titles">The Aim</h2>
9+
<div>
10+
<ul>
11+
<li>Education</li>
12+
<li>Ecosystem</li>
13+
<li>Events</li>
14+
</ul>
15+
</div>
1516
</div>
16-
</div>
1717
{% endblock %}

‎templates/base.html

+6-9
Original file line numberDiff line numberDiff line change
@@ -2,25 +2,22 @@
22
<html lang="en">
33
<head>
44
{% include 'sections/head.html' %}
5-
<link href='/static/flaskcwg-icon.png' rel='icon' />
65
{% block head %}{% endblock %}
7-
<!--<link rel="stylesheet" href="/static/css/styles.css">-->
86
<style>
97
{% include 'sections/styles.css' %}
108
</style>
119
</head>
1210
<body id="body-container">
1311
<div class="off-canvas">
14-
<!-- off-screen toggle button -->
15-
<a class="off-canvas-toggle btn btn-primary bg-dark btn-action show-xs show-sm" href="#sidebar-id">
12+
<a class="off-canvas-toggle btn btn-primary bg-dark btn-action show-xs show-sm" href="#sidebar-id" aria-label="Abrir menú lateral">
1613
<i class="icon icon-menu"></i>
1714
</a>
1815
{% include 'sections/sidebar.html' %}
19-
<a class="off-canvas-overlay" href="#close"></a>
16+
<a class="off-canvas-overlay" href="#close" aria-label="Cerrar menú lateral"></a>
2017
<div class="off-canvas-content container">
2118
<!-- off-screen content -->
2219
<div class="columns" id="banner">
23-
<a class="col-4 col-mx-auto"href="{{path}}">
20+
<a class="col-4 col-mx-auto" href="{{path}}">
2421
<img src="/static/flaskcwgbanner.png" class="img-responsive hide-sx hide-sm" alt="FlaskCWG Banner">
2522
</a>
2623
</div>
@@ -53,14 +50,14 @@
5350
</section>
5451
</header>
5552
</div>
56-
<div id="main-content-container" class="columns">
57-
<div id="main-content" class="column col-8 col-sm-10 col-mx-auto">
53+
<div class="columns">
54+
<div class="column col-8 col-sm-10 col-mx-auto">
5855
{% block body %}
5956
{% endblock %}
6057
</div>
6158
</div>
6259
<div class="columns">
63-
<div id="main-content" class="column col-8 col-sm-10 col-mx-auto">
60+
<div class="column col-8 col-sm-10 col-mx-auto">
6461
{% include 'sections/footer.html' %}
6562
</div>
6663
</div>

‎templates/category.html

+32-36
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,40 @@
11
{% extends 'base.html' %}
22
{% set section = 'blog' %}
33
{% block head %}
4-
<title>Posts for {{ category }}</title>
4+
<title>Posts for {{ category }}</title>
55
{% endblock %}
66
{% block body %}
7-
<div id='posts'>
8-
<h3>Blog Posts For Category: {{ category }}</h3>
9-
<div>
10-
<table class="table table-striped">
11-
<thead>
12-
<tr>
13-
<th>Title</th>
14-
<th>Date</th>
15-
<th>Author/s</th>
16-
</tr>
17-
</thead>
18-
<tbody>
19-
20-
{% for blog_post in posts %}
7+
<div id="posts">
8+
<h3>Blog Posts For Category: {{ category }}</h3>
9+
<div>
10+
<table class="table table-striped">
11+
<thead>
2112
<tr>
22-
<td>
23-
<a href="{{path}}b/{{ blog_post['slug'] }}">{{ blog_post['title'] }}</a>
24-
</td>
25-
<td>
26-
{{ blog_post['date'] }}
27-
</td>
28-
<td>
29-
{% set authors = blog_post['authors'] %}
30-
{% for author in authors %}
31-
<a href="{{path}}u/{{ author }}">{{ author }}</a>{% if (not loop.index == len(authors)) %},{% endif %}
32-
{% endfor %}
33-
</td>
13+
<th scope="col">Title</th>
14+
<th scope="col">Date</th>
15+
<th scope="col">Author/s</th>
3416
</tr>
35-
{% endfor %}
36-
37-
</tbody>
38-
</table>
17+
</thead>
18+
<tbody>
19+
{% for blog_post in posts %}
20+
<tr>
21+
<td>
22+
<a href="{{path}}b/{{ blog_post['slug'] }}">{{ blog_post['title'] }}</a>
23+
</td>
24+
<td>
25+
{{ blog_post['date'] }}
26+
</td>
27+
<td>
28+
{% set authors = blog_post['authors'] %}
29+
{% for author in authors %}
30+
<a href="{{path}}u/{{ author }}">{{ author }}</a>{% if (not loop.index == len(authors)) %},{% endif %}
31+
{% endfor %}
32+
</td>
33+
</tr>
34+
{% endfor %}
35+
</tbody>
36+
</table>
37+
</div>
38+
<p></p>
3939
</div>
40-
<p>
41-
42-
</p>
43-
</div>
44-
{% endblock %}
40+
{% endblock %}

‎templates/index.html

+6-12
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
{% extends 'base.html' %}
2-
32
{% set section = 'why' %}
4-
53
{% block head %}
64
<title>Flask CWG</title>
75
{% endblock %}
@@ -12,31 +10,27 @@ <h2 class="text-center titles">The Why</h2>
1210
<p>
1311
<span class="first-letter">F</span>lask is a great library with great people and great extensions, but it can be even greater with a structured approach to the community aspect. Being around for 10 years and yet, still maintaining relevance is a feat of it’s own. It’s simple to get started with all while being a battle-proven framework. We also notice that it’s a smooth flow from a proof of concept to production. It also influences other frameworks upto this day. Technically it is sound, no doubt about it.
1412
</p>
15-
1613
<p>
1714
However, there are many Flask-related issues which deserve some attention. The fix to those issues lies not in mere merges or code fixes. One such example is the plugins/extensions ecosystem. A recurrent and commonly observed pattern is that a project rises in popularity and becomes the de-facto reference for a specific task then the maintainer goes offline, cut off from the project. Sometimes other maintainers themselves have no merge right, leaving the project as good as dead.
1815
</p>
19-
2016
<p>
2117
Due to many factors, the projects soon become obsolete, less efficient or outright broken. But people still use them sometimes unknowingly exposing their applications to vulnerabilities. One help point from the WG is keep an eye on extensions and prevent those kinds of failures. One concrete initiative is to set up an organization (github) to care about extensions. It will have a minimum required number of developers who are willing to look after those extensions. This can also further the Flask education cause by having mentoring, much like Google Code-In.
22-
18+
2319
Another aspect is that the Flask community is very fragmented. Flask people don’t have a point of regrouping. Events are organised and then die peacefully. A community WG helps to knit together the community, making Flask users feeling very welcome. It also encourages Flask users to adhere to a code of conduct when organising events, rather than letting every event be as free electrons.
24-
20+
2521
Events will also help to grow the community and introduce new members to the ecosystem, especially if these events can keep a high quality standard consistently. The WG would help independent organisers by providing guidelines and knowledge for hosting great events.
2622
</p>
27-
2823
<p>
2924
A point to further the Flask cause is the organising of monthly/quarterly Flask chats where people are invited to talk about flask-related issues including projects.
30-
25+
3126
One other function that this workgroup may help to achieve is to bring to a minimum, if possible, is the increasing options and fragmentations in the Flask-type of building framework, for example, Hug, Sanic, FastAPI are all taking after the Flask model of doing things and may benefit as one whole project, all streamlined to be able to help increase productivity. (Flask enhancement proposals?)
32-
27+
3328
In it’s preliminary stage the WG would prepare the event grants requests guidelines and maybe act as the grants WG members until (if needed) such a body is formed.
34-
29+
3530
Lastly the WG would provide guidelines as to its own running and constant improvement and provide a consistent plan of action in this regard.
3631
</p>
37-
3832
<p>
3933
The WG also endeavours to take care of translations.
4034
</p>
4135
</div>
42-
{% endblock %}
36+
{% endblock %}

‎templates/join.html

+8-6
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
{% extends 'base.html' %}
22
{% set section = 'join' %}
33
{% block head %}
4-
<title>Join</title>
4+
<title>Join</title>
55
{% endblock %}
66
{% block body %}
7-
<div id='join'>
8-
<h2 class="text-center titles">Join the WG</h2>
9-
See how to join the WG <a href="https://github.com/flaskcwg/join-requests/blob/main/README.md">here</a>
10-
</div>
11-
{% endblock %}
7+
<div id="join">
8+
<h2 class="text-center titles">Join the WG</h2>
9+
<p>
10+
See how to join the WG <a href="https://github.com/flaskcwg/join-requests/blob/main/README.md">here</a>
11+
</p>
12+
</div>
13+
{% endblock %}

0 commit comments

Comments
 (0)