-
-
Notifications
You must be signed in to change notification settings - Fork 167
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
feat(rentry): init #1198
feat(rentry): init #1198
Conversation
GitHub autofills it from the name of your branch. |
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.
In general, a lot of missed nesting and not very organized. I recommend grouping things into semantic sections based on where/what pages elements appear on, and utilize blank lines between selectors to make it easier to read and signal a shift in the content.
styles/rentry/catppuccin.user.css
Outdated
color: @mauve; | ||
} | ||
.highlight .gt { | ||
color: @sapphire; | ||
} | ||
.highlight .kt { | ||
color: @pink; | ||
} | ||
.highlight .na { | ||
color: @yellow; | ||
} | ||
.highlight .no { | ||
color: @peach; | ||
} | ||
.highlight .ni { | ||
color: @subtext0; | ||
} | ||
.highlight .ne { | ||
color: @maroon; | ||
} | ||
.highlight .nl { | ||
color: @yellow; | ||
} | ||
.highlight .nn { | ||
color: @mauve; | ||
} | ||
.highlight .w { | ||
color: @subtext1; | ||
} | ||
.highlight .sd { | ||
color: @blue; | ||
} | ||
.highlight .se { | ||
color: @peach; | ||
} | ||
.highlight .c, | ||
.highlight .ch, | ||
.highlight .cm, | ||
.highlight .cpf, | ||
.highlight .c1, | ||
.highlight .cs { | ||
color: @overlay2; | ||
} | ||
.highlight .k, | ||
.highlight .kc, | ||
.highlight .kd, | ||
.highlight .kn, | ||
.highlight .kp, | ||
.highlight .kr, | ||
.highlight .nb, | ||
.highlight .nt, | ||
.highlight .sx, | ||
.highlight .bp { | ||
color: @maroon; | ||
} | ||
.highlight .o, | ||
.highlight .m, | ||
.highlight .mb, | ||
.highlight .mf, | ||
.highlight .mh, | ||
.highlight .mi, | ||
.highlight .mo, | ||
.highlight .il { | ||
color: @teal; | ||
} | ||
.highlight .gh, | ||
.highlight .gp { | ||
color: @sapphire; | ||
} | ||
.highlight .s, | ||
.highlight .sa, | ||
.highlight .sb, | ||
.highlight .sc, | ||
.highlight .dl, | ||
.highlight .s2, | ||
.highlight .sh, | ||
.highlight .s1 { | ||
color: @green; | ||
} | ||
.highlight .nc, | ||
.highlight .nf, | ||
.highlight .fm { | ||
color: @sky; | ||
} | ||
.highlight .nd, | ||
.highlight .ow { | ||
color: @mauve; | ||
} | ||
.highlight .nv, | ||
.highlight .ss, | ||
.highlight .vc, | ||
.highlight .vg, | ||
.highlight .vi, | ||
.highlight .vm { | ||
color: @lavender; | ||
} | ||
.highlight .si, | ||
.highlight .sr { | ||
color: @red; | ||
} |
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.
Nesting please.
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.
Also please make sure you haven't just taken their colors and made them Catppuccin- syntax highlighting needs to match how our style guide is, so look at how code looks in (paste it in to) VS Code or Neovim or whatever your editor is and try to match the classes as well as you can.
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.
i tried to match the colors in 1e1ec94
(#1198) with the vscode(/ium) theme and it became more accurate however there are things i can't solve such as special characters ((){}.<>=*:;
) being in the same color due to using the same class (.p
) (style-guide.md says that symbols and atoms(?) should be red so i made it red)
if you notices any issues with the syntax highlighting please point them out
styles/rentry/catppuccin.user.css
Outdated
.admonition-title::before, | ||
.admonition.warning > .admonition-title::before, | ||
.admonition.danger > .admonition-title::before { | ||
filter: none !important; | ||
} | ||
.admonition.info, | ||
.admonition.hint, | ||
.admonition.tip { | ||
color: @blue; | ||
background: fade(@blue, 25%); | ||
} | ||
.admonition.info > .admonition-title::before, | ||
.admonition.hint > .admonition-title::before, | ||
.admonition.tip > .admonition-title::before { | ||
@svg: escape( | ||
'<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="@{blue}" viewBox="0 0 16 16"><path d="M2 6a6 6 0 1 1 10.174 4.31c-.203.196-.359.4-.453.619l-.762 1.769A.5.5 0 0 1 10.5 13h-5a.5.5 0 0 1-.46-.302l-.761-1.77a1.964 1.964 0 0 0-.453-.618A5.984 5.984 0 0 1 2 6zm3 8.5a.5.5 0 0 1 .5-.5h5a.5.5 0 0 1 0 1l-.224.447a1 1 0 0 1-.894.553H6.618a1 1 0 0 1-.894-.553L5.5 15a.5.5 0 0 1-.5-.5z"/></svg>' | ||
); | ||
content: url("data:image/svg+xml,@{svg}"); | ||
} | ||
.admonition.note, | ||
.admonition.important { | ||
color: @green; | ||
background-color: fade(@green, 25%); | ||
} | ||
.admonition.greentext { | ||
color: @green; | ||
background-color: fade(@yellow, 25%); | ||
} | ||
.admonition.note > .admonition-title:before, | ||
.admonition.important > .admonition-title:before, | ||
.admonition.greentext > .admonition-title:before { | ||
@svg: escape( | ||
'<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="@{green}" viewBox="0 0 16 16"><path d="M0 2a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V2zm8.93 4.588-2.29.287-.082.38.45.083c.294.07.352.176.288.469l-.738 3.468c-.194.897.105 1.319.808 1.319.545 0 1.178-.252 1.465-.598l.088-.416c-.2.176-.492.246-.686.246-.275 0-.375-.193-.304-.533L8.93 6.588zM8 5.5a1 1 0 1 0 0-2 1 1 0 0 0 0 2z"/></svg>' | ||
); | ||
content: url("data:image/svg+xml,@{svg}"); | ||
} | ||
.admonition.warning { | ||
color: @yellow; | ||
background-color: fade(@yellow, 25%); | ||
} | ||
.admonition.warning > .admonition-title:before, | ||
.admonition.caution > .admonition-title:before, | ||
.admonition.attention > .admonition-title:before { | ||
@svg: escape( | ||
'<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="@{yellow}" viewBox="0 0 16 16"><path d="M8.982 1.566a1.13 1.13 0 0 0-1.96 0L.165 13.233c-.457.778.091 1.767.98 1.767h13.713c.889 0 1.438-.99.98-1.767L8.982 1.566zM8 5c.535 0 .954.462.9.995l-.35 3.507a.552.552 0 0 1-1.1 0L7.1 5.995A.905.905 0 0 1 8 5zm.002 6a1 1 0 1 1 0 2 1 1 0 0 1 0-2z"/></svg>' | ||
); | ||
content: url("data:image/svg+xml,@{svg}"); | ||
} | ||
.admonition.danger { | ||
color: @red; | ||
background-color: fade(@red, 25%); | ||
} | ||
.admonition.danger > .admonition-title:before, | ||
.admonition.error > .admonition-title:before { | ||
@svg: escape( | ||
'<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="@{red}" viewBox="0 0 16 16"><path d="M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0zM8 4a.905.905 0 0 0-.9.995l.35 3.507a.552.552 0 0 0 1.1 0l.35-3.507A.905.905 0 0 0 8 4zm.002 6a1 1 0 1 0 0 2 1 1 0 0 0 0-2z"/></svg>' | ||
); | ||
content: url("data:image/svg+xml,@{svg}"); | ||
} |
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.
Some nesting would be nice here.
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.
this one should be solved with da5f71b
styles/rentry/catppuccin.user.css
Outdated
// editor | ||
.CodeMirror-line::selection, | ||
.CodeMirror-line > span::selection, | ||
.CodeMirror-line > span > span::selection { | ||
background-color: fade(@accent-color, 30%); | ||
} | ||
.cm-formatting-admonition { | ||
color: @yellow; | ||
} | ||
.cm-mark { | ||
color: @yellow; | ||
} | ||
.cm-link { | ||
color: @blue; | ||
} | ||
.cm-url { | ||
color: @sky; | ||
} | ||
.cm-formatting-toc { | ||
color: @mauve; | ||
} | ||
.cm-variable-2 { | ||
color: @green; | ||
} | ||
.cm-keyword { | ||
color: @pink; | ||
} | ||
.cm-meta { | ||
color: @subtext0; | ||
} | ||
.cm-comment { | ||
color: @pink !important; | ||
} | ||
.cm-hr { | ||
color: @surface2; | ||
} | ||
// markdown | ||
.cm-header { | ||
color: @text; | ||
} |
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.
Same thing with my other syntax highlighting comment, make sure it actually resembles our syntax highlighting ports.
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.
the style guide is focused on code based syntax highlighting (terminals, code editors) but these are colors for (afaik) rentry specific syntax (i don't know other languages that support something specific like ==marks== or how i am supposed to theme a [TOC] element). i guess the closest thing would be markdown but this seems like it's own thing
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.
Delete/danger buttons (.btn-danger
) are incorrectly themed by the default button styling, you'll want to add a section for .btn-danger
below the .btn
part.
EDIT: .btn-success
also has the same issue, an eaxmple of this button is the Save button.
how do i fix edit: i did put the svgs into svgo, and the issue is still there. are there specific arguments that i should use? |
@thismoon your supposed to add |
thanks for the suggestion @somerand0mcat, but it didn't fix the issue |
run |
thanks! this fixed it. i forgot about this part in the docs |
This is not true Omar. Some SVGs can be themed by setting the fill color for the whole image, others (like the one in the docs) only need/should have the fill color set for a specific path. |
Glad you figured it out. It can be confusing, are you in the Catppuccin Discord? We have a channel there exclusively for userstyles and userstyles help. Happy to answer any questions you ever have there! |
yeah im in the discord server, i didn't know there was a forum thread for userstyles. will ask questions there next time. thanks |
styles/rentry/catppuccin.user.css
Outdated
==/UserStyle== */ | ||
|
||
@-moz-document domain('rentry.org'), domain('rentry.co') { | ||
:root.dark-mode { |
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.
:root.dark-mode { | |
.dark-mode { |
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.
nice work! next time you should run deno task lint:fix && deno task format
to both fix any lint errors and format the code
styles/rentry/catppuccin.user.css
Outdated
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.
Looking much much better. Do you mind adding comments for the types of tokens? E.g. constants, variables, keywords, strings, punctuation, operators, comments, etc.
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.
Also, on those few remaining innaccuracies - I would go side by side with the playground on https://shiki.style/ (scroll down a bit, change the language to something like JavaScript and the theme to Catppuccin ) and compare the Shiki highlighting to how it looks on Rentry (paste the demo code Shiki has into a Rentry markdown code block).
Co-authored-by: uncenter <[email protected]>
what? i didn't do that |
It's automatic when you push a new commit, ensures that an approval doesn't stay after something has changed. |
I think i messed it up by renaming the branch |
Ahah you don't need to rename the branch in the future. That doesn't have any effect outside of this PR so it doesn't matter what the name of the branch is as long as you can find it! |
🎉 Theme for Rentry 🎉
Rentry.co is a markdown paste service with preview, custom urls and editing.¹
💬 Additional Comments 💬
there are classes but they were never used, instead the website is themed with hardcoded color values from bootstrap.min.css. so i had to theme every element individually
this specific table header in "how" is colored differently
because it's different than normal tables in user created pages
users can set text with custom colors using this syntax:
and while in theory it's possible to color them
there are too many colors. it's possible to color the main ones,
note: users still can still set custom colors with hex codes
%#ACBDEF% Colored Text Hex %%
theming those colors would open a can of worms because this
results in this
the only exception i did is coloring
grey
and#039205
because they're used in an official pagei added a regex for pages ending in
/raw
, pages starting withhttps://rentry.co/static/
and pages on the subdomainexport3.rentry.co
so they default toprefers-color-scheme
(device theme) instead of@lightFlavor
(default light theme because the way dark theme is set is by adding a class to the root but without it it's light theme, and these pages don't have a toggle button for dark theme but they follow the device theme instead)also i think it's possible to only keep
@base
and@text
only in the catppuccin mixin in that section but i'm not sure if i should do itthe accent color was never usedi forgot that::selection{background-color: fade(@accent-color, 30%);}
existsthe syntax highlighting is using CodeMirror. and while there is a theme for it, it's not present in tips-and-tricks.md. also i think its outdated. so i themed everything manually (according to the default light theme css)
🗒 Checklist 🗒
/styles/<name-of-website>
containing the contents of the/template
directory.userstyles.yml
file with information about the new userstyle.
catppuccin.user.css
- all the CSS for the userstyle, based on thetemplate.
preview.webp
- composite image of all four individual flavor screenshots (taken with the default accent color of mauve) stitched together, generated via Catwalk.