Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
8960f3a
Add tab navigation for collections
suecarmol Jul 26, 2021
25c14ea
Add my applications link
suecarmol Jul 26, 2021
2d6e5a2
Add filter section
suecarmol Jul 27, 2021
0129ceb
Fix reset filters positioning. Fix positioning in view my applicatins…
suecarmol Jul 27, 2021
8dc1e4a
Add styles to improve tablet look
suecarmol Jul 27, 2021
d0c69e3
Center collections tabs. Adjust collection tiles width. Other minor c…
suecarmol Jul 27, 2021
a5ccb41
Have link to partner only cover image
suecarmol Jul 27, 2021
a95e306
Add expired section in My Collections
suecarmol Jul 27, 2021
4e35cb5
Change card image size on medium screens
suecarmol Jul 28, 2021
5bf5b40
Add check on user's staff status to show unavailable partners
suecarmol Jul 28, 2021
38623de
Implement filter functionality for languages and tags
suecarmol Jul 29, 2021
311ca14
Add vertical line separator between filters section and the collectio…
suecarmol Jul 29, 2021
83dca6a
Fix bug where Expired title still appeared when there were no expired…
suecarmol Jul 29, 2021
e2bf7d4
Add styles to django-filter tags via JS
suecarmol Jul 29, 2021
8dd5333
Order tags in filter alphabetically
suecarmol Jul 29, 2021
0e0eab2
Change collection tab underline
suecarmol Jul 30, 2021
65ebd56
Change hover underline color in collection tabs
suecarmol Jul 30, 2021
68b78a9
Fix filtering bug (that I discovered when I created tests for it)
suecarmol Jul 30, 2021
fc896d1
Add RTL css
suecarmol Jul 30, 2021
3e4f251
Added noopener rel attribute on external access links
suecarmol Jul 30, 2021
bc63bcb
Change image ratio in collection tiles
suecarmol Aug 2, 2021
f7e8936
Align View my applications link to collections tabs
suecarmol Aug 2, 2021
ba6e0d1
Do not display TWL text on smaller screens
suecarmol Aug 2, 2021
942ce28
Remove TWL header title on smaller screens
suecarmol Aug 2, 2021
a1a04d1
Fix translation string
suecarmol Aug 3, 2021
3525399
Reduce bottom margin between card rows
suecarmol Aug 3, 2021
daeca4a
Remove : from translatable string
suecarmol Aug 3, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions TWLight/resources/filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,13 @@ def __init__(self, *args, **kwargs):
kwargs.pop("language_code")
super(PartnerFilter, self).__init__(*args, **kwargs)
self.filters["tags"].extra.update({"choices": get_tag_choices(language_code)})
# Add CSS classes to style widgets
self.filters["tags"].field.widget.attrs.update(
{"class": "form-control form-control-sm"}
)
self.filters["languages"].field.widget.attrs.update(
{"class": "form-control form-control-sm"}
)

class Meta:
model = Partner
Expand Down
2 changes: 2 additions & 0 deletions TWLight/resources/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,8 @@ def get_tag_choices(language_code: str = "en"):

tag_choices.append(tag_tuple)

tag_choices.sort(key=lambda a: a[1])

TAG_CHOICES = tuple(tag_choices)

return TAG_CHOICES
Expand Down
3 changes: 1 addition & 2 deletions TWLight/static/css/local-rtl.css
Original file line number Diff line number Diff line change
Expand Up @@ -262,8 +262,7 @@ nav .divider {
}

.site-title {
font-family: Roboto;
padding: 10px 0px 0px 0px;
display: none;
}

