Skip to content

Commit 792f1a7

Browse files
committed
fix: pydata theme colors
Issue-ref: resolves eclipse-score#4 * Uses pyData Sphinx theme * Changes default theme colors * Add How to get involved page * Small fix for the github CI docs build
1 parent d05cb3e commit 792f1a7

File tree

9 files changed

+377
-13
lines changed

9 files changed

+377
-13
lines changed

.github/workflows/docs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838
retention-days: 1
3939
if-no-files-found: error
4040
- name: Comment artifact URL
41-
if: github.event_name == 'pull_request'
41+
if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork == false
4242
run: |
4343
gh pr comment ${{ github.event.pull_request.number }} \
4444
--body "Documentation artifact: ${{ steps.upload-artifact-pr.outputs.artifact-url }}"

.gitignore

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,12 @@ MODULE.bazel.lock
44

55
# Ruff
66
.ruff_cache
7+
8+
# Python
9+
.venv/
10+
11+
# Environments
12+
.envrc
13+
14+
# Sphinx builds
15+
_build/

docs/BUILD

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
# SPDX-License-Identifier: Apache-2.0
1212
# *******************************************************************************
1313

14-
load("@pip_sphinx//:requirements.bzl", "requirement")
14+
load("@pip_sphinx//:requirements.bzl", "all_requirements", "requirement")
1515
load("@rules_pkg//pkg:mappings.bzl", "pkg_files")
1616
load("@rules_pkg//pkg:tar.bzl", "pkg_tar")
1717
load("@rules_python//python:defs.bzl", "py_library")
@@ -25,6 +25,7 @@ sphinx_docs(
2525
"**/*.svg",
2626
"**/*.rst",
2727
"**/*.html",
28+
"**/*.css",
2829
]),
2930
config = ":conf.py",
3031
extra_opts = [
@@ -42,9 +43,7 @@ sphinx_docs(
4243

4344
sphinx_build_binary(
4445
name = "sphinx_build",
45-
deps = [
46-
requirement("sphinx"),
47-
],
46+
deps = all_requirements,
4847
)
4948

5049
compile_pip_requirements(

docs/_assets/css/score.css

Lines changed: 188 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,188 @@
1+
html {
2+
--pst-font-size-base: 17px;
3+
}
4+
5+
.underline {
6+
text-decoration: underline;
7+
}
8+
9+
/* SCORE specfic colors
10+
A list of available colro variable names for pyData Sphinx Theme can be found at
11+
https://pydata-sphinx-theme.readthedocs.io/en/stable/_downloads/565fbb3ecf2b3048f5fb3953890ba176/_color.scss
12+
13+
The base color is TEAL */
14+
15+
16+
html[data-theme="light"] {
17+
--pst-color-primary: #547980;
18+
--pst-color-secondary: #45ADA8;
19+
--pst-color-accent: #9DE0AD;
20+
--pst-color-target: #E5FCC2;
21+
--pst-color-on-surface: #594F4F;
22+
--pst-color-on-background: var(--pst-color-secondary);
23+
--pst-color-text-muted: #FFFFFF;
24+
--pst-color-table-row-zebra-high-bg: #e6e7e8;
25+
--pst-color-table-row-hover-bg: var(--pst-color-secondary); /*#d7d6d6;*/
26+
}
27+
28+
html[data-theme="dark"] {
29+
--pst-color-primary: #45ADA8;
30+
--pst-color-secondary: #547980;
31+
--pst-color-accent: #9DE0AD;
32+
--pst-color-target: #E5FCC2;
33+
--pst-color-on-surface: #594F4F;
34+
--pst-color-on-background: var(--pst-color-secondary);
35+
--pst-color-text-muted: #FFFFFF;
36+
--pst-color-table-row-zebra-high-bg: #20242b;
37+
--pst-color-table-row-hover-bg: var(--pst-color-secondary); /*#30353e;*/
38+
}
39+
40+
.search-button-field {
41+
color: var(--pst-color-primary);
42+
}
43+
html .pst-navbar-icon:hover {
44+
border-bottom: max(3px,.1875rem,.12em) solid var(--pst-color-primary) !important;
45+
color: var(--pst-color-primary) !important;
46+
}
47+
48+
.bd-header ul.navbar-nav > li.nav-item.current > .nav-link {
49+
color: var(--pst-color-text-muted) !important;
50+
font-weight: 900 !important;
51+
}
52+
53+
.bd-header ul.navbar-nav > li.nav-item > .nav-link:hover {
54+
color: var(--pst-color-primary);
55+
}
56+
57+
ul.navbar-nav li a {
58+
color: var(--pst-color-primary);
59+
}
60+
61+
.bd-search input.form-control::placeholder,
62+
.bd-search input.form-control {
63+
color: var(--pst-color-primary) !important;
64+
}
65+
66+
/* Right sidebar */
67+
.toc-entry a.nav-link {
68+
color: var(--pst-color-text-base);
69+
}
70+
/* Left, top SCORE brand */
71+
.navbar-brand p
72+
{
73+
color: var(--pst-color-text-muted);
74+
font-weight: 900;
75+
}
76+
.navbar-brand:hover, .navbar-brand:visited:hover {
77+
text-decoration: none;
78+
}
79+
80+
/* GitHub logo for shorten URL */
81+
a.github::before {
82+
content: var(--pst-icon-github);
83+
color: var(--pst-color-text-base);
84+
}
85+
a.github {
86+
text-decoration: none !important;
87+
}
88+
89+
/* Left sidebar links */
90+
nav.bd-links li > a {
91+
color: var(--pst-color-text-base);
92+
}
93+
94+
/* Breadcrumbs, above page content: Link color */
95+
ul.bd-breadcrumbs li.breadcrumb-item a {
96+
color: var(--pst-color-text-base);
97+
text-decoration: none;
98+
}
99+
100+
/* Breadcrumbs, above page content: Arrow color */
101+
ul.bd-breadcrumbs li.breadcrumb-item:not(.breadcrumb-home)::before {
102+
color: var(--pst-color-text-base);
103+
}
104+
105+
blockquote {
106+
color: var(--pst-color-text-base);
107+
}
108+
109+
.admonition, div.admonition {
110+
background-color: rgba(0,0,0,0.1);
111+
}
112+
113+
/* SCORE Background video
114+
Source: https://www.imi21.com/background-video-full-screen.php */
115+
116+
div.score_banner {
117+
background-color: var(--pst-color-on-surface);
118+
}
119+
#videowrapper{
120+
position: relative;
121+
overflow: hidden;
122+
}
123+
124+
#fullScreenDiv{
125+
height: 300px;
126+
width: 100%;
127+
padding:0;
128+
margin: 0;
129+
/* background-color: gray;
130+
position: relative; */
131+
container-type: inline-size;
132+
}
133+
134+
#video{
135+
width: 100%;
136+
/* height: auto;
137+
margin: auto;
138+
display: block; */
139+
}
140+
@media (min-aspect-ratio: 16/9) {
141+
#video{
142+
width: 100%;
143+
height:auto;
144+
}
145+
}
146+
147+
#score-title {
148+
width: 100%;
149+
height: 100%;
150+
position: absolute;
151+
top: 0;
152+
left: 0;
153+
display: flex;
154+
justify-content: center;
155+
align-items: center;
156+
flex-direction: column;
157+
color: var(--pst-color-text-base);
158+
/* font-size: 4.5em; */
159+
font-size: 8.0cqw;
160+
font-weight: 900;
161+
162+
/* Is somehow cool with image/video title background */
163+
/*animation: fadeIn 3s; */
164+
}
165+
166+
/* As long as no image or video is shown in
167+
the title, this is not needed, but kept
168+
for future needs */
169+
/* html[data-theme="light"] #score-title {
170+
background-color: rgba(0,0,0,0.3);
171+
}
172+
html[data-theme="dark"] #score-title {
173+
background-color: rgba(0,0,0,0.5);
174+
} */
175+
176+
#score-subtitle {
177+
font-size: 0.4em;
178+
}
179+
180+
#score-phrase {
181+
font-size: 0.3em;
182+
font-weight: 400;
183+
}
184+
185+
@keyframes fadeIn {
186+
0% { opacity: 0; }
187+
100% { opacity: 1; }
188+
}

