2018-11-20 11:19:58 -08:00
|
|
|
extends layout.pug
|
|
|
|
|
2022-10-04 06:18:50 -07:00
|
|
|
mixin wishlistDetails(wishlist, onlyShowAddedByUser)
|
2022-10-18 12:35:22 -07:00
|
|
|
.wishlist-dropdown-container.wishlist-dropdown-container-unloaded
|
|
|
|
button.wishlist-dropdown-button.button.is-rounded
|
|
|
|
span.icon.is-small
|
|
|
|
i.fas.fa-chevron-left
|
|
|
|
i.fas.fa-chevron-down
|
|
|
|
ul.wishlist-dropdown
|
2022-10-03 18:13:36 -07:00
|
|
|
for item in wishlist
|
2022-10-04 06:18:50 -07:00
|
|
|
if onlyShowAddedByUser === undefined || item.addedBy === onlyShowAddedByUser
|
|
|
|
li= item.name
|
2022-10-03 18:13:36 -07:00
|
|
|
|
2018-11-20 11:19:58 -08:00
|
|
|
block content
|
2022-10-03 18:13:36 -07:00
|
|
|
style.
|
2022-10-18 12:35:22 -07:00
|
|
|
.wishlist-dropdown-container-unloaded {
|
|
|
|
display: none;
|
2022-10-03 18:13:36 -07:00
|
|
|
}
|
2022-10-18 12:35:22 -07:00
|
|
|
.wishlist-dropdown-button {
|
|
|
|
margin-left: auto;
|
|
|
|
margin-right: 0;
|
|
|
|
display: block;
|
|
|
|
}
|
|
|
|
.wishlist-dropdown {
|
|
|
|
display: none;
|
2022-10-03 18:13:36 -07:00
|
|
|
}
|
2022-10-18 12:35:22 -07:00
|
|
|
.wishlist-dropdown li {
|
2022-10-03 18:13:36 -07:00
|
|
|
list-style-type: disc !important;
|
|
|
|
}
|
2022-10-18 12:35:22 -07:00
|
|
|
.wishlist-dropdown-container-active > .wishlist-dropdown {
|
|
|
|
display: block;
|
|
|
|
}
|
|
|
|
|
|
|
|
.wishlist-dropdown-container .fa-chevron-left {
|
|
|
|
display: inline-block;
|
|
|
|
}
|
|
|
|
.wishlist-dropdown-container .fa-chevron-down {
|
|
|
|
display: none;
|
|
|
|
}
|
|
|
|
.wishlist-dropdown-container.wishlist-dropdown-container-active .fa-chevron-left {
|
|
|
|
display: none;
|
|
|
|
}
|
|
|
|
.wishlist-dropdown-container.wishlist-dropdown-container-active .fa-chevron-down {
|
|
|
|
display: inline-block;
|
|
|
|
}
|
|
|
|
|
2018-11-23 14:29:40 -08:00
|
|
|
ul.noStyle.noLeftMargin
|
2022-10-03 07:49:36 -07:00
|
|
|
if req.user._id !== '_CCUNKNOWN'
|
2020-11-08 14:23:51 -08:00
|
|
|
li
|
2022-10-03 18:13:36 -07:00
|
|
|
.box
|
|
|
|
a(href=`${_CC.config.base}wishlist/${req.user._id}`, style='color: #4a4a4a;')
|
2021-11-29 09:13:16 -08:00
|
|
|
.columns.is-mobile
|
2021-10-11 06:50:09 -07:00
|
|
|
if config.pfp
|
2021-11-29 09:13:16 -08:00
|
|
|
.column.is-1(style='overflow: hidden; padding: 0 0.5rem 0 0;')
|
2021-10-11 06:50:09 -07:00
|
|
|
figure.image.is-square.is-fullwidth.is-marginless(style='display: inline-block;')
|
|
|
|
img.is-rounded.is-fullwidth(src=req.user.pfp, style='object-fit: cover;')
|
2021-09-14 23:41:44 -07:00
|
|
|
.column
|
2021-12-03 08:13:43 -08:00
|
|
|
span
|
|
|
|
span=lang('WISHLISTS_COUNTS_SELF', req.user._id)
|
2021-09-14 23:41:44 -07:00
|
|
|
progress.progress(value=1, max=1)
|
2022-10-04 06:18:50 -07:00
|
|
|
+wishlistDetails(req.user.wishlist, req.user._id)
|
2018-11-20 11:19:58 -08:00
|
|
|
each user in users
|
|
|
|
if req.user._id !== user.id
|
|
|
|
li
|
2022-10-03 18:13:36 -07:00
|
|
|
.box
|
|
|
|
a(href=`${_CC.config.base}wishlist/${user.id}`, style='color: #4a4a4a;')
|
2021-11-29 09:13:16 -08:00
|
|
|
.columns.is-mobile
|
2021-10-11 06:50:09 -07:00
|
|
|
if config.pfp
|
2021-11-29 09:13:16 -08:00
|
|
|
.column.is-1(style='overflow: hidden; padding: 0 0.5rem 0 0;')
|
2021-10-11 06:50:09 -07:00
|
|
|
figure.image.is-square.is-fullwidth.is-marginless(style='display: inline-block;')
|
|
|
|
img.is-rounded.is-fullwidth(src=user.doc.pfp, style='object-fit: cover;')
|
2021-09-14 23:41:44 -07:00
|
|
|
.column
|
2021-12-03 08:13:43 -08:00
|
|
|
span= lang('WISHLISTS_COUNTS', user.id, totals(user.doc.wishlist).pledged, user.doc.wishlist.length)
|
2022-10-03 18:13:36 -07:00
|
|
|
progress.progress.is-info(value=totals(user.doc.wishlist).pledged, max=user.doc.wishlist.length)
|
2022-10-18 12:35:22 -07:00
|
|
|
+wishlistDetails(user.doc.wishlist)
|
|
|
|
script.
|
|
|
|
document.querySelectorAll('.wishlist-dropdown-button')
|
|
|
|
.forEach(button => {
|
|
|
|
button.addEventListener('click', e => {
|
|
|
|
button.parentElement.classList.toggle('wishlist-dropdown-container-active')
|
|
|
|
})
|
|
|
|
})
|
|
|
|
document.querySelectorAll('.wishlist-dropdown-container-unloaded')
|
|
|
|
.forEach(container => container.classList.remove('wishlist-dropdown-container-unloaded'))
|