Skip to content

A Q&A platform software for teams at any scales. Whether it's a community forum, help center, or knowledge management platform, you can always count on Apache Answer.

feat(homepage): add a loading spinner for app

haitao(lj)b0adf81b8020
diff --git a/ui/public/index.html b/ui/public/index.html
index efa315fc..97b4bcb2 100644
--- a/ui/public/index.html
+++ b/ui/public/index.html
@@ -24,7 +24,34 @@
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
- <div id="root"></div>
+ <div id="root">
+ <style>
+ @keyframes _doc-spin {
+ to { transform: rotate(360deg) }
+ }
+ #doc-spinner {
+ position: fixed;
+ top: 50%;
+ left: 50%;
+ transform: translate(-50%, -50%);
+ }
+ #doc-spinner .spinner {
+ box-sizing: border-box;
+ display: inline-block;
+ width: 2rem;
+ height: 2rem;
+ vertical-align: -.125em;
+ border: .25rem solid currentColor;
+ border-right-color: transparent;
+ color: rgba(108, 117, 125, .75);
+ border-radius: 50%;
+ animation: 0.75s linear infinite _doc-spin;
+ }
+ </style>
+ <div id="doc-spinner">
+ <div class="spinner"></div>
+ </div>
+ </div>
<!--
This HTML file is a template.
If you open it directly in the browser, you will see an empty page.