docs/conf.py

Lines changed: 42 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,5 +34,45 @@
3434
# -- Options for HTML output -------------------------------------------------
3535
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output
3636

37-
html_theme = "alabaster"
38-
html_theme_options = {"page_width": "auto", "body_max_width": "1500"}
37+
html_theme = "pydata_sphinx_theme" # "alabaster"
38+
# html_theme_options = {"page_width": "auto", "body_max_width": "1500"}
39+
40+
html_static_path = ["_assets"]
41+
html_css_files = [
42+
"css/score.css",
43+
]
44+
45+
html_theme_options = {
46+
"external_links": [
47+
{"name": "Docs", "url": "https://eclipse-score.github.io/score/"},
48+
{
49+
"name": "Eclipse",
50+
"url": "https://projects.eclipse.org/projects/automotive.score",
51+
},
52+
],
53+
"icon_links": [
54+
{
55+
"name": "GitHub",
56+
"url": "https://github.com/eclipse-score",
57+
"icon": "fa-brands fa-github",
58+
"type": "fontawesome",
59+
}
60+
],
61+
"use_edit_page_button": True, # https://pydata-sphinx-theme.readthedocs.io/en/stable/user_guide/source-buttons.html#add-an-edit-button
62+
"collapse_navigation": True,
63+
"logo": {
64+
"text": "Eclipse SCORE",
65+
},
66+
}
67+
68+
html_context = {
69+
# "github_url": "https://github.com", # or your GitHub Enterprise site
70+
"github_user": "eclipse-score",
71+
"github_repo": "eclipse-score.github.io",
72+
"github_version": "main",
73+
"doc_path": "docs",
74+
}
75+
76+
# Shows no left sidebar for single files
77+
# Woraround for bug: https://github.com/pydata/pydata-sphinx-theme/issues/1662#issuecomment-1913672649
78+
html_sidebars = {"get_involved": []}

