-
Notifications
You must be signed in to change notification settings - Fork 7
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
Subsections and headings #237
Conversation
* render navbar only if window is wider than breakpoint * render (non-functional) burger menu below breakpoint * classes * implement useWindowSize hook * fixed toolbar elements staying on the right * fixed licensing button moving when nav bar condenses * maintain padding at narrow resolutions * burger menu click open drawer * added functional but unstyled burger draw * basic styling * present material themes in one column when window width less than columnBreakpoint * added padding to 'material themes' title * footer condenses awkwardly below media breakpoint, changed to flex below md: for better themebutton positioning * fixed ThemeSwitcher positioning in flex div * minor footer placement fix * added burger drawer material indentation * burger drawer styling improvements * add dark mode to burger drawer * add dark mode to burger drawer (and run prettify on footer.tsx)
The code changes include adding the `CourseGrid` component to to use a mui grid rather than the react-flow diagram
This commit refactors the Layout component to use the MuiTheme from the @mui/material library for theming. It adds the necessary imports for the useTheme, ThemeProvider, and CssBaseline components. It also introduces the LightTheme and DarkTheme objects in the MuiTheme file, which define the color palette and styling for the light and dark themes respectively.
adds`NavDiagram` component to the to see the full repo layout via a link from /material
This commit adds the getStaticPaths function to the diagram.tsx file in the pages/material/[repoId]/[themeId] directory. The function generates the paths for the dynamic routes based on the material data retrieved from the getMaterial function. Each path corresponds to a specific combination of repoId, themeId, and courseId. This change ensures that the dynamic routes are properly generated and accessible for the material pages.
…berg into subsections-and-headings
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great stuff,
So I think I have some small issues with the anchor links:
It is not obvious from a UX pov that they exist, the mouseover is not obvious and has to be in a specific location:: I think we can just add them permanently to with a superscript link icon e.g fa link
I do wonder if they logic for the wrapping of paragraph components is a little over the top...changing Paragraph in the future might be hard: when I had done this previously it was legit just a component with new props.
If it is possible to rebase this branch once you have made the change to the links? The current diff is jank.?
Great thanks, all agreed! I'll get that done 👍 |
Created a new PR with a cleaner branch at #247 @alasdairwilson |
Fixes #231 and #192 by rendering headings as Paragraph components and giving headings id attributes. Now working on adding a copy-to-clipboard / share button next to headings to make these subsection links easier to generate. PR should be ready once this is done - now done