From c944e8450123a606807b2cea123fa24910417bd9 Mon Sep 17 00:00:00 2001 From: Mirko Lenz Date: Tue, 19 Nov 2024 10:01:45 +0100 Subject: [PATCH] build(docs): fetch pdoc template from upstream --- default.nix | 9 +- pdoc-template/syntax-highlighting.css | 246 -------------------------- pdoc-template/theme.css | 20 --- 3 files changed, 8 insertions(+), 267 deletions(-) delete mode 100644 pdoc-template/syntax-highlighting.css delete mode 100644 pdoc-template/theme.css diff --git a/default.nix b/default.nix index dd5bdf8..205a590 100644 --- a/default.nix +++ b/default.nix @@ -2,12 +2,19 @@ lib, stdenv, callPackage, + fetchFromGitHub, uv2nix, pyproject-nix, python3, tbb_2021_11, }: let + pdocRepo = fetchFromGitHub { + owner = "mitmproxy"; + repo = "pdoc"; + rev = "v15.0.0"; + hash = "sha256-6XEcHhaKkxY/FU748f+OsTcSgrM4iQTmJAL8rJ3EqnY="; + }; workspace = uv2nix.lib.workspace.loadWorkspace { workspaceRoot = ./.; }; projectOverlay = workspace.mkPyprojectOverlay { sourcePreference = "wheel"; @@ -98,7 +105,7 @@ let pdoc \ -d google \ - -t pdoc-template \ + -t ${pdocRepo}/examples/dark-mode \ --math \ --logo https://raw.githubusercontent.com/wi2trier/cbrkit/main/assets/logo.png \ -o "$out" \ diff --git a/pdoc-template/syntax-highlighting.css b/pdoc-template/syntax-highlighting.css deleted file mode 100644 index c9abda4..0000000 --- a/pdoc-template/syntax-highlighting.css +++ /dev/null @@ -1,246 +0,0 @@ -/* monokai color scheme, see pdoc/template/README.md */ -pre { - line-height: 125%; -} -span.linenos { - color: inherit; - background-color: transparent; - padding-left: 5px; - padding-right: 20px; -} -.pdoc-code .hll { - background-color: #49483e; -} -.pdoc-code { - background: #272822; - color: #f8f8f2; -} -.pdoc-code .c { - color: #75715e; -} /* Comment */ -.pdoc-code .err { - color: #960050; - background-color: #1e0010; -} /* Error */ -.pdoc-code .esc { - color: #f8f8f2; -} /* Escape */ -.pdoc-code .g { - color: #f8f8f2; -} /* Generic */ -.pdoc-code .k { - color: #66d9ef; -} /* Keyword */ -.pdoc-code .l { - color: #ae81ff; -} /* Literal */ -.pdoc-code .n { - color: #f8f8f2; -} /* Name */ -.pdoc-code .o { - color: #f92672; -} /* Operator */ -.pdoc-code .x { - color: #f8f8f2; -} /* Other */ -.pdoc-code .p { - color: #f8f8f2; -} /* Punctuation */ -.pdoc-code .ch { - color: #75715e; -} /* Comment.Hashbang */ -.pdoc-code .cm { - color: #75715e; -} /* Comment.Multiline */ -.pdoc-code .cp { - color: #75715e; -} /* Comment.Preproc */ -.pdoc-code .cpf { - color: #75715e; -} /* Comment.PreprocFile */ -.pdoc-code .c1 { - color: #75715e; -} /* Comment.Single */ -.pdoc-code .cs { - color: #75715e; -} /* Comment.Special */ -.pdoc-code .gd { - color: #f92672; -} /* Generic.Deleted */ -.pdoc-code .ge { - color: #f8f8f2; - font-style: italic; -} /* Generic.Emph */ -.pdoc-code .gr { - color: #f8f8f2; -} /* Generic.Error */ -.pdoc-code .gh { - color: #f8f8f2; -} /* Generic.Heading */ -.pdoc-code .gi { - color: #a6e22e; -} /* Generic.Inserted */ -.pdoc-code .go { - color: #66d9ef; -} /* Generic.Output */ -.pdoc-code .gp { - color: #f92672; - font-weight: bold; -} /* Generic.Prompt */ -.pdoc-code .gs { - color: #f8f8f2; - font-weight: bold; -} /* Generic.Strong */ -.pdoc-code .gu { - color: #75715e; -} /* Generic.Subheading */ -.pdoc-code .gt { - color: #f8f8f2; -} /* Generic.Traceback */ -.pdoc-code .kc { - color: #66d9ef; -} /* Keyword.Constant */ -.pdoc-code .kd { - color: #66d9ef; -} /* Keyword.Declaration */ -.pdoc-code .kn { - color: #f92672; -} /* Keyword.Namespace */ -.pdoc-code .kp { - color: #66d9ef; -} /* Keyword.Pseudo */ -.pdoc-code .kr { - color: #66d9ef; -} /* Keyword.Reserved */ -.pdoc-code .kt { - color: #66d9ef; -} /* Keyword.Type */ -.pdoc-code .ld { - color: #e6db74; -} /* Literal.Date */ -.pdoc-code .m { - color: #ae81ff; -} /* Literal.Number */ -.pdoc-code .s { - color: #e6db74; -} /* Literal.String */ -.pdoc-code .na { - color: #a6e22e; -} /* Name.Attribute */ -.pdoc-code .nb { - color: #f8f8f2; -} /* Name.Builtin */ -.pdoc-code .nc { - color: #a6e22e; -} /* Name.Class */ -.pdoc-code .no { - color: #66d9ef; -} /* Name.Constant */ -.pdoc-code .nd { - color: #a6e22e; -} /* Name.Decorator */ -.pdoc-code .ni { - color: #f8f8f2; -} /* Name.Entity */ -.pdoc-code .ne { - color: #a6e22e; -} /* Name.Exception */ -.pdoc-code .nf { - color: #a6e22e; -} /* Name.Function */ -.pdoc-code .nl { - color: #f8f8f2; -} /* Name.Label */ -.pdoc-code .nn { - color: #f8f8f2; -} /* Name.Namespace */ -.pdoc-code .nx { - color: #a6e22e; -} /* Name.Other */ -.pdoc-code .py { - color: #f8f8f2; -} /* Name.Property */ -.pdoc-code .nt { - color: #f92672; -} /* Name.Tag */ -.pdoc-code .nv { - color: #f8f8f2; -} /* Name.Variable */ -.pdoc-code .ow { - color: #f92672; -} /* Operator.Word */ -.pdoc-code .w { - color: #f8f8f2; -} /* Text.Whitespace */ -.pdoc-code .mb { - color: #ae81ff; -} /* Literal.Number.Bin */ -.pdoc-code .mf { - color: #ae81ff; -} /* Literal.Number.Float */ -.pdoc-code .mh { - color: #ae81ff; -} /* Literal.Number.Hex */ -.pdoc-code .mi { - color: #ae81ff; -} /* Literal.Number.Integer */ -.pdoc-code .mo { - color: #ae81ff; -} /* Literal.Number.Oct */ -.pdoc-code .sa { - color: #e6db74; -} /* Literal.String.Affix */ -.pdoc-code .sb { - color: #e6db74; -} /* Literal.String.Backtick */ -.pdoc-code .sc { - color: #e6db74; -} /* Literal.String.Char */ -.pdoc-code .dl { - color: #e6db74; -} /* Literal.String.Delimiter */ -.pdoc-code .sd { - color: #e6db74; -} /* Literal.String.Doc */ -.pdoc-code .s2 { - color: #e6db74; -} /* Literal.String.Double */ -.pdoc-code .se { - color: #ae81ff; -} /* Literal.String.Escape */ -.pdoc-code .sh { - color: #e6db74; -} /* Literal.String.Heredoc */ -.pdoc-code .si { - color: #e6db74; -} /* Literal.String.Interpol */ -.pdoc-code .sx { - color: #e6db74; -} /* Literal.String.Other */ -.pdoc-code .sr { - color: #e6db74; -} /* Literal.String.Regex */ -.pdoc-code .s1 { - color: #e6db74; -} /* Literal.String.Single */ -.pdoc-code .ss { - color: #e6db74; -} /* Literal.String.Symbol */ -.pdoc-code .bp { - color: #f8f8f2; -} /* Name.Builtin.Pseudo */ -.pdoc-code .fm { - color: #a6e22e; -} /* Name.Function.Magic */ -.pdoc-code .vc { - color: #f8f8f2; -} /* Name.Variable.Class */ -.pdoc-code .vg { - color: #f8f8f2; -} /* Name.Variable.Global */ -.pdoc-code .vi { - color: #f8f8f2; -} /* Name.Variable.Instance */ -.pdoc-code .vm { - color: #f8f8f2; -} /* Name.Variable.Magic */ diff --git a/pdoc-template/theme.css b/pdoc-template/theme.css deleted file mode 100644 index 0ef7c45..0000000 --- a/pdoc-template/theme.css +++ /dev/null @@ -1,20 +0,0 @@ -:root { - --pdoc-background: #212529; -} - -.pdoc { - --text: #f7f7f7; - --muted: #9d9d9d; - --link: #58a6ff; - --link-hover: #3989ff; - --code: #333; - --active: #555; - - --accent: #343434; - --accent2: #555; - - --nav-hover: rgba(0, 0, 0, 0.1); - --name: #77c1ff; - --def: #0cdd0c; - --annotation: #00c037; -}