Skip to content

Commit

Permalink
🎄 refactor!: refactor code, remove unused libraries, update HTML stru…
Browse files Browse the repository at this point in the history
…cture

- 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.
  • Loading branch information
Jalkhov committed Dec 2, 2024
1 parent 78bd3b1 commit 3452034
Show file tree
Hide file tree
Showing 12 changed files with 242 additions and 330 deletions.
20 changes: 10 additions & 10 deletions templates/aim.html
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
{% extends 'base.html' %}
{% set section = 'aim' %}
{% block head %}
<title>Aim</title>
<title>Aim</title>
{% endblock %}
{% block body %}
<div id='aim'>
<h2 class="text-center titles">The Aim</h2>
<div>
<ul>
<li>Education</li>
<li>Ecosystem</li>
<li>Events</li>
</ul>
<div id="aim">
<h2 class="text-center titles">The Aim</h2>
<div>
<ul>
<li>Education</li>
<li>Ecosystem</li>
<li>Events</li>
</ul>
</div>
</div>
</div>
{% endblock %}
15 changes: 6 additions & 9 deletions templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,22 @@
<html lang="en">
<head>
{% include 'sections/head.html' %}
<link href='/static/flaskcwg-icon.png' rel='icon' />
{% block head %}{% endblock %}
<!--<link rel="stylesheet" href="/static/css/styles.css">-->
<style>
{% include 'sections/styles.css' %}
</style>
</head>
<body id="body-container">
<div class="off-canvas">
<!-- off-screen toggle button -->
<a class="off-canvas-toggle btn btn-primary bg-dark btn-action show-xs show-sm" href="#sidebar-id">
<a class="off-canvas-toggle btn btn-primary bg-dark btn-action show-xs show-sm" href="#sidebar-id" aria-label="Abrir menú lateral">
<i class="icon icon-menu"></i>
</a>
{% include 'sections/sidebar.html' %}
<a class="off-canvas-overlay" href="#close"></a>
<a class="off-canvas-overlay" href="#close" aria-label="Cerrar menú lateral"></a>
<div class="off-canvas-content container">
<!-- off-screen content -->
<div class="columns" id="banner">
<a class="col-4 col-mx-auto"href="{{path}}">
<a class="col-4 col-mx-auto" href="{{path}}">
<img src="/static/flaskcwgbanner.png" class="img-responsive hide-sx hide-sm" alt="FlaskCWG Banner">
</a>
</div>
Expand Down Expand Up @@ -53,14 +50,14 @@
</section>
</header>
</div>
<div id="main-content-container" class="columns">
<div id="main-content" class="column col-8 col-sm-10 col-mx-auto">
<div class="columns">
<div class="column col-8 col-sm-10 col-mx-auto">
{% block body %}
{% endblock %}
</div>
</div>
<div class="columns">
<div id="main-content" class="column col-8 col-sm-10 col-mx-auto">
<div class="column col-8 col-sm-10 col-mx-auto">
{% include 'sections/footer.html' %}
</div>
</div>
Expand Down
68 changes: 32 additions & 36 deletions templates/category.html
Original file line number Diff line number Diff line change
@@ -1,44 +1,40 @@
{% extends 'base.html' %}
{% set section = 'blog' %}
{% block head %}
<title>Posts for {{ category }}</title>
<title>Posts for {{ category }}</title>
{% endblock %}
{% block body %}
<div id='posts'>
<h3>Blog Posts For Category: {{ category }}</h3>
<div>
<table class="table table-striped">
<thead>
<tr>
<th>Title</th>
<th>Date</th>
<th>Author/s</th>
</tr>
</thead>
<tbody>

{% for blog_post in posts %}
<div id="posts">
<h3>Blog Posts For Category: {{ category }}</h3>
<div>
<table class="table table-striped">
<thead>
<tr>
<td>
<a href="{{path}}b/{{ blog_post['slug'] }}">{{ blog_post['title'] }}</a>
</td>
<td>
{{ blog_post['date'] }}
</td>
<td>
{% set authors = blog_post['authors'] %}
{% for author in authors %}
<a href="{{path}}u/{{ author }}">{{ author }}</a>{% if (not loop.index == len(authors)) %},{% endif %}
{% endfor %}
</td>
<th scope="col">Title</th>
<th scope="col">Date</th>
<th scope="col">Author/s</th>
</tr>
{% endfor %}

</tbody>
</table>
</thead>
<tbody>
{% for blog_post in posts %}
<tr>
<td>
<a href="{{path}}b/{{ blog_post['slug'] }}">{{ blog_post['title'] }}</a>
</td>
<td>
{{ blog_post['date'] }}
</td>
<td>
{% set authors = blog_post['authors'] %}
{% for author in authors %}
<a href="{{path}}u/{{ author }}">{{ author }}</a>{% if (not loop.index == len(authors)) %},{% endif %}
{% endfor %}
</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
<p></p>
</div>
<p>

</p>
</div>
{% endblock %}
{% endblock %}
18 changes: 6 additions & 12 deletions templates/index.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
{% extends 'base.html' %}

{% set section = 'why' %}

{% block head %}
<title>Flask CWG</title>
{% endblock %}
Expand All @@ -12,31 +10,27 @@ <h2 class="text-center titles">The Why</h2>
<p>
<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.
</p>

<p>
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.
</p>

<p>
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.

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.

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.
</p>

<p>
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.

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?)

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.

Lastly the WG would provide guidelines as to its own running and constant improvement and provide a consistent plan of action in this regard.
</p>

<p>
The WG also endeavours to take care of translations.
</p>
</div>
{% endblock %}
{% endblock %}
14 changes: 8 additions & 6 deletions templates/join.html
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
{% extends 'base.html' %}
{% set section = 'join' %}
{% block head %}
<title>Join</title>
<title>Join</title>
{% endblock %}
{% block body %}
<div id='join'>
<h2 class="text-center titles">Join the WG</h2>
See how to join the WG <a href="https://github.com/flaskcwg/join-requests/blob/main/README.md">here</a>
</div>
{% endblock %}
<div id="join">
<h2 class="text-center titles">Join the WG</h2>
<p>
See how to join the WG <a href="https://github.com/flaskcwg/join-requests/blob/main/README.md">here</a>
</p>
</div>
{% endblock %}
Loading

0 comments on commit 3452034

Please sign in to comment.