Skip to content

Commit 2a2dc44

Browse files
committed
Use non-outline secondary buttons with new styling
1 parent 0e2a16e commit 2a2dc44

File tree

9 files changed

+45
-31
lines changed

9 files changed

+45
-31
lines changed

media/commitfest/css/commitfest.css

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,20 @@ a:hover .badge {
152152
white-space: nowrap;
153153
}
154154

155+
/* Light grey btn-secondary with dark text that darkens on hover */
156+
.btn-secondary {
157+
--bs-btn-color: #495057;
158+
--bs-btn-bg: #f2f2f2;
159+
--bs-btn-border-color: #f2f2f2;
160+
--bs-btn-hover-color: #212529;
161+
--bs-btn-hover-bg: #dee2e6;
162+
--bs-btn-hover-border-color: #dee2e6;
163+
--bs-btn-focus-shadow-rgb: 222, 226, 230;
164+
--bs-btn-active-color: #212529;
165+
--bs-btn-active-bg: #ced4da;
166+
--bs-btn-active-border-color: #ced4da;
167+
}
168+
155169
/* Responsive navbar layout */
156170
.navbar-content-wrapper {
157171
display: flex;

pgcommitfest/commitfest/templates/base_form.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ <h3 class="modal-title">Search user</h3>
5959
<form class="d-flex gap-2" style="margin-bottom: 5px;">
6060
<div class="input-group">
6161
<input id="searchUserSearchField" type="text" class="form-control" autocomplete="off">
62-
<button id="searchUserSearchButton" onclick="return findUsers()" class="btn btn-outline-secondary">Search</button>
62+
<button id="searchUserSearchButton" onclick="return findUsers()" class="btn btn-secondary">Search</button>
6363
</div>
6464
</form>
6565
<div>Search for users above and then pick one in the list below:</div>
@@ -68,7 +68,7 @@ <h3 class="modal-title">Search user</h3>
6868
</div>
6969
</div>
7070
<div class="modal-footer">
71-
<a href="#" class="btn btn-outline-secondary" data-bs-dismiss="modal">Close</a>
71+
<a href="#" class="btn btn-secondary" data-bs-dismiss="modal">Close</a>
7272
<a href="#" id="doSelectUserButton" class="btn btn-primary disabled">Add user to system</a>
7373
</div>
7474
</div>
@@ -83,7 +83,7 @@ <h3 class="modal-title">Search user</h3>
8383
<script>
8484
{%if user.is_staff%}
8585
$('.selectize-control.add-user-picker').after(
86-
$('<a href="#" class="btn btn-outline-secondary btn-sm">Import user not listed</a>').click(function () {
86+
$('<a href="#" class="btn btn-secondary btn-sm">Import user not listed</a>').click(function () {
8787
search_and_store_user();
8888
})
8989
);

pgcommitfest/commitfest/templates/commitfest.html

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
{%load commitfest %}
33
{%block contents%}
44

5-
<button type="button" class="btn btn-outline-secondary active" id="filterButton" onClick="togglePatchFilterButton('filterButton', 'collapseFilters')">Search/filter</button>
6-
<a class="btn btn-outline-secondary{% if request.GET.reviewer == '-2' %} active{% endif %}" href="?reviewer=-2">No reviewers</a>
7-
<a class="btn btn-outline-secondary{% if request.GET.author == '-3' %} active{% endif %}" href="?author=-3">My patches</a>
8-
<a class="btn btn-outline-secondary{% if request.GET.reviewer == '-3' %} active{% endif %}" href="?reviewer=-3">My reviews</a>
5+
<button type="button" class="btn btn-secondary active" id="filterButton" onClick="togglePatchFilterButton('filterButton', 'collapseFilters')">Search/filter</button>
6+
<a class="btn btn-secondary{% if request.GET.reviewer == '-2' %} active{% endif %}" href="?reviewer=-2">No reviewers</a>
7+
<a class="btn btn-secondary{% if request.GET.author == '-3' %} active{% endif %}" href="?author=-3">My patches</a>
8+
<a class="btn btn-secondary{% if request.GET.reviewer == '-3' %} active{% endif %}" href="?reviewer=-3">My reviews</a>
99
{%if cf.is_open or user.is_staff %}
10-
<a class="btn btn-outline-secondary" href="new/">New patch</a>
10+
<a class="btn btn-secondary" href="new/">New patch</a>
1111
{%endif%}
1212
{%include "filter_form.html" %}
1313

@@ -111,11 +111,11 @@ <h3>{{p.is_open|yesno:"Active patches,Closed patches"}}</h3>
111111

112112
<div>
113113
{%if cf.is_open or user.is_staff %}
114-
<a class="btn btn-outline-secondary" href="new/">New patch</a>
114+
<a class="btn btn-secondary" href="new/">New patch</a>
115115
{%endif%}
116116
{%if user.is_staff%}
117117
<div class="btn-group dropup">
118-
<button type="button" class="btn btn-outline-secondary dropdown-toggle" data-bs-toggle="dropdown" aria-expanded="false">Send private mail</button>
118+
<button type="button" class="btn btn-secondary dropdown-toggle" data-bs-toggle="dropdown" aria-expanded="false">Send private mail</button>
119119
<ul class="dropdown-menu">
120120
<li><a class="dropdown-item" href="javascript:send_selected()">Selected</a></li>
121121
<li><a class="dropdown-item" href="send_email/?reviewers={{openpatchids|join:","}}">All reviewers (open patches)</a></li>
@@ -125,7 +125,7 @@ <h3>{{p.is_open|yesno:"Active patches,Closed patches"}}</h3>
125125
</div>
126126

127127
<div class="btn-group dropup">
128-
<button type="button" class="btn btn-outline-secondary dropdown-toggle" data-bs-toggle="dropdown" aria-expanded="false">Reports</button>
128+
<button type="button" class="btn btn-secondary dropdown-toggle" data-bs-toggle="dropdown" aria-expanded="false">Reports</button>
129129
<ul class="dropdown-menu">
130130
<li><a class="dropdown-item" href="reports/authorstats/">Author stats</a></li>
131131
</ul>

pgcommitfest/commitfest/templates/filter_form.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@
2323
</td>
2424
{%endfor%}
2525
<td>
26-
<input type="submit" class="btn btn-outline-secondary" value="Filter">
27-
<a class="btn btn-outline-secondary" href=".">Clear</a>
26+
<input type="submit" class="btn btn-secondary" value="Filter">
27+
<a class="btn btn-secondary" href=".">Clear</a>
2828
</td>
2929
</tr>
3030
</tbody>

pgcommitfest/commitfest/templates/patch.html

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
{%endfor%}
4444
{%endif%}
4545
{%if cfbot_branch %}
46-
<button class="btn btn-outline-secondary" title="This adds the following to your clipboard (needs to be run in an existing git repo):
46+
<button class="btn btn-secondary" title="This adds the following to your clipboard (needs to be run in an existing git repo):
4747
git remote add commitfest https://github.com/postgresql-cfbot/postgresql.git
4848
git fetch commitfest cf/{{patch.id}}
4949
git checkout commitfest/cf/{{patch.id}}" onclick="addGitCheckoutToClipboard({{patch.id}})">Copy git checkout commands</button>
@@ -106,12 +106,12 @@
106106
</tr>
107107
<tr>
108108
<th>Reviewers</th>
109-
<td>{{patch.reviewers_string}}<a href="reviewer/{{is_reviewer|yesno:"remove,become"}}/" class="btn btn-outline-secondary float-end">{{is_reviewer|yesno:"Remove from reviewers,Become reviewer"}}</a></td>
109+
<td>{{patch.reviewers_string}}<a href="reviewer/{{is_reviewer|yesno:"remove,become"}}/" class="btn btn-secondary float-end">{{is_reviewer|yesno:"Remove from reviewers,Become reviewer"}}</a></td>
110110
</tr>
111111
<tr>
112112
<th>Committer</th>
113113
<td>{%if patch.committer%}{{patch.committer.fullname}}{%endif%}
114-
{%if is_committer%}<a href="committer/{{is_this_committer|yesno:"remove,become"}}/" class="btn btn-outline-secondary float-end">{{is_this_committer|yesno:"Unclaim as committer,Claim as committer"}}</a>{%endif%}
114+
{%if is_committer%}<a href="committer/{{is_this_committer|yesno:"remove,become"}}/" class="btn btn-secondary float-end">{{is_this_committer|yesno:"Unclaim as committer,Claim as committer"}}</a>{%endif%}
115115
</td>
116116
</tr>
117117
<tr>
@@ -129,9 +129,9 @@
129129
<th>Emails</th>
130130
<td>
131131
{%if user.is_authenticated%}
132-
<div style="float:right"><button class="btn btn-outline-secondary" onclick="attachThread({{cf.id}},{{patch.id}})">Attach thread</button></div>
132+
<div style="float:right"><button class="btn btn-secondary" onclick="attachThread({{cf.id}},{{patch.id}})">Attach thread</button></div>
133133
{%else%}
134-
<div style="float:right"><button class="btn btn-outline-secondary" onclick="location.href='/account/login/?next=/{{cf.id}}/{{patch.id}}/%3Fattachthreadnow'">Attach thread</button></div>
134+
<div style="float:right"><button class="btn btn-secondary" onclick="location.href='/account/login/?next=/{{cf.id}}/{{patch.id}}/%3Fattachthreadnow'">Attach thread</button></div>
135135
{%endif%}
136136
<dl>
137137
{%for t in patch.mailthread_set.all%}
@@ -141,7 +141,7 @@
141141
Latest at <a href="https://www.postgresql.org/message-id/{{t.latestmsgid}}">{{t.latestmessage}}</a> by {{t.latestauthor|hidemail}}<br/>
142142
{%for ta in t.mailthreadattachment_set.all%}
143143
{%if forloop.first%}
144-
Latest attachment (<a href="https://www.postgresql.org/message-id/attachment/{{ta.attachmentid}}/{{ta.filename}}">{{ta.filename}}</a>) at <a href="https://www.postgresql.org/message-id/{{ta.messageid}}">{{ta.date}}</a> from {{ta.author|hidemail}} <button type="button" class="btn btn-outline-secondary btn-sm" data-bs-toggle="collapse" data-bs-target="#att{{t.pk}}" title="Show all attachments">+</button>
144+
Latest attachment (<a href="https://www.postgresql.org/message-id/attachment/{{ta.attachmentid}}/{{ta.filename}}">{{ta.filename}}</a>) at <a href="https://www.postgresql.org/message-id/{{ta.messageid}}">{{ta.date}}</a> from {{ta.author|hidemail}} <button type="button" class="btn btn-secondary btn-sm" data-bs-toggle="collapse" data-bs-target="#att{{t.pk}}" title="Show all attachments">+</button>
145145
<div id="att{{t.pk}}" class="collapse">
146146
{%endif%}
147147
&nbsp;&nbsp;&nbsp;&nbsp;Attachment (<a href="https://www.postgresql.org/message-id/attachment/{{ta.attachmentid}}/{{ta.filename}}">{{ta.filename}}</a>) at <a href="https://www.postgresql.org/message-id/{{ta.messageid}}">{{ta.date}}</a> from {{ta.author|hidemail}} (Patch: {{ta.ispatch|yesno:"Yes,No,Pending check"}})<br/>
@@ -173,7 +173,7 @@ <h4>Annotations</h4>
173173
</table>
174174
{%endif%}
175175
{%endfor%}
176-
{%if user.is_authenticated%}<button class="btn btn-sm btn-outline-secondary" onclick="addAnnotation({{t.id}})">Add annotation</button>{%endif%}
176+
{%if user.is_authenticated%}<button class="btn btn-sm btn-secondary" onclick="addAnnotation({{t.id}})">Add annotation</button>{%endif%}
177177
</div>
178178
</dd>
179179
{%endfor%}
@@ -204,7 +204,7 @@ <h4>Annotations</h4>
204204
</table>
205205
</div>
206206
{%if user.is_authenticated%}
207-
<a href="{{is_subscribed|yesno:"unsubscribe,subscribe"}}/" class="btn btn-outline-secondary">{{is_subscribed|yesno:"Unsubscribe from patch update emails,Subscribe to patch update emails"}}</a>
207+
<a href="{{is_subscribed|yesno:"unsubscribe,subscribe"}}/" class="btn btn-secondary">{{is_subscribed|yesno:"Unsubscribe from patch update emails,Subscribe to patch update emails"}}</a>
208208
{%endif%}
209209
</td>
210210
</tr>
@@ -237,7 +237,7 @@ <h3>Flag as committed</h3>
237237
</form>
238238
</div>
239239
<div class="modal-footer">
240-
<a href="#" class="btn btn-outline-secondary" data-bs-dismiss="modal">Close</a>
240+
<a href="#" class="btn btn-secondary" data-bs-dismiss="modal">Close</a>
241241
<a href="#" class="btn btn-primary" id="doCommitButton">Flag as committed</a>
242242
</div>
243243
</div>
@@ -269,7 +269,7 @@ <h3>Add annotation</h3>
269269
</div>
270270
</div>
271271
<div class="modal-footer">
272-
<a href="#" class="btn btn-outline-secondary" data-bs-dismiss="modal">Close</a>
272+
<a href="#" class="btn btn-secondary" data-bs-dismiss="modal">Close</a>
273273
<a href="#" id="doAnnotateMessageButton" class="btn btn-primary disabled">Add annotation</a>
274274
</div>
275275
</div></div>

pgcommitfest/commitfest/templates/patch_commands.inc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
<div style="margin-bottom:5px;">
2-
<a class="btn btn-outline-secondary" href="edit/">Edit</a>
2+
<a class="btn btn-secondary" href="edit/">Edit</a>
33

44
<div class="btn-group">
5-
<button class="btn btn-outline-secondary dropdown-toggle" type="button" data-bs-toggle="dropdown" aria-expanded="false">Comment/Review</button>
5+
<button class="btn btn-secondary dropdown-toggle" type="button" data-bs-toggle="dropdown" aria-expanded="false">Comment/Review</button>
66
<ul class="dropdown-menu">
77
<li><a class="dropdown-item" href="comment/">Comment</a></li>
88
<li><a class="dropdown-item" href="review/">Review</a></li>
99
</ul>
1010
</div>
1111

1212
<div class="btn-group">
13-
<button class="btn btn-outline-secondary dropdown-toggle" type="button" data-bs-toggle="dropdown" aria-expanded="false">Change Status</button>
13+
<button class="btn btn-secondary dropdown-toggle" type="button" data-bs-toggle="dropdown" aria-expanded="false">Change Status</button>
1414
<ul class="dropdown-menu">
1515
<li><h6 class="dropdown-header">Open statuses</h6></li>
1616
<li><a class="dropdown-item" href="status/review/">Needs review</a></li>
@@ -48,7 +48,7 @@
4848

4949
{%if request.user.is_staff%}
5050
<div class="btn-group">
51-
<button class="btn btn-outline-secondary dropdown-toggle" type="button" data-bs-toggle="dropdown" aria-expanded="false">Send private mail</button>
51+
<button class="btn btn-secondary dropdown-toggle" type="button" data-bs-toggle="dropdown" aria-expanded="false">Send private mail</button>
5252
<ul class="dropdown-menu">
5353
<li><a class="dropdown-item" href="send_email/?authors={{patch.id}}">Send mail to authors</a></li>
5454
<li><a class="dropdown-item" href="send_email/?reviewers={{patch.id}}">Send mail to reviewers</a></li>

pgcommitfest/commitfest/templates/patchsearch.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<div class="form-group">
77
<input type="text" class="form-control" id="searchterm" name="searchterm" placeholder="Global search">
88
</div>
9-
<button type="submit" class="btn btn-outline-secondary">Search</button>
9+
<button type="submit" class="btn btn-secondary">Search</button>
1010
</form>
1111

1212
<table class="table table-striped table-bordered table-hover">

pgcommitfest/commitfest/templates/thread_attach.inc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<input type="hidden" id="attachThreadAttachOnly" value="0">
1111
<div class="input-group">
1212
<input id="attachThreadSearchField" type="text" class="form-control" placeholder="Search subject or name">
13-
<button id="attachThreadSearchButton" onclick="return findLatestThreads()" class="btn btn-outline-secondary">Search</button>
13+
<button id="attachThreadSearchButton" onclick="return findLatestThreads()" class="btn btn-secondary">Search</button>
1414
</div>
1515
</form>
1616
<div class="mb-3">Pick one of the recent emails from pgsql-hackers, or search above for subject or name:</div>
@@ -22,7 +22,7 @@
2222
<input type="text" id="attachThreadMessageId" class="form-control" placeholder="Message id" onkeypress="attachThreadChanged()" onchange="attachThreadChanged()">
2323
</div>
2424
<div class="modal-footer">
25-
<button type="button" class="btn btn-outline-secondary" data-bs-dismiss="modal">Close</button>
25+
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button>
2626
<button type="button" id="doAttachThreadButton" class="btn btn-primary disabled">Attach thread</button>
2727
</div>
2828
</div></div>

pgcommitfest/commitfest/widgets.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ def render(self, name, value, attrs=None, renderer=None):
88
html = super(ThreadPickWidget, self).render(name, value, attrs)
99
html = (
1010
html
11-
+ '&nbsp;<button class="btn btn-outline-secondary attachThreadButton" id="btn_%s">Find thread</button>'
11+
+ '&nbsp;<button class="btn btn-secondary attachThreadButton" id="btn_%s">Find thread</button>'
1212
% name
1313
)
1414
return mark_safe(html)

0 commit comments

Comments
 (0)