From 0043eca672e4389d345203507a6cf67b3afee0da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kamil=20=C5=9Aliwak?= Date: Tue, 5 Oct 2021 16:32:03 +0200 Subject: [PATCH 1/2] Consistent indentation in doc config, templates and static files --- docs/_static/css/custom.css | 14 +++++++------- docs/_templates/layout.html | 6 +++--- docs/conf.py | 2 +- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/docs/_static/css/custom.css b/docs/_static/css/custom.css index fd5062036..252537b04 100644 --- a/docs/_static/css/custom.css +++ b/docs/_static/css/custom.css @@ -1,14 +1,14 @@ pre { - white-space: pre-wrap; /* css-3 */ - white-space: -moz-pre-wrap; /* Mozilla, since 1999 */ - white-space: -pre-wrap; /* Opera 4-6 */ - white-space: -o-pre-wrap; /* Opera 7 */ - word-wrap: break-word; + white-space: pre-wrap; /* css-3 */ + white-space: -moz-pre-wrap; /* Mozilla, since 1999 */ + white-space: -pre-wrap; /* Opera 4-6 */ + white-space: -o-pre-wrap; /* Opera 7 */ + word-wrap: break-word; } .wy-table-responsive table td, .wy-table-responsive table th { - white-space: normal; + white-space: normal; } .rst-content table.docutils td { - vertical-align: top; + vertical-align: top; } diff --git a/docs/_templates/layout.html b/docs/_templates/layout.html index 5f81b2320..41713a109 100644 --- a/docs/_templates/layout.html +++ b/docs/_templates/layout.html @@ -1,6 +1,6 @@ {% extends "!layout.html" %} - {% block menu %} +{% block menu %} {{ super() }} - Keyword Index - {% endblock %} + Keyword Index +{% endblock %} diff --git a/docs/conf.py b/docs/conf.py index 60d50fe51..6cf5b8b75 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -238,7 +238,7 @@ latex_elements = { # (source start file, target name, title, # author, documentclass [howto, manual, or own class]). latex_documents = [ - ('index', 'solidity.tex', 'Solidity Documentation', 'Ethereum', 'manual'), + ('index', 'solidity.tex', 'Solidity Documentation', 'Ethereum', 'manual'), ] # The name of an image file (relative to this directory) to place at the top of From 551c3ae17a7e8d931a933031fffa8bad1fb8194b Mon Sep 17 00:00:00 2001 From: 4molybdenum2 Date: Fri, 10 Sep 2021 15:46:43 +0530 Subject: [PATCH 2/2] Adjust Colors for the Solidity Docs --- docs/_static/css/custom.css | 34 ++++++++++++++++++++++++++++++++++ docs/_static/css/dark.css | 17 ++++++++++++----- docs/conf.py | 8 ++++++-- docs/index.rst | 7 +------ 4 files changed, 53 insertions(+), 13 deletions(-) diff --git a/docs/_static/css/custom.css b/docs/_static/css/custom.css index 252537b04..7fbda74b7 100644 --- a/docs/_static/css/custom.css +++ b/docs/_static/css/custom.css @@ -12,3 +12,37 @@ pre { .rst-content table.docutils td { vertical-align: top; } + +/* links */ +.rst-content a:not(:visited) { + color: #002fa7; +} + +.rst-content .highlighted { + background: #eac545; +} + +/* code block highlights */ +.rst-content pre { + background: #fafafa; +} + +.wy-side-nav-search img.logo { + width: 100px !important; + padding: 0; +} + +.wy-side-nav-search > a { + padding: 0; + margin: 0; +} + +/* project version (displayed under project logo) */ +.wy-side-nav-search .version { + color: #272525 !important; +} + +/* menu section headers */ +.wy-menu .caption { + color: #65afff !important; +} diff --git a/docs/_static/css/dark.css b/docs/_static/css/dark.css index f9b445898..f93f1aa2d 100644 --- a/docs/_static/css/dark.css +++ b/docs/_static/css/dark.css @@ -1,11 +1,9 @@ /* links */ -a, -a:visited { - color: #aaddff; +.rst-content a:not(:visited) { + color: #aaddff !important; } - /* code directives */ .method dt, @@ -46,6 +44,9 @@ em.property { background-color: #5a5a5a; } +.rst-content pre { + background: none; +} /* inlined code highlights */ @@ -70,6 +71,12 @@ code.docutils.literal.notranslate { color: #ddd; } +/* highlight color search text */ + +.rst-content .highlighted { + background: #ff5722; + box-shadow: 0 0 0 2px #f0978b; +} /* notes, warnings, hints */ @@ -619,4 +626,4 @@ code.docutils.literal.notranslate { } -/* Literal.Number.Integer.Long */ \ No newline at end of file +/* Literal.Number.Integer.Long */ diff --git a/docs/conf.py b/docs/conf.py index 6cf5b8b75..a46bac343 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -128,7 +128,11 @@ html_theme = 'sphinx_rtd_theme' # Theme options are theme-specific and customize the look and feel of a theme # further. For a list of options available for each theme, see the # documentation. -#html_theme_options = {} +html_theme_options = { + 'logo_only': True, + 'style_nav_header_background': '#65afff', + 'display_version': True, +} # Add any paths that contain custom themes here, relative to this directory. #html_theme_path = [] @@ -142,7 +146,7 @@ html_theme = 'sphinx_rtd_theme' # The name of an image file (relative to this directory) to place at the top # of the sidebar. -#html_logo = None +html_logo = "logo.svg" # The name of an image file (within the static path) to use as favicon of the # docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 diff --git a/docs/index.rst b/docs/index.rst index 024a872f1..d702a28c9 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -1,11 +1,6 @@ Solidity ======== -.. image:: logo.svg - :width: 120px - :alt: Solidity logo - :align: center - Solidity is an object-oriented, high-level language for implementing smart contracts. Smart contracts are programs which govern the behaviour of accounts within the Ethereum state. @@ -172,4 +167,4 @@ Contents bugs.rst contributing.rst brand-guide.rst - language-influences.rst \ No newline at end of file + language-influences.rst