Skip to content

Commit

Permalink
feat(hoogle): init (#1437)
Browse files Browse the repository at this point in the history
  • Loading branch information
jn-sena authored Nov 12, 2024
1 parent 4a3e879 commit c1beb63
Show file tree
Hide file tree
Showing 3 changed files with 303 additions and 0 deletions.
8 changes: 8 additions & 0 deletions scripts/userstyles.yml
Original file line number Diff line number Diff line change
Expand Up @@ -475,6 +475,14 @@ userstyles:
readme:
app-link: "https://github.com/benphelps/homepage"
current-maintainers: [*gandalf-the-blue]
hoogle:
name: Hoogle
categories: [development, productivity]
icon: haskell
color: mauve
readme:
app-link: "https://hoogle.haskell.org"
current-maintainers: [*jn-sena]
hoppscotch:
name: Hoppscotch
categories: [development, productivity]
Expand Down
295 changes: 295 additions & 0 deletions styles/hoogle/catppuccin.user.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,295 @@
/* ==UserStyle==
@name Hoogle Catppuccin
@namespace github.com/catppuccin/userstyles/styles/hoogle
@homepageURL https://github.com/catppuccin/userstyles/tree/main/styles/hoogle
@version 0.1.0
@updateURL https://github.com/catppuccin/userstyles/raw/main/styles/hoogle/catppuccin.user.css
@supportURL https://github.com/catppuccin/userstyles/issues?q=is%3Aopen+is%3Aissue+label%3Ahoogle
@description Soothing pastel theme for Hoogle
@author Catppuccin
@license MIT
@preprocessor less
@var select lightFlavor "Light Flavor" ["latte:Latte*", "frappe:Frappé", "macchiato:Macchiato", "mocha:Mocha"]
@var select darkFlavor "Dark Flavor" ["latte:Latte", "frappe:Frappé", "macchiato:Macchiato", "mocha:Mocha*"]
@var select accentColor "Accent" ["rosewater:Rosewater", "flamingo:Flamingo", "pink:Pink", "mauve:Mauve*", "red:Red", "maroon:Maroon", "peach:Peach", "yellow:Yellow", "green:Green", "teal:Teal", "blue:Blue", "sapphire:Sapphire", "sky:Sky", "lavender:Lavender", "subtext0:Gray"]
==/UserStyle== */

@-moz-document domain("hoogle.haskell.org") {
@media (prefers-color-scheme: light) {
:root {
#catppuccin(@lightFlavor, @accentColor);
}
}
@media (prefers-color-scheme: dark) {
:root {
#catppuccin(@darkFlavor, @accentColor);
}
}

#catppuccin(@lookup, @accent) {
@rosewater: @catppuccin[@@lookup][@rosewater];
@flamingo: @catppuccin[@@lookup][@flamingo];
@pink: @catppuccin[@@lookup][@pink];
@mauve: @catppuccin[@@lookup][@mauve];
@red: @catppuccin[@@lookup][@red];
@maroon: @catppuccin[@@lookup][@maroon];
@peach: @catppuccin[@@lookup][@peach];
@yellow: @catppuccin[@@lookup][@yellow];
@green: @catppuccin[@@lookup][@green];
@teal: @catppuccin[@@lookup][@teal];
@sky: @catppuccin[@@lookup][@sky];
@sapphire: @catppuccin[@@lookup][@sapphire];
@blue: @catppuccin[@@lookup][@blue];
@lavender: @catppuccin[@@lookup][@lavender];
@text: @catppuccin[@@lookup][@text];
@subtext1: @catppuccin[@@lookup][@subtext1];
@subtext0: @catppuccin[@@lookup][@subtext0];
@overlay2: @catppuccin[@@lookup][@overlay2];
@overlay1: @catppuccin[@@lookup][@overlay1];
@overlay0: @catppuccin[@@lookup][@overlay0];
@surface2: @catppuccin[@@lookup][@surface2];
@surface1: @catppuccin[@@lookup][@surface1];
@surface0: @catppuccin[@@lookup][@surface0];
@base: @catppuccin[@@lookup][@base];
@mantle: @catppuccin[@@lookup][@mantle];
@crust: @catppuccin[@@lookup][@crust];
@accent-color: @catppuccin[@@lookup][@@accent];

color-scheme: if(@lookup = latte, light, dark);

::selection {
background-color: fade(@accent-color, 30%);
}

a {
color: @accent-color;

&:hover {
background-color: @surface0;
}
}

body {
background-color: @base;
color: @text;
}

/*
* Top
*/

#links {
background-color: @accent-color;
color: @surface1;
border-color: shade(@accent-color, 25%);
}

#top-menu li {
border-color: @crust;

a,
a:visited,
a:link {
color: @base;
}
a:hover {
background-color: fade(@overlay0, 30%);
}
}

