Skip to content

Commit 12a9457

Browse files
Fix metadata generation and add progress bar
1 parent f4489ed commit 12a9457

File tree

4 files changed

+40
-15
lines changed

4 files changed

+40
-15
lines changed

.github/workflows/update.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@ jobs:
5757
diff --color=always -u index.html-public build/index.html || :
5858
cat build/index.html
5959
- run: uv run generate_metadata.py # generates metadata.html
60-
- run: cp metadata.html warnings* build
6160
- name: Deploy metadata view 🚀
6261
if: github.event_name != 'pull_request'
6362
uses: JamesIves/github-pages-deploy-action@v4

build_warnings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,5 +33,5 @@ def number(clones_dir: str, repo: str, language_code: str) -> int:
3333
f'./sphinxbuild/{language_code}', # outputdir
3434
)
3535
)
36-
copyfile(warning_file, f'warnings-{language_code}.txt')
36+
copyfile(warning_file, f'build/warnings-{language_code}.txt')
3737
return len(findall('ERROR|WARNING', Path(warning_file).read_text()))

src/style.css

Lines changed: 26 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
/* GLOBAL STYLES
2-
-------------------------------------------------- */
3-
/* Padding below the footer and lighter body text */
1+
/* ------------------------ GLOBAL STYLES -------------------------- */
42

53
body {
64
padding-top: 4.5rem;
@@ -9,7 +7,6 @@ body {
97
padding-bottom: 3rem;
108
color: #5a5a5a;
119
background-color: rgb(245, 245, 245);
12-
overflow-x: hidden; /* Risky, this need testing but I find scroll bar annoying */
1310
}
1411

1512
a {
@@ -20,12 +17,13 @@ a:hover {
2017
color: #1595fe;
2118
}
2219

23-
/* NAVAR
24-
* ----------------------------------------*/
20+
/* --------------------------- NAVBAR ------------------------------ */
2521

2622
.navbar {
27-
background-color: rgb(245, 245, 245);
23+
background-color: rgb(245, 245, 245, 0.6);
24+
backdrop-filter: blur(10px);
2825
border-bottom: 0.25px solid #999;
26+
-webkit-backdrop-filter: blur(10px);
2927
}
3028

3129
.navbar li {
@@ -45,8 +43,7 @@ a:hover {
4543
color: #0d0d0d;
4644
}
4745

48-
/* Cards and card columns
49-
----------------------------- */
46+
/* ----------------------- Cards and card columns --------------------------- */
5047

5148
.row > [class^="col-"] {
5249
display: flex;
@@ -79,7 +76,26 @@ a:hover {
7976
}
8077
}
8178

82-
/* -------------------------- OLD STUFF ------------------------------------ */
79+
/* ------------------------------ Index ------------------------------------- */
80+
81+
.progress-bar-container {
82+
border-radius: 4px;
83+
border: 1px solid rgba(0, 0, 0, 0.2);
84+
height: 20px;
85+
overflow: hidden;
86+
position: relative;
87+
}
88+
89+
.progress-bar-index {
90+
display: inline-block;
91+
color: white;
92+
height: 100%;
93+
line-height: 20px;
94+
border-top-left-radius: 4px;
95+
border-bottom-left-radius: 4px;
96+
}
97+
98+
/* ------------------------------ Tables ------------------------------------ */
8399

84100
table {
85101
border-collapse: collapse;

templates/index.html.jinja

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,23 @@
77
<div class="col-12 col-sm-6 col-md-4 d-flex">
88
<a href="{{ project.language.code }}.html" class="card mb-3 w-100">
99
<div class="card-body">
10-
<h5 class="card-title">{{ project.language.name }} ({{ project.language.code }})</h5>
11-
<h6 class="card-subtitle mb-2 text-muted">Completion: {{ '{:.2f}%'.format(project.completion) }}</h6>
10+
<h4 class="card-title">{{ project.language.name }} ({{ project.language.code }})</h4>
11+
<h5 class="card-subtitle mb-2">Completion: <strong>{{ '{:.2f}%'.format(project.completion) }}</strong></h5>
12+
<h6 class="card-subtitle mb-2 text-muted">30 Days Progress: {{ '{:.2f}%'.format(project.change) }}</h6>
1213
<h6 class="card-subtitle mb-2 text-muted">Translators: {{ project.translators.number }}</h6>
14+
<div class="progress-bar-container">
15+
<div class="progress-bar-index" style="width: {{ project.completion }}%;
16+
{% if project.change %}
17+
background: linear-gradient(to left, #94cf96 {{ project.change * 100 / project.completion }}%, #4caf50 {{ project.change * 100 / project.completion }}%);
18+
{% else %}
19+
background-color: #4caf50;
20+
{% endif %}">
21+
</div>
22+
</div>
1323
</div>
1424
</a>
1525
</div>
1626
{% endfor %}
1727
</div>
1828
</div>
19-
{% endblock %}
29+
{% endblock %}

0 commit comments

Comments
 (0)