-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
) * feat(frontend): Fix CSS issues and UI cleanups * feat(frontend): Remove unused css * [Bot] Update version to 2.4.1 * fix(frontend): extend "listing type" width * fix(frontend): Update email separator to ',' --------- Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
- Loading branch information
1 parent
f7e44bd
commit 0ec8031
Showing
12 changed files
with
195 additions
and
182 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,116 @@ | ||
/****** Print Styles ******/ | ||
/* | ||
TODO: | ||
- This print stylesheet was originally mixed into body.css, making it unnecessarily long and hard to maintain. | ||
- Cleaned it up a bit, but it still needs further refactoring for better readability and maintainability. | ||
- One approach worth considering is using a `.no-print` class in the HTML instead of explicitly listing elements here. | ||
- Something like `@media print { .no-print { display: none !important; } }` would make it cleaner and easier to manage. | ||
*/ | ||
|
||
#wheader, .cblock, .rsummary, .mobileHeader, #footerMain, #footerMainNoPatch, .title, .btn-primary { | ||
display: none; | ||
@media print { | ||
/* Hide unnecessary UI elements */ | ||
.uw-thinstrip, #dawgdrops, #quicklinks, #uwsearcharea, .uw-breadcrumbs, | ||
.uw-hero-image, .uw-hero-image:after, .uw-hero-image:before, .uw-news-image, | ||
.site-news.single .uw-site-title, .screen-reader-shortcut, #wpadminbar, #respond, | ||
.uw-footer h4, .uw-footer .footer-social, .uw-footer > a, .uw-footer, | ||
.cblock, .results-summary, .title, .btn-primary, #view-more, .navbar, .view-more { | ||
display: none !important; | ||
} | ||
|
||
/* Footer cleanup */ | ||
.uw-footer { | ||
border-top: none; | ||
} | ||
|
||
.uw-footer ul.footer-links li a { | ||
color: #fff !important; | ||
} | ||
|
||
/* Layout fixes */ | ||
.info-box, .widget, ul.uw-sidebar-menu { | ||
margin-left: 0; | ||
padding-left: 0; | ||
margin-top: 0; | ||
} | ||
|
||
/* Reset styles for print */ | ||
* { | ||
text-shadow: none !important; | ||
color: #000 !important; | ||
background: transparent !important; | ||
box-shadow: none !important; | ||
position: static !important; | ||
overflow: visible !important; | ||
} | ||
|
||
/* Typography adjustments */ | ||
.site-regents { | ||
font-size: 14px !important; | ||
line-height: 18px !important; | ||
} | ||
|
||
.site-regents h1 { font-size: 23px !important; } | ||
.site-regents h2 { font-size: 20px !important; } | ||
.site-regents h2.uw-site-title { font-size: 40px !important; } | ||
.site-regents h3, .site-regents h4 { font-size: 17px !important; } | ||
|
||
/* Link styles */ | ||
a, a:visited { | ||
text-decoration: underline; | ||
} | ||
|
||
/* Abbreviation title formatting */ | ||
abbr[title]:after { | ||
content: " (" attr(title) ")"; | ||
} | ||
|
||
/* Block elements */ | ||
pre, blockquote { | ||
border: 1px solid #999; | ||
page-break-inside: avoid; | ||
} | ||
|
||
/* Ensure headers remain at the top of pages */ | ||
thead { | ||
display: table-header-group; | ||
} | ||
|
||
/* Prevent page break issues */ | ||
tr, img { | ||
page-break-inside: avoid; | ||
} | ||
|
||
img { | ||
max-width: 100% !important; | ||
} | ||
|
||
p, h2, h3 { | ||
orphans: 3; | ||
widows: 3; | ||
} | ||
|
||
h2, h3 { | ||
page-break-after: avoid; | ||
} | ||
|
||
/* Form and table styles */ | ||
select { | ||
background: #fff !important; | ||
} | ||
|
||
.table, .table-bordered { | ||
border-collapse: collapse !important; | ||
} | ||
|
||
.table-bordered th, .table-bordered td { | ||
border: 1px solid #ddd !important; | ||
} | ||
|
||
/* Buttons and labels */ | ||
.btn > .caret, .dropup > .btn > .caret { | ||
border-top-color: #000 !important; | ||
} | ||
|
||
.label { | ||
border: 1px solid #000; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,42 @@ | ||
<h4>{{ person['name'] }}</h4> | ||
<ul class="dir-listing"> | ||
{% for email in person['emails'] %} | ||
<li>{{ email }}</li> | ||
{% endfor %} | ||
{% for contact_method, numbers in | ||
person['phone_contacts'].items() %} | ||
{% if numbers|length %} | ||
<!-- Begin Person Card --> | ||
<div class="person-card"> | ||
<!-- Full Name --> | ||
<h4 class="person-name">{{ person['name'] }}</h4> | ||
<!-- Departments --> | ||
<ul class="no-style-list"> | ||
{% for entry in person['departments'] %} | ||
<li>{{ entry.title }}, {{ entry.department }}</li> | ||
{% endfor %} | ||
</ul> | ||
<ul class="dir-listing no-style-list"> | ||
<!-- Emails --> | ||
{% if person['emails']|length %} | ||
<li> | ||
{{ contact_method|singularize|titleize }}: | ||
{{ numbers|join(', ') }} | ||
{% if person['emails']|length > 1 %} | ||
Emails: {{ person['emails']|join(', ') }} | ||
{% else %} | ||
Email: {{ person['emails'][0] }} | ||
{% endif %} | ||
</li> | ||
{% endif %} | ||
{% endfor %} | ||
{% if person['box_number'] %} | ||
<li class="dir-boxstuff">Box {{ person['box_number'] }}</li> | ||
{% endif %} | ||
</ul> | ||
<ul class="multiaddr"> | ||
{% for entry in person['departments'] %} | ||
<li>{{ entry.title }}, {{ entry.department }}</li> | ||
{% endfor %} | ||
</ul> | ||
<form method="POST" action="/person/vcard"> | ||
<input type="hidden" name="person_href" value="{{ person['href'] }}"> | ||
<input class="btn btn-primary" | ||
type="submit" | ||
name="expand-{{ person['href'] }}" | ||
value="Download vcard"> | ||
</form> | ||
<!-- Phones --> | ||
{% for contact_method, numbers in person['phone_contacts'].items() %} | ||
{% if numbers|length %} | ||
<li>{{ contact_method|singularize|titleize }}: {{ numbers|join(', ') }}</li> | ||
{% endif %} | ||
{% endfor %} | ||
<!-- Box Number --> | ||
{% if person['box_number'] %} | ||
<li class="person-box-number">Box {{ person['box_number'] }}</li> | ||
{% endif %} | ||
</ul> | ||
<!-- Download vCard Button --> | ||
<form method="POST" action="/person/vcard"> | ||
<input type="hidden" name="person_href" value="{{ person['href'] }}"> | ||
<input class="btn btn-primary" | ||
type="submit" | ||
name="expand-{{ person['href'] }}" | ||
value="Download vcard"> | ||
</form> | ||
</div> | ||
<!-- End Person Card --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.