Initial castro
This commit is contained in:
parent
22174ee93f
commit
91dbce8352
6 changed files with 51 additions and 52 deletions
|
@ -6,5 +6,8 @@ services:
|
||||||
build: .
|
build: .
|
||||||
environment:
|
environment:
|
||||||
NODE_ENV: production
|
NODE_ENV: production
|
||||||
|
BULMASWATCH: Cosmo
|
||||||
|
MARKDOWN: true
|
||||||
|
SITE_TITLE: Christmas 2023
|
||||||
ports:
|
ports:
|
||||||
- 80:80
|
- 80:80
|
|
@ -2,13 +2,13 @@ module.exports.momentLocale = 'en'
|
||||||
|
|
||||||
module.exports.strings = {
|
module.exports.strings = {
|
||||||
_NOT_LOCALIZED: key => `${key} hasn't been translated to English yet.`,
|
_NOT_LOCALIZED: key => `${key} hasn't been translated to English yet.`,
|
||||||
ADMIN_CLEAR_WISHLISTS_BUTTON: 'Clear all wishlists',
|
ADMIN_CLEAR_WISHLISTS_BUTTON: 'Clear all lists',
|
||||||
ADMIN_CLEAR_WISHLISTS_DESCRIPTION: 'This will instantly <b>irreversibly delete all wishlists!</b> Consider making a backup of the database before using this.',
|
ADMIN_CLEAR_WISHLISTS_DESCRIPTION: 'This will instantly <b>irreversibly delete all lists!</b> Consider making a backup of the database before using this.',
|
||||||
ADMIN_CLEAR_WISHLISTS_HEADER: 'Wishlist Deletion',
|
ADMIN_CLEAR_WISHLISTS_HEADER: 'List Deletion',
|
||||||
ADMIN_SETTINGS_CLEARDB_BUTTON: 'Clear Wishlists',
|
ADMIN_SETTINGS_CLEARDB_BUTTON: 'Clear lists',
|
||||||
ADMIN_SETTINGS_CLEARDB_DESCRIPTION: '<b>Warning</b>: These options <b>destroy data</b>! You may want to back up the database before using these options.',
|
ADMIN_SETTINGS_CLEARDB_DESCRIPTION: '<b>Warning</b>: These options <b>destroy data</b>! You may want to back up the database before using these options.',
|
||||||
ADMIN_SETTINGS_CLEARDB_HEADER: 'Data Destruction',
|
ADMIN_SETTINGS_CLEARDB_HEADER: 'Data Destruction',
|
||||||
ADMIN_SETTINGS_CLEARDB_SUCCESS: 'Cleared all wishlists.',
|
ADMIN_SETTINGS_CLEARDB_SUCCESS: 'Cleared all lists.',
|
||||||
ADMIN_SETTINGS_HEADER: 'Admin Settings',
|
ADMIN_SETTINGS_HEADER: 'Admin Settings',
|
||||||
ADMIN_SETTINGS_USERS_ADD_BUTTON: 'Add User',
|
ADMIN_SETTINGS_USERS_ADD_BUTTON: 'Add User',
|
||||||
ADMIN_SETTINGS_USERS_ADD_HEADER: 'Add user',
|
ADMIN_SETTINGS_USERS_ADD_HEADER: 'Add user',
|
||||||
|
@ -72,11 +72,11 @@ module.exports.strings = {
|
||||||
LOGIN_USERNAME_PLACEHOLDER: 'john',
|
LOGIN_USERNAME_PLACEHOLDER: 'john',
|
||||||
LOGIN_USERNAME: 'Username',
|
LOGIN_USERNAME: 'Username',
|
||||||
LOGOUT_BUTTON: 'Log Out',
|
LOGOUT_BUTTON: 'Log Out',
|
||||||
NAVBAR_ADMIN: 'Admin Settings',
|
NAVBAR_ADMIN: 'Admin Panel',
|
||||||
NAVBAR_LOGIN: 'Log In',
|
NAVBAR_LOGIN: 'Log In',
|
||||||
NAVBAR_LOGOUT: 'Log Out',
|
NAVBAR_LOGOUT: 'Log Out',
|
||||||
NAVBAR_PROFILE: 'Profile',
|
NAVBAR_PROFILE: 'Settings',
|
||||||
NAVBAR_WISHLIST: 'My Wishlist',
|
NAVBAR_WISHLIST: 'My List',
|
||||||
NOTE_BACK: name => `Back to ${name}'s wishlist`,
|
NOTE_BACK: name => `Back to ${name}'s wishlist`,
|
||||||
NOTE_GET_PRODUCT_DATA: 'Get Product Data',
|
NOTE_GET_PRODUCT_DATA: 'Get Product Data',
|
||||||
NOTE_GUARD: 'Invalid user',
|
NOTE_GUARD: 'Invalid user',
|
||||||
|
@ -124,8 +124,8 @@ module.exports.strings = {
|
||||||
SETUP_PASSWORD: 'Password',
|
SETUP_PASSWORD: 'Password',
|
||||||
SETUP_USERNAME_PLACEHOLDER: 'john',
|
SETUP_USERNAME_PLACEHOLDER: 'john',
|
||||||
SETUP_USERNAME: 'Username',
|
SETUP_USERNAME: 'Username',
|
||||||
SUPPORTED_SITES_HEADER: 'Supported Sites',
|
SUPPORTED_SITES_HEADER: 'Working Sites',
|
||||||
SUPPORTED_SITES_TEXT: 'Is a site missing or broken? Open an issue <a href="https://gitlab.com/wingysam/get-product-name/-/issues/new">here</a>! :)',
|
SUPPORTED_SITES_TEXT: 'You can still add items from other sites, but it can\'t autopopulate the information, so do that yourself.',
|
||||||
UPDATE_NOTICE: (current, latest) => `
|
UPDATE_NOTICE: (current, latest) => `
|
||||||
<span class="has-text-danger is-size-4 has-text-weight-bold">
|
<span class="has-text-danger is-size-4 has-text-weight-bold">
|
||||||
Christmas Community is out of date. There may be new features or bug fixes. Consider updating! :)
|
Christmas Community is out of date. There may be new features or bug fixes. Consider updating! :)
|
||||||
|
@ -138,13 +138,13 @@ module.exports.strings = {
|
||||||
<span>Latest: ${latest}</span>
|
<span>Latest: ${latest}</span>
|
||||||
<span class="has-text-info" style="float: right;">This message is only visible to admins</span>`,
|
<span class="has-text-info" style="float: right;">This message is only visible to admins</span>`,
|
||||||
WISHLIST_ADD: 'Add item to wishlist',
|
WISHLIST_ADD: 'Add item to wishlist',
|
||||||
WISHLIST_ADDED_BY_USER: addedBy => `Added by: ${addedBy}`,
|
WISHLIST_ADDED_BY_USER: addedBy => `Suggested by: ${addedBy}`,
|
||||||
WISHLIST_ADDED_BY: 'Added By',
|
WISHLIST_ADDED_BY: 'Suggested by',
|
||||||
WISHLIST_ADDED_ITEM_TO_OWN_WISHLIST: 'Added item to wishlist.',
|
WISHLIST_ADDED_ITEM_TO_OWN_WISHLIST: 'Added item to your list.',
|
||||||
WISHLIST_CONFLICT: 'Items are being added too quickly. Please try again.',
|
WISHLIST_CONFLICT: 'Items are being added too quickly. Please try again.',
|
||||||
WISHLIST_DELETE: 'Delete',
|
WISHLIST_DELETE: 'Delete',
|
||||||
WISHLIST_EDIT_ITEM: 'Edit Item',
|
WISHLIST_EDIT_ITEM: 'Edit Item',
|
||||||
WISHLIST_FETCH_FAIL: 'Failed to fetch the wishlist -- does the user exist?',
|
WISHLIST_FETCH_FAIL: 'Failed to fetch the list -- does the user exist?',
|
||||||
WISHLIST_IMAGE: 'Image',
|
WISHLIST_IMAGE: 'Image',
|
||||||
WISHLIST_ITEM_MISSING: 'Failed to find item',
|
WISHLIST_ITEM_MISSING: 'Failed to find item',
|
||||||
WISHLIST_MOVE_DOWN: 'Move Down',
|
WISHLIST_MOVE_DOWN: 'Move Down',
|
||||||
|
@ -161,27 +161,27 @@ module.exports.strings = {
|
||||||
WISHLIST_NOTE: 'Note',
|
WISHLIST_NOTE: 'Note',
|
||||||
WISHLIST_OPTIONAL: 'Optional',
|
WISHLIST_OPTIONAL: 'Optional',
|
||||||
WISHLIST_PLEDGE_DUPLICATE: 'Item already pledged for',
|
WISHLIST_PLEDGE_DUPLICATE: 'Item already pledged for',
|
||||||
WISHLIST_PLEDGE_ITEM: 'Pledge item',
|
WISHLIST_PLEDGE_ITEM: 'Get this',
|
||||||
WISHLIST_PLEDGE_SUCCESS: 'Successfully pledged for item!',
|
WISHLIST_PLEDGE_SUCCESS: 'You pledged for something! Good job!',
|
||||||
WISHLIST_PLEDGE: 'Pledge',
|
WISHLIST_PLEDGE: 'Pledge',
|
||||||
WISHLIST_PLEDGED: pledgedBy => `Pledged for by ${pledgedBy}`,
|
WISHLIST_PLEDGED: pledgedBy => `${pledgedBy} is getting this`,
|
||||||
WISHLIST_PLEDGED_GUEST: 'Pledged for by a guest user',
|
WISHLIST_PLEDGED_GUEST: 'Someone is getting this',
|
||||||
WISHLIST_PLEDGED_ITEM_FOR_USER: user => `Pledged item for ${user}.`,
|
WISHLIST_PLEDGED_ITEM_FOR_USER: user => `Pledged item for ${user}.`,
|
||||||
WISHLIST_PRICE: 'Price',
|
WISHLIST_PRICE: 'Price',
|
||||||
WISHLIST_REFRESH_GUARD: 'Invalid user',
|
WISHLIST_REFRESH_GUARD: 'Invalid user',
|
||||||
WISHLIST_REFRESH_NO_URL: 'Item has no URL.',
|
WISHLIST_REFRESH_NO_URL: 'Item has no URL. Fix that, probably.',
|
||||||
WISHLIST_REFRESH_SUCCESS: 'Successfully refreshed data!',
|
WISHLIST_REFRESH_SUCCESS: 'Refreshed data!',
|
||||||
WISHLIST_REMOVE_GUARD: 'Not correct user',
|
WISHLIST_REMOVE_GUARD: 'Not correct user',
|
||||||
WISHLIST_REMOVE_SUCCESS: 'Successfully removed from wishlist',
|
WISHLIST_REMOVE_SUCCESS: 'Removed from your list',
|
||||||
WISHLIST_SUGGEST: 'Suggest item',
|
WISHLIST_SUGGEST: 'Suggest item',
|
||||||
WISHLIST_TITLE: name => `${_CC.config.siteTitle} - Wishlist - ${name}`,
|
WISHLIST_TITLE: name => `${_CC.config.siteTitle}: ${name}`,
|
||||||
WISHLIST_UNPLEDGE_GUARD: 'You did not pledge for this', // should never happen unless someone makes their own http requests
|
WISHLIST_UNPLEDGE_GUARD: 'You didn\'t pledge for this', // should never happen unless someone makes their own http requests
|
||||||
WISHLIST_UNPLEDGE_SUCCESS: 'Successfully unpledged for item!',
|
WISHLIST_UNPLEDGE_SUCCESS: 'Unpledged!',
|
||||||
WISHLIST_UNPLEDGE: 'Unpledge',
|
WISHLIST_UNPLEDGE: 'Not getting this anymore',
|
||||||
WISHLIST_URL_LABEL: `Item URL or Name (<a href="${_CC.config.base}supported-sites">Supported Sites</a>)`,
|
WISHLIST_URL_LABEL: `Item URL or Name (<a href="${_CC.config.base}supported-sites">List of sites that auto-populate from a URL</a>)`,
|
||||||
WISHLIST_URL_PLACEHOLDER: 'https://www.amazon.com/dp/B00ZV9RDKK',
|
WISHLIST_URL_PLACEHOLDER: 'https://www.amazon.com/dp/B00ZV9RDKK',
|
||||||
WISHLIST_URL_REQUIRED: 'Item URL or Name is required',
|
WISHLIST_URL_REQUIRED: 'Item URL or at least a name is required',
|
||||||
WISHLISTS_COUNTS_SELF: name => `${name}: ???/???`,
|
WISHLISTS_COUNTS_SELF: name => `<h3>${name}</h3> You don't get to see how many of your items have been pledged for. Where's the fun in that?`,
|
||||||
WISHLISTS_COUNTS: (name, pledged, total) => `${name}: ${pledged}/${total}`,
|
WISHLISTS_COUNTS: (name, pledged, total) => `<h3>${name}</h3> ${pledged}/<em>${total}</em>`,
|
||||||
WISHLISTS_TITLE: `${_CC.config.siteTitle} - Wishlists`
|
WISHLISTS_TITLE: `${_CC.config.siteTitle}`
|
||||||
}
|
}
|
||||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 98 KiB After Width: | Height: | Size: 5.6 KiB |
Binary file not shown.
Before Width: | Height: | Size: 87 KiB |
|
@ -4,36 +4,33 @@ mixin navBarLink(href, title)
|
||||||
else
|
else
|
||||||
a.navbar-item(href=href)= title
|
a.navbar-item(href=href)= title
|
||||||
|
|
||||||
nav.navbar.is-fixed-top(role='navigation', aria-label='main navigation',style='box-shadow: 0px 0px 7px rgb(14, 15, 17);')
|
nav.navbar.is-fixed-top(role='navigation', aria-label='main navigation', style='box-shadow: 0px 0px 7px rgb(14, 15, 17);')
|
||||||
.navbar-brand
|
.navbar-brand
|
||||||
if _CC.config.base === req.path
|
if _CC.config.base === req.path
|
||||||
a.is-active.navbar-item(href=_CC.config.base)
|
a.is-active.navbar-item(href=_CC.config.base)
|
||||||
img(src=`${_CC.config.base}img/logo.png`, alt='')
|
img(src=`${_CC.config.base}img/logo.png`, alt='Castro Christmas')
|
||||||
span #{config.siteTitle}
|
|
||||||
else
|
else
|
||||||
a.navbar-item(href=_CC.config.base)
|
a.navbar-item(href=_CC.config.base)
|
||||||
img(src=`${_CC.config.base}img/logo.png`, alt='')
|
img(src=`${_CC.config.base}img/logo.png`, alt='Castro Christmas')
|
||||||
span #{config.siteTitle}
|
|
||||||
a.navbar-burger#navBarBurger(role='button', aria-label='menu', aria-expanded='false')
|
a.navbar-burger#navBarBurger(role='button', aria-label='menu', aria-expanded='false')
|
||||||
span(aria-hidden='true')
|
span(aria-hidden='true')
|
||||||
span(aria-hidden='true')
|
span(aria-hidden='true')
|
||||||
span(aria-hidden='true')
|
span(aria-hidden='true')
|
||||||
.navbar-menu#navBarMenu
|
.navbar-menu#navBarMenu
|
||||||
.navbar-start
|
.navbar-end
|
||||||
if req.isAuthenticated()
|
if req.isAuthenticated()
|
||||||
if req.user._id === '_CCUNKNOWN'
|
if req.user._id === '_CCUNKNOWN'
|
||||||
.navbar-item
|
.navbar-item
|
||||||
a.button.is-primary(href=`${_CC.config.base}login`)= lang('NAVBAR_LOGIN')
|
a.button.is-primary(href=`${_CC.config.base}login`)= lang('NAVBAR_LOGIN')
|
||||||
else
|
else
|
||||||
.navbar-item.has-dropdown.is-hoverable
|
.navbar-item
|
||||||
a.navbar-link= req.user._id
|
+navBarLink(`${_CC.config.base}wishlist/${req.user._id}`, lang('NAVBAR_WISHLIST'))
|
||||||
.navbar-dropdown
|
.navbar-item
|
||||||
+navBarLink(`${_CC.config.base}wishlist/${req.user._id}`, lang('NAVBAR_WISHLIST'))
|
+navBarLink(`${_CC.config.base}profile`, lang('NAVBAR_PROFILE'))
|
||||||
+navBarLink(`${_CC.config.base}profile`, lang('NAVBAR_PROFILE'))
|
if req.user.admin
|
||||||
if req.user.admin
|
.navbar-item
|
||||||
+navBarLink(`${_CC.config.base}admin-settings`, lang('NAVBAR_ADMIN'))
|
+navBarLink(`${_CC.config.base}admin-settings`, lang('NAVBAR_ADMIN'))
|
||||||
hr.navbar-divider
|
.navbar-item
|
||||||
.navbar-item
|
+navBarLink(`${_CC.config.base}logout`, lang('NAVBAR_LOGOUT'))
|
||||||
form#logoutForm(action=`${_CC.config.base}logout`, method='POST')
|
|
||||||
button.button.is-warning(type='submit')= lang('NAVBAR_LOGOUT')
|
script(src=`${_CC.config.base}js/nav.js`)
|
||||||
script(src=`${_CC.config.base}js/nav.js`)
|
|
||||||
|
|
|
@ -59,8 +59,7 @@ block content
|
||||||
img.is-rounded.is-fullwidth(src=req.user.pfp, style='object-fit: cover;')
|
img.is-rounded.is-fullwidth(src=req.user.pfp, style='object-fit: cover;')
|
||||||
.column
|
.column
|
||||||
span
|
span
|
||||||
span=lang('WISHLISTS_COUNTS_SELF', req.user._id)
|
span!=lang('WISHLISTS_COUNTS_SELF', req.user._id)
|
||||||
progress.progress(value=1, max=1)
|
|
||||||
+wishlistDetails(req.user.wishlist, req.user._id)
|
+wishlistDetails(req.user.wishlist, req.user._id)
|
||||||
each user in users
|
each user in users
|
||||||
if req.user._id !== user.id
|
if req.user._id !== user.id
|
||||||
|
@ -73,7 +72,7 @@ block content
|
||||||
figure.image.is-square.is-fullwidth.is-marginless(style='display: inline-block;')
|
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;')
|
img.is-rounded.is-fullwidth(src=user.doc.pfp, style='object-fit: cover;')
|
||||||
.column
|
.column
|
||||||
span= lang('WISHLISTS_COUNTS', user.id, totals(user.doc.wishlist).pledged, user.doc.wishlist.length)
|
span!= lang('WISHLISTS_COUNTS', user.id, totals(user.doc.wishlist).pledged, user.doc.wishlist.length)
|
||||||
progress.progress.is-info(value=totals(user.doc.wishlist).pledged, max=user.doc.wishlist.length)
|
progress.progress.is-info(value=totals(user.doc.wishlist).pledged, max=user.doc.wishlist.length)
|
||||||
+wishlistDetails(user.doc.wishlist)
|
+wishlistDetails(user.doc.wishlist)
|
||||||
script.
|
script.
|
||||||
|
|
Loading…
Reference in a new issue