Skip to content
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

Update to use Ghost’s user-editable navigation #7

Merged
merged 15 commits into from
Sep 2, 2020
Merged

Update to use Ghost’s user-editable navigation #7

merged 15 commits into from
Sep 2, 2020

Conversation

backspace
Copy link
Collaborator

@backspace backspace commented Aug 26, 2020

This closes #3. It converts the theme to use Ghost’s built-in navigation features rather than hard-coding links to pages. That means it’ll be easier for non-computer nerds to keep the site updated 🥳

You can check it out on the theme “sandbox” site. It has different navigation than the true site to highlight this difference.

@backspace backspace self-assigned this Aug 26, 2020
@backspace backspace marked this pull request as ready for review August 26, 2020 01:50
@backspace backspace requested a review from farfamahar August 26, 2020 01:50
@backspace
Copy link
Collaborator Author

eep I just noticed there’s a homepage header background that shows up after scrolling a bit on mobile, I’m not sure this update preserves that… and also the sandbox site has lost its theme (probably when the Heroku dyno went to sleep), so that setup needs some refining 😯

I’ll follow up re the header background in the morning 🤞🏻

@backspace
Copy link
Collaborator Author

ah it does still show up! I’m not sure how exactly and maybe it would benefit from alignment with these changes but I think it’s fine for now at least haha

re the sandbox problem, my true dream is to create a Heroku deployment for every pull request, with something like this approach to include the theme in the Git commit vs uploading a .zip that doesn’t persist on the ephemeral filesystem. Maybe I can get to this some time in the next week.

@farfamahar
Copy link
Contributor

farfamahar commented Aug 26, 2020

How does the blog page look for you? I downloaded and opened this branch locally and the header background doesn't show up on the blog page for me. I think it might have to do with the way I set up routes to the blog page. Mine looks like this https://pastebin.com/nu6J2PLQ

Only way it works on my end is if I add

background-color: rgba(34,34,34,0.9); box-shadow: 0 19px 38px rgba(0,0,0,0.30), 0 15px 12px rgba(0,0,0,0.22); margin-bottom: 50px;

to the .header class.

@backspace
Copy link
Collaborator Author

Thanks for catching that! In ba94237 I added a bit of ugliness that appends a blog-template class to body so it can get the same header that the other pages that need it have. I also added it for post-template which is the class individual blog posts get.

It’s visible in the sandbox… for now 😆

@backspace backspace force-pushed the nav branch 3 times, most recently from 4dfb251 to f3b8e3c Compare August 27, 2020 08:51
This will allow theme PRs to include a .content-overrides
directory that gets copied to the Heroku deployment so
redirects.json and routes.yaml persist. I don’t love it
because it means PRs will have spurious files but it’ll
work for now…
This breaks current-page-tracking and overapplies a style
meant only for certain pages.
This is out of sync on mobile but it’s closer…
The border was 0 because of the cascade 😐
Since this is only used once now, no need to use a partial.
It took me a while to understand that a checkbox is what was
revealing the content!
This was used to style the menu differently on the homepage
but it’s now handled in CSS.
Without this short-named items could wrap.
@backspace
Copy link
Collaborator Author

I achieved my dream of a preview deployment for every PR! It required an unpleasant workaround because of how redirects and routes in the filesystem vs the database and don’t survive on Heroku’s ephemeral filesystem: the PR has a .content-overrides/settings/routes.yaml file that is copied to the deployment. It may be that we can actually keep that directory in main though… maybe that makes sense 🤔

But now you can see on the preview that the blog has the proper header:

image

@backspace
Copy link
Collaborator Author

If you think this is ready for merging, @FarfamaH, you could “approve” the pull request 🤓

image

If there are any conflicts with your work on #4, let me know if you want to pair on resolving them.

@farfamahar farfamahar merged commit 63bf3c3 into main Sep 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Navigation should use Ghost facilities
2 participants