Skip to content

Commit d1cb87b

Browse files
authored
Update docs: polish landing page (#875)
1 parent 3b035d4 commit d1cb87b

File tree

3 files changed

+132
-15
lines changed

3 files changed

+132
-15
lines changed

docs/_static/css/landing.css

Lines changed: 116 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
1+
/* Subtle green radial glow from the top, spanning the full page */
2+
body {
3+
background-image: radial-gradient(
4+
ellipse 80% 50% at 50% 0%,
5+
rgba(45, 164, 78, 0.09) 0%,
6+
transparent 60%
7+
);
8+
background-attachment: fixed;
9+
}
10+
11+
html.dark body {
12+
background-image: radial-gradient(
13+
ellipse 80% 50% at 50% 0%,
14+
rgba(63, 185, 80, 0.09) 0%,
15+
transparent 60%
16+
);
17+
}
18+
19+
/* Tighten hero spacing */
20+
.yue {
21+
padding-bottom: 1rem !important;
22+
}
23+
24+
.yue section:first-of-type h1 {
25+
margin-top: 1.5rem !important;
26+
margin-bottom: 0.75rem !important;
27+
}
28+
29+
/* Badges, tagline, buttons, section labels */
30+
div.badges {
31+
margin-bottom: 0.75rem;
32+
}
33+
34+
p.lead {
35+
margin-bottom: 0.25rem;
36+
}
37+
38+
div.buttons {
39+
margin-top: 0.75rem;
40+
margin-bottom: 0;
41+
}
42+
43+
p.rubric {
44+
margin-top: 1.75rem;
45+
margin-bottom: 0.75rem;
46+
}
47+
48+
/* Testimonials */
49+
.testimonials.container {
50+
width: 100%;
51+
max-width: none;
52+
}
53+
54+
@media (min-width: 768px) {
55+
.testimonials.container {
56+
display: grid;
57+
grid-template-columns: 1fr 1fr;
58+
gap: 1rem;
59+
align-items: stretch;
60+
}
61+
}
62+
63+
.testimonials.container > blockquote.epigraph {
64+
position: relative;
65+
padding-top: 0.25rem;
66+
}
67+
68+
.testimonials.container > blockquote.epigraph::before {
69+
content: "\201C";
70+
position: absolute;
71+
top: -2rem;
72+
left: -0.75rem;
73+
font-size: 9rem;
74+
line-height: 1;
75+
color: rgba(45, 164, 78, 0.13);
76+
font-family: Georgia, serif;
77+
pointer-events: none;
78+
user-select: none;
79+
z-index: 0;
80+
}
81+
82+
html.dark .testimonials.container > blockquote.epigraph::before {
83+
color: rgba(63, 185, 80, 0.13);
84+
}
85+
86+
.testimonials.container > blockquote.epigraph code {
87+
white-space: nowrap;
88+
}
89+
90+
.testimonials.container > blockquote.epigraph > p {
91+
position: relative;
92+
z-index: 1;
93+
}
94+
95+
.testimonials.container > blockquote.epigraph .attribution {
96+
position: relative;
97+
z-index: 1;
98+
font-size: 0.875rem;
99+
font-weight: 500;
100+
color: #2da44e;
101+
}
102+
103+
html.dark .testimonials.container > blockquote.epigraph .attribution {
104+
color: #3fb950;
105+
}
106+
107+
/* Contributors: center the avatar grid */
108+
section#contributors .rounded-image.container,
109+
section#contributors .sphinx-contributors.container {
110+
width: 100%;
111+
max-width: none;
112+
}
113+
114+
.sphinx-contributors--avatars .sphinx-contributors_list {
115+
justify-content: center !important;
116+
}

docs/conf.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -257,6 +257,7 @@ def _get_project_meta() -> dict[str, str]:
257257
# relative to this directory. They are copied after the builtin static files,
258258
# so a file named "default.css" will overwrite the builtin "default.css".
259259
html_static_path = ['_static']
260+
html_css_files = ['css/landing.css']
260261
html_js_files = [
261262
'https://cdn.jsdelivr.net/npm/chart.js@4.5.1/dist/chart.umd.min.js',
262263
]

docs/index.rst

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@
1010
:width: 700
1111
:align: center
1212

13-
==================
14-
1513
.. container:: badges
1614
:name: badges
1715

@@ -60,27 +58,29 @@ and extend ``django-modern-rest`` framework.
6058

6159
.. rubric:: Testimonials
6260

63-
.. epigraph::
61+
.. container:: testimonials
62+
63+
.. epigraph::
6464

65-
| The one thing I really love about **django-modern-rest** is its pluggable
66-
| serializers and validators. Frameworks that are tightly coupled
67-
| with **pydantic** can be really painful to work with.
65+
The one thing I really love about ``django-modern-rest`` is its pluggable
66+
serializers and validators. Frameworks that are tightly coupled
67+
with ``pydantic`` can be really painful to work with.
6868

69-
-- `Kirill Podoprigora <https://github.com/Eclips4>`_, CPython core developer
69+
-- `Kirill Podoprigora <https://github.com/Eclips4>`_, CPython core developer
7070

71-
.. epigraph::
71+
.. epigraph::
7272

73-
| Using ``django-modern-rest`` has been a game-changer
74-
| for my productivity. The strict type safety and schema validation
75-
| for both requests and responses mean I spend less time debugging
76-
| and more time building.
73+
Using ``django-modern-rest`` has been a game-changer
74+
for my productivity. The strict type safety and schema validation
75+
for both requests and responses mean I spend less time debugging
76+
and more time building.
7777

78-
-- `Josiah Kaviani <https://github.com/proofit404>`_, Django core developer
78+
-- `Josiah Kaviani <https://github.com/proofit404>`_, Django core developer
7979

8080

81-
Main features include:
81+
.. rubric:: Main features include:
8282

83-
.. grid:: 1 1 2 2
83+
.. grid:: 1 1 2 3
8484
:class-row: surface
8585
:padding: 0
8686
:gutter: 2

0 commit comments

Comments
 (0)