Skip to content

Commit e4abf42

Browse files
authored
Update v1.3.0 (#20)
Features - Add Container component - Add Description component - Add TextEffect component - Add LinkBox component - Add more responsivity to layout - Add title to links components - Add astro-rename to hash class names Changes - Fix Header on top - Update 404 page location to match spring boot requirements - Update dependencies - Update package name - Update settings and tsconfig - Update README - Update yarn.lock - Move css to global file - Make BackgroundEffect responsive - Make Footer fixed - Remove sdks page - Remove main from 404 and index pages - Remove style from Link component - Replace Button with Link component - Replace a tag with Link component - Rename border color css variable - Rename nav class names - Rename nav class names *Bump version to 1.3.0* *Upgrade to yarn 4.X*
1 parent 4e8fc8b commit e4abf42

27 files changed

+8334
-5197
lines changed

.gitignore

+8
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,14 @@ yarn-debug.log*
1111
yarn-error.log*
1212
pnpm-debug.log*
1313

14+
# yarn
15+
.pnp.*
16+
.yarn/*
17+
!.yarn/patches
18+
!.yarn/plugins
19+
!.yarn/releases
20+
!.yarn/sdks
21+
!.yarn/versions
1422

1523
# environment variables
1624
.env

.vscode/settings.json

-3
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,6 @@
2929
"typescript.updateImportsOnFileMove.enabled": "always",
3030
"javascript.updateImportsOnFileMove.enabled": "always",
3131
"prettier.documentSelectors": ["**/*.astro"],
32-
"[astro]": {
33-
"editor.defaultFormatter": "esbenp.prettier-vscode"
34-
},
3532
"eslint.validate": [
3633
"javascript",
3734
"javascriptreact",

.yarnrc.yml

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
nodeLinker: node-modules

README.md

+1-10
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ This repository contains the source code required to build the [HawAPI](https://
55
## Topics
66

77
- [Prerequisites](#prerequisites)
8-
- [Dependencies](#dependencies)
98
- [Setup](#usage)
109
- [Scripts](#scripts)
1110
- [Contributing](#contributing)
@@ -14,17 +13,9 @@ This repository contains the source code required to build the [HawAPI](https://
1413
## Prerequisites
1514

1615
- Text editor or IDE (VsCode, Subline, Noteped++)
17-
- Npm/Yarn
16+
- Yarn
1817
- [Astro](https://astro.build/) for [website](https://github.com/HawAPI/website) generation
1918

20-
## Dependencies
21-
22-
- [@astrojs/sitemap](https://www.npmjs.com/package/@astrojs/sitemap)
23-
- [astro](https://www.npmjs.com/package/astro)
24-
- [astro-compress](https://www.npmjs.com/package/astro-compress)
25-
- [eslint](https://www.npmjs.com/package/eslint)
26-
- [prettier](https://www.npmjs.com/package/prettier)
27-
2819
## Setup
2920

3021
Step by step of how to run the application.

astro.config.mjs

+12-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@ import sitemap from '@astrojs/sitemap';
22
import { defineConfig } from 'astro/config';
33

44
import compress from 'astro-compress';
5+
import rename from 'astro-rename';
6+
7+
import HashRenamer from './src/lib/hash-renamer';
8+
9+
const renamer = new HashRenamer();
510

611
// https://astro.build/config
712
export default defineConfig({
@@ -19,7 +24,13 @@ export default defineConfig({
1924
// Astro sitemap.
2025
//
2126
// Ref: https://docs.astro.build/en/guides/integrations-guide/sitemap/
22-
integrations: [sitemap(), compress()],
27+
integrations: [
28+
sitemap(),
29+
rename({
30+
rename: { except: ['title'], strategy: (key) => renamer.rename(key) },
31+
}),
32+
compress(),
33+
],
2334
// Listen on all addresses, including LAN and public addresses.
2435
//
2536
// Ref: https://docs.astro.build/en/reference/configuration-reference/#serverhost

package.json

+12-10
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,26 @@
11
{
2-
"name": "@hawapi/root",
3-
"version": "1.2.0",
2+
"name": "@hawapi/website",
3+
"packageManager": "yarn@4.0.1",
4+
"version": "1.3.0",
45
"private": true,
56
"scripts": {
67
"dev": "astro dev",
78
"build": "astro build",
89
"clean": "rm -rf ./build"
910
},
1011
"devDependencies": {
11-
"@astrojs/sitemap": "^3.0.0",
12-
"@typescript-eslint/eslint-plugin": "^6.7.2",
13-
"@typescript-eslint/parser": "^6.7.2",
14-
"astro": "^3.1.1",
15-
"astro-compress": "^2.0.12",
12+
"@astrojs/sitemap": "^3.0.3",
13+
"@typescript-eslint/eslint-plugin": "^6.9.1",
14+
"@typescript-eslint/parser": "^6.9.1",
15+
"astro": "^3.4.2",
16+
"astro-compress": "^2.2.0",
1617
"astro-icon": "^0.8.1",
17-
"eslint": "^8.49.0",
18+
"astro-rename": "^1.1.1",
19+
"eslint": "^8.52.0",
1820
"eslint-config-prettier": "^9.0.0",
19-
"eslint-plugin-astro": "^0.29.0",
21+
"eslint-plugin-astro": "^0.29.1",
2022
"prettier": "^3.0.3",
21-
"prettier-plugin-astro": "^0.12.0",
23+
"prettier-plugin-astro": "^0.12.1",
2224
"svgo": "2.8.0"
2325
}
2426
}

public/styles/swagger-ui.css

+7-7
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
+11-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
---
2+
23
---
34

45
<span class="background-effect"></span>
@@ -7,13 +8,20 @@
78
.background-effect {
89
width: 0px;
910
height: 0px;
10-
border-left: 32rem solid transparent;
11-
border-right: 32rem solid transparent;
12-
border-top: 70rem solid red;
11+
border-left: 26.6vw solid transparent;
12+
border-right: 26.6vw solid transparent;
13+
border-top: 60vh solid red;
1314
filter: blur(120px);
1415
top: 0;
1516
opacity: 0.15;
1617
position: absolute;
1718
pointer-events: none;
1819
}
20+
21+
@media (max-width: 768px) {
22+
.background-effect {
23+
border-left: 50vw solid transparent;
24+
border-right: 50vw solid transparent;
25+
}
26+
}
1927
</style>

src/components/core/Button.astro

-34
This file was deleted.

src/components/core/Description.astro

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
interface Props {
3+
value?: string;
4+
margin?: string;
5+
}
6+
7+
const { value, margin = '1rem' } = Astro.props;
8+
---
9+
10+
<p class="description-container">
11+
{value ?? <slot />}
12+
</p>
13+
14+
<style define:vars={{ margin }}>
15+
.description-container {
16+
text-align: center;
17+
margin: var(--margin);
18+
}
19+
</style>

src/components/core/Link.astro

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
---
2+
interface Props {
3+
name?: string;
4+
title: string;
5+
href: string;
6+
isLocal?: boolean;
7+
active?: boolean;
8+
id?: string;
9+
classes?: string[];
10+
}
11+
12+
const { name, title, href, isLocal, id, classes } = Astro.props as Props;
13+
---
14+
15+
<a
16+
class:list={['link-item', classes]}
17+
href={href}
18+
rel={isLocal ? undefined : 'noopener noreferrer'}
19+
target={isLocal ? undefined : '_blank'}
20+
id={id}
21+
title={title}
22+
>
23+
{name ?? <slot />}
24+
</a>
25+
26+
<style>
27+
.link-item {
28+
display: initial;
29+
}
30+
</style>

src/components/core/LinkBox.astro

+50
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
---
2+
interface Props {
3+
name: string;
4+
title: string;
5+
href: string;
6+
isLocal?: boolean;
7+
active?: boolean;
8+
id?: string;
9+
}
10+
11+
const { name, title, href, isLocal, active, id } = Astro.props as Props;
12+
---
13+
14+
<a
15+
class:list={['link-box', active ? 'active' : undefined]}
16+
href={href}
17+
rel={isLocal ? undefined : 'noopener noreferrer'}
18+
target={isLocal ? undefined : '_blank'}
19+
id={id}
20+
title={title}
21+
>
22+
{name}
23+
</a>
24+
25+
<style>
26+
.link-box {
27+
display: flex;
28+
height: 2.5rem;
29+
width: 8rem;
30+
border-radius: var(--border-radius);
31+
align-items: center;
32+
justify-content: center;
33+
transition: all 0.5s;
34+
cursor: pointer;
35+
border: 1px solid rgb(179, 2, 2);
36+
color: white;
37+
}
38+
39+
.link-box:hover {
40+
background-color: var(--secondary-color);
41+
}
42+
43+
.active {
44+
background-color: var(--secondary-color);
45+
}
46+
47+
.active:hover {
48+
background-color: rgb(151, 0, 0);
49+
}
50+
</style>

0 commit comments

Comments
 (0)