Skip to content

Commit b5eb750

Browse files
authored
Fix: styles adjustment to match pyos branding (#118)
* Fix: cleanup styles * Fix: add favicon * Remove commented text
1 parent b31db3a commit b5eb750

File tree

3 files changed

+148
-13
lines changed

3 files changed

+148
-13
lines changed

_static/pyos.css

Lines changed: 132 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,51 @@
1+
html, body {
2+
font-size: 1.0rem;
3+
}
4+
5+
/* Allow the center content to expand to wide on wide screens */
6+
@media (min-width: 960px){
7+
.bd-page-width {
8+
max-width: min(100%, 1600px)!important;
9+
}
10+
}
11+
12+
/* Make sure the header nav is centered - not sure why it's not overriding*/
13+
.navbar-header-items .me-auto, .me-auto .navbar-header-items__center {
14+
margin-left: auto!important;
15+
margin-right: auto!important;
16+
}
17+
18+
/* custom fonts */
19+
120
html, body {
221
font-size: 1.02rem;
22+
font-family: 'Poppins', sans-serif!important;
323
}
424

525
body p {
626
}
727

828
.admonition {
9-
margin-top: 40px;
10-
margin-bottom: 40px;
29+
margin-top: 60px!important;
30+
margin-bottom: 70px!important;
1131
}
1232

13-
h1, h2, h3, h4 {
33+
h2, h3, h4 {
34+
font-family: 'Poppins', sans-serif!important;
1435
}
1536

1637
h1 {
17-
margin-top: 50px;
38+
margin-top: 10px;
1839
margin-bottom: 40px;
40+
font-family: 'Itim'!important;
41+
color: #542568;
1942
}
2043
h2 {
21-
margin-top: 60px;
44+
margin-top: 80px;
2245
}
2346

2447
h3 {
25-
margin-top: 40px}
48+
margin-top: 60px}
2649

2750
figcaption .caption-text {
2851
text-align: left!important;
@@ -40,5 +63,107 @@ figcaption {
4063

4164

4265
.admonition p {
43-
font-size: 1em;
66+
font-size: .9em;
67+
}
68+
69+
70+
/* Tutorial block page */
71+
.left-div {
72+
background-color: #3498db;
73+
color: #fff;
74+
text-align: center;
75+
padding: 20px;
76+
width: 35%;
77+
border-radius: 10px;
78+
}
79+
80+
.right-div {
81+
margin-top: 10px;
82+
}
83+
84+
.lesson-div {
85+
cursor: pointer;
86+
transition: background-color 0.3s;
87+
margin-bottom: 10px;
88+
padding: 10px;
89+
border-radius: 5px;
90+
text-align: center;
91+
color: #333;
92+
}
93+
94+
.lesson-div a {
95+
color: inherit;
96+
text-decoration: none;
97+
display: block;
98+
height: 100%;
99+
width: 100%;
100+
}
101+
102+
.lesson-div:hover {
103+
background-color: #ccc;
104+
}
105+
106+
/* Different colors and their shades */
107+
.lesson-div:nth-child(1) {
108+
background-color: #216A6B;
109+
color: #fff;
110+
}
111+
112+
.lesson-div:nth-child(2) {
113+
background-color: #6D597A;
114+
color: #fff;
115+
}
116+
117+
.lesson-div:nth-child(3) {
118+
background-color: #B56576;
119+
color: #fff;
120+
}
121+
122+
.lesson-div:nth-child(4) {
123+
background-color: #3A8C8E; /* Shade of #216A6B */
124+
}
125+
126+
.lesson-div:nth-child(5) {
127+
background-color: #8F7B8D; /* Shade of #6D597A */
128+
}
129+
130+
.lesson-div:nth-child(6) {
131+
background-color: #D78287; /* Shade of #B56576 */
132+
}
133+
134+
.lesson-div:nth-child(7) {
135+
background-color: #185355; /* Darker shade of #216A6B */
136+
color: #fff;
137+
}
138+
139+
140+
141+
html[data-theme=light] {
142+
--pst-color-primary: #703c87;
143+
--pst-color-primary-text: #fff;
144+
--pst-color-primary-highlight: #053f49;
145+
--sd-color-primary: var(--pst-color-primary);
146+
--sd-color-primary-text: var(--pst-color-primary-text);
147+
--sd-color-primary-highlight: var(--pst-color-primary-highlight);
148+
--sd-color-primary-bg: #d0ecf1;
149+
--sd-color-primary-bg-text: #14181e;
150+
--pst-color-secondary: #8045e5;
151+
--pst-color-secondary-text: #fff;
152+
--pst-color-secondary-highlight: #591bc2;
153+
--sd-color-secondary: var(--pst-color-secondary);
154+
--sd-color-secondary-text: var(--pst-color-secondary-text);
155+
--sd-color-secondary-highlight: var(--pst-color-secondary-highlight);
156+
--sd-color-secondary-bg: #e0c7ff;
157+
--sd-color-secondary-bg-text: #14181e;
158+
--pst-color-success: #00843f;
159+
--pst-color-success-text: #fff;
160+
--pst-color-success-highlight: #00381a;
161+
--sd-color-success: var(--pst-color-success);
162+
--sd-color-success-text: var(--pst-color-success-text);
163+
--sd-color-success-highlight: var(--pst-color-success-highlight);
164+
--sd-color-success-bg: #d6ece1;
165+
--sd-color-success-bg-text: #14181e;
166+
--pst-color-info: #A66C98; /* general admonition */
167+
--pst-color-info-bg: #eac8e2;
168+
--pst-heading-color: #542568;
44169
}

_templates/header.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<!-- custom head content-->
2-
3-
<!-- <link rel="preconnect" href="https://fonts.googleapis.com">
2+
<link rel="preconnect" href="https://fonts.googleapis.com">
43
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
5-
<link href="https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;600&family=Raleway:wght@200;300;400;600&display=swap" rel="stylesheet"> -->
4+
<link href="https://fonts.googleapis.com/css2?family=Itim&family=Poppins:wght@300;400;600&display=swap" rel="stylesheet">
5+
66
<!-- END custom head content -->

conf.py

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,15 @@
5151

5252
# Link to our repo for easy PR/ editing
5353
html_theme_options = {
54+
"favicons": [
55+
{
56+
"rel": "icon",
57+
"sizes": "16x16",
58+
"href": "https://www.pyopensci.org/images/favicon.ico",
59+
},
60+
],
5461
"announcement": "<p><a href='https://www.pyopensci.org/software-peer-review/about/intro.html'>Submit Your Python Package for Peer Review - Learn More!</a></p>🚧 This guide is currently being developed! 🚧 ",
62+
#"navbar_center": ["nav"], this can be a way to override the default navigation structure
5563
"external_links": [
5664
{
5765
"url": "https://www.pyopensci.org",
@@ -74,17 +82,19 @@
7482
},
7583
],
7684
"logo": {
77-
"text": "Python Package Guide",
85+
"text": "Python Packaging",
7886
"image_dark": "logo-dark-mode.png",
7987
"image_light": "logo-light-mode.png",
8088
"alt_text": "pyOpenSci Python Package Guide. The pyOpenSci logo is a purple flower with pyOpenSci under it. The o in open sci is the center of the flower",
8189
},
82-
"header_links_before_dropdown": 3,
90+
"header_links_before_dropdown": 4,
8391
"use_edit_page_button": True,
92+
"show_nav_level": 2,
93+
"navigation_depth": 3,
8494
"show_toc_level": 1,
8595
# "navbar_align": "left", # [left, content, right] For testing that the navbar items align properly
8696
"github_url": "https://github.com/pyopensci/python-package-guide",
87-
"twitter_url": "https://twitter.com/pyopensci",
97+
8898
"footer_items": ["copyright"],
8999
}
90100

0 commit comments

Comments
 (0)