Skip to content

Commit 93c5dbd

Browse files
authored
Merge pull request #502 from SpineEventEngine/docs-structure
Prepare structure for documentation
2 parents 7a7519a + d8432e2 commit 93c5dbd

File tree

28 files changed

+352
-487
lines changed

28 files changed

+352
-487
lines changed

_hugo-site/assets/js/main.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,4 @@
2525
*/
2626

2727
import './modules/navbar/navbar';
28+
import './modules/go-top-button';
Lines changed: 32 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*!
1+
/*
22
* Copyright 2025, TeamDev. All rights reserved.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -24,73 +24,35 @@
2424
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2525
*/
2626

27-
html, body, div, span, applet, object, iframe,
28-
h1, h2, h3, h4, h5, h6, p, figure,
29-
a, abbr, acronym, address, big, cite,
30-
del, dfn, em, font, ins, kbd, q, s, samp,
31-
small, strike, strong, sub, sup, tt, var,
32-
dl, dt, dd, ol, ul, li,
33-
fieldset, form, label, legend,
34-
table, caption, tbody, tfoot, thead, tr, th, td {
35-
border: 0;
36-
font-family: inherit;
37-
font-size: 100%;
38-
font-style: inherit;
39-
font-weight: inherit;
40-
margin: 0;
41-
outline: 0;
42-
padding: 0;
43-
vertical-align: baseline;
44-
}
27+
'use strict';
4528

46-
:focus {
47-
outline: 0;
48-
}
49-
50-
body {
51-
background: #FFF;
52-
line-height: 1;
53-
}
54-
55-
ol,
56-
ul {
57-
list-style: none;
58-
}
59-
60-
table {
61-
border-collapse: separate;
62-
border-spacing: 0;
63-
}
64-
65-
caption,
66-
th,
67-
td {
68-
font-weight: normal;
69-
text-align: left;
70-
}
71-
72-
blockquote:before,
73-
blockquote:after,
74-
q:before,
75-
q:after {
76-
content: "";
77-
}
78-
79-
blockquote,
80-
q {
81-
quotes: "" "";
82-
}
83-
84-
a img {
85-
border: 0;
86-
}
87-
88-
article, aside, details, figcaption, figure,
89-
footer, header, hgroup, menu, nav, section {
90-
display: block;
91-
}
92-
93-
a,
94-
a:hover {
95-
text-decoration: none;
96-
}
29+
/**
30+
* Scrolls the content to the top of the page on the “Go to top” button click.
31+
*
32+
* <p>The button will be shown if the content will be too long.
33+
*/
34+
$(function () {
35+
const $goTopButton = $('#go-top-button');
36+
if (!$goTopButton || !$goTopButton.length) return;
37+
38+
/**
39+
* Shows the button when the user scrolls down more than 300 pixels.
40+
*/
41+
$(window).on('scroll', function() {
42+
if ($(this).scrollTop() > 300) {
43+
$goTopButton.fadeIn();
44+
} else {
45+
$goTopButton.fadeOut();
46+
}
47+
});
48+
49+
/**
50+
* Scrolls the content to top with the animation effect on the button click.
51+
*/
52+
$goTopButton.on('click', function() {
53+
$('html, body').animate({
54+
scrollTop: 0
55+
}, 300);
56+
return false;
57+
});
58+
});

_hugo-site/assets/scss/base/_common.scss

