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

Subsections and headings #237

Closed
wants to merge 45 commits into from
Closed

Subsections and headings #237

wants to merge 45 commits into from

Conversation

dankimberley
Copy link
Collaborator

@dankimberley dankimberley commented Jul 10, 2024

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


ShareSection

dankimberley and others added 30 commits July 9, 2024 12:32
* 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.
@dankimberley dankimberley marked this pull request as ready for review July 15, 2024 13:37
Copy link
Collaborator

@alasdairwilson alasdairwilson left a 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
image

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.?

@dankimberley
Copy link
Collaborator Author

Great thanks, all agreed! I'll get that done 👍

@dankimberley
Copy link
Collaborator Author

Created a new PR with a cleaner branch at #247 @alasdairwilson

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.

regrtession on leaving coments on headings
2 participants