Skip to content

Commit 761af59

Browse files
Merge pull request #62 from geoadmin/task-PB-1908-format-codebase
PB-1908 : Format codebase
2 parents fed07b8 + 7e08a03 commit 761af59

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+4016
-5679
lines changed

.vitepress/config.mts

Lines changed: 185 additions & 187 deletions
Large diffs are not rendered by default.

.vitepress/theme/custom.css

Lines changed: 95 additions & 95 deletions
Original file line numberDiff line numberDiff line change
@@ -2,207 +2,207 @@
22
1. Global Styles
33
========================== */
44
:root {
5-
--vp-c-brand-1: red;
6-
--vp-c-brand-2: red;
7-
--vp-c-brand-3: #d8232a;
8-
--vp-c-text-4: #0456a0;
9-
--vp-c-text-5: #6f42c1;
10-
--vp-c-text-6: #008b7f;
5+
--vp-c-brand-1: red;
6+
--vp-c-brand-2: red;
7+
--vp-c-brand-3: #d8232a;
8+
--vp-c-text-4: #0456a0;
9+
--vp-c-text-5: #6f42c1;
10+
--vp-c-text-6: #008b7f;
1111
}
1212

1313
.dark {
14-
--vp-c-text-4: #9ecbff;
15-
--vp-c-text-5: #b392f0;
16-
--vp-c-text-6: #00e8c6;
14+
--vp-c-text-4: #9ecbff;
15+
--vp-c-text-5: #b392f0;
16+
--vp-c-text-6: #00e8c6;
1717
}
1818

1919
* {
20-
box-sizing: border-box;
20+
box-sizing: border-box;
2121
}
2222

2323
figcaption {
24-
font-size: 0.8rem;
25-
color: var(--vp-c-text-2);
24+
font-size: 0.8rem;
25+
color: var(--vp-c-text-2);
2626
}
2727

2828
.VPLink:hover {
29-
background-color: var(--vp-button-alt-hover-bg);
30-
border-color: transparent !important;
29+
background-color: var(--vp-button-alt-hover-bg);
30+
border-color: transparent !important;
3131
}
3232

3333
/* ==========================
3434
2. Layout Styles
3535
========================== */
3636

3737
.home-status-container {
38-
width: 100%;
39-
border-top: 1px solid var(--vp-c-divider);
40-
padding-top: 32px;
41-
margin-top: 24px;
38+
width: 100%;
39+
border-top: 1px solid var(--vp-c-divider);
40+
padding-top: 32px;
41+
margin-top: 24px;
4242
}
4343

4444
.home-status-container a {
45-
text-decoration: none;
46-
color: var(--vp-button-brand-bg);
47-
font-weight: normal;
45+
text-decoration: none;
46+
color: var(--vp-button-brand-bg);
47+
font-weight: normal;
4848
}
4949

5050
.home-container {
51-
width: 100%;
52-
margin-top: 48px;
53-
display: flex;
54-
flex-direction: column;
55-
gap: 32px;
51+
width: 100%;
52+
margin-top: 48px;
53+
display: flex;
54+
flex-direction: column;
55+
gap: 32px;
5656
}
5757

5858
.releases-container {
59-
flex: 2;
59+
flex: 2;
6060
}
6161

6262
.releases-container-cols {
63-
display: flex;
64-
flex-direction: column;
65-
gap: 32px;
63+
display: flex;
64+
flex-direction: column;
65+
gap: 32px;
6666
}
6767

6868
.announcements-container {
69-
flex: 1;
69+
flex: 1;
7070
}
7171

7272
.home-container-col {
73-
width: 100%;
73+
width: 100%;
7474
}
7575

7676
#home-container-h2 {
77-
margin: 0px;
77+
margin: 0px;
7878
}
7979

8080
.home-container-col h4 {
81-
margin-bottom: 12px;
81+
margin-bottom: 12px;
8282
}
8383

8484
.home-container-col span {
85-
display: block;
86-
margin-bottom: 4px;
85+
display: block;
86+
margin-bottom: 4px;
8787
}
8888

8989
.home-container-col a {
90-
display: block;
91-
text-decoration: none;
92-
padding: 4px 0px;
93-
color: var(--vp-button-brand-bg);
94-
font-weight: normal;
90+
display: block;
91+
text-decoration: none;
92+
padding: 4px 0px;
93+
color: var(--vp-button-brand-bg);
94+
font-weight: normal;
9595
}
9696

9797
@media (min-width: 768px) {
98-
.releases-container-cols {
99-
flex-direction: row;
100-
}
98+
.releases-container-cols {
99+
flex-direction: row;
100+
}
101101
}
102102

103103
@media (min-width: 960px) {
104-
.home-container {
105-
flex-direction: row;
106-
}
104+
.home-container {
105+
flex-direction: row;
106+
}
107107
}
108108

109109
.status-container {
110-
width: 100%;
110+
width: 100%;
111111
}
112112

113113
.status-warning {
114-
background-color: var(--vp-custom-block-warning-bg);
115-
color: var(--vp-custom-block-warning-text);
116-
width: 100%;
114+
background-color: var(--vp-custom-block-warning-bg);
115+
color: var(--vp-custom-block-warning-text);
116+
width: 100%;
117117
}
118118

119119
.status-warning:hover {
120-
background-color: var(--vp-c-yellow-3);
121-
color: white;
120+
background-color: var(--vp-c-yellow-3);
121+
color: white;
122122
}
123123

124124
.status-danger {
125-
background-color: var(--vp-custom-block-danger-bg);
126-
color: var(--vp-custom-block-warning-text);
127-
width: 100%;
125+
background-color: var(--vp-custom-block-danger-bg);
126+
color: var(--vp-custom-block-warning-text);
127+
width: 100%;
128128
}
129129

