Skip to content

Commit cc05574

Browse files
Dedelweissckipp01
authored andcommitted
Remove obsolete CSS, Corrections and improvements
- I removed the obsolete CSS in dottydoc.css - The compliant CSS codes have been moved to folder dotty_res/styles/theme/layout - I improved the UI for the author of a blog post
1 parent af6af31 commit cc05574

File tree

4 files changed

+71
-239
lines changed

4 files changed

+71
-239
lines changed

docs/_assets/css/dottydoc.css

Lines changed: 10 additions & 211 deletions
Original file line numberDiff line numberDiff line change
@@ -1,224 +1,23 @@
1-
html, body {
2-
font-weight: 300;
3-
height: 100%;
4-
}
5-
6-
main.container {
7-
min-height: 100vh;
8-
padding: 15px 15px;
9-
padding-bottom: 45px; /* prevents the content to be hidden by the gitter sidecar */
10-
}
11-
12-
.container img {
13-
width: 100%;
14-
height: auto;
15-
}
16-
17-
.site-container img{
18-
width: 100%;
19-
height: auto;
20-
}
21-
22-
/* headers */
23-
main header {
24-
border-bottom: 1px solid rgba(0,0,0,.1);
25-
margin-bottom: 16px;
26-
padding-bottom: 16px;
27-
}
28-
29-
main > h1 {
30-
margin-bottom: 20px;
31-
}
32-
331
.byline {
342
font-size: 14px;
3+
display: flex;
4+
margin-top: 10px;
355
}
366

37-
.byline, .byline a {
38-
color: grey;
39-
}
40-
.byline .author {
41-
display: block;
42-
}
43-
44-
/* indexes */
45-
ul.post-list {
46-
list-style: none;
47-
padding-left: 0;
48-
}
49-
.post-list h2 {
50-
margin-bottom: 0;
51-
}
52-
53-
h1:hover a.anchor,
54-
h2:hover a.anchor,
55-
h3:hover a.anchor,
56-
h4:hover a.anchor,
57-
h5:hover a.anchor {
58-
color: lightgrey;
59-
text-decoration: none;
60-
}
61-
62-
h1:hover a.anchor:hover,
63-
h2:hover a.anchor:hover,
64-
h3:hover a.anchor:hover,
65-
h4:hover a.anchor:hover,
66-
h5:hover a.anchor:hover {
67-
color: var(--secondary);
68-
}
69-
70-
/* blog footer */
71-
.blog-author {
72-
color: gray;
73-
}
74-
75-
.blog-author img#author-img {
7+
.byline img#author-img {
768
width: auto;
779
height: auto;
78-
max-width:100px;
79-
max-height:100px;
80-
border-radius: 50%;
10+
max-width: 50px;
11+
border-radius: 10px;
8112
}
8213

