Skip to content

Commit 44e89f4

Browse files
committed
More wrappers
1 parent 3979926 commit 44e89f4

8 files changed

Lines changed: 35 additions & 138 deletions

File tree

hypha/apply/dashboard/templates/dashboard/staff_dashboard.html

Lines changed: 24 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@
2020

2121

2222
{% block content %}
23-
<div class="wrapper wrapper--large wrapper--inner-space-medium">
24-
<div class="wrapper wrapper--bottom-space">
23+
<div class="flex flex-col gap-8 my-8">
24+
<section>
2525
{% if my_tasks.count %}
2626
{% include "dashboard/includes/my-tasks.html" with mytasks=mytasks %}
2727
{% endif %}
@@ -65,19 +65,19 @@ <h4 id="my-reviews-title" class="m-0 stat-title">{% trans "Your previous reviews
6565
</div>
6666
{% endif %}
6767
</div>
68-
</div>
68+
</section>
6969

70-
<div id="submissions-awaiting-review" class="wrapper wrapper--bottom-space">
70+
<section id="submissions-awaiting-review">
7171
{% include "dashboard/includes/submissions-waiting-for-review.html" with in_review_count=awaiting_reviews.count my_review=awaiting_reviews.table display_more=awaiting_reviews.display_more active_statuses_filter=awaiting_reviews.active_statuses_filter %}
72-
</div>
72+
</section>
7373

7474
{% if my_flagged.count %}
75-
<div id="submissions-flagged" class="wrapper wrapper--bottom-space">
76-
<h3 class="mb-2 text-xl">
75+
<section id="submissions-flagged">
76+
<h2 class="mb-2 card-title">
7777
<a href="{% url "apply:submissions:list" %}?query=flagged:@me">
7878
Your flagged submissions <span class="badge badge-soft badge-secondary">{{ my_flagged.count }}</span>
7979
</a>
80-
</h3>
80+
</h2>
8181

8282
{% include "submissions/partials/submissions-inline.html" with submissions=my_flagged.objects row_layout="table" %}
8383

@@ -86,62 +86,63 @@ <h3 class="mb-2 text-xl">
8686
<a href="{% url "apply:submissions:list" %}?query=flagged:@me">Show All</a>
8787
</div>
8888
{% endif %}
89-
</div>
89+
</section>
9090
{% endif %}
9191

9292
{% if rounds.closed or rounds.open %}
93-
{% include "funds/includes/round-block.html" with can_export=can_export closed_rounds=rounds.closed open_rounds=rounds.open title="Your rounds and labs" page_type='dashboard' %}
93+
<section>
94+
{% include "funds/includes/round-block.html" with can_export=can_export closed_rounds=rounds.closed open_rounds=rounds.open title="Your rounds and labs" page_type='dashboard' %}
95+
</section>
9496
{% endif %}
9597

9698
{% if PROJECTS_ENABLED and paf_for_review.count %}
97-
<div id="paf_for_review" class="wrapper wrapper--bottom-space">
99+
<section id="paf_for_review">
98100
<h2 class="mb-2 card-title">{% trans "Project forms for review" %}</h2>
99101
<div class="card card-border shadow-xs">
100102
<div class="p-0 card-body">
101103
{% render_table paf_for_review.table %}
102104
</div>
103105
</div>
104-
</div>
106+
</section>
105107
{% endif %}
106108

107109
{% if PROJECTS_ENABLED and projects.table.data %}
108-
<div id="active-projects" class="wrapper wrapper--bottom-space">
109-
<h3 class="mb-2 text-xl">
110+
<section id="active-projects">
111+
<h2 class="mb-2 card-title">
110112
{% trans "Your projects" %}
111-
</h3>
113+
</h2>
112114

113115
{% render_table projects.table %}
114116

115117
<div class="flex justify-center items-center py-3 font-semibold border-b border-x">
116118
<a href="{{ projects.url }}?lead={{ request.user.pk }}">{% trans "Show all" %}</a>
117119
</div>
118-
</div>
120+
</section>
119121
{% endif %}
120122

121123
{% if PROJECTS_ENABLED and active_invoices.count %}
122-
<div id="active-invoices" class="wrapper wrapper--bottom-space">
124+
<section id="active-invoices">
123125
<h2 class="card-title">{% trans "Active Invoices" %}</h2>
124126
{% render_table active_invoices.table %}
125-
</div>
127+
</section>
126128
{% endif %}
127129

128130
{% if my_reviewed.count %}
129-
<div class="wrapper wrapper--bottom-space">
130-
<h3 class="mb-2 text-xl">
131+
<section>
132+
<h2 class="mb-2 card-title">
131133
<a href="{% url "apply:submissions:list" %}?query=reviewed-by:@me">
132134
{% trans "Your previous reviews" %} <span class="badge badge-soft badge-secondary">{{ my_reviewed.count }}</span>
133135
</a>
134-
</h3>
136+
</h2>
135137
{% include "submissions/partials/submissions-inline.html" with submissions=my_reviewed.objects row_layout="table" %}
136138

137139
{% if my_reviewed.display_more %}
138140
<div class="flex justify-center items-center py-3 font-semibold border-b border-x">
139141
<a href="{% url "apply:submissions:list" %}?query=reviewed-by:@me">{% trans "Show all" %}</a>
140142
</div>
141143
{% endif %}
142-
</div>
144+
</section>
143145
{% endif %}
144-
145146
</div>
146147
{% endblock %}
147148

hypha/apply/funds/templates/funds/application_base.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ <h4>
126126
{% endif %}
127127
</div>
128128
</form>
129-
<p class="wrapper--error message-no-js js-hidden">
129+
<p class="alert alert-error message-no-js js-hidden">
130130
{% trans "You must have Javascript enabled to use this form." %}
131131
</p>
132132
{% endif %}

hypha/apply/funds/templates/funds/applicationsubmission_form.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
{% endfor %}
5151
</div>
5252
</form>
53-
<p class="wrapper--error message-no-js js-hidden">
53+
<p class="alert alert-error message-no-js js-hidden">
5454
{% trans "You must have Javascript enabled to use this form." %}
5555
</p>
5656
</div>

hypha/apply/funds/templates/funds/submissions_result.html

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,9 @@
1010
{% endblock %}
1111

1212
{% block content %}
13-
<div class="wrapper wrapper--large wrapper--inner-space-medium">
14-
<section class="wrapper wrapper--bottom-space">
15-
<div class="flex flex-wrap gap-4 lg:gap-8">
16-
13+
<div class="flex flex-col gap-8 my-8 mx-auto max-w-6xl">
14+
<section>
15+
<div class="flex flex-wrap gap-4 justify-between lg:gap-8">
1716
<section aria-labelledby="amounts-heading">
1817
<h3 id="amounts-heading" class="mb-2 card-title">{% trans "Amounts" %}</h3>
1918
<div class="shadow lg:w-full stats">
@@ -100,8 +99,8 @@ <h3 id="reviews-heading" class="mb-2 card-title">{% trans "Reviews" %}</h3>
10099
</div>
101100
</section>
102101

103-
<section class="wrapper wrapper--bottom-space" aria-labelledby="submission-value-total">
104-
<h3 id="submission-value-total" class="card-title">{% trans "Totals" %}</h3>
102+
<section aria-labelledby="submission-value-total">
103+
<h2 id="submission-value-total" class="mb-2 card-title">{% trans "Totals" %}</h2>
105104

106105

107106
{% include "funds/includes/table_filter_and_search.html" with search_term=search_term %}
@@ -130,7 +129,7 @@ <h3 id="submission-value-total" class="card-title">{% trans "Totals" %}</h3>
130129

131130
{% if not count_values == object_list.count %}
132131
{% with object_list.count|subtract:count_values as count_diff %}
133-
<p class="text-xs text-base-content/60" aria-live="polite">
132+
<p class="mt-1 text-xs text-fg-muted" aria-live="polite">
134133
{% blocktrans %}*{{ count_diff }} submission(s) lack requested amount fields or data and are not included.{% endblocktrans %}
135134
</p>
136135
{% endwith %}

hypha/apply/templates/forms/includes/form_errors.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
{% load i18n heroicons %}
22

33
{% if form.errors or form.non_field_errors %}
4-
<div class="wrapper wrapper--medium wrapper--error">
5-
{% heroicon_solid "exclamation-triangle" class="inline me-1 fill-red-500" aria_hidden=true %}
6-
<h5 class="heading heading--no-margin heading--regular">{% trans "There were some errors with your form. Please amend the fields highlighted below." %}</h5>
4+
<div class="alert alert-error" role="alert">
5+
{% heroicon_solid "exclamation-triangle" aria_hidden=true %}
6+
<span>{% trans "There were some errors with your form. Please amend the fields highlighted below." %}</span>
77
{% if form.non_field_errors %}
88
<ul>
99
{% for error in form.non_field_errors %}

hypha/static_src/sass/components/_form.scss

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -164,16 +164,6 @@
164164
}
165165
}
166166

