Skip to content

Commit

Permalink
chore: bump scalar
Browse files Browse the repository at this point in the history
chore: rust theme

chore: fix typo
  • Loading branch information
abbudao committed Jun 5, 2024
1 parent 2bad9ab commit ec69e8c
Show file tree
Hide file tree
Showing 2 changed files with 110 additions and 109 deletions.
155 changes: 73 additions & 82 deletions crates/aide/res/scalar/rust-theme.css
Original file line number Diff line number Diff line change
@@ -1,116 +1,107 @@
root {
--theme-font: "Inter", var(--system-fonts);
--scalar-font: "Inter", var(--system-fonts);
}
/* basic theme */
.light-mode {
--theme-color-1: rgb(9, 9, 11);
--theme-color-2: rgb(113, 113, 122);
--theme-color-3: rgba(25, 25, 28, 0.5);
--theme-color-accent: var(--theme-color-1);
--scalar-color-1: rgb(9, 9, 11);
--scalar-color-2: rgb(113, 113, 122);
--scalar-color-3: rgba(25, 25, 28, 0.5);
--scalar-color-accent: var(--theme-color-1);

--theme-background-1: #fff;
--theme-background-2: #f4f4f5;
--theme-background-3: #e3e3e6;
--theme-background-accent: #8ab4f81f;
--scalar-background-1: #fff;
--scalar-background-2: #f4f4f5;
--scalar-background-3: #e3e3e6;
--scalar-background-accent: #8ab4f81f;

--theme-border-color: rgb(228, 228, 231);
--scalar-border-color: rgb(228, 228, 231);
}
.dark-mode {
--theme-color-1: #fafafa;
--theme-color-2: rgb(161, 161, 170);
--theme-color-3: rgba(255, 255, 255, 0.533);
--theme-color-accent: var(--theme-color-1);
--scalar-color-1: #fafafa;
--scalar-color-2: rgb(161, 161, 170);
--scalar-color-3: rgba(255, 255, 255, 0.533);
--scalar-color-accent: var(--theme-color-1);

--theme-background-1: #09090b;
--theme-background-2: #18181b;
--theme-background-3: #2c2c30;
--theme-background-accent: #8ab4f81f;
--scalar-background-1: #09090b;
--scalar-background-2: #18181b;
--scalar-background-3: #2c2c30;
--scalar-background-accent: #8ab4f81f;

--theme-border-color: rgba(255, 255, 255, 0.12);
--scalar-border-color: rgba(255, 255, 255, 0.12);
}
/* Document header */
.light-mode .t-doc__header {
--header-background-1: var(--theme-background-1);
--header-border-color: var(--theme-border-color);
--header-color-1: var(--theme-color-1);
--header-color-2: var(--theme-color-2);
--header-background-toggle: var(--theme-color-3);
--header-call-to-action-color: var(--theme-color-accent);
--scalar-header-background-1: var(--scalar-background-1);
--scalar-header-border-color: var(--scalar-border-color);
--scalar-header-color-1: var(--scalar-color-1);
--scalar-header-color-2: var(--scalar-color-2);
--scalar-header-background-toggle: var(--scalar-color-3);
--scalar-header-call-to-action-color: var(--scalar-color-accent);
}

.dark-mode .t-doc__header {
--header-background-1: var(--theme-background-1);
--header-border-color: var(--theme-border-color);
--header-color-1: var(--theme-color-1);
--header-color-2: var(--theme-color-2);
--header-background-toggle: var(--theme-color-3);
--header-call-to-action-color: var(--theme-color-accent);
--scalar-header-background-1: var(--scalar-background-1);
--scalar-header-border-color: var(--scalar-border-color);
--scalar-header-color-1: var(--scalar-color-1);
--scalar-header-color-2: var(--scalar-color-2);
--scalar-header-background-toggle: var(--scalar-color-3);
--scalar-header-call-to-action-color: var(--scalar-color-accent);
}