#logo {
img {
@svg: escape(
'<svg xmlns="http://www.w3.org/2000/svg" width="160" height="58"><path d="M110.241 11.967c-.248 0-.524.221-.837.652a20.5 20.5 0 0 1-2.977 3.328v1.126a7 7 0 0 1 .672-.03q1.194-.001 1.82.526.623.528 1.601 2.915l1.271 3.028-5.085 13.519c-.404 1.03-.757 1.666-1.043 1.901-.287.222-.739.39-1.365.507v1.643a14 14 0 0 1 1.82-.134q.802-.001 2.407.134c1.044-4.317 2.51-9.344 4.414-15.069 1.956 5.36 3.33 8.896 4.113 10.604a34 34 0 0 0 2.76 4.858h.61a57 57 0 0 1 4.516-2.057v-1.096q-1.215-.116-2.098-1.074c-.574-.653-1.58-2.778-3.028-6.377l-5.261-13.25q-1.174-2.932-2.367-4.279c-.795-.913-1.447-1.375-1.943-1.375m-93.741.3v28.68h5.788V28.402h11.348v12.547h5.788v-28.68h-5.788v11.285H22.288V12.267zm118.453 9.095c-2.635 0-4.864 1.038-6.677 3.111-1.721 1.996-2.573 4.331-2.573 7.018 0 3.012.897 5.432 2.697 7.245q2.699 2.698 7.235 2.697 4.501.002 7.38-3.049c.208-.221.31-.376.31-.454q.001-.096-.683-1.406c-.456-.887-.705-1.348-.744-1.374q-.04-.041-.196-.042l-.63.517q-2.583 1.995-5.675 1.995c-1.2 0-2.315-.388-3.359-1.158-1.095-.808-1.732-1.787-1.902-2.935 7.513-.56 11.553-.939 12.113-1.147.835-.326 1.251-.978 1.251-1.943q-.001-3.756-2.408-6.377-2.463-2.699-6.14-2.698m-36.741.042c-.157 0-.238.385-.238 1.167 0 .183.015.47.041.848.027.365.042.626.042.796q0 .352-.155.351c-.092 0-.246-.129-.455-.403-1.265-1.656-2.974-2.49-5.126-2.49-2.44 0-4.417.928-5.943 2.78-1.435 1.734-2.15 3.836-2.15 6.314 0 2.44.746 4.501 2.233 6.17 1.551 1.735 3.53 2.595 5.942 2.595 2.23 0 4.072-.875 5.52-2.636.052.952.072 1.566.072 1.84 0 1.239-.49 2.18-1.468 2.832-.848.574-1.913.858-3.204.858-1.97 0-3.935-.553-5.891-1.675-.104-.065-.183-.103-.248-.103q-.218 0-.28.33-.587 3.11-.588 2.895c0 .13.147.292.434.475q2.74 1.683 7.183 1.685c3.065 0 5.291-.782 6.687-2.347 1.33-1.473 1.995-3.769 1.995-6.873 0-1.565.015-3.908.041-7.038.026-3.143.041-5.504.041-7.07 0-.273-.096-.44-.279-.506-.117-.052-.81-.189-2.087-.423-1.279-.248-1.989-.372-2.12-.372m-45.464.155c-2.7 0-4.962.979-6.8 2.935-1.788 1.917-2.688 4.24-2.688 6.966s.9 5.038 2.687 6.955c1.826 1.983 4.088 2.977 6.8 2.977 2.7 0 4.965-1.002 6.791-2.997 1.787-1.93 2.677-4.25 2.677-6.977q.001-4.068-2.698-6.924-2.739-2.934-6.77-2.935m20.485 0q-4.051 0-6.81 2.935-2.679 2.876-2.677 6.966c0 2.726.89 5.038 2.676 6.955 1.826 1.983 4.099 2.977 6.811 2.977 2.7 0 4.965-1.002 6.79-2.997 1.787-1.93 2.677-4.25 2.677-6.977q.001-4.068-2.697-6.924-2.74-2.934-6.77-2.935m61.444 3.555c1.069 0 2.035.416 2.883 1.25.86.835 1.292 1.802 1.292 2.884q0 .236-1.137.393c-2.686.391-4.994.579-6.925.579-.469 0-.702-.13-.702-.403 0-1.2.459-2.291 1.385-3.256.939-.965 2.004-1.447 3.204-1.447m-41.31.279q2.13 0 3.441 1.664c.796 1.017 1.189 2.25 1.189 3.71q0 2.134-1.23 3.68-1.329 1.683-3.4 1.684c-1.396 0-2.537-.563-3.411-1.684q-1.212-1.546-1.21-3.68c0-1.447.404-2.672 1.2-3.69q1.309-1.682 3.42-1.684m-40.617.217q2.349-.002 3.875 1.778 1.468 1.683 1.468 4.072c0 1.565-.49 2.914-1.468 4.062q-1.546 1.819-3.875 1.819c-1.54 0-2.822-.607-3.866-1.82-.99-1.147-1.488-2.496-1.488-4.061q0-2.388 1.468-4.093c1.03-1.174 2.32-1.757 3.886-1.757m20.484 0q2.349-.001 3.876 1.778 1.467 1.683 1.468 4.072c0 1.565-.49 2.914-1.468 4.062Q75.56 37.34 73.23 37.34q-2.31 0-3.875-1.82c-.992-1.147-1.489-2.496-1.489-4.061q0-2.388 1.468-4.093 1.547-1.759 3.896-1.757" fill="@{accent-color}"/></svg>'
);
content: url("data:image/svg+xml,@{svg}");
}