167-
&__label {
168-
.wrapper--comments & {
169-
font-size: 15px;
170-
}
171-
}
172-
173-
&__required {
174-
color: variables.$color--purple;
175-
}
176-
177167
&__help {
178168
margin: 0;
179169
color: var(--color-fg-muted);

hypha/static_src/sass/components/_heading.scss

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -41,16 +41,4 @@
4141
line-height: 1.75rem;
4242
margin-block-end: 0.25rem;
4343
}
44-
45-
&--activity-feed {
46-
line-height: 1.1;
47-
text-align: center;
48-
49-
@include mixins.responsive-font-sizes(12px, 18px);
50-
51-
@include mixins.media-query(md) {
52-
line-height: auto;
53-
text-align: start;
54-
}
55-
}
5644
}

hypha/static_src/sass/components/_wrapper.scss

Lines changed: 0 additions & 81 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,6 @@
2727
}
2828
}
2929

30-
&--default-bg {
31-
background-color: var(--color-bg-default);
32-
}
33-
3430
&--embed {
3531
width: 100%;
3632
height: 100%;
@@ -59,20 +55,6 @@
5955
}
6056
}
6157

62-
&--error {
63-
display: flex;
64-
align-items: center;
65-
max-width: 830px;
66-
padding: 10px;
67-
margin: 0 auto 2rem;
68-
background: variables.$color--light-pink;
69-
border: 1px solid variables.$color--tomato;
70-
71-
.feed & {
72-
margin: 0 0 1rem;
73-
}
74-
}
75-
7658
&--bottom-space {
7759
padding-block-end: 20px;
7860
margin-block-end: 20px;
@@ -83,11 +65,6 @@
8365
}
8466
}
8567

