Commit Graph

641 Commits

Author SHA1 Message Date
Thibaut Patel
527ef79955 Added the last_seen_at update on member page view
refs https://github.com/TryGhost/Team/issues/1306

- This adds a `MemberPageViewEvent` event when a page is viewed by a member (post/page/tag/author/...)
- Integrates the `LastSeenAtUpdater` service that listens to the `MemberPageViewEvent` events to update `member.last_seen_at`
- Follows the latest testing recommendation (end to end test + testing for side-effects)
2022-03-02 13:58:26 +01:00
Naz
b9e26c836b 🐛 Fixed missing index page from pages sitemaps
closes https://github.com/TryGhost/Ghost/issues/14180
refs 597ec51afb

- The index page `/` was missing from sitemaps.xml. It was a regression instoruced with a referenced commit.
2022-02-28 22:23:11 +07:00
Hannah Wolfe
5bf12939e4
Updated eslint-plugin-ghost & fixed resulting failures
- I recently added a bunch of strict rules to our eslint plugin around returns: ca9af37866
- These mostly are issues that occur whilst writing code, that you spot and fix as you're developing, but they're annoying to notice/find and eslint can be used to flag them quickly
- There are of course, edge cases where you don't need to return from array fns, but this rule also suggests better patterns might be available
- For our excert helper and new assertEvent helper, I've updated the code to use simpler patterns that are easier to read, so as to avoid the warnings
- For our old API I've simply disabled the rule as we're about to delete this code
2022-02-21 12:30:12 +00:00
Torsten Zander
f1b71f7fd7
🐛 Fixed AssetHelper not working with svg (#13978)
loses TryGhost#13971

This fixes an issue with links containing # anchor. It makes sure the # part is at the end of the url like url?v=hash#anhor

Co-authored-by: Hannah Wolfe <github.erisds@gmail.com>
2022-02-07 15:07:18 +00:00
Daniel Lockyer
af240816d8 Added eslint exemption for camelcase line
no issue

- the new eslint bump seems to flag this line up for using camelcase
- i'm not sure why this hasn't flagged before but it seems we want to
  keep the naming because the function name has the same linting exemption
2022-02-07 13:16:05 +01:00
Matt Hanley
6d4538cc2b Updated wording on unsubscribe confirmation with paid conditional
refs https://github.com/TryGhost/Team/issues/1228

- We were displaying a message referencing paid subscriptions to all users, which was causing confusion
- We don't have the `member.paid` flag in this context, so we use the match helper on member.status not free
2022-02-02 12:36:41 +00:00
Rishabh
93596a1375 Updated frontend routing to include products for page/post
refs https://github.com/TryGhost/Team/issues/1071

- `products` relation is needed on post/page to tackle custom tiers visibility, this change attaches `products` as default include for frontend controllers
2022-02-01 11:13:51 +05:30
Rishabh
15d692dc01 Updated frontend helpers to handle tiers visibility
refs https://github.com/TryGhost/Team/issues/1071

- visibility handling for posts/pages with restricted tiers access has changed, this change updates frontend helpers
2022-02-01 11:13:51 +05:30
Fabien 'egg' O'Carroll
01f30eb632
Included benefits with theme product data (#14051)
refs https://github.com/TryGhost/Team/issues/1079

These were missing when benefits were added to products, and will allow
theme developers to make more useful custom subscribe pages.
2022-01-24 13:55:25 +02:00
Fabien 'egg' O'Carroll
db4da54265
Removed archived Tiers from theme data (#14049)
refs https://github.com/TryGhost/Team/issues/1252

In order to allow existing subscribe pages to continue working without
an extra flag, we're going to filter out the archived tiers.
2022-01-24 12:47:24 +02:00
Hannah Wolfe
9d8089a748
Removed deprecated routes.yaml data format
refs: https://github.com/TryGhost/Ghost/issues/10434
refs: https://github.com/TryGhost/Ghost/pull/10449
refs: https://github.com/TryGhost/Ghost/pull/10559

- We originally had a weird structure returned for data keys in routes.yaml.
- To the best of my knowledge this was never desired or really used
- I'm removing it now simply because I'm trying to remove all references to v2/v3 in tests, and this had a comment saying it was deprecated in v3
- I could have changed the comment to be a proper @deprecated comment and leave this til we rewrite dynamic routing
- However it's weird and confusing and I believe entirely unused - so getting rid is way way better
2022-01-21 20:16:43 +00:00
Marat Vyshegorodtsev
74b97e99cd
Added timezone and locale to the options of the date helper (#13892)
fixes https://github.com/TryGhost/Ghost/issues/13832

The `date` handlebars helper has only one option currently — `format`. It assumes the locale and timezone from the `options.data.site` object which is not always desired behavior.

The helper sometimes is used, for example, in custom RSS template where we always need the `en-US` locale, not the one that we have configured for the website globally. This change makes the two options configurable, and defaults to the `options.data.site` object values, if not specified in the helper (keeps the backwards compatibility with the current behavior).
2022-01-19 14:43:53 +00:00
Rishabh
62777d7f26 Handled default product to use first paid product
Since we now have 2 products by default for all ghost sites, free and default paid, the usage of default product which so far was using first product needs to be updated to use the first paid product.

- updates default product usage to use first paid tier
- updates tests
2022-01-17 22:59:34 +05:30
Fabien "egg" O'Carroll
f58b5984cb Updated caching policy for /members/.well-known
refs https://github.com/TryGhost/Team/issues/1273

This endpoint currently only serves the members public key, which should
never change. A 24 hours cache will drastically reduce the number of
requests for the key, with little to no impact on functionality.
2022-01-14 14:04:23 +02:00
Matt Hanley
620059c7b4 🐛 Fixed incorrect edit redirect for authors
closes https://github.com/TryGhost/Ghost/issues/13942

- Admin routes were updated, and the author page was moved under the settings route, but the /edit redirect was missed
2022-01-10 16:56:33 +00:00
Kevin Ansfield
c27ad6e6b8 🎨 Improved copy on member email unsubscribe page
closes https://github.com/TryGhost/Team/issues/1228

- copy updated to clarify the unsubscribe was for emails only, not full account cancelation
- added a link to member account management so members can easily re-subscribe to emails if desired
2022-01-05 15:27:13 +00:00
Thibaut Patel
01e833376b
🐛 Added pagination to sitemap.xml to avoid max 50,000 entries limit
refs https://github.com/TryGhost/Team/issues/1044
refs https://github.com/TryGhost/Ghost/pull/13298

- This splits the sitemaps according to the limit set by Google https://developers.google.com/search/docs/advanced/sitemaps/large-sitemaps

Co-authored-by:
- Kevin Ansfield (@kevinansfield)
2022-01-05 11:54:35 +01:00
Kevin Ansfield
5b5f756a8d Fixed linter error
refs https://github.com/TryGhost/Team/issues/1258

- all uses of `labs` service in the frontend site router have been removed but the require had been left in place
2022-01-04 15:29:00 +00:00
Kevin Ansfield
0de2c7e261 Removed filesAPI GA labs flag
refs https://github.com/TryGhost/Team/issues/1258

- files API is GA so labs flag and conditional access to files API routes is no longer necessary
2022-01-04 14:56:07 +00:00
Kevin Ansfield
2773e82e3e Removed mediaAPI GA labs flag
refs https://github.com/TryGhost/Team/issues/1258

- media API is GA so labs flag and conditional access to media API routes is no longer necessary
2022-01-04 13:11:23 +00:00
Matt Hanley
cc7f527a6a
🐛 Added fallback for meta_description to custom_excerpt (#13927)
closes https://github.com/TryGhost/Ghost/issues/13920

- Custom excerpt should be used as a fallback for meta_description in line with the behaviour of OG and Twitter metadata
- We specifically don't want to use the full fallback to the auto-generated preview text when a custom excerpt isn't defined, because we trust search engines to be able to summarise content better than we can
2022-01-03 19:09:03 +00:00
Kevin Ansfield
cabf78e938 Cleaned up customThemeSettings labs flag
closes https://github.com/TryGhost/Team/issues/1164

- `customThemeSettings` feature is GA so any conditionals can be cleaned up
- removed conditional loading of custom theme settings and associated API routes
- removed event trigger for reloading custom theme settings when the feature flag is toggled
- removed flag from labs GA list
2022-01-03 17:45:25 +00:00
Juan Delgadillo
76cde79186
Fixed AMP style compliance (#13912)
no issue

- `!important` qualifier is not allowed in AMP styles as it's disallowed by the framework's spec https://amp.dev/documentation/guides-and-tutorials/develop/style_and_layout/style_pages/#disallowed-styles
2021-12-21 21:32:53 -05:00
Peter Zimon
25748f420c Applied default box sizing to all cards
refs. https://github.com/TryGhost/Ghost/issues/13874

- Improved stability of cards by adding 'box-sizing: border-box;' CSS property to all of them so that it's not required by themes anymore
2021-12-17 15:28:35 +01:00
Peter Zimon
e64e646587 Refined default header styles 2021-12-17 07:53:16 +01:00
Peter Zimon
1d46adf07a Updated header card colors and typography 2021-12-17 04:23:46 +01:00
Peter Zimon
fb39a0032e Revert "Used neutral background colors for default header styles"
This reverts commit 999dc867b6.
2021-12-17 04:15:37 +01:00
Peter Zimon
999dc867b6 Used neutral background colors for default header styles 2021-12-17 03:41:50 +01:00
Peter Zimon
384efab031 Updated header frontend styles 2021-12-16 19:39:30 +01:00
James Morris
81374e3040 Updated button for header card frontend to not style inner span
refs https://github.com/TryGhost/Team/issues/1253
2021-12-16 18:26:02 +00:00
Thibaut Patel
4984223bf2 Renamed the header styles
refs https://github.com/TryGhost/Team/issues/1253

- The naming is easier to understand for theme developers
2021-12-16 18:22:16 +01:00
James Morris
90c99afcfb Removed unnecessary styles from header card frontend
refs https://github.com/TryGhost/Team/issues/1253
2021-12-16 17:20:12 +00:00
James Morris
c373e41699 Added in proper header link colours
refs https://github.com/TryGhost/Team/issues/1253
2021-12-16 17:05:39 +00:00
James Morris
3490047a36 Updated frontend with header style tweaks
refs https://github.com/TryGhost/Team/issues/1253
2021-12-16 16:37:02 +00:00
Sodbileg Gansukh
7898828cc6 Add gap to image card on smaller screen sizes 2021-12-16 21:54:23 +08:00
Sodbileg Gansukh
2649ba4c4b Add gap custom CSS property to image card
This adds margin to the image card next to a gallery card
2021-12-16 21:50:43 +08:00
Fabien 'egg' O'Carroll
0c853a372b
Supported restricting limit="all" in get helper (#13903)
refs https://github.com/TryGhost/Team/issues/1251

With sites that have a huge number of resources, using limit="all" can
cause OOM errors at the Node level. Administrators now have the ability
to cap limit="all" requests via config. This only affects the get helper
used in themes, not the API, this is by design as themes have less
visibility of issues.
2021-12-16 13:59:39 +02:00
Peter Zimon
41e4ba68c9 Updated toggle and product card spacings 2021-12-16 08:49:37 +01:00
Peter Zimon
9a8461e06b Added underline to accented callout card links 2021-12-16 08:45:31 +01:00
James Morris
5dc30ba6a9 Added AMP styles for headers as well as more tweaks for email and frontend
refs https://github.com/TryGhost/Team/issues/1253
2021-12-15 18:42:25 +00:00
Fabien egg O'Carroll
9db1c843c3 Updated Before/After card markup
refs https://github.com/TryGhost/Team/issues/1249

This removes some superfluous markup as well as renaming the slider
handle classname
2021-12-15 20:11:16 +02:00
James Morris
ad96ad4baa Next round of styles for headers in frontend and email
refs https://github.com/TryGhost/Team/issues/1253
2021-12-15 17:45:01 +00:00
Peter Zimon
4353763de1 Updated file upload frontend styles 2021-12-15 17:44:37 +01:00
Fabien egg O'Carroll
6938808276 Improved styling of mismatched aspect ratio sliders
refs https://github.com/TryGhost/Team/issues/1249

The height:100%; stops taller images escaping the slider component.
2021-12-15 17:04:06 +02:00
Fabien egg O'Carroll
6f97396c1b Removed focus from slider after use
refs https://github.com/TryGhost/Team/issues/1249

If we leave focus on the slider than after interacting with it, it will
capture scroll events and move the slider rather than scrolling the
page.
2021-12-15 16:59:25 +02:00
Fabien egg O'Carroll
c745211ee4 Fixed small images in "wide" before/after card
refs https://github.com/TryGhost/Team/issues/1249

Because we cannot resize the container of teh slider without affecting
the surrounding content, e.g. in the context of a grid. We need to
stretch images to fit the slider container.

This also applies the `object-fit: cover` property to the slider image
to help with mis-matched aspect ratios
2021-12-15 16:56:46 +02:00
Fabien egg O'Carroll
16c6e535be Fixed image widths for before/after slider
refs https://github.com/TryGhost/Team/issues/1249

Instead of attempting to calculate teh width of the container, we leave
one image to fill up space naturally as the browser allows it, and then
use that to set the width of the secondary image.
2021-12-15 16:32:35 +02:00
Peter Zimon
acd0223f5b Callout style refinements 2021-12-15 14:51:55 +01:00
Thibaut Patel
49170e7ff2 Added a first version of the header card frontend rendering
refs https://github.com/TryGhost/Team/issues/1253

- Based on the editor card, the css isn't correct yet as it has undefined css variables
2021-12-15 14:46:00 +01:00
Fabien egg O'Carroll
a21a436f98 Added handle for before/after slider
refs https://github.com/TryGhost/Team/issues/1249

Using an input as the slider handle meant setting a width of 100% + px,
which could push width over the size of the screen - not good! This
takes the same approach as the CodePen linked below and uses a separate
element, which has the position of it updated by JS in realtime.

https://codepen.io/josephwong2004/pen/NWRGxdR
2021-12-15 15:16:29 +02:00