From b86f87e629089398c9fbbee3fe32b5c2cf57d1b0 Mon Sep 17 00:00:00 2001 From: Emmanuel Florent Date: Fri, 28 Jun 2019 11:21:02 +0200 Subject: [PATCH] recopy from pydocs review input --- layouts/_default/baseof.html | 35 ++++---- layouts/_default/list.html | 8 +- layouts/shortcodes/refname.html | 2 +- .../layouts/partials/breadcrumb.html | 2 +- .../partials/breadcrumb_recursive.html | 9 ++- themes/doc-theme/layouts/partials/menu.html | 30 ++++--- .../layouts/partials/menu_recursive.html | 9 ++- .../doc-theme/layouts/partials/toolbar.html | 7 +- themes/doc-theme/static/css/doc-theme.css | 80 ++++++------------- 9 files changed, 76 insertions(+), 106 deletions(-) diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index 6f7c323..13839ef 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -14,27 +14,20 @@ - {{ partial "menu.html" . }} - {{- partial "toolbar.html" . -}} - + {{ partial "menu.html" . }} + {{- partial "toolbar.html" . -}} - + + {{- partial "menu-contextual.html" . -}} + {{- block "main" . }}{{- end }} + + + - - - - {{- partial "menu-contextual.html" . -}} - {{- block "main" . }}{{- end }} - - - - - - - - - {{- partial "footer.html" . -}} + @@ -63,8 +56,8 @@ drawer2: true, toc: 0, branches: [ - { value: 'https://development.pycom.io', text: 'development version'}, - { value: 'https://docs.pycom.io', text: 'version stable', } + { value: 'https://docs.pycom.io', text: 'version stable', }, + { value: 'https://development.pycom.io', text: 'version development'}, ], branch: "" }, @@ -102,7 +95,7 @@ fetchResults (kw, start) { if (!start) { start = 1 } let key = "AIzaSyD4-MGytNzTCZpTH6UYk1mfOxZkt74T5MI"; - let cx = "004592132197158309932:jleutbge8gs"; + let cx = "004592132197158309932:anluf60c9w8"; let url = "https://www.googleapis.com/customsearch/v1"; url = url + "?cx=" + cx + "&key=" + key + "&q=" + encodeURI(kw) + "&start=" + start diff --git a/layouts/_default/list.html b/layouts/_default/list.html index 3469cf6..3af4b64 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -2,21 +2,21 @@ {{ partial "breadcrumb_recursive.html" (dict "menu" .Site.Menus.main "page" . ) }} - {{ if .Title }}

{{- .Title -}}

{{ end }} +

{{- .Title -}}

{{- .Content -}}
+

 

{{ partial "prev_next.html" (dict "menu" .Site.Menus.main "page" . ) }} - + {{ end }} diff --git a/layouts/shortcodes/refname.html b/layouts/shortcodes/refname.html index f9d058e..528feb6 100644 --- a/layouts/shortcodes/refname.html +++ b/layouts/shortcodes/refname.html @@ -1,4 +1,4 @@ {{ $p := .Get 0 }} {{ with .Page.GetPage $p }} -
{{ .Title }} + {{ .Title }} {{ end }} diff --git a/themes/doc-theme/layouts/partials/breadcrumb.html b/themes/doc-theme/layouts/partials/breadcrumb.html index 28ae432..c7fcd26 100644 --- a/themes/doc-theme/layouts/partials/breadcrumb.html +++ b/themes/doc-theme/layouts/partials/breadcrumb.html @@ -1,3 +1,3 @@

- {{ partial "breadcrumb_recursive.html" (dict "menu" .Site.Menus.main "page" . ) }} + {{ partial "breadcrumb_recursive.html" (dict "menu" .Site.Menus.main "page" . ) }}

diff --git a/themes/doc-theme/layouts/partials/breadcrumb_recursive.html b/themes/doc-theme/layouts/partials/breadcrumb_recursive.html index ff1bfc6..64c875c 100644 --- a/themes/doc-theme/layouts/partials/breadcrumb_recursive.html +++ b/themes/doc-theme/layouts/partials/breadcrumb_recursive.html @@ -1,8 +1,12 @@ {{ $page := .page }} - {{ $prev := . }} +{{ $level := 1 }} +{{ $prev := . }} {{ range .menu }} + + + {{ $iz := eq $page.URL .URL}} {{ $haz := in $page.URL .URL}} @@ -14,7 +18,7 @@ {{ .Pre }} {{ .Name }} {{ if not $iz }}>{{ end }} {{ end }} - {{ partial "breadcrumb_recursive.html" (dict "menu" .Children "page" $page) }} + {{ partial "breadcrumb_recursive.html" (dict "menu" .Children "page" $page "level" $level) }} {{ if or $iz $haz }} @@ -36,3 +40,4 @@ {{ end }} {{ end }} + diff --git a/themes/doc-theme/layouts/partials/menu.html b/themes/doc-theme/layouts/partials/menu.html index 43bc128..01377ad 100644 --- a/themes/doc-theme/layouts/partials/menu.html +++ b/themes/doc-theme/layouts/partials/menu.html @@ -5,14 +5,12 @@ class="lighten-4 pt-0" style="overflow-y: hidden; overflow-x: hidden;" > - - + + - - - -
+
- + - -

- - home Table of content -

- - {{ partial "menu_recursive.html" (dict "menu" .Site.Menus.main "page" . ) }} +

+ + {{ partial "menu_recursive.html" (dict "menu" .Site.Menus.main "page" . "level" 0) }} -
    Have a question ? +

     

    diff --git a/themes/doc-theme/layouts/partials/menu_recursive.html b/themes/doc-theme/layouts/partials/menu_recursive.html index 93d68e2..c8ebadc 100644 --- a/themes/doc-theme/layouts/partials/menu_recursive.html +++ b/themes/doc-theme/layouts/partials/menu_recursive.html @@ -1,4 +1,5 @@ {{ $page := .page }} +{{ $level := add .level 1 }} {{ $pURL := .page.URL }}
      {{ range .menu }} @@ -10,10 +11,11 @@ {{ if true }}
    • - {{ .Pre }} {{ .Name }} + done + {{ .Pre }} {{ .Name }} {{ end }} {{ if or $iz $haz $phaz }} - {{ partial "menu_recursive.html" (dict "menu" .Children "page" $page) }} + {{ partial "menu_recursive.html" (dict "menu" .Children "page" $page "level" $level ) }} {{ end }} {{ if or $iz $haz $phaz}} @@ -24,7 +26,8 @@
    • - {{ .Name }} + done + {{ .Name }}
    • {{ end }} diff --git a/themes/doc-theme/layouts/partials/toolbar.html b/themes/doc-theme/layouts/partials/toolbar.html index 5ebeba2..f6d8071 100644 --- a/themes/doc-theme/layouts/partials/toolbar.html +++ b/themes/doc-theme/layouts/partials/toolbar.html @@ -7,9 +7,8 @@ dark style="background-color: #171730" > - - + @@ -21,8 +20,8 @@ -
      - +
      +
      {{- if gt .WordCount 400 -}} diff --git a/themes/doc-theme/static/css/doc-theme.css b/themes/doc-theme/static/css/doc-theme.css index 714b3c8..ffbc50a 100644 --- a/themes/doc-theme/static/css/doc-theme.css +++ b/themes/doc-theme/static/css/doc-theme.css @@ -1,15 +1,12 @@ - html { font-size: 105%; - } - .menu-contextual { width: 320px; right: 0px; top: 0px; - z-index: 3; + z-index: 4; position: fixed; } @@ -72,30 +69,27 @@ url("/fonts/BebasNeue-Regular.otf") format("opentype"); .application { /* font-family: 'Beba',Helvetica,Arial,Lucida,sans-serif; */ - font-family:'Space Mono',monospace; + font-family: Helvetica; } - +/* p { text-align: justify; } +*/ .bread { font-family: 'Beba',Helvetica,Arial,Lucida,sans-serif; letter-spacing: 0.1em; - color: #7800FF; + /* color: #7800FF; */ } .theme--dark.v-navigation-drawer:not(.v-navigation-drawer--floating) .v-navigation-drawer__border { background-color: transparent; } -/** this gives correct offset when link to anchors -*[id]:before { - display: block; - content: " "; - visibility: hidden; - z-index: 0; + +ul.lefttree { + margin-left: -8px; } -*/ a, li.lefttree > a { text-decoration: none; @@ -114,8 +108,12 @@ a:hover { background-color: yellow; } +a.v-tabs__item:hover { + background-color: red!important; +} + a { - color: #1E1E3C!important; + color: #1E1E3C; } li > a { @@ -125,18 +123,13 @@ li > a { } li > a.hot { - color: #7800FF; text-decoration: underline; - background-color: yellow; padding: 6px; } - -li.lefttree { - margin-top: 6px; - margin-bottom: 6px; - +li.lefttree > i { + display: hidden; } li.lefttree > a { @@ -153,31 +146,25 @@ li.hot { } - -ul.lefttree { - padding-right: 0px; - margin-right: 0px; -} - .v-toolbar__content, .v-toolbar__extension { padding:0!important; } .danger-alert { - background-color: #FF450A !important; + background-color: #EF9A9A !important; margin-top: 24px; margin-bottom: 24px; } .warning-alert { - background-color: #FF450A !important; + background-color: #EF9A9A !important; margin-top: 24px; margin-bottom: 24px; } .info-alert { - background-color: #00FFFF !important; + background-color: #90CAF9 !important; margin-top: 24px; margin-bottom: 24px; } @@ -197,26 +184,6 @@ img { padding: 18px; } -/* -nav#TableOfContents::-webkit-scrollbar, .fancyScroll::-webkit-scrollbar -{ - width: 10px!important; -} - -nav#TableOfContents::-webkit-scrollbar-thumb, .fancyScroll::-webkit-scrollbar-thumb -{ - border-radius: 10px!important; - background-image: -webkit-gradient(linear, - left bottom, - left top, - color-stop(0.86, rgb(255,255,255)), - color-stop(0.72, rgb(120,0,255))); -} -*/ - - - - [v-cloak] > * { display:none } [v-cloak]::before { content: " "; @@ -230,8 +197,6 @@ nav#TableOfContents::-webkit-scrollbar-thumb, .fancyScroll::-webkit-scrollbar-th background-position: center; } - - table { display: table; width: 100%; @@ -289,7 +254,6 @@ pre > code { } code { - padding: 1px; background-color: #EEEEEE; } @@ -297,3 +261,11 @@ code { .primary--text { color: #7800FF; } + +.v-window { + padding-top: 24px; +} + +p { + text-align: justify; +} \ No newline at end of file