&:hover {
background-color: transparent;
}
}

#hoogle,
#scope,
#submit {
background-color: @mantle;
color: @subtext1;
border-style: solid;
border-width: 2px;
border-color: @surface0;
border-radius: 4px;
}

.chosen-container {
.chosen-drop {
background-color: @mantle;
border-color: @surface0;
}

.chosen-single {
background-image: none;
background-color: @mantle;
box-shadow: none;
border-style: solid;
border-width: 2px;
border-color: @surface0;
color: @subtext1;
}

.chosen-default {
color: @crust;
}

.chosen-search input {
border-color: @surface1;
border-radius: 4px;
}

.chosen-results {
color: @subtext1;

li.disabled-result {
color: @overlay0;
}

li.highlighted {
background-image: none;
background-color: @accent-color;
color: @base;
}

li.no-results {
color: @subtext1;
background-color: @mantle;
}
}
}

/*
* Left
*/

#left {
a {
color: @accent-color;
}
.plus {
@svg: escape(
'<svg width="12" height="12" viewBox="0 0 12 12" xmlns="http://www.w3.org/2000/svg"><circle cy="6" cx="6" r="5.5" fill="none" stroke="@{overlay0}"/><rect width="2" height="8" x="5" y="2" ry=".5" fill="@{green}"/><rect width="8" height="2" x="2" y="5" ry=".5" fill="@{green}"/></svg>'
);
background-image: url("data:image/svg+xml,@{svg}");
color: @green;
}
.minus {
@svg: escape(
'<svg width="12" height="12" viewBox="0 0 12 12" xmlns="http://www.w3.org/2000/svg"><circle cy="6" cx="6" r="5.5" fill="none" stroke="@{overlay0}"/><rect width="8" height="2" x="2" y="5" ry=".5" fill="@{red}"/></svg>'
);
background-image: url("data:image/svg+xml,@{svg}");
color: @red;
}
}

/*
* Footer
*/

#footer {
background-color: @crust;
color: @subtext1;
border-color: @overlay0;
}

/*
* Other
*/

.error {
border-color: @red;
}

#example {
background-color: @mantle;
color: @subtext1;
border-color: @surface0;
}

/*
* Results
*/

.result.active {
background-color: @mantle;
}

.ans {
background-color: @mantle;
border-color: @surface0;

a {
color: @subtext1;
}
.name {
color: @accent-color;
}
}

.links a {
color: @overlay1;
}

.from a,
.p1,
.p2 {
color: @green;
}

.doc,
.doc a {
color: @subtext1;
}

