Skip to content

Commit f3d931b

Browse files
authored
Fix homepage css (#2027)
* Fix homepage css * Add comments, fix START HERE link for image, use child selector
1 parent e26753e commit f3d931b

2 files changed

Lines changed: 282 additions & 175 deletions

File tree

doc/_static/css/custom.css

Lines changed: 102 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,116 @@ body {
44
/* TOC - Main landing page */
55
/* Show two columns if screen is wide enough */
66
@media screen and (min-width: 700px) {
7+
/* For regular items */
78
.toctree-wrapper > ul {
89
columns: 2;
910
}
11+
/* For Social and Learning Resources sections */
12+
.toc-outside-links {
13+
columns: 2;
14+
}
15+
}
16+
17+
/* Wrap individual main page items for easier group manipulation
18+
of contents and images. See PR #2027 for main page css changes */
19+
.main-page-item-wrapper {
20+
align-items: flex-start;
21+
display: flex;
22+
margin: 10px;
23+
}
24+
.main-page-item-wrapper > .toctree-wrapper {
25+
width: 100%;
26+
}
27+
28+
/* single-col-box for items on main page with 2 bullet points, use if
29+
wanting to avoid having 2 columns with 1 item each inside */
30+
.main-page-item-wrapper > .single-col-box {
31+
width: 100%;
32+
}
33+
.main-page-item-wrapper > .single-col-box ul {
34+
columns: 1;
35+
}
36+
37+
/* For Social and Learning Resources to make
38+
title + list appear like other categories */
39+
.main-page-item-wrapper > .main-page-item-sub-wrapper {
40+
display: flex;
41+
flex-direction: column;
42+
margin: 0px;
43+
width: 100%;
44+
}
45+
.main-page-item-wrapper > .main-page-item-title {
46+
width: 100%;
47+
}
48+
.main-page-item-title > p {
49+
font-size: var(--font-size--small);
50+
margin-bottom: 0;
51+
text-align: initial;
52+
text-transform: uppercase;
53+
}
54+
.main-page-item-sub-wrapper > .toc-outside-links {
55+
margin-left: 0px;
56+
width: 100%;
57+
}
58+
59+
/* Wrappers and formatting for sprinter, START HERE, github star button
60+
to align them neatly */
61+
.main-page-item-wrapper-header {
62+
align-items: center;
63+
display: flex;
64+
margin: 10px;
1065
}
66+
.main-page-box {
67+
width: 100%;
68+
display: flex;
69+
justify-content: space-between;
70+
align-items: center;
71+
}
72+
.main-page-box > .main-page-link {
73+
display: flex;
74+
width: 100%;
75+
}
76+
.main-page-box > .main-page-link a {
77+
display: flex;
78+
}
79+
.sprinter-box {
80+
margin-left: 10px;
81+
height: 55px;
82+
display: flex;
83+
}
84+
.start-here-box {
85+
align-items: center;
86+
display: flex;
87+
margin-left: -10px;
88+
}
89+
#the-python-arcade-library h2 {
90+
font-size: var(--font-size--small);
91+
font-weight: 400;
92+
margin-bottom: 0;
93+
margin-top: .5rem;
94+
text-align: initial;
95+
text-transform: uppercase;
96+
width: 100%;
97+
display: flex;
98+
}
99+
.main-page-box > .main-page-box-gh {
100+
display: flex;
101+
align-items: center;
102+
margin-right: 0px;
103+
}
104+
#github-stars {
105+
width: 141px;
106+
height: 30px;
107+
margin-bottom: -9px;
108+
}
109+
110+
/* Formatting for list items */
11111
.toctree-l1 {
12112
margin-left: 5px;
13113
}
14-
.toc-outside-links {
15-
margin-left: 35px;
16-
}
17114
.toc-outside-links ul {
18-
columns: 2;
115+
width: fit-content;
116+
columns: 1;
19117
}
20118
.toc-outside-links li p, .toc-outside-links ul li {
21119
margin-left: 5px;
@@ -32,23 +130,10 @@ body {
32130
.toctree-wrapper a:hover {
33131
text-decoration: underline;
34132
}
35-
#the-python-arcade-library h2 {
36-
font-size: var(--font-size--small);
37-
font-weight: 400;
38-
margin-bottom: 0;
39-
margin-top: .5rem;
40-
text-align: initial;
41-
text-transform: uppercase;
42-
}
43133
#the-python-arcade-library ul {
44134
margin-top: 0;
45135
margin-bottom: 0;
46136
}
47-
#github-stars {
48-
width: 170px;
49-
height: 30px;
50-
margin-bottom: -18px;
51-
}
52137
.heading-icon {
53138
columns: 2;
54139
position: relative;
@@ -104,9 +189,6 @@ img.right-image {
104189
width: 78px;
105190
padding-right: 15px;
106191
}
107-
.main-page-table {
108-
width: 100%;
109-
}
110192
.vimeo-video {
111193
border: 0;
112194
position:absolute;

0 commit comments

Comments
 (0)