83-
/* api docs */
84-
.api span.letter-anchor {
85-
float: left;
86-
width: 50px;
87-
height: 50px;
88-
border-radius: 50px;
89-
color: white;
90-
margin-top: 6px;
91-
margin-right: 8px;
92-
line-height: 50px;
93-
text-align: center;
94-
text-decoration: none;
95-
font-size: 43px;
96-
font-family: var(--font-family-sans-serif);
97-
}
98-
.api span.letter-anchor.object {
99-
line-height: 48px;
100-
}
101-
.api span.letter-anchor.class {
102-
line-height: 48px;
103-
padding-right: 3px;
104-
}
105-
.letter-anchor.object {
106-
background: #2c6c8d;
107-
}
108-
.letter-anchor.class {
109-
background: #44ad7d;
110-
}
111-
.letter-anchor.trait {
112-
background: #19aacf;
113-
}
114-
.letter-anchor.enum {
115-
background: #7803fc;
116-
}
117-
.letter-anchor.package {
118-
background: #2c6c8d;
119-
}
120-
121-
.api header {
122-
font-family: var(--font-family-sans-serif);
14+
.byline, .byline a {
15+
color: grey;
12316
}
124-
.api header .name-prefix {
17+
.byline .author {
12518
display: block;
12619
}
127-
.api header .name-suffix {
128-
display: inline-block;
129-
}
130-
131-
.api header h1 {
132-
margin: -13px 8px 0 0;
133-
display: inline-block;
134-
}
135-
.api h2 {
136-
margin-top: 1rem;
137-
}
138-
.api h3 {
139-
display: inline;
140-
margin: 0;
141-
font: inherit;
142-
font-weight: bold;
143-
}
144-
145-
/* improved display and wrapping of parameters */
146-
.api .params, .api .type-params {
147-
display: inline-flex;
148-
flex-flow: wrap;
149-
}
150-
151-
/* api layout */
152-
.wide-table {
153-
display: table;
154-
width: 100%;
155-
}
156-
.api .member:hover {
157-
background: var(--doc-bg);
158-
cursor: pointer;
159-
}
160-
.api .left-column {
161-
white-space: nowrap;
162-
padding-left: 1em;
163-
border-left: 3px solid transparent;/* table rows cannot have borders*/
164-
font-family: var(--font-family-monospace);
165-
text-align: right;
166-
width: 1px;
167-
}
168-
.api .member:hover .left-column {
169-
border-left: 3px solid var(--secondary);
170-
}
171-
.api .right-column {
172-
display: inline;
173-
text-align: right;
174-
font-family: var(--font-family-monospace);
175-
}
176-
177-
/* admonitions */
178-
blockquote {
179-
padding: 0 1em;
180-
color: #777;
181-
border-left: 0.25em solid #ddd;
182-
}
183-
184-
185-
aside.notice {
186-
border-left: 3px solid #4c97e4;
187-
background-color: #e4ebff;
188-
}
189-
190-
aside.success {
191-
border-left: 3px solid #36bf1d;
192-
background-color: #ebfddd;
193-
}
194-
195-
/* media queries for bigger screens (dottydoc is mobile-first) */
196-
@media (min-width: 576px) {
197-
.byline .author {
198-
display: inline;
199-
margin-left: 1em;
200-
}
201-
main.container {
202-
padding: 15px 30px;
203-
}
204-
}
205-
@media (min-width: 768px) {
206-
.api .member {
207-
display: table-row;
208-
}
209-
.api .left-column {
210-
display: table-cell;
211-
}
212-
.api .right-column {
213-
display: flex;
214-
flex-flow: wrap;
215-
}
216-
main.container {
217-
padding: 15px 45px;
218-
}
219-
}
22020

221-
header {
222-
position: static !important;
223-
width: 100% !important;
21+
.byline .secondary-infos{
22+
margin-left: 10px;
22423
}

docs/_layouts/blog-page.html

Lines changed: 19 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,25 @@
55
<header>
66
<h1>{{ page.title }}</h1>
77
<div class="byline">
8-
<time class="date">
9-
<i class="far fa-calendar-alt"></i>
10-
{{ page.date | date: "%Y-%m-%d" }}
11-
</time>
12-
<span class="author">
13-
<i class="fas fa-pen-nib"></i>
14-
{{ page.author }}
15-
</span>
8+
{% if page.author and page.authorImg %}
9+
<img id="author-img" src="{{ site.baseurl }}{{ page.authorImg }}">
10+
{% endif %}
11+
<div class="secondary-infos">
12+
{% if page.author %}
13+
<div>
14+
<span class="author">
15+
<i class="fas fa-pen-nib"></i>
16+
{{ page.author }}
17+
</span>
18+
</div>
19+
{% endif %}
20+
<div>
21+
<time class="date">
22+
<i class="far fa-calendar-alt"></i>
23+
{{ page.date | date: "%Y-%m-%d" }}
24+
</time>
25+
</div>
26+
</div>
1627
</div>
1728
{% if page.subTitle %}
1829
<div class="subtitle">
@@ -22,14 +33,4 @@ <h1>{{ page.title }}</h1>
2233
</header>
2334

2435
{{ content }}
25-
26-
{% if page.author and page.authorImg %}
27-
<hr/>
28-
<div class="blog-author">
29-
<img id="author-img" src="{{ site.baseurl }}{{ page.authorImg }}">
30-
<span id="author-signature">
31-
{{ page.author }}
32-
</span>
33-
</div>
34-
{% endif %}
3536
</main>

scaladoc/resources/dotty_res/styles/theme/layout/container.css

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,11 @@ p {
1919
--header-height: calc(8 * var(--base-spacing));
2020
}
2121

22+
.site-container img{
23+
max-width: 100%;
24+
height: auto;
25+
}
26+
2227
/* Scrollbar */
2328

2429
::-webkit-scrollbar {

scaladoc/resources/dotty_res/styles/theme/layout/content.css

Lines changed: 37 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,19 @@
88
scroll-behavior: smooth;
99
}
1010

11+
/* blog footer */
12+
.blog-author {
13+
color: gray;
14+
}
15+
16+
.blog-author img#author-img {
17+
width: auto;
18+
height: auto;
19+
max-width:100px;
20+
max-height:100px;
21+
border-radius: 50%;
22+
}
23+
1124
#content {
1225
display: flex;
1326
flex-flow: row;
@@ -144,9 +157,9 @@
144157
}
145158

146159
#content h2 {
147-
color: var(--text-primary);
148-
margin-block-start: calc(6* var(--base-spacing));
149-
margin-block-end: calc(3* var(--base-spacing));
160+
color: var(--text-primary);
161+
margin-block-start: calc(6* var(--base-spacing));
162+
margin-block-end: calc(3* var(--base-spacing));
150163
}
151164

152165
#content .cover > h2 {
@@ -167,7 +180,7 @@
167180

168181
/* content first paragraph */
169182
.first-p {
170-
margin-block-start: calc(2* var(--base-spacing));
183+
margin-block-start: calc(2* var(--base-spacing));
171184
}
172185

173186
#content .first-p {
@@ -218,18 +231,32 @@
218231

219232
/* content link */
220233
#content a {
221-
color: var(--text-primary);
222-
text-decoration: underline solid 1px;
223-
-webkit-text-decoration-line: underline; /* Safari */
224-
text-decoration-line: underline;
225-
text-underline-offset: 2px;
226-
transition: text-decoration-color .2s ease-in-out;
234+
color: var(--text-primary);
235+
text-decoration: underline solid 1px;
236+
-webkit-text-decoration-line: underline; /* Safari */
237+
text-decoration-line: underline;
238+
text-underline-offset: 2px;
239+
transition: text-decoration-color .2s ease-in-out;
227240
}
228241

229242
#content a:hover {
230243
text-decoration-color: transparent;
231244
}
232245

246+
#content a.anchor {
247+
color: transparent;
248+
margin-left: -23px;
249+
padding-right: 3px;
250+
transition: color .4s ease-out;
251+
}
252+
253+
#content a.anchor::before {
254+
content: "\f0c1";
255+
font-family: "Font Awesome 5 Free";
256+
font-weight: 900;
257+
font-size: 20px;
258+
}
259+
233260
#content .cover-header {
234261
margin-block-end: calc(2 * var(--base-spacing));
235262
}

0 commit comments

Comments
 (0)