Skip to content

Commit

Permalink
✨ feat: 🌐 优化了加载页面的HTML结构和样式,并引入了bootstrapbootstrap-icons
Browse files Browse the repository at this point in the history
  • Loading branch information
vnobo committed Jun 5, 2024
1 parent 2598254 commit 69b02e6
Show file tree
Hide file tree
Showing 6 changed files with 114 additions and 19 deletions.
36 changes: 29 additions & 7 deletions ui-work/angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,33 @@
{
"glob": "**/*",
"input": "projects/web/public"
},
{
"glob": "**/*",
"input": "./node_modules/@ant-design/icons-angular/src/inline-svg/",
"output": "/assets/"
}
],
"styles": [
"projects/web/src/styles.scss"
{
"input": "bootstrap/dist/css/bootstrap.css",
"bundleName": "bootstrap-module"
},
{
"input": "bootstrap-icons/font/bootstrap-icons.css",
"bundleName": "icons-module"
},
{
"input": "projects/web/src/styles.scss",
"bundleName": "main-module"
}
],
"scripts": [
{
"input": "bootstrap/dist/js/bootstrap.js",
"bundleName": "bootstrap-module"
}
],
"scripts": [],
"server": "projects/web/src/main.server.ts",
"prerender": true,
"ssr": {
Expand All @@ -79,13 +100,13 @@
"budgets": [
{
"type": "initial",
"maximumWarning": "500kB",
"maximumError": "1MB"
"maximumWarning": "1024kB",
"maximumError": "2MB"
},
{
"type": "anyComponentStyle",
"maximumWarning": "2kB",
"maximumError": "4kB"
"maximumWarning": "32kB",
"maximumError": "64kB"
}
],
"outputHashing": "all"
Expand All @@ -105,7 +126,8 @@
"buildTarget": "web:build:production"
},
"development": {
"buildTarget": "web:build:development"
"buildTarget": "web:build:development",
"proxyConfig": "proxy.conf.json"
}
},
"defaultConfiguration": "development"
Expand Down
48 changes: 48 additions & 0 deletions ui-work/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions ui-work/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@
"express": "^4.18.2",
"rxjs": "~7.8.0",
"tslib": "^2.3.0",
"zone.js": "~0.14.3"
"zone.js": "~0.14.3",
"bootstrap": "^5.3.3",
"bootstrap-icons": "^1.11.3"
},
"devDependencies": {
"@angular-devkit/build-angular": "^18.0.2",
Expand All @@ -42,4 +44,4 @@
"ng-packagr": "^18.0.0",
"typescript": "~5.4.2"
}
}
}
17 changes: 14 additions & 3 deletions ui-work/projects/web/src/index.html
Original file line number Diff line number Diff line change
@@ -1,13 +1,24 @@
<!doctype html>
<html lang="en">
<html lang="zh">
<head>
<meta charset="utf-8">
<title>Web</title>
<meta content="width=device-width, initial-scale=1, viewport-fit=cover" name="viewport"/>
<meta content="ie=edge" http-equiv="X-UA-Compatible"/>
<title>Loading page ....</title>
<base href="/">
<meta content="width=device-width, initial-scale=1" name="viewport">
<link href="favicon.ico" rel="icon" type="image/x-icon">
</head>
<body>
<app-root></app-root>
<app-root>
<div class="d-flex justify-content-center align-items-center h-100 bg-success">
<div class="d-block text-center">
<div class="spinner-border text-warning" role="status" style="width: 5rem; height: 5rem;">
<span class="visually-hidden">Loading...</span>
</div>
<span class="d-flex align-self-center" role="status" style="font-size: 3rem;">Loading...</span>
</div>
</div>
</app-root>
</body>
</html>
11 changes: 11 additions & 0 deletions ui-work/proxy.conf.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"/api": {
"target": "http://localhost:8080",
"secure": false,
"pathRewrite": {
"^/api": ""
},
"changeOrigin": true,
"logLevel": "debug"
}
}
15 changes: 8 additions & 7 deletions ui/projects/web/src/index.html
Original file line number Diff line number Diff line change
@@ -1,22 +1,23 @@
<!DOCTYPE html>
<html lang="zh">

<head>
<meta charset="utf-8">
<meta content="width=device-width, initial-scale=1, viewport-fit=cover" name="viewport" />
<meta content="ie=edge" http-equiv="X-UA-Compatible" />
<meta content="width=device-width, initial-scale=1, viewport-fit=cover" name="viewport"/>
<meta content="ie=edge" http-equiv="X-UA-Compatible"/>
<title>Loading page ....</title>
<base href="/">
<link href="favicon.ico" rel="icon" type="image/x-icon" />
<link href="favicon.ico" rel="icon" type="image/x-icon"/>
</head>
<body>
<app-root><div class="d-flex justify-content-center align-items-center h-100 bg-success">
<app-root>
<div class="d-flex justify-content-center align-items-center h-100 bg-success">
<div class="d-block text-center">
<div class="spinner-border text-warning" role="status" style="width: 5rem; height: 5rem;">
<span class="visually-hidden">Loading...</span>
</div>
<span class="d-flex align-self-center" role="status" style="font-size: 3rem;">Loading...</span>
</div>
</div></app-root>
</div>
</app-root>
</body>
</html>
</html>

0 comments on commit 69b02e6

Please sign in to comment.