86-
// Inner spacing
87-
&--inner-space-small {
88-
padding: 20px 0;
89-
}
90-
9168
&--inner-space-medium {
9269
padding: calc(var(--spacing) * 2) 0;
9370

@@ -96,27 +73,6 @@
9673
}
9774
}
9875

99-
&--inner-space-large {
100-
padding: 20px 0;
101-
102-
@include mixins.media-query(md) {
103-
padding: 2rem 0;
104-
}
105-
}
106-
107-
&--inner-space-xl {
108-
padding: 2rem 20px;
109-
110-
@include mixins.media-query(md) {
111-
padding: 4rem 20px;
112-
}
113-
}
114-
115-
// Outer spacing
116-
&--top-outer-space-small {
117-
margin: 20px 0 0;
118-
}
119-
12076
&--outer-space-medium {
12177
padding-block: calc(var(--spacing) * 4);
12278
}
@@ -143,12 +99,6 @@
14399
}
144100
}
145101

146-
&--applicant-dashboard {
147-
display: flex;
148-
flex-wrap: wrap;
149-
justify-content: space-between;
150-
}
151-
152102
&--status-bar-outer {
153103
padding: 20px 0;
154104
background-color: var(--color-base-100);
@@ -165,35 +115,4 @@
165115
margin-block-end: 0;
166116
}
167117
}
168-
169-
&--activity-feed {
170-
padding: 0 20px;
171-
margin-block-start: 50px;
172-
173-
@include mixins.media-query(lg) {
174-
margin-block-start: 70px;
175-
}
176-
}
177-
178-
&--comments {
179-
margin-block-end: 1rem;
180-
border-block-end: 1px solid variables.$color--mid-grey;
181-
182-
.helptext {
183-
font-size: 15px;
184-
}
185-
}
186-
187-
&--submission-actions {
188-
margin-inline-start: auto;
189-
display: flex;
190-
margin-block-start: 1rem;
191-
align-items: flex-start;
192-
193-
@include mixins.media-query(lg) {
194-
margin-block-start: 0;
195-
justify-content: flex-end;
196-
flex: 1;
197-
}
198-
}
199118
}

0 commit comments

Comments
 (0)