-
Notifications
You must be signed in to change notification settings - Fork 104
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Edit achievements #437
base: main
Are you sure you want to change the base?
Edit achievements #437
Changes from 1 commit
4c58a85
1dd4735
be4c7d1
df93d1a
a68db2e
3b4a8fa
883c439
c43a264
8ddf4bb
23abc8c
eb11834
3849707
f9c26ed
fa49f24
a068fe8
439944b
be1689c
023b76d
91289fb
130b868
4b3067c
8c312f8
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,15 @@ | ||
{% load i18n static mathfilters %} | ||
{% load i18n static contrib_extras %} | ||
|
||
<div class="progress d-flex justify-content-between" style="height: max-content;"> | ||
<div class="bg-info text-dark text-start aligns-items-center" role="progressbar" style="width: {{ contribution|div:achievement_made_count|mul:100|floatformat:0 }}%;" aria-valuenow="25" aria-valuemin="0" aria-valuemax="100"> | ||
<div class="bg-info text-dark text-start aligns-items-center" role="progressbar" style="width: {% calc_percent_achievement contribution achievement_made_count %}%;" aria-valuenow="25" aria-valuemin="0" aria-valuemax="100"> | ||
<dl class="p-2 fs-6 mb-0" style="width:50vw;"> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. тут какой-то скастомный стиль используется. Давайте от такого избавляться (он инлайн стилей). Посмотрите, есть ли в бутстрапе похожий класс, если нет, то можно добавить кастомный класс, который именуется через префикс There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. А тут не поправили? Посмотрите, как в сикпе сделаны кастомные стили - https://github.com/Hexlet/hexlet-sicp/blob/f02ff453e6c8b045764f497fe536e8ecd24913b6/resources/sass/_custom.scss#L1-L23 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. style="height: max-content и style="width:50vw перенесены в base.css как кастомные стили. style="width: {{ contribution|div:achievement_made_count|mul:100|floatformat:0 }} используемый прогрессбаром остается, так как увидел подобное решение в образце от bootstrap |
||
<dt>{% trans achievement_name %}</dt> | ||
<dd class="mb-0">{% trans achievement_description %}</dd> | ||
</dl> | ||
</div> | ||
|
||
<div class="p-2 fs-6 d-flex justify-content-center align-items-center"> | ||
{% if contribution|div:achievement_made_count|mul:100 > 100 %} | ||
100.0% | ||
{% else %} | ||
{{ contribution|div:achievement_made_count|mul:100|floatformat:1 }}% | ||
{% endif %} | ||
{% calc_percent_achievement contribution achievement_made_count %}% | ||
</div> | ||
</div> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
здесь тоже какой-то кастомный styel
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
перенесено в base.css как кастомный стиль.