From 5d10104b7f8f7e4eeb06a09450a19452508589f0 Mon Sep 17 00:00:00 2001 From: Roger Ferrer Ibanez Date: Thu, 22 Nov 2018 14:52:16 +0100 Subject: [PATCH 1/9] Use a custom alabaster style --- _static/.gitignore | 1 + _static/custom.css | 6 ++++++ conf.py | 13 +++++++++---- 3 files changed, 16 insertions(+), 4 deletions(-) create mode 100644 _static/custom.css diff --git a/_static/.gitignore b/_static/.gitignore index a1fe169..30223e5 100644 --- a/_static/.gitignore +++ b/_static/.gitignore @@ -2,3 +2,4 @@ * # # Except this file !.gitignore +!custom.css diff --git a/_static/custom.css b/_static/custom.css new file mode 100644 index 0000000..6cd7e0c --- /dev/null +++ b/_static/custom.css @@ -0,0 +1,6 @@ +@import url('https://fonts.googleapis.com/css?family=Roboto+Condensed:400,700'); +@import url('https://fonts.googleapis.com/css?family=Roboto+Mono:400,700'); + +span.option { + font-family: "Roboto Mono", monospace +} diff --git a/conf.py b/conf.py index 44091c3..1d935a7 100644 --- a/conf.py +++ b/conf.py @@ -44,7 +44,7 @@ master_doc = 'index' # General information about the project. project = u'OmpSs User Guide' -copyright = u'2016, BSC Programming Models' +copyright = u'2016-2018, BSC Programming Models' # The version info for the project you're documenting, acts as replacement for # |version| and |release|, also used in various other places throughout the @@ -98,13 +98,18 @@ pygments_style = 'sphinx' # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. -html_theme = 'default' +html_theme = 'alabaster' # 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 = { - "sidebarwidth" : "280" + "sidebarwidth" : "280", + "font_family": '"Roboto Condensed", sans-serif', + "caption_font_family": '"Roboto Condensed", sans-serif', + "head_font_family": '"Roboto Condensed", sans-serif', + "code_font_family": '"Roboto Mono", monospace', + "show_powered_by": False, } # Add any paths that contain custom themes here, relative to this directory. @@ -268,7 +273,7 @@ texinfo_documents = [ epub_title = u'OmpSs User Guide' epub_author = u'BSC Programming Models' epub_publisher = u'BSC Programming Models' -epub_copyright = u'2016, BSC Programming Models' +epub_copyright = u'2016-2018, BSC Programming Models' # The basename for the epub file. It defaults to the project name. #epub_basename = u'OmpSs User Guide' -- GitLab From 801945e8c51394ec8d0326dc03d9d726b4172896 Mon Sep 17 00:00:00 2001 From: Victor Lopez Date: Thu, 22 Nov 2018 16:36:32 +0100 Subject: [PATCH 2/9] Add custom header --- _static/custom.css | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/_static/custom.css b/_static/custom.css index 6cd7e0c..b876a86 100644 --- a/_static/custom.css +++ b/_static/custom.css @@ -4,3 +4,34 @@ span.option { font-family: "Roboto Mono", monospace } + +.document:before { + content: "Programming Models @ BSC"; + background: #6fa5cc; + width: 100vw; + display: block; + position: absolute; + text-align: center; + height: 6rem; + font-size: 2rem; + left: 0; + top: 0; + color: #000000; + font-size: 48px; + font-style: normal; + font-weight: 600; + line-height: 54px; + padding-top: 3rem; +} + +.document { + margin-top: 0; +} + +.documentwrapper { + margin-top: 8rem !important; +} + +.sphinxsidebar { + margin-top: 8rem; +} -- GitLab From 89585196d68e1d3951505d0409bd9cfeb786bbf8 Mon Sep 17 00:00:00 2001 From: Jaume Bosch Date: Thu, 22 Nov 2018 17:01:21 +0100 Subject: [PATCH 3/9] Fix header width The viewport seems to include the scrollbar, so `100vw` can be slightly wider than `100%`. Using the second option the horizontal scrollbar should not appear. --- _static/custom.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_static/custom.css b/_static/custom.css index b876a86..354399b 100644 --- a/_static/custom.css +++ b/_static/custom.css @@ -8,7 +8,7 @@ span.option { .document:before { content: "Programming Models @ BSC"; background: #6fa5cc; - width: 100vw; + width: 100%; display: block; position: absolute; text-align: center; -- GitLab From 9940116d584213d413cdc060b95aae3a34586b61 Mon Sep 17 00:00:00 2001 From: Victor Lopez Date: Fri, 23 Nov 2018 15:50:43 +0100 Subject: [PATCH 4/9] Improve header positioning --- _static/custom.css | 23 ++++------------------- 1 file changed, 4 insertions(+), 19 deletions(-) diff --git a/_static/custom.css b/_static/custom.css index 354399b..1d3d87f 100644 --- a/_static/custom.css +++ b/_static/custom.css @@ -5,33 +5,18 @@ span.option { font-family: "Roboto Mono", monospace } -.document:before { +body:before { content: "Programming Models @ BSC"; background: #6fa5cc; width: 100%; display: block; - position: absolute; text-align: center; - height: 6rem; - font-size: 2rem; - left: 0; - top: 0; + height: auto; + overflow: hidden; color: #000000; font-size: 48px; font-style: normal; font-weight: 600; line-height: 54px; - padding-top: 3rem; -} - -.document { - margin-top: 0; -} - -.documentwrapper { - margin-top: 8rem !important; -} - -.sphinxsidebar { - margin-top: 8rem; + padding: 3rem 0 3rem 0; } -- GitLab From 9ca5f403bb6fe7a16b3483bb227389340c5f8aa3 Mon Sep 17 00:00:00 2001 From: Victor Lopez Date: Fri, 23 Nov 2018 15:52:04 +0100 Subject: [PATCH 5/9] Increase section width --- _static/custom.css | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/_static/custom.css b/_static/custom.css index 1d3d87f..c6a335f 100644 --- a/_static/custom.css +++ b/_static/custom.css @@ -20,3 +20,11 @@ body:before { line-height: 54px; padding: 3rem 0 3rem 0; } + +.document { + width: 80% !important; +} + +.body { + max-width: 900px !important; +} -- GitLab From b5cb465d75b6a78f262cecf9513e0f42dda28529 Mon Sep 17 00:00:00 2001 From: Victor Lopez Date: Fri, 23 Nov 2018 16:14:20 +0100 Subject: [PATCH 6/9] Revert "Increase section width" This reverts commit c2e3ce862379926cfc25a64ed218f79966c52070. --- _static/custom.css | 8 -------- 1 file changed, 8 deletions(-) diff --git a/_static/custom.css b/_static/custom.css index c6a335f..1d3d87f 100644 --- a/_static/custom.css +++ b/_static/custom.css @@ -20,11 +20,3 @@ body:before { line-height: 54px; padding: 3rem 0 3rem 0; } - -.document { - width: 80% !important; -} - -.body { - max-width: 900px !important; -} -- GitLab From 25f20bfa2ed2cdbccc72c033ac479a7c28ea7ecf Mon Sep 17 00:00:00 2001 From: Victor Lopez Date: Mon, 26 Nov 2018 12:45:33 +0100 Subject: [PATCH 7/9] Make header to expand also on small screens --- _static/custom.css | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/_static/custom.css b/_static/custom.css index 1d3d87f..02cba15 100644 --- a/_static/custom.css +++ b/_static/custom.css @@ -20,3 +20,10 @@ body:before { line-height: 54px; padding: 3rem 0 3rem 0; } + +@media screen and (max-width: 875px) { + body:before { + margin: -20px -30px 20px -30px; + width: 100vw; + } +} -- GitLab From 5373009e34f3618a6789ca4120185247f3526e8c Mon Sep 17 00:00:00 2001 From: Victor Lopez Date: Mon, 26 Nov 2018 17:37:22 +0100 Subject: [PATCH 8/9] Use calc to remove the sidescroll --- _static/custom.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_static/custom.css b/_static/custom.css index 02cba15..565fa90 100644 --- a/_static/custom.css +++ b/_static/custom.css @@ -24,6 +24,6 @@ body:before { @media screen and (max-width: 875px) { body:before { margin: -20px -30px 20px -30px; - width: 100vw; + width: calc(100% + 60px); } } -- GitLab From ba7eb82234c6115565785a73be0db7a199598ab0 Mon Sep 17 00:00:00 2001 From: Victor Lopez Date: Mon, 26 Nov 2018 17:38:22 +0100 Subject: [PATCH 9/9] Increase width by 100px on wide screens --- _static/custom.css | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/_static/custom.css b/_static/custom.css index 565fa90..2e9f5da 100644 --- a/_static/custom.css +++ b/_static/custom.css @@ -27,3 +27,13 @@ body:before { width: calc(100% + 60px); } } + +.document { + width: 1040px !important; +} + +@media screen and (max-width: 875px) { + .document { + width: 100% !important; + } +} -- GitLab