docs/get_involved.rst

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
..
2+
# *******************************************************************************
3+
# Copyright (c) 2024 Contributors to the Eclipse Foundation
4+
#
5+
# See the NOTICE file(s) distributed with this work for additional
6+
# information regarding copyright ownership.
7+
#
8+
# This program and the accompanying materials are made available under the
9+
# terms of the Apache License Version 2.0 which is available at
10+
# https://www.apache.org/licenses/LICENSE-2.0
11+
#
12+
# SPDX-License-Identifier: Apache-2.0
13+
# *******************************************************************************
14+
15+
.. role:: underline
16+
:class: underline
17+
18+
Get involved
19+
============
20+
21+
How to get in contact with SCORE
22+
--------------------------------
23+
24+
If you want to get into contact with SCORE, these are your primary entry points:
25+
26+
:Project Mailing List: [email protected]
27+
28+
:Architectural Discussion: `#score-project-open-channel <https://sdvworkinggroup.slack.com/archives/C083Z4VL90B>`__
29+
30+
| **General Information / Alignment regarding SCORE as a basis for distributions & products:**
31+
| Contact one of the project leads of SCORE https://projects.eclipse.org/projects/automotive.score/who
32+
33+
The technical HOWTO regarding involvement into SCORE is described here:
34+
https://github.com/eclipse-score/score/blob/main/CONTRIBUTION.md
35+
36+
How to get involved into SCORE
37+
------------------------------
38+
39+
The :underline:`only` way to influence SCORE is TO CONTRIBUTE. Everybody can contribute – SCORE is open.
40+
41+
Active Contributions to the SCORE project are the basis for getting involved. The SCORE Project works according to
42+
the Eclipse Project Handbook and has named and elected project leads and committers (see https://projects.eclipse.org/projects/automotive.score/who).
43+
Direction of the SCORE project is discussed and decided in the project lead circle, technical direction is created and prediscussed in the tech
44+
lead circle. Meeting notes are transparent via the SCORE github organization. (see https://github.com/orgs/eclipse-score/discussions)
45+
46+
We aim to build a safety ready full stack architecture, where components fit to each other in
47+
automotive grade Software Quality and performance. To achieve this, we follow a strict feature roadmap and architecture
48+
and a rigid software development process (publicly available in the SCORE Project Handbook starting end of 2024).
49+
50+
Contributions to the SCORE project must therefore follow the technical direction of the project and the SCORE
51+
architecture. All work in SCORE will therefore follow a "Contribution Request" Process. Features on the roadmap of
52+
SCORE are defined, Contribution Requests create the basis for individual contributions from within the SCORE
53+
project and also from the outside.
54+
55+
You can make proposals for new features or architectural building blocks besides the active contribution requests.
56+
Those will not by default be part of the next release of SCORE, because the SCORE release roadmap will strictly
57+
comply with the contribution request structure.
58+
We plan to have the initial contribution request structure available in the SCORE GitHub until Q1 / 2025.
59+
60+
We plan to incorporate a staging area for such contributions, but
61+
in the initial phase of the SCORE project (until end of 2025) the focus will be primarily on building a valid 1.0
62+
release. Feel free to reach out via the communication channels above.
63+
64+
If you think about your contribution to SCORE, the Contribution Request overview
65+
is the best place to start (available on https://github.com/eclipse-score/score/issues starting Q1 / 2025)
66+
67+
Based on successful code contributions to the SCORE roadmap, further steps in involvement (like becoming a committer)
68+
will be handled according to the rules of the Eclipse Foundation Project Handbook. We value real code based
69+
collaboration and will judge new potential contributors and committers mainly on the validity of their work. Active
70+
and sustaining contributions are the basis for the ability to shape SCORE.
71+
72+
Making active code contributions via the contribution request process described in the Project Handbook. The
73+
project handbook will be available on the SCORE website until end of 2024.

0 commit comments

Comments
 (0)