From fc966f1f842deed7eb8b4cb584d1a78b41afffff Mon Sep 17 00:00:00 2001 From: EvilMuffinHa Date: Tue, 15 Feb 2022 11:02:08 -0500 Subject: [PATCH] markdown --- nvim/lua/markdownStyle.css | 414 ++++++++++++++++++ nvim/lua/plugins.lua | 8 +- themectl/config.toml | 2 +- .../{discord.mustache => css-custom.mustache} | 0 4 files changed, 417 insertions(+), 7 deletions(-) create mode 100644 nvim/lua/markdownStyle.css rename themectl/templates/{discord.mustache => css-custom.mustache} (100%) diff --git a/nvim/lua/markdownStyle.css b/nvim/lua/markdownStyle.css new file mode 100644 index 0000000..51fdabc --- /dev/null +++ b/nvim/lua/markdownStyle.css @@ -0,0 +1,414 @@ +/* @import url("file:///home/gideon/.config/nvim/configs/colors.css"); */ + +body { background-color: var(--background); } + +.markdown-body ol ol, +.markdown-body ul ol, +.markdown-body ol ul, +.markdown-body ul ul, +.markdown-body ol ul ol, +.markdown-body ul ul ol, +.markdown-body ol ul ul, +.markdown-body ul ul ul { + margin-top: 0; + margin-bottom: 0; +} +.markdown-body { + font-family: "Helvetica Neue", Helvetica, "Segoe UI", Arial, freesans, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; + font-size: 16px; + color: var(--foreground); + line-height: 1.6; + word-wrap: break-word; + padding: 45px; + background: var(--background); + border: 0px solid var(--foreground); + -webkit-border-radius: 0 0 3px 3px; + border-radius: 0 0 3px 3px; +} +.markdown-body > *:first-child { + margin-top: 0 !important; +} +.markdown-body > *:last-child { + margin-bottom: 0 !important; +} +.markdown-body .table-of-contents ol { + list-style: none; +} +.markdown-body .table-of-contents > ol { + padding-left: 0; +} +.markdown-body * { + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} +.markdown-body h1, +.markdown-body h2, +.markdown-body h3, +.markdown-body h4, +.markdown-body h5, +.markdown-body h6 { + margin-top: 1em; + margin-bottom: 16px; + font-weight: bold; + line-height: 1.4; +} +.markdown-body h1 .anchor, +.markdown-body h2 .anchor, +.markdown-body h3 .anchor, +.markdown-body h4 .anchor, +.markdown-body h5 .anchor, +.markdown-body h6 .anchor { + margin-left: -24px; + visibility: hidden; +} +.markdown-body h1:hover .anchor, +.markdown-body h2:hover .anchor, +.markdown-body h3:hover .anchor, +.markdown-body h4:hover .anchor, +.markdown-body h5:hover .anchor, +.markdown-body h6:hover .anchor { + visibility: visible; +} +.markdown-body p, +.markdown-body blockquote, +.markdown-body ul, +.markdown-body ol, +.markdown-body dl, +.markdown-body table, +.markdown-body pre { + margin-top: 0; + margin-bottom: 16px; + background-color: var(--background) !important; /* Changes background of code block */ +} +.markdown-body h1 { + margin: 0.67em 0; + padding-bottom: 0.3em; + font-size: 2.25em; + line-height: 1.2; + border-bottom: 1px solid var(--color4); + color: var(--color13) !important; +} +.markdown-body h2 { + padding-bottom: 0.3em; + font-size: 1.75em; + line-height: 1.225; + border-bottom: 1px solid var(--color4); + color: var(--color12) !important; +} +.markdown-body h3 { + font-size: 1.5em; + line-height: 1.43; +} +.markdown-body h4 { + font-size: 1.25em; +} +.markdown-body h5 { + font-size: 1em; +} +.markdown-body h6 { + font-size: 1em; + color: var(--color8) !important; +} +.markdown-body hr { + margin-top: 20px; + margin-bottom: 20px; + height: 0; + border: 0; + border-top: 1px solid var(--color4); +} +.markdown-body ol, +.markdown-body ul { + padding-left: 2em; +} +.markdown-body ol ol, +.markdown-body ul ol { + list-style-type: lower-roman; +} +.markdown-body ol ul, +.markdown-body ul ul { + list-style-type: circle; +} +.markdown-body ol ul ul, +.markdown-body ul ul ul { + list-style-type: square; +} +.markdown-body ol { + list-style-type: decimal; +} +.markdown-body ul { + list-style-type: disc; + /* color: var(--color9) !important; */ /* changes color of all bullet lists */ +} +li::marker { + color: var(--color14) !important; /* changes color of bullet points */ +} +.markdown-body dl { + margin-bottom: 1.3em +} +.markdown-body dl dt { + font-weight: 700; +} +.markdown-body dl dd { + margin-left: 0; +} +.markdown-body dl dd p { + margin-bottom: 0.8em; +} +.markdown-body blockquote { + margin-left: 0; + margin-right: 0; + padding: 0 15px; + color: var(--color8) !important; + border-left: 4px solid var(--color3) !important; /* border denoting block quote */ +} +.markdown-body table { + display: block; + width: 100%; + overflow: auto; + word-break: normal; + word-break: keep-all; + border-collapse: collapse; + border-spacing: 0; +} +.markdown-body table tr { + background-color: var(--background) !important; /* Changes bacground color of tables */ + border-top: 1px solid var(--color4); +} +.markdown-body table tr:nth-child(2n) { + background-color: #f8f8f8; +} +.markdown-body table th, +.markdown-body table td { + padding: 6px 13px; + border: 1px solid var(--color4); /* color of table cells/border */ +} +.markdown-body pre { + word-wrap: normal; + padding: 16px; + overflow: auto; + font-size: 85%; + line-height: 1.45; + background-color: #f7f7f7; + -webkit-border-radius: 3px; + border-radius: 3px; +} +.markdown-body pre code { + display: inline; + max-width: initial; + padding: 0; + margin: 0; + overflow: initial; + font-size: 100%; + line-height: inherit; + word-wrap: normal; + white-space: pre; + -webkit-border-radius: 3px; + border-radius: 3px; + background-color: transparent; +} +.markdown-body pre code:before, +.markdown-body pre code:after { + content: normal; +} +.markdown-body code { + font-family: Consolas, "Liberation Mono", Menlo, Courier, monospace; + padding: 0; + padding-top: 0.2em; + padding-bottom: 0.2em; + margin: 0; + font-size: 85%; + -webkit-border-radius: 3px; + border-radius: 3px; +} +.markdown-body code:before, +.markdown-body code:after { + letter-spacing: -0.2em; + content: "\00a0"; +} +.markdown-body a { + color: var(--color2) !important; /* Change style of hyperlinks */ + text-decoration: underline; + background: transparent; +} +.markdown-body img { + max-width: 100%; + max-height: 100%; +} +.markdown-body strong { + font-weight: bold; +} +.markdown-body em { + font-style: italic; +} +.markdown-body del { + text-decoration: line-through; +} +.task-list-item { + list-style-type: none; +} +.task-list-item input { + font: 13px/1.4 Helvetica, arial, nimbussansl, liberationsans, freesans, clean, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; + margin: 0 0.35em 0.25em -1.6em; + vertical-align: middle; +} +.task-list-item input[disabled] { + cursor: default; +} +.task-list-item input[type="checkbox"] { + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + padding: 0; +} +.task-list-item input[type="radio"] { + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + padding: 0; +} + + +/* Below are the page settings */ + +#page-ctn { + margin: 0 auto; + max-width: 900px; +} + +#page-header { + padding: 8px; + background-color: var(--background) !important; + border-color: var(--foreground) !important; + border-style: solid; + border-width: 1px 1px 0; + border-top-left-radius: 3px; + border-top-right-radius: 3px; +} + +#page-header svg { + display: inline-block; + margin-right: 5px; + overflow: hidden; + fill: var(--foreground) !important; +} + +#page-header h3 { + display: flex; + align-items: center; + margin-top: 0; + margin-bottom: 0; + padding-right: 16px; + font-size: 14px; + font-weight: 600; + color: var(--foreground) !important; + + +} + + + + +/* Highlight settings */ + +.hljs { + display: block; + overflow-x: auto; + padding: 0.5em; + /* color: #333; */ + color: var(--color7) !important; + background: var(--background) !important; +} + +.hljs-comment, +.hljs-quote { + color: var(--color8) !important; /* color of comments */ + font-style: italic; +} + +.hljs-keyword, +.hljs-selector-tag, +.hljs-subst { + color: var(--color4) !important; + font-weight: bold; +} + +.hljs-number, +.hljs-literal, +.hljs-variable, +.hljs-template-variable, +.hljs-tag .hljs-attr { + color: var(--color5) !important; +} + +.hljs-string, +.hljs-doctag { + color: var(--color1) !important; +} + +.hljs-title, +.hljs-section, +.hljs-selector-id { + color: var(--color3) !important; /* Color of function title */ + font-weight: bold; +} + +.hljs-subst { + font-weight: normal; +} + +.hljs-type, +.hljs-class .hljs-title { + color: var(--color2) !important; /* Color of class title */ + font-weight: bold; +} + +.hljs-tag, +.hljs-name, +.hljs-attribute { + font-weight: normal; + color: var(--color6) !important; /* Color of XML/HTML tags */ +} + +.hljs-regexp, +.hljs-link { + /* color: #009926; */ + color: var(--color9) !important; +} + +.hljs-symbol, +.hljs-bullet { + /* color: #990073; */ + color: var(--color10) !important; +} + +.hljs-built_in, +.hljs-builtin-name { + /* color: #0086b3; */ + color: var(--color12) !important; +} + +.hljs-meta { + color: var(--color8) !important; /* Color of meta tags */ + font-weight: bold; +} + +.hljs-deletion { + background: var(--color3); +} + +.hljs-addition { + background: #dfd; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} + +.katex-html { + color: var(--color6); +} diff --git a/nvim/lua/plugins.lua b/nvim/lua/plugins.lua index 319ff9e..13e288b 100644 --- a/nvim/lua/plugins.lua +++ b/nvim/lua/plugins.lua @@ -126,14 +126,10 @@ return require('packer').startup({function(use) local map = vim.api.nvim_set_keymap map('n', '', 'MarkdownPreviewToggle', {}) map('n', 'm', 'MarkdownPreviewToggle', {}) + vim.g.mkdp_markdown_css = os.getenv("HOME") .. "/.config/nvim/lua/markdownStyle.css" + vim.g.mkdp_highlight_css = os.getenv("HOME") .. "/.cache/wal/colors.css" end } - - use { - 'https://github.com/dylanaraps/wal.vim', - as = 'wal' - } - if bootstrap.is_bootstrap then require('packer').sync() end diff --git a/themectl/config.toml b/themectl/config.toml index 6f347a5..eaee436 100644 --- a/themectl/config.toml +++ b/themectl/config.toml @@ -15,7 +15,7 @@ rofi-custom = "~/.cache/theme/colors-rofi.rasi" dunst-custom = { file = "~/.config/dunst/dunstrc", post = "(killall dunst &) ; (dunst &)" } zathura-custom = "~/.config/zathura/zathurarc" -discord = { file = "~/.cache/wal/colors.css", post = "pywal-discord &" } +css-custom = { file = "~/.cache/wal/colors.css", post = "pywal-discord &" } firefox = { file = "~/.cache/wal/colors.json", post = "pywalfox update &" } binary-ninja-custom = { file = "~/.config/binja/.binaryninja/themes/theme.bntheme" } diff --git a/themectl/templates/discord.mustache b/themectl/templates/css-custom.mustache similarity index 100% rename from themectl/templates/discord.mustache rename to themectl/templates/css-custom.mustache