Closed blksnk closed 4 months ago
I think I managed a similar look using some CSS wizardry 🧙🏼♂️ Let me know if this works for you
Are you referring to the changes made to navbar
, and playground
made to keep the original layout of the playground intact ?
I mainly need navbar
to be fixed to the top for /everything
's page layout to work as intended. I'll see if I manage to target & override its position only when on the appropriate page and get back to you.
!important
rules will be deleted shortly, as they are not needed anymore 👍🏼
Agreed! I would be able to style the code block itself but I'd like to leave the code's syntax highlighting to you if possible.
I tweaked, fixed, polished a few things and implemented your feedback.
I replicated the code blocks' style, though I'm not 100% convinced by how they look in light mode. What do you think?
In the meantime I managed to find a way to allow for the table of contents to be accessed on mobile! I've included a screen recording in the original description at the cost of compression. Please try it out for yourself and let me know your thoughts.
Cheers
Hi, thanks for working on this!
I replicated the code blocks' style, though I'm not 100% convinced by how they look in light mode. What do you think?
Maybe you could copy the style from the docs website?
Although it looks a bit strange with such dramatic drop shadow in this case
Thank you for the feedback ! I tried a bit harder and I think I made it work, using both of your ideas as inspiration.
I then got sidetracked with adding syntax highlighting for the code snippets (using highlight.js core) while preserving the current CodeFlask implementation and ended up overhauling most of the codebase 😖!
I'll stop myself from adding onto this already huge pull request and wait for your feedback. I think I definitely went too far, hopefully it still suits your needs !
Regarding syntax highlighting, I started to collect some thoughts in https://github.com/gleam-lang/language-tour/issues/59 I think we should think about that separately, as we don't seem to currently have a "preferred" code theme
I agree. That's the reason I made the following changes:
render
function in tour/pages/everything
)I personally am not too keen on Atom One Dark being the default and would like to replace it with something else (Catppuccin perhaps ?) but kept it for now as I did not want to drastically impact the editor's look in this PR
@lpil Done ! I've kept the original widgets
module separate. Did you need me to merge it as well ?
Any news on when / if this can be merged ?
Oh! I've just noticed that you've added a bunch of non-brand colours. Please don't do that.
Hello Gleam team !
While stumbling upon @lpil's stream this evening, I thought I could help out with some CSS and content for the tour.
Context
This PR is aimed at the
single-page
branch since I am not familiar enough with the language / codebase to finish the whole feature mentioned in #36 by myself.This is my first time actually using the language for something other than learning purposes, so feel free to flood this PR with change requests 😄
Code / logic changes
src/tour.gleam
, focusing on theeverything_html
functionstatic/common.css
muted-indigo
color, used as a dim background color for the dark themeoff-white
a tiny bit to improve contrast withwhite
static/style.css
--gap
unit frompx
torem
for better responsiveness--gap-<factor>
variables (quarter, half, double)--color-text-secondary
for both light & dark themes/everything
pageUI / UX Changes
Responsive (kinda for now)
Renders at various screen sizes
![image](https://github.com/gleam-lang/language-tour/assets/43580664/ffd2f17e-b7e3-4301-80d8-50caa2a77fd4) ![image](https://github.com/gleam-lang/language-tour/assets/43580664/b26d370b-091e-447a-80fc-f04acb31c217) ![image](https://github.com/gleam-lang/language-tour/assets/43580664/801e59bf-ce7d-4cd1-a5f7-9634461761fa)Mobile table of contents
Screen recording on device (Pixel 7)
https://github.com/gleam-lang/language-tour/assets/43580664/be857c5c-9e92-41c5-ad95-a99ddc5ad551Run
button that links to the corresponding lesson's interactive tour pageTested with
gleam run
+live-server