130130
.status-danger:hover {
131-
background-color: var(--vp-c-red-2);
132-
color: white;
131+
background-color: var(--vp-c-red-2);
132+
color: white;
133133
}
134134

135135
.status-content {
136-
padding: 10px 30px;
137-
width: 100%;
138-
height: 64px;
139-
display: flex;
140-
align-items: center;
136+
padding: 10px 30px;
137+
width: 100%;
138+
height: 64px;
139+
display: flex;
140+
align-items: center;
141141
}
142142

143143
.status-content-title {
144-
font-weight: bold;
144+
font-weight: bold;
145145
}
146146

147147
.status-content-text {
148-
font-weight: normal;
148+
font-weight: normal;
149149
}
150150

151151
@media (min-width: 960px) {
152-
.status-danger,
153-
.status-warning {
154-
margin-top: 64px;
155-
}
152+
.status-danger,
153+
.status-warning {
154+
margin-top: 64px;
155+
}
156156

157-
.item.grid-4 {
158-
width: calc(100% / 5) !important;
159-
}
157+
.item.grid-4 {
158+
width: calc(100% / 5) !important;
159+
}
160160
}
161161

162162
@media (min-width: 1456px) {
163-
.status-content {
164-
max-width: 1376px;
165-
margin: auto;
166-
padding: 0;
167-
}
163+
.status-content {
164+
max-width: 1376px;
165+
margin: auto;
166+
padding: 0;
167+
}
168168
}
169169

170170
/* ==========================
171171
3. Component Styles
172172
========================== */
173173

174174
.api-block {
175-
background-color: var(--vp-code-block-bg);
176-
border-radius: 8px;
177-
display: flex;
178-
align-items: center;
179-
padding: 20px 20px;
175+
background-color: var(--vp-code-block-bg);
176+
border-radius: 8px;
177+
display: flex;
178+
align-items: center;
179+
padding: 20px 20px;
180180
}
181181

182182
.api-block pre {
183-
background-color: transparent;
183+
background-color: transparent;
184184
}
185185

186186
.method-button {
187-
display: inline-block;
188-
padding: 2px 12px;
189-
border-radius: 30px;
190-
background-color: var(--vp-c-brand-1);
191-
color: white;
192-
text-decoration: none;
193-
font-weight: bold;
194-
pointer-events: none;
187+
display: inline-block;
188+
padding: 2px 12px;
189+
border-radius: 30px;
190+
background-color: var(--vp-c-brand-1);
191+
color: white;
192+
text-decoration: none;
193+
font-weight: bold;
194+
pointer-events: none;
195195
}
196196

197197
/* ==========================
198198
4. Utility Classes
199199
========================== */
200200
#link-with-icon {
201-
text-decoration: none;
202-
color: var(--vp-c-text-1);
203-
display: flex;
201+
text-decoration: none;
202+
color: var(--vp-c-text-1);
203+
display: flex;
204204
}
205205

206206
#link-with-icon:hover {
207-
color: #d8232a;
207+
color: #d8232a;
208208
}

.vitepress/theme/index.ts

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,28 @@
1-
import type { Theme } from "vitepress";
2-
import DefaultTheme from "vitepress/theme";
3-
import ApiCodeBlock from "../../components/ApiCodeBlock.vue";
4-
import "./custom.css";
5-
import ExampleCodeBlock from "../../components/ExampleCodeBlock.vue";
6-
import { createHighlighter } from "shiki";
7-
import type { HighlighterGeneric, BundledLanguage, BundledTheme } from "shiki";
1+
import type { Theme } from 'vitepress'
2+
import DefaultTheme from 'vitepress/theme'
3+
import ApiCodeBlock from '../../components/ApiCodeBlock.vue'
4+
import './custom.css'
5+
import ExampleCodeBlock from '../../components/ExampleCodeBlock.vue'
6+
import { createHighlighter } from 'shiki'
7+
import type { HighlighterGeneric, BundledLanguage, BundledTheme } from 'shiki'
88

99
// Create a global instance of the highlighter as Shiki is supposed to be used as a singleton
1010
const highlighterPromise = createHighlighter({
11-
themes: ["github-dark"],
12-
langs: ["javascript", "json", "sh", "html", "http"],
13-
});
11+
themes: ['github-dark'],
12+
langs: ['javascript', 'json', 'sh', 'html', 'http'],
13+
})
1414

1515
export default {
16-
extends: DefaultTheme,
17-
async enhanceApp({ app }) {
18-
// register custom global components
19-
app.component("ApiCodeBlock", ApiCodeBlock);
20-
app.component("ExampleCodeBlock", ExampleCodeBlock);
16+
extends: DefaultTheme,
17+
async enhanceApp({ app }) {
18+
// register custom global components
19+
app.component('ApiCodeBlock', ApiCodeBlock)
20+
app.component('ExampleCodeBlock', ExampleCodeBlock)
2121

22-
const highlighter: HighlighterGeneric<BundledLanguage, BundledTheme> =
23-
await highlighterPromise;
22+
const highlighter: HighlighterGeneric<BundledLanguage, BundledTheme> =
23+
await highlighterPromise
2424

25-
// Provide the highlighter globally (it can later be used in any component)
26-
app.provide("highlighter", highlighter);
27-
},
28-
} satisfies Theme;
25+
// Provide the highlighter globally (it can later be used in any component)
26+
app.provide('highlighter', highlighter)
27+
},
28+
} satisfies Theme

0 commit comments

Comments
 (0)