.logo-header {
Expand Down
3 changes: 1 addition & 2 deletions TWLight/static/css/local.css
Original file line number Diff line number Diff line change
Expand Up @@ -323,8 +323,7 @@ nav .divider {
}

.site-title {
font-family: Roboto;
padding: 10px 0px 0px 0px;
display: none;
}

.logo-header {
Expand Down
200 changes: 193 additions & 7 deletions TWLight/static/css/new-local.css
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,18 @@ and (max-device-width : 480px) {
float: left;
padding: 0px 0px 10px 0px;
}
.site-title {
display: none;
}
}

@media screen
and (min-width : 320px)
and (max-width : 480px) {
.site-title {
display: none;
}
}
/*
----------------------------------------------------------------------------
LOGIN PARTIAL CSS
Expand Down Expand Up @@ -548,14 +558,170 @@ and (min-device-width : 1025px) {
NEW MY LIBRARY CSS
--------------------------------------------------------------------------
*/
.collection-tile{
margin: 0px 0px 105px 0px;
.collections-nav{
margin-bottom: 40px;
}
.collection-nav-separator{
border-right: 1px solid #565656;
}
.collection-tab-item{
font-family: Roboto;
font-size: 24px;
color: #565656;
}

.collection-tab-item.active{
color: #000000;
box-shadow: inset 0 0px 0 white, inset 0 -3px 0 #000000;
}

.collection-tab-item:hover{
font-family: Roboto;
color: #000000;
box-shadow: inset 0 0px 0 white, inset 0 -3px 0 #565656;
}

.applications-item{
position: absolute;
right: 15px;
top: 10px;
}

.applications-link{
font-family: Roboto;
font-size: 14px;
color: #3366CC;
text-decoration: underline;
}
.applications-link:hover{
color: #3366CC;
text-decoration: none;
}
.filter-container{
flex-direction: column;
margin-top: 40px;
}
.filter-title-container{
width: 100%;
}
.filter-title{
text-align: left;
font-size: 15px;
}

.reset-filters-link{
font-size: 15px;
color: #3366CC;
text-decoration: underline;
position: absolute;
right: 0px;
}
.reset-filters-link:hover{
color: #3366CC;
text-decoration: none;
}

.collection-filter-label{
font-size: 14px;
text-align: left;
font-weight: 500;
}

.collection-filter-button{
margin-top: 20px;
}

.v-divider{
margin-left:10px;
margin-right:15px;
width:1px;
border-left:1px solid #DFE1E5;
}

/* Tablets */
@media only screen
and (min-device-width : 768px)
and (max-device-width : 1024px) {
.collection-tab-item{
font-family: Roboto;
font-size: 20px;
color: #000000;
text-align: center;
}
.applications-link{
font-family: Roboto;
font-size: 13px;
color: #3366CC;
text-decoration: underline;
}
.applications-item{
position: absolute;
right: 10px;
top: -20px;
}
}

/* Smartphones */
@media only screen
and (min-device-width : 320px)
and (max-device-width : 480px) {
.collections-section-container{
margin-top: 10px;
}
.collection-nav-separator{
border-right: 0px;
}
.collection-tab-item{
font-family: Roboto;
color: #000000;
text-align: center;
}
.applications-link{
font-family: Roboto;
font-size: 13px;
color: #3366CC;
text-decoration: underline;
}
.applications-item{
position: absolute;
right: 10px;
top: -20px;
}
.collections-nav{
margin-bottom: 40px;
margin-left: auto;
margin-right: auto;
}
}
@media screen
and (min-width : 320px)
and (max-width : 1440px) {
.applications-item{
position: absolute;
right: 10px;
top: -25px;
}
}
/*
----------------------------------------------------------------------------
NEW MY LIBRARY COLLECTION TILES CSS
--------------------------------------------------------------------------
*/
.collections-pane{
margin-right: 15px;
}
.collection-tile{
margin: 0px 0px 50px 0px;
}
.tile-partner-link{
max-height: 125px;
max-width: 270px;
margin-left: auto;
margin-right: auto;
}
.library-tile-image{
max-height: 255px;
max-width: 275px;
padding: 10px 0px 0px 0px;
max-height: 125px;
padding: 10px 10px 0px 10px;
}

.collection-tags{
Expand All @@ -569,14 +735,14 @@ NEW MY LIBRARY CSS
}

.expiry-date-text{
font-size: 14px;
font-size: 13px;
text-align: right;
}

.access-apply-button{
color: #FFFFFF;
background-color: #3366CC;
width: 40%;
width: 50%;
}

.access-apply-button:hover{
Expand Down Expand Up @@ -629,6 +795,26 @@ and (max-device-width : 1024px) {
}
}

/* Change image width on some medium-sized screens */
@media screen
and (min-width : 768px)
and (max-width : 1440px) {
.library-tile-image{
max-height: 80px;
max-width: 190px;
padding: 10px 0px 0px 0px;
}
}

@media screen
and (min-width : 320px)
and (max-width : 581px){
.collection-nav-separator{
border-right: 0px;
}
}


/*
----------------------------------------------------------------------------
NEW FOOTER CSS
Expand Down
Loading