diff --git a/docker-compose.yml b/docker-compose.yml index 38878c8..fb67f56 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -6,5 +6,8 @@ services: build: . environment: NODE_ENV: production + BULMASWATCH: Cosmo + MARKDOWN: true + SITE_TITLE: Christmas 2023 ports: - - 80:80 \ No newline at end of file + - 80:80 diff --git a/src/languages/en-us.js b/src/languages/en-us.js index 8f73cb9..232f169 100644 --- a/src/languages/en-us.js +++ b/src/languages/en-us.js @@ -2,13 +2,13 @@ module.exports.momentLocale = 'en' module.exports.strings = { _NOT_LOCALIZED: key => `${key} hasn't been translated to English yet.`, - ADMIN_CLEAR_WISHLISTS_BUTTON: 'Clear all wishlists', - ADMIN_CLEAR_WISHLISTS_DESCRIPTION: 'This will instantly irreversibly delete all wishlists! Consider making a backup of the database before using this.', - ADMIN_CLEAR_WISHLISTS_HEADER: 'Wishlist Deletion', - ADMIN_SETTINGS_CLEARDB_BUTTON: 'Clear Wishlists', + ADMIN_CLEAR_WISHLISTS_BUTTON: 'Clear all lists', + ADMIN_CLEAR_WISHLISTS_DESCRIPTION: 'This will instantly irreversibly delete all lists! Consider making a backup of the database before using this.', + ADMIN_CLEAR_WISHLISTS_HEADER: 'List Deletion', + ADMIN_SETTINGS_CLEARDB_BUTTON: 'Clear lists', ADMIN_SETTINGS_CLEARDB_DESCRIPTION: 'Warning: These options destroy data! You may want to back up the database before using these options.', 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_USERS_ADD_BUTTON: 'Add User', ADMIN_SETTINGS_USERS_ADD_HEADER: 'Add user', @@ -72,11 +72,11 @@ module.exports.strings = { LOGIN_USERNAME_PLACEHOLDER: 'john', LOGIN_USERNAME: 'Username', LOGOUT_BUTTON: 'Log Out', - NAVBAR_ADMIN: 'Admin Settings', + NAVBAR_ADMIN: 'Admin Panel', NAVBAR_LOGIN: 'Log In', NAVBAR_LOGOUT: 'Log Out', - NAVBAR_PROFILE: 'Profile', - NAVBAR_WISHLIST: 'My Wishlist', + NAVBAR_PROFILE: 'Settings', + NAVBAR_WISHLIST: 'My List', NOTE_BACK: name => `Back to ${name}'s wishlist`, NOTE_GET_PRODUCT_DATA: 'Get Product Data', NOTE_GUARD: 'Invalid user', @@ -124,8 +124,8 @@ module.exports.strings = { SETUP_PASSWORD: 'Password', SETUP_USERNAME_PLACEHOLDER: 'john', SETUP_USERNAME: 'Username', - SUPPORTED_SITES_HEADER: 'Supported Sites', - SUPPORTED_SITES_TEXT: 'Is a site missing or broken? Open an issue here! :)', + SUPPORTED_SITES_HEADER: 'Working Sites', + 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) => ` Christmas Community is out of date. There may be new features or bug fixes. Consider updating! :) @@ -138,13 +138,13 @@ module.exports.strings = { Latest: ${latest} This message is only visible to admins`, WISHLIST_ADD: 'Add item to wishlist', - WISHLIST_ADDED_BY_USER: addedBy => `Added by: ${addedBy}`, - WISHLIST_ADDED_BY: 'Added By', - WISHLIST_ADDED_ITEM_TO_OWN_WISHLIST: 'Added item to wishlist.', + WISHLIST_ADDED_BY_USER: addedBy => `Suggested by: ${addedBy}`, + WISHLIST_ADDED_BY: 'Suggested by', + WISHLIST_ADDED_ITEM_TO_OWN_WISHLIST: 'Added item to your list.', WISHLIST_CONFLICT: 'Items are being added too quickly. Please try again.', WISHLIST_DELETE: 'Delete', 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_ITEM_MISSING: 'Failed to find item', WISHLIST_MOVE_DOWN: 'Move Down', @@ -161,27 +161,27 @@ module.exports.strings = { WISHLIST_NOTE: 'Note', WISHLIST_OPTIONAL: 'Optional', WISHLIST_PLEDGE_DUPLICATE: 'Item already pledged for', - WISHLIST_PLEDGE_ITEM: 'Pledge item', - WISHLIST_PLEDGE_SUCCESS: 'Successfully pledged for item!', + WISHLIST_PLEDGE_ITEM: 'Get this', + WISHLIST_PLEDGE_SUCCESS: 'You pledged for something! Good job!', WISHLIST_PLEDGE: 'Pledge', - WISHLIST_PLEDGED: pledgedBy => `Pledged for by ${pledgedBy}`, - WISHLIST_PLEDGED_GUEST: 'Pledged for by a guest user', + WISHLIST_PLEDGED: pledgedBy => `${pledgedBy} is getting this`, + WISHLIST_PLEDGED_GUEST: 'Someone is getting this', WISHLIST_PLEDGED_ITEM_FOR_USER: user => `Pledged item for ${user}.`, WISHLIST_PRICE: 'Price', WISHLIST_REFRESH_GUARD: 'Invalid user', - WISHLIST_REFRESH_NO_URL: 'Item has no URL.', - WISHLIST_REFRESH_SUCCESS: 'Successfully refreshed data!', + WISHLIST_REFRESH_NO_URL: 'Item has no URL. Fix that, probably.', + WISHLIST_REFRESH_SUCCESS: 'Refreshed data!', 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_TITLE: name => `${_CC.config.siteTitle} - Wishlist - ${name}`, - WISHLIST_UNPLEDGE_GUARD: 'You did not pledge for this', // should never happen unless someone makes their own http requests - WISHLIST_UNPLEDGE_SUCCESS: 'Successfully unpledged for item!', - WISHLIST_UNPLEDGE: 'Unpledge', - WISHLIST_URL_LABEL: `Item URL or Name (Supported Sites)`, + WISHLIST_TITLE: name => `${_CC.config.siteTitle}: ${name}`, + WISHLIST_UNPLEDGE_GUARD: 'You didn\'t pledge for this', // should never happen unless someone makes their own http requests + WISHLIST_UNPLEDGE_SUCCESS: 'Unpledged!', + WISHLIST_UNPLEDGE: 'Not getting this anymore', + WISHLIST_URL_LABEL: `Item URL or Name (List of sites that auto-populate from a URL)`, WISHLIST_URL_PLACEHOLDER: 'https://www.amazon.com/dp/B00ZV9RDKK', - WISHLIST_URL_REQUIRED: 'Item URL or Name is required', - WISHLISTS_COUNTS_SELF: name => `${name}: ???/???`, - WISHLISTS_COUNTS: (name, pledged, total) => `${name}: ${pledged}/${total}`, - WISHLISTS_TITLE: `${_CC.config.siteTitle} - Wishlists` + WISHLIST_URL_REQUIRED: 'Item URL or at least a name is required', + WISHLISTS_COUNTS_SELF: name => `

${name}

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_TITLE: `${_CC.config.siteTitle}` } diff --git a/src/static/img/logo.png b/src/static/img/logo.png index 09366a2..23bb47f 100644 Binary files a/src/static/img/logo.png and b/src/static/img/logo.png differ diff --git a/src/static/img/logo.transparent.png b/src/static/img/logo.transparent.png deleted file mode 100644 index 91b5717..0000000 Binary files a/src/static/img/logo.transparent.png and /dev/null differ diff --git a/src/views/includes/navbar.pug b/src/views/includes/navbar.pug index 6d15d0f..463365b 100644 --- a/src/views/includes/navbar.pug +++ b/src/views/includes/navbar.pug @@ -4,36 +4,33 @@ mixin navBarLink(href, title) else 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 if _CC.config.base === req.path a.is-active.navbar-item(href=_CC.config.base) - img(src=`${_CC.config.base}img/logo.png`, alt='') - span #{config.siteTitle} + img(src=`${_CC.config.base}img/logo.png`, alt='Castro Christmas') else a.navbar-item(href=_CC.config.base) - img(src=`${_CC.config.base}img/logo.png`, alt='') - span #{config.siteTitle} + img(src=`${_CC.config.base}img/logo.png`, alt='Castro Christmas') a.navbar-burger#navBarBurger(role='button', aria-label='menu', aria-expanded='false') span(aria-hidden='true') span(aria-hidden='true') span(aria-hidden='true') .navbar-menu#navBarMenu - .navbar-start + .navbar-end if req.isAuthenticated() if req.user._id === '_CCUNKNOWN' .navbar-item a.button.is-primary(href=`${_CC.config.base}login`)= lang('NAVBAR_LOGIN') else - .navbar-item.has-dropdown.is-hoverable - a.navbar-link= req.user._id - .navbar-dropdown - +navBarLink(`${_CC.config.base}wishlist/${req.user._id}`, lang('NAVBAR_WISHLIST')) - +navBarLink(`${_CC.config.base}profile`, lang('NAVBAR_PROFILE')) - if req.user.admin - +navBarLink(`${_CC.config.base}admin-settings`, lang('NAVBAR_ADMIN')) - hr.navbar-divider - .navbar-item - 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`) + .navbar-item + +navBarLink(`${_CC.config.base}wishlist/${req.user._id}`, lang('NAVBAR_WISHLIST')) + .navbar-item + +navBarLink(`${_CC.config.base}profile`, lang('NAVBAR_PROFILE')) + if req.user.admin + .navbar-item + +navBarLink(`${_CC.config.base}admin-settings`, lang('NAVBAR_ADMIN')) + .navbar-item + +navBarLink(`${_CC.config.base}logout`, lang('NAVBAR_LOGOUT')) + +script(src=`${_CC.config.base}js/nav.js`) diff --git a/src/views/wishlists.pug b/src/views/wishlists.pug index 0bb0129..7a632bf 100644 --- a/src/views/wishlists.pug +++ b/src/views/wishlists.pug @@ -59,8 +59,7 @@ block content img.is-rounded.is-fullwidth(src=req.user.pfp, style='object-fit: cover;') .column span - span=lang('WISHLISTS_COUNTS_SELF', req.user._id) - progress.progress(value=1, max=1) + span!=lang('WISHLISTS_COUNTS_SELF', req.user._id) +wishlistDetails(req.user.wishlist, req.user._id) each user in users if req.user._id !== user.id @@ -73,7 +72,7 @@ block content 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;') .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) +wishlistDetails(user.doc.wishlist) script.