Skip to content

Commit

Permalink
add aws cdk docs
Browse files Browse the repository at this point in the history
  • Loading branch information
aruncveli committed Aug 4, 2024
1 parent c550b3f commit 859fe7d
Show file tree
Hide file tree
Showing 5 changed files with 185 additions and 3 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,4 @@ extension is [Stylus](https://github.com/openstyles/stylus), since:
| npm | [Install](https://github.com/aruncveli/userstyles/raw/main/npm/npm.user.styl) | [Info](npm) |
| PSArips | [Install](https://github.com/aruncveli/userstyles/raw/main/psarips/psarips.user.styl) | [Info](psarips) |
| YouGov | [Install](https://github.com/aruncveli/userstyles/raw/main/yougov/yougov.user.styl) | [Info](yougov) |
| AWS CDK | [Install](https://github.com/aruncveli/userstyles/raw/main/aws-cdk/aws-cdk.user.styl) | [Info](aws-cdk) |
7 changes: 7 additions & 0 deletions aws-cdk/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# AWS CDK Dark

[Install](https://github.com/aruncveli/userstyles/raw/main/aws-cdk/aws-cdk.user.styl)

Dark mode only for the _TypeScript_ docs of AWS CDK.

![Screenshot of page](screenshot.png)
169 changes: 169 additions & 0 deletions aws-cdk/aws-cdk.user.styl
Original file line number Diff line number Diff line change
@@ -0,0 +1,169 @@
/* ==UserStyle==
@name AWS CDK Dark
@namespace github.com/aruncveli/userstyles
@version 24.08.04
@description description
@author Arun Chandanaveli <aruncveli@gmail.com> (https://github.com/aruncveli)
@homepageURL https://github.com/aruncveli/userstyles
@supportURL https://github.com/aruncveli/userstyles/issues
@updateURL https://github.com/aruncveli/userstyles/raw/main/raw/main/aws-cdk/aws-cdk.user.styl
@license MIT
@preprocessor stylus
@var color fg "Foreground" white
@var color bg "Background" black
@var color bg1 "Background lightened 1" #111111
@var color bg2 "Background lightened 2" #222222
@var color link-color "Link" #0b84ff
==/UserStyle== */

set-bg(var = bg)
background-color var

set-bg1()
set-bg(bg1)

set-bg2()
set-bg(bg2)

set-fg()
color fg

@-moz-document url-prefix("https://docs.aws.amazon.com/cdk/api/v2/docs/")
:root
color-scheme dark

body
set-bg()
set-fg()

.onPageNav a
.toc .toggleNav .navGroup .navGroupCategoryTitle
.toc .toggleNav .navGroup .navGroupSubcategoryTitle
.toc .toggleNav ul li a
set-fg()
blockquote
set-fg()
set-bg1()

table tr:nth-child(2n)
set-bg()

code
set-bg1()

@css {
.hljs {
color: #c9d1d9;
background: #0d1117;
}

.hljs-doctag,
.hljs-keyword,
.hljs-meta .hljs-keyword,
.hljs-template-tag,
.hljs-template-variable,
.hljs-type,
.hljs-variable.language_ {
/* prettylights-syntax-keyword */
color: #ff7b72;
}

.hljs-title,
.hljs-title.class_,
.hljs-title.class_.inherited__,
.hljs-title.function_ {
/* prettylights-syntax-entity */
color: #d2a8ff;
}

.hljs-attr,
.hljs-attribute,
.hljs-literal,
.hljs-meta,
.hljs-number,
.hljs-operator,
.hljs-variable,
.hljs-selector-attr,
.hljs-selector-class,
.hljs-selector-id {
/* prettylights-syntax-constant */
color: #79c0ff;
}

.hljs-regexp,
.hljs-string,
.hljs-meta .hljs-string {
/* prettylights-syntax-string */
color: #a5d6ff;
}

.hljs-built_in,
.hljs-symbol {
/* prettylights-syntax-variable */
color: #ffa657;
}

.hljs-comment,
.hljs-code,
.hljs-formula {
/* prettylights-syntax-comment */
color: #8b949e;
}

.hljs-name,
.hljs-quote,
.hljs-selector-tag,
.hljs-selector-pseudo {
/* prettylights-syntax-entity-tag */
color: #7ee787;
}

.hljs-subst {
/* prettylights-syntax-storage-modifier-import */
color: #c9d1d9;
}

.hljs-section {
/* prettylights-syntax-markup-heading */
color: #1f6feb;
font-weight: bold;
}

.hljs-bullet {
/* prettylights-syntax-markup-list */
color: #f2cc60;
}

.hljs-emphasis {
/* prettylights-syntax-markup-italic */
color: #c9d1d9;
font-style: italic;
}

.hljs-strong {
/* prettylights-syntax-markup-bold */
color: #c9d1d9;
font-weight: bold;
}

.hljs-addition {
/* prettylights-syntax-markup-inserted */
color: #aff5b4;
background-color: #033a16;
}

.hljs-deletion {
/* prettylights-syntax-markup-deleted */
color: #ffdcd7;
background-color: #67060c;
}

.hljs-char.escape_,
.hljs-link,
.hljs-params,
.hljs-property,
.hljs-punctuation,
.hljs-tag {
/* purposely ignored */
}
}
Binary file added aws-cdk/screenshot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 8 additions & 3 deletions generate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,17 @@ import { argv } from "node:process";

import { renderFile } from "ejs";

const name = argv[2];
if (!name) {
/**
* Usage: pnpm run generate Style Name
*/

const args = argv.slice(2);
if (!args.length) {
throw new Error("Name is required");
}

const smallName = name.toLocaleLowerCase().replaceAll(" ", "-");
const name = args.join(" ");
const smallName = args.join("-").toLocaleLowerCase();
console.log(`Creating directory ${smallName}`);
mkdirSync(smallName);

Expand Down

0 comments on commit 859fe7d

Please sign in to comment.