Skip to content

Commit fea7a72

Browse files
committed
small fixes
1 parent f553413 commit fea7a72

5 files changed

Lines changed: 61 additions & 72 deletions

File tree

_includes/landing.css

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ main {
33
}
44

55
header.top-nav-header {
6-
position: absolute;
76
border: 0;
87
background: #050a12;
98
}
@@ -23,7 +22,7 @@ header.top-nav-header nav ul.top-nav li a:hover {
2322

2423
/* Hide dark mode toggle on landing page */
2524
#dark-mode-toggle {
26-
display: none;
25+
visibility: hidden;
2726
}
2827

2928
/* White variant for header icons */
@@ -493,11 +492,7 @@ header.top-nav-header nav ul.top-nav li a:hover {
493492
line-height: 1.7;
494493
}
495494

496-
@media (max-width: 600px) {
497-
body {
498-
padding-top: 100px !important;
499-
}
500-
}
495+
501496

502497
@media (max-width: 480px) {
503498

_includes/starBegging.html

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,12 @@
1-
<div id="star-begging">
1+
<div id="star-begging" class="jv-card">
22
<style>
33
#star-begging {
44
transition: transform .25s;
55
transform: scale(0);
6-
border-radius: var(--jv-radius-lg);
76
position: fixed;
87
bottom: 32px;
98
right: 32px;
109
padding: 16px 40px 12px 16px;
11-
background: #fff;
12-
border: 1px solid var(--jv-color-border);
13-
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
1410
z-index: 9999998;
1511
}
1612
#star-begging.in {
@@ -29,27 +25,33 @@
2925
position: absolute;
3026
right: 16px;
3127
top: 16px;
32-
height: 32px;
33-
width: 32px;
34-
line-height: 1;
28+
background: rgba(0, 0, 0, 0.04);
29+
border: none;
30+
border-radius: 8px;
31+
cursor: pointer;
32+
padding: 8px;
3533
display: flex;
3634
align-items: center;
3735
justify-content: center;
38-
font-size: 28px;
39-
cursor: pointer;
40-
background: rgba(0, 0, 0, 0.05);
41-
border-radius: var(--jv-radius-md);
42-
transition: background 0.2s ease;
4336
}
4437
#star-begging .close:hover {
45-
background: rgba(0, 0, 0, 0.1);
38+
background: rgba(0, 0, 0, 0.08);
39+
}
40+
#star-begging .close svg {
41+
width: 20px;
42+
height: 20px;
43+
fill: var(--jv-color-text);
4644
}
4745
</style>
4846
<p>
4947
Like Javalin?
5048
<br>Star us 😊
5149
</p>
52-
<span class="close">×</span>
50+
<button class="close" aria-label="Close">
51+
<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
52+
<path d="M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z"/>
53+
</svg>
54+
</button>
5355
<iframe id="starFrame" class="githubStar" title="github-stars"
5456
src="https://ghbtns.com/github-btn.html?user=javalin&amp;repo=javalin&amp;type=star&amp;count=true&size=large"
5557
frameborder="0" scrolling="0" width="150px" height="30px">

_sass/_frame.scss

Lines changed: 39 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,13 @@ html {
44
}
55

66
body {
7-
padding-top: 80px;
87
margin-bottom: 40px;
98
}
109

11-
/* Header - Fixed at top */
10+
/* Header - Sticky at top */
1211
header.top-nav-header {
13-
position: fixed;
12+
position: sticky;
1413
top: 0;
15-
left: 0;
1614
width: 100%;
1715
height: 80px;
1816
z-index: 1000;
@@ -106,10 +104,6 @@ nav.width-limit {
106104

107105
/* Header icon buttons */
108106
.header-icons {
109-
position: fixed;
110-
top: 20px;
111-
right: 20px;
112-
z-index: 1001;
113107
display: flex;
114108
gap: 8px;
115109
align-items: center;
@@ -300,60 +294,56 @@ body.dark-mode {
300294
}
301295
}
302296

303-
/* Responsive: Mobile screens (<600px) - Non-landing pages only */
297+
/* Responsive: Mobile screens (<600px) */
304298
@media (max-width: 600px) {
305-
body:not(.splash) {
306-
padding-top: 120px;
307-
308-
header.top-nav-header {
309-
height: auto;
310-
padding: 12px 0;
311-
}
299+
header.top-nav-header {
300+
height: auto;
301+
padding: 12px 0;
302+
}
312303

313-
nav.width-limit {
314-
flex-direction: column;
315-
align-items: center;
316-
height: auto;
317-
gap: 12px;
304+
nav.width-limit {
305+
flex-direction: column;
306+
align-items: center;
307+
height: auto;
308+
gap: 12px;
318309

319-
#logo {
320-
align-self: flex-start;
310+
#logo {
311+
align-self: flex-start;
321312

322-
img {
323-
height: 32px !important;
324-
margin: 0;
325-
}
313+
img {
314+
height: 32px !important;
315+
margin: 0;
326316
}
317+
}
327318

328-
ul.top-nav {
329-
margin: 0;
319+
ul.top-nav {
320+
margin: 0;
330321

331-
li {
332-
a {
333-
margin: 0;
334-
font-size: 16px;
335-
padding: 8px;
336-
}
322+
li {
323+
a {
324+
margin: 0;
325+
font-size: 16px;
326+
padding: 8px;
337327
}
338328
}
339329
}
330+
}
340331

341-
.header-icons {
342-
position: absolute;
343-
top: 12px;
344-
right: 20px;
345-
gap: 4px;
346-
}
332+
.header-icons {
333+
position: absolute;
334+
top: 12px;
335+
right: 20px;
336+
gap: 4px;
337+
}
347338

348-
#dark-mode-toggle,
349-
#discord-link,
350-
#github-link {
351-
padding: 6px;
339+
#dark-mode-toggle,
340+
#discord-link,
341+
#github-link {
342+
padding: 6px;
352343

353-
svg {
354-
width: 16px;
355-
height: 16px;
356-
}
344+
svg {
345+
width: 16px;
346+
height: 16px;
357347
}
358348
}
359349

_sass/_syntaxHighlighting.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ pre.code-toolbar > .toolbar span {
6161
box-shadow: none;
6262
border-radius: 0 5px 0 5px;
6363
color: rgba(255, 255, 255, 0.45);
64-
border: 1px solid rgba(255, 255, 255, 0.1);
64+
border: 1px solid var(--jv-color-code-toolbar-border);
6565
border-top: 0;
6666
border-right: 0;
6767
text-shadow: none;

_sass/_variables.scss

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
--jv-color-code-border: #ccd;
1616
--jv-color-code-bg: #f5f5f5;
1717
--jv-color-code-bg-dark: #2a2b31;
18+
--jv-color-code-toolbar-border: rgba(255, 255, 255, 0.1);
1819
--jv-color-bg-light: #f9f9f9;
1920
--jv-color-bg-main: #fff;
2021
--jv-color-text: #333;
@@ -43,6 +44,7 @@ body.dark-mode {
4344
--jv-color-code-border: #202225;
4445
--jv-color-code-bg: #2f3136;
4546
--jv-color-code-bg-dark: #2f3136;
47+
--jv-color-code-toolbar-border: #202225;
4648
--jv-color-bg-light: #2f3136;
4749
--jv-color-bg-main: #36393f;
4850
--jv-color-text: #dcddde;

0 commit comments

Comments
 (0)