From ead1ae4e7c1054446e2c72d96bfa6d0924615935 Mon Sep 17 00:00:00 2001 From: Ske Date: Fri, 12 Jun 2020 12:47:44 +0200 Subject: [PATCH] Style changes --- docs/content/.vuepress/components/Arg.vue | 43 +++------------ docs/content/.vuepress/components/Cmd.vue | 51 ++++++++++++++---- .../.vuepress/components/CmdInline.vue | 1 + .../.vuepress/components/CommandInfo.vue | 54 +------------------ docs/content/.vuepress/styles/palette.styl | 13 ++--- 5 files changed, 57 insertions(+), 105 deletions(-) diff --git a/docs/content/.vuepress/components/Arg.vue b/docs/content/.vuepress/components/Arg.vue index 80dd5e07..5263bcb0 100644 --- a/docs/content/.vuepress/components/Arg.vue +++ b/docs/content/.vuepress/components/Arg.vue @@ -1,61 +1,34 @@  \ No newline at end of file diff --git a/docs/content/.vuepress/components/CmdInline.vue b/docs/content/.vuepress/components/CmdInline.vue index e1ad8444..96718eca 100644 --- a/docs/content/.vuepress/components/CmdInline.vue +++ b/docs/content/.vuepress/components/CmdInline.vue @@ -11,6 +11,7 @@ color: $exampleTextColor; padding: 0.2rem 0.4rem; border-radius: 3px; + border-bottom: 1px solid darken($exampleArgColor, 15%); } .custom-block.tip .example-inline { diff --git a/docs/content/.vuepress/components/CommandInfo.vue b/docs/content/.vuepress/components/CommandInfo.vue index 042d1fd1..8dc360b0 100644 --- a/docs/content/.vuepress/components/CommandInfo.vue +++ b/docs/content/.vuepress/components/CommandInfo.vue @@ -10,22 +10,12 @@

Syntax (how the command is used)

- - - {{ part.str }} - {{ part.arg }} - - +

Examples

- - - {{ part.str }} - {{ part.arg }} - - +

Arguments (fill in above)

@@ -41,25 +31,6 @@ -{{ key }} - {{ flag.desc }} - - @@ -71,27 +42,6 @@ data() { return {command: commands[this.cmd]}; - }, - - methods: { - parseUsage(usage) { - if (usage.cmd) usage = usage.cmd; - - const argRegex = /`([^`]+)`/g; - const parts = []; - let lastMatch = 0; - for (const match of usage.matchAll(argRegex)) { - if (match.index > 0) - parts.push({type: "str", str: usage.substring(lastMatch, match.index)}); - parts.push({type: "arg", arg: match[1]}); - lastMatch = match.index + match[0].length; - } - if (lastMatch < usage.length) - parts.push({type: "str", str: usage.substring(lastMatch)}); - console.log("INPUT STRING:", usage); - console.log("OUTPUT TOKENS:", parts); - return parts; - } } } diff --git a/docs/content/.vuepress/styles/palette.styl b/docs/content/.vuepress/styles/palette.styl index 1b2bfa4f..ef410862 100644 --- a/docs/content/.vuepress/styles/palette.styl +++ b/docs/content/.vuepress/styles/palette.styl @@ -3,19 +3,16 @@ $textColor = #2c3e50; $accentColor = darken(#e8a024, 10%); // CUSTOM -/*$exampleBgColor = $codeBgColor; -$exampleTextColor = #ffffff;*/ $exampleBgColor = #f3f5f7; $exampleBgColorInTip = darken($exampleBgColor, 4%); $exampleTextColor = darken($textColor, 5%); -$exampleArgColor = darken($exampleBgColor, 4%); -$exampleArgColorInExample = darken($exampleBgColor, 8%); -$exampleArgColorInTip = darken($exampleBgColor, 7%); -$exampleArgColorInBoth = darken($exampleBgColor, 12%); +$exampleArgColor = darken($exampleBgColor, 1%); +$exampleArgColorInExample = darken($exampleBgColor, 4%); +$exampleArgColorInTip = darken($exampleBgColor, 3%); +$exampleArgColorInBoth = darken($exampleBgColor, 8%); $tipDarkenFactor = 3; $exampleDarkenFactor = 5; -//$examplePrefixColor = #b3b6b9; -$examplePrefixColor = desaturate(lighten($textColor, 40%), 50%); $exampleCommentColor = darken($accentColor, 15%); +$examplePrefixColor = desaturate(lighten($exampleCommentColor, 20%), 10%); $exampleFontSize = 0.9rem; $exampleFontFamily = source-code-pro, Menlo, Monaco, Consolas, "Courier New", monospace; \ No newline at end of file