Lines changed: 3 additions & 153 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
.intro-section {
2828
padding-top: 40px;
2929
padding-bottom: 48px;
30+
3031
@media (max-width: $tablet) {
3132
padding-top: 32px;
3233
padding-bottom: 32px;
@@ -64,106 +65,10 @@
6465
}
6566

6667
.content-with-fixed-header {
67-
margin-top: $page-top-offset;
68+
margin-top: $header-height + 32px;;
6869

6970
@media(max-width: $desktop-small) {
70-
margin-top: $page-top-offset-mobile;
71-
}
72-
}
73-
74-
.toc-col,
75-
.side-nav-col {
76-
-ms-flex: 0 0 $custom-side-col-width;
77-
flex: 0 0 $custom-side-col-width;
78-
}
79-
80-
.toc-col {
81-
// Custom width is used here to have the central content column more readable.
82-
@media (max-width: 1140px) {
83-
display: none;
84-
}
85-
}
86-
87-
.sticky-element {
88-
@media (min-width: $tablet-large) {
89-
padding: 0;
90-
position: relative;
91-
overflow: auto;
92-
max-height: 80%;
93-
-webkit-transform: translateZ(0); // Fixes jumping while scrolling
94-
95-
&.sticky {
96-
position: fixed;
97-
}
98-
}
99-
}
100-
101-
.toc {
102-
width: $sticky-el-width;
103-
padding-top: 12px;
104-
105-
&.blog-toc {
106-
margin: 40px 0 24px;
107-
}
108-
109-
&.initially-fixed {
110-
position: fixed;
111-
}
112-
113-
&.hide-block {
114-
display: none !important;
115-
}
116-
117-
@media (max-width: 1024px) {
118-
display: none !important;
119-
}
120-
121-
.blog-toc-header {
122-
margin-bottom: 16px;
123-
padding-left: 12px;
124-
font-size: 12px;
125-
color: $gray-300;
126-
font-weight: 500;
127-
text-transform: uppercase;
128-
}
129-
130-
>ul>li>a {
131-
display: block;
132-
line-height: 1.4;
133-
margin-bottom: 18px;
134-
}
135-
136-
ul {
137-
list-style-type: none !important;
138-
padding-left: 12px;
139-
font-size: 12px;
140-
141-
li {
142-
line-height: 1.4;
143-
margin-bottom: 18px;
144-
145-
// Overrides Bootstrap v5 default value.
146-
&.active {
147-
a,
148-
a:not([href]):not([tabindex]) {
149-
color: $mainBrandColor;
150-
}
151-
}
152-
}
153-
154-
// Overrides Bootstrap v5 default value
155-
a,
156-
a:not([href]):not([tabindex]) {
157-
color: $gray-500;
158-
font-weight: 500;
159-
padding: 0;
160-
letter-spacing: 0.2px;
161-
&:hover {
162-
color:$black;
163-
background: none;
164-
text-decoration: none;
165-
}
166-
}
71+
margin-top: $header-height + 16px;;
16772
}
16873
}
16974

@@ -244,58 +149,3 @@ $tooltip-padding: .5rem .7rem;
244149
border-bottom-color: $tooltip-color;
245150
}
246151
}
247-
248-
.anchorjs-link {
249-
&:hover {
250-
text-decoration: none !important;
251-
}
252-
253-
&:after {
254-
vertical-align: -2px;
255-
}
256-
}
257-
258-
/* Custom checkbox styles. */
259-
$checkbox-size: 18px;
260-
.checkbox-container {
261-
position: relative;
262-
display: block;
263-
cursor: pointer;
264-
margin-top: 12px;
265-
padding-left: $checkbox-size + 12px;
266-
line-height: 1.4;
267-
user-select: none;
268-
269-
&:hover input ~ .checkmark {
270-
border-color: $mainBrandColor;
271-
}
272-
273-
.text {
274-
font-size: 14px;
275-
}
276-
277-
/* Hide the browser's default checkbox. */
278-
input {
279-
position: absolute;
280-
cursor: pointer;
281-
opacity: 0;
282-
height: 0;
283-
width: 0;
284-
285-
&:checked ~ .checkmark {
286-
background: url('img/icons/checkbox.svg') no-repeat center/cover;
287-
border: none;
288-
}
289-
}
290-
291-
/* Custom checkbox. */
292-
.checkmark {
293-
position: absolute;
294-
top: 2px;
295-
left: 0;
296-
height: $checkbox-size;
297-
width: $checkbox-size;
298-
border: 1px solid $gray-300;
299-
border-radius: $border-radius-s;
300-
}
301-
}

0 commit comments

Comments
 (0)