diff --git a/src/blenderbim/docs/_static/custom.css b/src/blenderbim/docs/_static/custom.css index ecd7ac3d44..c5acbfef1f 100644 --- a/src/blenderbim/docs/_static/custom.css +++ b/src/blenderbim/docs/_static/custom.css @@ -1,12 +1,35 @@ +@import url("https://fonts.googleapis.com/css2?family=Nunito:wght@200;300;400;500;600;700;800&display=swap"); +@import url('https://fonts.googleapis.com/css2?family=Inconsolata:wght@200;300;400;500;600;700&display=swap'); +h1, h2, h3, h4 { + font-weight: normal; + color: #7cbf33; + background: -webkit-linear-gradient(0deg, #7cbf33, #049344); + background-clip: border-box; + -webkit-background-clip: text; + -webkit-text-fill-color: transparent; +} +.sidebar-brand-text { + font-size: 1rem; +} .blockbutton { - border: 1px solid var(--color-admonition-title--seealso); - background-color: var(--color-admonition-title-background--seealso); - padding: 5px; - text-align: center; - border-radius: 5px; max-width: 500px; margin-left: auto; margin-right: auto; + text-align: center; +} +.blockbutton a { + display: block; + padding-top: 15px; + padding-bottom: 15px; + border-radius: 5px; + background: #40b74c; + width: 100%; + height: 100%; + color: #fff; + text-decoration: none; +} +.blockbutton a:hover { + background: #70ba35; } section img { display: block; diff --git a/src/blenderbim/docs/conf.py b/src/blenderbim/docs/conf.py index a589be30ca..f6e841e634 100644 --- a/src/blenderbim/docs/conf.py +++ b/src/blenderbim/docs/conf.py @@ -36,7 +36,7 @@ # -- Project information ----------------------------------------------------- project = "BlenderBIM Add-on" -copyright = "2020-2023 IfcOpenShell Contributors" +copyright = "2020-2024 IfcOpenShell Contributors" author = "IfcOpenShell Contributors" # The full version, including alpha/beta/rc tags @@ -48,7 +48,7 @@ release = "0.0.231104" # Add any Sphinx extension module names here, as strings. They can be # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom # ones. -extensions = ["sphinx.ext.autodoc", "sphinx.ext.autosectionlabel"] +extensions = ["sphinx.ext.autodoc", "sphinx.ext.autosectionlabel", "sphinx_copybutton"] # Auto add document prefixes to help guarantee uniqueness of automatic section references. autosectionlabel_prefix_document = True @@ -75,3 +75,56 @@ html_theme = "furo" html_static_path = ["_static"] html_css_files = ["custom.css"] + +# Code block styles. Dark styling helps important code examples "pop" on the +# page even on light themes. +pygments_style = "one-dark" +pygments_dark_style = "one-dark" + +html_logo = "https://blenderbim.org/assets/images/blender/blender-logo.png" +html_theme_options = { + "source_repository": "https://github.com/IfcOpenShell/IfcOpenShell/", + "source_branch": "v0.7.0", + "source_directory": "src/blenderbim/docs/", + "light_css_variables": { + "color-brand-primary": "#39b54a", + "color-brand-content": "#39b54a", + "color-brand-visited": "#d9e021", + "color-background-primary": "#f7f7f6", + "color-background-secondary": "#eeeeec", + "color-background-border": "#cfd0cb", + "color-foreground-primary": "#2e3436", + "font-stack": "Nunito, -apple-system, BlinkMacSystemFont, Segoe UI, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji" + }, + "dark_css_variables": { + "color-brand-primary": "#39b54a", + "color-brand-content": "#39b54a", + "color-brand-visited": "#d9e021", + # "color-background-primary": "#f7f7f6", + "color-background-primary": "#2e3436", + "color-background-border": "#2e3436", + "color-foreground-primary": "#eeeeec", + "font-stack": "Nunito, -apple-system, BlinkMacSystemFont, Segoe UI, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji" + }, + + "footer_icons": [ + { + "name": "IfcOpenShell", + "url": "https://ifcopenshell.org", + "html": """ + + """, + "class": "", + }, + { + "name": "GitHub", + "url": "https://github.com/IfcOpenShell/IfcOpenShell/tree/v0.7.0/src/blenderbim/docs", + "html": """ + + + + """, + "class": "", + }, + ], +} diff --git a/src/ifcopenshell-python/docs/_static/custom.css b/src/ifcopenshell-python/docs/_static/custom.css index 69f9d25e32..ce7adfb65b 100644 --- a/src/ifcopenshell-python/docs/_static/custom.css +++ b/src/ifcopenshell-python/docs/_static/custom.css @@ -1,12 +1,35 @@ +@import url("https://fonts.googleapis.com/css2?family=Nunito:wght@200;300;400;500;600;700;800&display=swap"); +@import url('https://fonts.googleapis.com/css2?family=Inconsolata:wght@200;300;400;500;600;700&display=swap'); +h1, h2, h3, h4 { + font-weight: normal; + color: #7cbf33; + background: -webkit-linear-gradient(0deg, #7cbf33, #049344); + background-clip: border-box; + -webkit-background-clip: text; + -webkit-text-fill-color: transparent; +} +.sidebar-brand-text { + font-size: 1rem; +} .blockbutton { - border: 1px solid var(--color-admonition-title--seealso); - background-color: var(--color-admonition-title-background--seealso); - padding: 5px; - text-align: center; - border-radius: 5px; max-width: 500px; margin-left: auto; margin-right: auto; + text-align: center; +} +.blockbutton a { + display: block; + padding-top: 15px; + padding-bottom: 15px; + border-radius: 5px; + background: #40b74c; + width: 100%; + height: 100%; + color: #fff; + text-decoration: none; +} +.blockbutton a:hover { + background: #70ba35; } section img { display: block; diff --git a/src/ifcopenshell-python/docs/conf.py b/src/ifcopenshell-python/docs/conf.py index befbaae79b..1824032dfa 100644 --- a/src/ifcopenshell-python/docs/conf.py +++ b/src/ifcopenshell-python/docs/conf.py @@ -1,20 +1,20 @@ -# BlenderBIM Add-on - OpenBIM Blender Add-on -# Copyright (C) 2020, 2021 Dion Moult +# IfcOpenShell - IFC toolkit and geometry engine +# Copyright (C) 2020-2024 Dion Moult # -# This file is part of BlenderBIM Add-on. +# This file is part of IfcOpenShell. # -# BlenderBIM Add-on is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by +# IfcOpenShell is free software: you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # -# BlenderBIM Add-on is distributed in the hope that it will be useful, +# IfcOpenShell is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU General Public License -# along with BlenderBIM Add-on. If not, see . +# You should have received a copy of the GNU Lesser General Public License +# along with IfcOpenShell. If not, see . # Configuration file for the Sphinx documentation builder. # @@ -36,7 +36,7 @@ sys.path.insert(0, os.path.abspath('..')) # -- Project information ----------------------------------------------------- project = "IfcOpenShell" -copyright = "2011-2023, IfcOpenShell Contributors" +copyright = "2011-2024, IfcOpenShell Contributors" author = "IfcOpenShell Contributors" # The full version, including alpha/beta/rc tags @@ -54,7 +54,7 @@ release = "0.7.0" # - No subnav making it really hard to navigate # - Kinda hacky setup https://stackoverflow.com/questions/2701998/sphinx-autodoc-is-not-automatic-enough # - I couldn't customise the template to show submodules above members which makes API discovery hard for users -extensions = ["autoapi.extension", "sphinx.ext.autosectionlabel"] +extensions = ["autoapi.extension", "sphinx.ext.autosectionlabel", "sphinx_copybutton"] # Auto add document prefixes to help guarantee uniqueness of automatic section references. autosectionlabel_prefix_document = True @@ -113,3 +113,51 @@ html_css_files = ["custom.css"] # page even on light themes. pygments_style = "one-dark" pygments_dark_style = "one-dark" + +html_logo = "https://ifcopenshell.org/assets/images/logo.png" +html_theme_options = { + "source_repository": "https://github.com/IfcOpenShell/IfcOpenShell/", + "source_branch": "v0.7.0", + "source_directory": "src/ifcopenshell-python/docs/", + "light_css_variables": { + "color-brand-primary": "#39b54a", + "color-brand-content": "#39b54a", + "color-brand-visited": "#d9e021", + "color-background-primary": "#f7f7f6", + "color-background-secondary": "#eeeeec", + "color-background-border": "#cfd0cb", + "color-foreground-primary": "#2e3436", + "font-stack": "Nunito, -apple-system, BlinkMacSystemFont, Segoe UI, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji" + }, + "dark_css_variables": { + "color-brand-primary": "#39b54a", + "color-brand-content": "#39b54a", + "color-brand-visited": "#d9e021", + # "color-background-primary": "#f7f7f6", + "color-background-primary": "#2e3436", + "color-background-border": "#2e3436", + "color-foreground-primary": "#eeeeec", + "font-stack": "Nunito, -apple-system, BlinkMacSystemFont, Segoe UI, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji" + }, + + "footer_icons": [ + { + "name": "IfcOpenShell", + "url": "https://ifcopenshell.org", + "html": """ + + """, + "class": "", + }, + { + "name": "GitHub", + "url": "https://github.com/IfcOpenShell/IfcOpenShell/tree/v0.7.0/src/ifcopenshell-python/docs", + "html": """ + + + + """, + "class": "", + }, + ], +}