-
-
Notifications
You must be signed in to change notification settings - Fork 10.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Split out the CSS for default templates #8126
Comments
I'm a beginner looking to contribute. it will take a while for me to ramp up on Ember and Ghost, but can I sign up for this one anyway? |
@TienSFU25 it would be great to have someone look at this - although please be aware we will need it within the next week or two. You shouldn't need to learn ember as the templates that need the styling separated are all rendered server-side. If you need a hand with anything, we all hang out in the #dev channel on our slack. |
alright, thanks! |
how do I make a new asset file that will be built and served under |
@TienSFU25 The |
I don't have write access to the repo. Can you help with this? |
As noted in #8187, the default 404 page is also pulling the
@TienSFU25 you don't need write access to this repo, you should fork the project, make your changes on a branch and push to your fork then open a Pull Request https://help.github.com/articles/creating-a-pull-request-from-a-fork/ - If you need any help swing by our Slack channel |
@TienSFU25 have you got some code for us? This change is needed before we can make others |
Yes, I will create a pr before the end of today. |
See Issue TryGhost#8126 Adds these files under /shared - normalizer.css - error.css - extracted.css (for subscribers.css and private.css) Also makes these files available as public static content
So I made 3 new CSS files, put them under /shared, and used If these three template files are the only ones that need to be migrated from the client side then this should be the correct subset of CSS required. If there are more template files, I think splitting these CSS files into things like If there's a better, more "Ghosty" way to do this let me know. |
See Issue TryGhost#8126 Adds these files under /shared - normalizer.css - ghost.css: subset of client side ghost.css Also makes these files available as public static content
Thanks for pointing that out! I will update the existing #8107 to include the new svg icons in those templates as well! |
See Issue TryGhost#8126 Adds these files under /shared - normalizer.css - error.css - extracted.css (for subscribers.css and private.css) Also makes these files available as public static content
closes TryGhost#8126 needs e3acd3c This is a replacement PR of TryGhost#8217 (thanks @TienSFU25 for the whole work 🤗), because these changes are needed urgently and blocking other work. Adds a new `ghost.css` file in `/core/shared/` to be used for server side template rendering (`error.hbs`, `subscribe.hbs` and `private.hbs`).
closes #8126 * Remove default template dependency on client side CSS See Issue #8126 Adds these files under /shared - normalizer.css - error.css - extracted.css (for subscribers.css and private.css) Also makes these files available as public static content * Remove default template dependency on client CSS closes #8126 needs e3acd3c This is a replacement PR of #8217 (thanks @TienSFU25 for the whole work 🤗), because these changes are needed urgently and blocking other work. Adds a new `ghost.css` file in `/core/shared/` to be used for server side template rendering (`error.hbs`, `subscribe.hbs` and `private.hbs`).
refs TryGhost#8126, TryGhost#8221 - we now have theme/engine instead of requiring express-hbs everywhere - only error-handler still also requires express-hbs, this is so that we can render errors without extra crud - TODO: remove the asset helper after TryGhost#8126 IF it is not needed, or else remove the TODO
refs #8126, #8221, #8223 ✨ New 'Proxy' for all helper requires - this is not currently enforced, but could be, much like apps - the proxy object is HUGE - changed date to use SafeString, this should have been there anyway - use the proxy for all helpers, including those in apps 😁 ✨ 🎨 Single instance of hbs for theme + for errors - we now have theme/engine instead of requiring express-hbs everywhere - only error-handler still also requires express-hbs, this is so that we can render errors without extra crud - TODO: remove the asset helper after #8126 IF it is not needed, or else remove the TODO 🎨 Cleanup visibility utils 🎨 Clean up the proxy a little bit 🚨 Unskip test as it now works! 🎨 Minor amends as per comments
This issue comes from PR #8105 and is also related to TryGhost/Admin#574.
In the Ghost server-side code we have 3 "default" templates, which provide some basic styles for a special page, and are allowed to be overridden by a theme.
At the moment, all 3 of these default templates get their styles by importing the ghost.css stylesheet from Ghost-Admin. However, we're trying very hard to separate out the server-side theme part of Ghost and the admin panel, and so we'd like those templates to have their own styles, which can be loaded separately.
To make it possible for us to not load the admin css for these templates, the CSS required to display these templates needs to be split out into a separate file, which can live in shared/ for now.
The 3 templates are:
1. The Error page: core/server/views/user-error.hbs
2. The "private" blog login page:
3. Subscribe to this blog page: core/server/apps/subscribers/lib/views/subscribe.hbs
The text was updated successfully, but these errors were encountered: