Skip to content

Commit

Permalink
Atualiza tema de acordo com as novas diretrizes de design da APyB
Browse files Browse the repository at this point in the history
  • Loading branch information
rougeth committed Sep 24, 2023
1 parent 6ed8e7d commit 036084a
Show file tree
Hide file tree
Showing 7 changed files with 599 additions and 4 deletions.
2 changes: 0 additions & 2 deletions source/_ext/template.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ def template(app, docname: str, source: list[str]):
return

content = content.replace("!template", "", 1)
print("*"*80)
print(app.config.templates_context)
rendered = app.builder.templates.render_string(content, app.config.templates_context)
source[0] = rendered

Expand Down
287 changes: 287 additions & 0 deletions source/_static/apyb-dark.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
253 changes: 253 additions & 0 deletions source/_static/apyb-light.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added source/_static/bg-dark.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added source/_static/bg-light.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
17 changes: 17 additions & 0 deletions source/_static/css/custom.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
body {
--image-background-primary: url('../bg-light.jpg');
}

body[data-theme=dark] {
--image-background-primary: url('../bg-dark.jpg');
}

.content {
background: var(--color-background-primary);
}
.main {
background: var(--image-background-primary) repeat fixed;
}
.sidebar-logo {
padding: 1.5rem 0;
}
44 changes: 42 additions & 2 deletions source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,50 @@
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
html_theme = 'furo'
html_theme = "furo"
html_theme_options = {
"light_logo": "apyb-light.svg",
"dark_logo": "apyb-dark.svg",
"sidebar_hide_name": True,
"light_css_variables": {
# Background
"color-background-secondary": "#FAF9FA",
# Sidebar
"color-link-underline": "#FAF9FA",
"color-link-underline--hover": "#0056CD",
"color-sidebar-link-text--top-level": "#0056CD",
# Text
"color-content-foreground": "#011224",
"color-link": "#0056cd",
},
"dark_css_variables": {
# Background
"color-background-border": "#0056CD",
"color-background-hover": "#01122430",
"color-background-primary": "#011224",
"color-background-secondary": "#0056CD",
# Sidebar
"color-sidebar-caption-text": "#ffffff",
"color-sidebar-link-text": "#ffffffaa",
"color-sidebar-link-text--top-level": "#ffffff",
"color-sidebar-search-background": "rgba(255, 255, 255, 0.1)",
"color-sidebar-search-background--focus": "rgba(255, 255, 255, 0.2)",
"color-sidebar-search-foreground": "#ffffff",
"color-sidebar-search-icon": "rgba(255, 255, 255, 0.5)",
# Text
"color-content-foreground": "#FAF9FAee",
"color-link": "#fff",
"color-link--hover": "#FFB93B",
"color-link-underline": "#FFB93B",
"color-link-underline--hover": "#FFB93B",
},
}

# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static']
html_static_path = ["_static"]
html_css_files = [
"css/custom.css",
]
html_title = "Associação Python Brasil"

0 comments on commit 036084a

Please sign in to comment.