.open {
@svg: escape(
'<svg width="10" height="10" viewBox="0 0 10 10" xmlns="http://www.w3.org/2000/svg"><rect width="9" height="9" x=".5" y=".5" ry="3" fill="none" stroke="@{overlay0}"/><rect width="6" height="2" x="2" y="4" ry=".5" fill="@{overlay0}"/></svg>'
);
background-image: url("data:image/svg+xml,@{svg}");
}
.shut {
@svg: escape(
'<svg width="10" height="10" viewBox="0 0 10 10" xmlns="http://www.w3.org/2000/svg"><rect width="9" height="9" x=".5" y=".5" ry="3" fill="none" stroke="@{overlay0}"/><rect width="2" height="6" x="4" y="2" ry=".5" fill="@{overlay0}"/><rect width="6" height="2" x="2" y="4" ry=".5" fill="@{overlay0}"/></svg>'
);
background-image: url("data:image/svg+xml,@{svg}");
}

.c0 {
background-color: @rosewater;
}
.c1 {
background-color: @green;
}
.c2 {
background-color: @lavender;
}
.c3 {
background-color: @yellow;
}
.c4 {
background-color: @pink;
}
.c5 {
background-color: @teal;
}
}
}

/* prettier-ignore */
@catppuccin: {
@latte: { @rosewater: #dc8a78; @flamingo: #dd7878; @pink: #ea76cb; @mauve: #8839ef; @red: #d20f39; @maroon: #e64553; @peach: #fe640b; @yellow: #df8e1d; @green: #40a02b; @teal: #179299; @sky: #04a5e5; @sapphire: #209fb5; @blue: #1e66f5; @lavender: #7287fd; @text: #4c4f69; @subtext1: #5c5f77; @subtext0: #6c6f85; @overlay2: #7c7f93; @overlay1: #8c8fa1; @overlay0: #9ca0b0; @surface2: #acb0be; @surface1: #bcc0cc; @surface0: #ccd0da; @base: #eff1f5; @mantle: #e6e9ef; @crust: #dce0e8; };
@frappe: { @rosewater: #f2d5cf; @flamingo: #eebebe; @pink: #f4b8e4; @mauve: #ca9ee6; @red: #e78284; @maroon: #ea999c; @peach: #ef9f76; @yellow: #e5c890; @green: #a6d189; @teal: #81c8be; @sky: #99d1db; @sapphire: #85c1dc; @blue: #8caaee; @lavender: #babbf1; @text: #c6d0f5; @subtext1: #b5bfe2; @subtext0: #a5adce; @overlay2: #949cbb; @overlay1: #838ba7; @overlay0: #737994; @surface2: #626880; @surface1: #51576d; @surface0: #414559; @base: #303446; @mantle: #292c3c; @crust: #232634; };
@macchiato: { @rosewater: #f4dbd6; @flamingo: #f0c6c6; @pink: #f5bde6; @mauve: #c6a0f6; @red: #ed8796; @maroon: #ee99a0; @peach: #f5a97f; @yellow: #eed49f; @green: #a6da95; @teal: #8bd5ca; @sky: #91d7e3; @sapphire: #7dc4e4; @blue: #8aadf4; @lavender: #b7bdf8; @text: #cad3f5; @subtext1: #b8c0e0; @subtext0: #a5adcb; @overlay2: #939ab7; @overlay1: #8087a2; @overlay0: #6e738d; @surface2: #5b6078; @surface1: #494d64; @surface0: #363a4f; @base: #24273a; @mantle: #1e2030; @crust: #181926; };
@mocha: { @rosewater: #f5e0dc; @flamingo: #f2cdcd; @pink: #f5c2e7; @mauve: #cba6f7; @red: #f38ba8; @maroon: #eba0ac; @peach: #fab387; @yellow: #f9e2af; @green: #a6e3a1; @teal: #94e2d5; @sky: #89dceb; @sapphire: #74c7ec; @blue: #89b4fa; @lavender: #b4befe; @text: #cdd6f4; @subtext1: #bac2de; @subtext0: #a6adc8; @overlay2: #9399b2; @overlay1: #7f849c; @overlay0: #6c7086; @surface2: #585b70; @surface1: #45475a; @surface0: #313244; @base: #1e1e2e; @mantle: #181825; @crust: #11111b; };
}

// vim:ft=less
Binary file added styles/hoogle/preview.webp
Binary file not shown.

0 comments on commit c1beb63

Please sign in to comment.