/* Document Sidebar */
.light-mode .t-doc__sidebar {
--sidebar-background-1: var(--theme-background-1);
--sidebar-item-hover-color: currentColor;
--sidebar-item-hover-background: var(--theme-background-2);
--sidebar-item-active-background: #09090b;
--sidebar-border-color: var(--theme-border-color);
--sidebar-color-1: var(--theme-color-1);
--sidebar-color-2: var(--theme-color-2);
--sidebar-color-active: var(--theme-background-1);
--sidebar-search-background: transparent;
--sidebar-search-border-color: var(--theme-border-color);
--sidebar-search--color: var(--theme-color-3);
}
.light-mode .t-doc__sidebar,
.dark-mode .t-doc__sidebar {
--scalar-sidebar-background-1: var(--scalar-background-1);
--scalar-sidebar-color-1: var(--scalar-color-1);
--scalar-sidebar-color-2: var(--scalar-color-2);
--scalar-sidebar-border-color: var(--scalar-border-color);

--scalar-sidebar-item-hover-background: var(--scalar-background-2);
--scalar-sidebar-item-hover-color: currentColor;

.dark-mode .sidebar {
--sidebar-background-1: var(--theme-background-1);
--sidebar-item-hover-color: currentColor;
--sidebar-item-hover-background: var(--theme-background-2);
--sidebar-item-active-background: var(--theme-background-3);
--sidebar-border-color: var(--theme-border-color);
--sidebar-color-1: var(--theme-color-1);
--sidebar-color-2: var(--theme-color-2);
--sidebar-color-active: var(--theme-color-accent);
--sidebar-search-background: transparent;
--sidebar-search-border-color: var(--theme-border-color);
--sidebar-search--color: var(--theme-color-3);
--scalar-sidebar-item-active-background: var(--scalar-background-2);
--scalar-sidebar-color-active: var(--scalar-color-1);

--scalar-sidebar-search-background: transparent;
--scalar-sidebar-search-color: var(--scalar-color-3);
--scalar-sidebar-search-border-color: var(--scalar-border-color);
}
/* advanced */
.light-mode {
--theme-button-1: rgb(49 53 56);
--theme-button-1-color: #fff;
--theme-button-1-hover: rgb(28 31 33);
--scalar-button-1: rgb(49 53 56);
--scalar-button-1-color: #fff;
--scalar-button-1-hover: rgb(28 31 33);

--theme-color-green: #069061;
--theme-color-red: #ef0006;
--theme-color-yellow: #edbe20;
--theme-color-blue: #0082d0;
--theme-color-orange: #fb892c;
--theme-color-purple: #5203d1;
--scalar-color-green: #069061;
--scalar-color-red: #ef0006;
--scalar-color-yellow: #edbe20;
--scalar-color-blue: #0082d0;
--scalar-color-orange: #fb892c;
--scalar-color-purple: #5203d1;

--theme-scrollbar-color: rgba(0, 0, 0, 0.18);
--theme-scrollbar-color-active: rgba(0, 0, 0, 0.36);
--scalar-scrollbar-color: rgba(0, 0, 0, 0.18);
--scalar-scrollbar-color-active: rgba(0, 0, 0, 0.36);
}
.dark-mode {
--theme-button-1: #f6f6f6;
--theme-button-1-color: #000;
--theme-button-1-hover: #e7e7e7;
--scalar-button-1: #f6f6f6;
--scalar-button-1-color: #000;
--scalar-button-1-hover: #e7e7e7;

--theme-color-green: #00b648;
--theme-color-red: #dc1b19;
--theme-color-yellow: #ffc90d;
--theme-color-blue: #4eb3ec;
--theme-color-orange: #ff8d4d;
--theme-color-purple: #b191f9;
--scalar-color-green: #00b648;
--scalar-color-red: #dc1b19;
--scalar-color-yellow: #ffc90d;
--scalar-color-blue: #4eb3ec;
--scalar-color-orange: #ff8d4d;
--scalar-color-purple: #b191f9;

--theme-scrollbar-color: rgba(255, 255, 255, 0.24);
--theme-scrollbar-color-active: rgba(255, 255, 255, 0.48);
--scalar-scrollbar-color: rgba(255, 255, 255, 0.24);
--scalar-scrollbar-color-active: rgba(255, 255, 255, 0.48);
}
/* Adv customization */
.introduction-cards .scalar-card:first-of-type {
overflow: visible;
}
.examples .scalar-card-footer {
--theme-background-3: transparent;
--scalar-background-3: transparent;
padding-top: 0;
}
.show-api-client-button:before {
Expand All @@ -124,7 +115,7 @@ root {
.references-rendered .markdown a {
text-decoration: underline !important;
}
.introduction-cards .scalar-card:first-of-type:before {
.introduction-card > :first-child:before {
content: "";
width: 140px;
height: 140px;
Expand All @@ -133,6 +124,6 @@ root {
background-image: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbDpzcGFjZT0icHJlc2VydmUiIHN0eWxlPSJmaWxsLXJ1bGU6ZXZlbm9kZDtjbGlwLXJ1bGU6ZXZlbm9kZDtzdHJva2UtbGluZWpvaW46cm91bmQ7c3Ryb2tlLW1pdGVybGltaXQ6MS40MTQyMSIgdmlld0JveD0iMCAwIDEyMDAgODAwIj48cGF0aCBkPSJtMC03LTEyLTI1di0zYzAtMjgtMjktNTUtNzktNzV2MTdsLTE1LTZ2LThjLTcxLTI1LTE3Ny00Mi0yOTQtNDItMTAzIDAtMTk3IDEzLTI2NiAzM3YyOC0zNGMtNzEgMjMtMTE1IDU0LTExNSA4OWwzIDE2LTcgMTNzLTYgNyA0IDIzYTIxMzggMjEzOCAwIDAgMCA5NiAxMjBjMS0xLTctMjktMjctNjAtOS0xNy0yMS00MC0yNy01NiAxOSAxMiAxMzAgNjggMzU3IDY4Qy0xNTAgOTAtNDcgMTgtMzYgOGMtNCAxNi0xNyA0OC0yOCA3MS0xOCAzMi0yNCA2MC0yMyA2MWwx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CAxNi0xMCAyOS0yMSAyOS0xMiAwLTIyLTEzLTIyLTI5czEwLTI5IDIyLTI5Qy0xMC0yOSAwLTE2IDAgMCIgc3R5bGU9ImZpbGw6I2ZmZjtmaWxsLXJ1bGU6bm9uemVybyIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoNTQ0IDQyNikiLz48cGF0aCBkPSJtMC00MCA4MS03cy0zIDEzLTEzIDIzYzAgMC0yOCAzMC02MC0zIDAgMC01LTUtOC0xMyIgc3R5bGU9ImZpbGwtcnVsZTpub256ZXJvIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSg1OTMgNTc3KSIvPjxwYXRoIGQ9Ik0wIDE5MWgtMmMtMjYtNi0xMDAtMjUtMTE5LTU3IDAgMCA5OS0xMTItNTYtMTg1bDE4IDEyNXMtNDgtMzItNTgtMTAxYzAgMC0xMTcgODQgNTEgMTY1IDAgMCAxNSA1OCAxNjEgMTAzYTI1IDI1IDAgMCAwIDMwLTI1YzAtMTQtMTEtMjUtMjUtMjUiIHN0eWxlPSJmaWxsOiNmNzRjMDA7ZmlsbC1ydWxlOm5vbnplcm8iIHRyYW5zZm9ybT0idHJhbnNsYXRlKDI3MCAyNzEpIi8+PC9zdmc+);
background-size: 100%;
background-repeat: no-repeat;
bottom: 0;
top: -70px;
background-position: center 70px;
}
}
64 changes: 37 additions & 27 deletions crates/aide/res/scalar/scalar.standalone.min.js

Large diffs are not rendered by default.

0 comments on commit ec69e8c

Please sign in to comment.