Skip to content

Commit 6fa1455

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 6fa1455

File tree

9 files changed

+345
-13
lines changed

9 files changed

+345
-13
lines changed

.github/workflows/docs.yml

+1-1
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

+9
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

+3-4
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

+156
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,156 @@
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+
}
25+
26+
html[data-theme="dark"] {
27+
--pst-color-primary: #45ADA8;
28+
--pst-color-secondary: #547980;
29+
--pst-color-accent: #9DE0AD;
30+
--pst-color-target: #E5FCC2;
31+
--pst-color-on-surface: #594F4F;
32+
--pst-color-on-background: var(--pst-color-secondary);
33+
--pst-color-text-muted: #FFFFFF;
34+
}
35+
36+
.search-button-field {
37+
color: var(--pst-color-primary);
38+
}
39+
html .pst-navbar-icon:hover {
40+
border-bottom: max(3px,.1875rem,.12em) solid var(--pst-color-primary) !important;
41+
color: var(--pst-color-primary) !important;
42+
}
43+
44+
.bd-header ul.navbar-nav > li.nav-item.current > .nav-link {
45+
color: var(--pst-color-text-muted) !important;
46+
font-weight: 900 !important;
47+
}
48+
49+
.bd-header ul.navbar-nav > li.nav-item > .nav-link:hover {
50+
color: var(--pst-color-primary);
51+
}
52+
53+
.bd-search input.form-control::placeholder,
54+
.bd-search input.form-control {
55+
color: var(--pst-color-primary) !important;
56+
}
57+
58+
/* Right sidebar */
59+
.toc-entry a.nav-link {
60+
color: var(--pst-color-text-base);
61+
}
62+
/* Left, top SCORE brand */
63+
.navbar-brand p
64+
{
65+
color: var(--pst-color-text-muted);
66+
font-weight: 900;
67+
}
68+
.navbar-brand:hover, .navbar-brand:visited:hover {
69+
text-decoration: none;
70+
}
71+
72+
/* GitHub logo for shorten URL */
73+
a.github::before {
74+
content: var(--pst-icon-github);
75+
color: var(--pst-color-text-base);
76+
}
77+
a.github {
78+
text-decoration: none !important;
79+
}
80+
81+
/* SCORE Background video
82+
Source: https://www.imi21.com/background-video-full-screen.php */
83+
84+
div.score_banner {
85+
background-color: var(--pst-color-on-surface);
86+
}
87+
#videowrapper{
88+
position: relative;
89+
overflow: hidden;
90+
}
91+
92+
#fullScreenDiv{
93+
height: 300px;
94+
width: 100%;
95+
padding:0;
96+
margin: 0;
97+
/* background-color: gray;
98+
position: relative; */
99+
container-type: inline-size;
100+
}
101+
102+
#video{
103+
width: 100%;
104+
/* height: auto;
105+
margin: auto;
106+
display: block; */
107+
}
108+
@media (min-aspect-ratio: 16/9) {
109+
#video{
110+
width: 100%;
111+
height:auto;
112+
}
113+
}
114+
115+
#score-title {
116+
width: 100%;
117+
height: 100%;
118+
position: absolute;
119+
top: 0;
120+
left: 0;
121+
display: flex;
122+
justify-content: center;
123+
align-items: center;
124+
flex-direction: column;
125+
color: var(--pst-color-text-base);
126+
/* font-size: 4.5em; */
127+
font-size: 8.0cqw;
128+
font-weight: 900;
129+
130+
/* Is somehow cool with image/video title background */
131+
/*animation: fadeIn 3s; */
132+
}
133+
134+
/* As long as no image or video is shown in
135+
the title, this is not needed, but kept
136+
for future needs */
137+
/* html[data-theme="light"] #score-title {
138+
background-color: rgba(0,0,0,0.3);
139+
}
140+
html[data-theme="dark"] #score-title {
141+
background-color: rgba(0,0,0,0.5);
142+
} */
143+
144+
#score-subtitle {
145+
font-size: 0.4em;
146+
}
147+
148+
#score-phrase {
149+
font-size: 0.3em;
150+
font-weight: 400;
151+
}
152+
153+
@keyframes fadeIn {
154+
0% { opacity: 0; }
155+
100% { opacity: 1; }
156+
}

docs/conf.py

+42-2
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

+73
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.

docs/index.rst

+29-3
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,35 @@
1212
# SPDX-License-Identifier: Apache-2.0
1313
# *******************************************************************************
1414
15+
.. raw:: html
16+
17+
<div style="visibility: hidden;height:0px;">
18+
1519
SCORE (Eclipse Safe Open Vehicle Core)
1620
######################################
1721

22+
.. raw:: html
23+
24+
</div>
25+
26+
.. toctree::
27+
:hidden:
28+
29+
get_involved
30+
31+
.. raw:: html
32+
33+
<div id="videowrapper">
34+
<div id="fullScreenDiv">
35+
<div id="score-title">
36+
Eclipse SCORE
37+
<span id="score-subtitle">Eclipse Safe Open Vehicle Core</span>
38+
<span id="score-phrase">BUILD THE BEST AUTOMOTIVE RUNTIME SOLUTION ONLY ONCE</span>
39+
</div>
40+
</div>
41+
</div>
42+
43+
1844
Background
1945
**********
2046

@@ -118,9 +144,9 @@ Roadmap
118144

119145
Here you can find the preliminary roadmap of the project:
120146

121-
.. image:: _assets/score_roadmap.svg
122-
:alt: project roadmap
123-
:align: center
147+
.. image:: _assets/score_roadmap.svg
148+
:alt: project roadmap
149+
:align: center
124150

125151

126152
Please be aware, that this roadmap will be also transfered to the `GitHub project <https://github.com/orgs/eclipse-score/projects/1>`_.

docs/requirements.txt

+1
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@
22

33
Sphinx==8.1.3
44
sphinx-needs==4.1.0
5+
pydata-sphinx-theme==0.16.0

0 commit comments

Comments
 (0)