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

Improve css of html documentation and allow different themes #2931

Merged
merged 9 commits into from
Aug 2, 2024

Conversation

janmasrovira
Copy link
Collaborator

@janmasrovira janmasrovira commented Jul 30, 2024

  1. Refactors css theme to only use variables as source for colors to make it easier to define themes. In order to define a theme, the following variables need to be defined (these variables have been taken mostly from the catppuchin theme):
  /* Code */
  --ju-inductive: var(--ctp-green);
  --ju-constructor: var(--ctp-mauve);
  --ju-function: var(--ctp-yellow);
  --ju-module: var(--ctp-lavender);
  --ju-axiom: var(--ctp-red);
  --ju-string: var(--ctp-flamingo);
  --ju-keyword: var(--ctp-sky);
  --ju-delimiter: var(--ctp-overlay2);
  --ju-var: var(--ctp-text);
  --ju-fixity: var(--ctp-sapphire);
  --ju-comment: var(--ctp-rosewater);
  --ju-judoc: var(--ctp-teal);
  --ju-number: var(--ctp-peach);

  /* Text */
  --ju-text: var(--ctp-text);
  --ju-subtext1: var(--ctp-subtext1);
  --ju-subtext0: var(--ctp-subtext0);

  /* Overlay */
  --ju-overlay0: var(--ctp-overlay0);
  --ju-overlay1: var(--ctp-overlay1);
  --ju-overlay2: var(--ctp-overlay2);

  /* Surface */
  --ju-surface0: var(--ctp-surface0);
  --ju-surface1: var(--ctp-surface1);
  --ju-surface2: var(--ctp-surface2);

  /* Panes */
  --ju-base: var(--ctp-base);
  --ju-mantle: var(--ctp-mantle);
  --ju-crust: var(--ctp-mantle);

  /* Theme */
  --ju-main: var(--ctp-maroon);
  --ju-main-link: var(--ctp-maroon);
  --ju-main-link-visited: var(--ctp-flamingo);
  --ju-warning: var(--ctp-red);
  1. When changing theme, the judoc documentation will also use that theme, as opposed to only the source code.
  2. Added highlighting for module names.
  3. When hovering a juvix code element (axiom, constructor, inductive, etc.), the underline will be of the correct color for the kind. Before it was always a fixed color.

@janmasrovira janmasrovira force-pushed the linuwial branch 8 times, most recently from 5ee2a48 to 07253ca Compare August 1, 2024 16:34
@janmasrovira janmasrovira marked this pull request as ready for review August 1, 2024 16:34
paulcadman
paulcadman previously approved these changes Aug 1, 2024
Copy link
Collaborator

@paulcadman paulcadman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎨

@janmasrovira janmasrovira merged commit bd3b7f1 into main Aug 2, 2024
4 checks passed
@janmasrovira janmasrovira deleted the linuwial branch August 2, 2024 14:16
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.

2 participants