@@ -10,6 +10,7 @@ import { log } from "../moreOnLog";
10
10
import { StatsView } from "src/statsView" ;
11
11
import InvioPlugin from "src/main" ;
12
12
import { Utils } from "src/utils/utils" ;
13
+ import { WMS_FOOTER , WMS_FOOTER_STYLE } from './wms-footer' ;
13
14
14
15
const LogoSVGDefault = `<svg xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" id="svg238067" height="768px" width="1024px" version="1.1" viewBox="0 0 100 100" class="svg-icon invio-sync-wait"><g fill-rule="evenodd" style="transform: scale3d(0.89, 0.99, 1.5);"><path d="M27 97.93A56.08 56.08 0 0 1 9.29 19.08 55.77 55.77 0 0 0 23.59 50l.07.07c.53.58 1.06 1.14 1.62 1.7s1.12 1.09 1.72 1.62L45.54 72a14.93 14.93 0 0 1 4.53 10.93v1.59a15.12 15.12 0 0 1-8 13.52A15.09 15.09 0 0 1 27 97.93z" style="fill: var(--icon-color);"></path><path d="M23.59 50a55.77 55.77 0 0 1-14.3-30.92A56.46 56.46 0 0 1 27 2.08 15.08 15.08 0 0 1 42.11 2a15.12 15.12 0 0 1 8 13.52v1.59A15 15 0 0 1 45.55 28l-22 22z" fill="#999999" opacity=".8"></path><path d="M85.16 2.08a56.08 56.08 0 0 1 17.67 78.84A55.77 55.77 0 0 0 88.53 50l-.08-.07c-.52-.58-1.06-1.14-1.62-1.7s-1.12-1.09-1.69-1.62L66.58 28a14.93 14.93 0 0 1-4.53-10.93v-1.55A15.12 15.12 0 0 1 70 2a15.08 15.08 0 0 1 15.15.08z" style="fill: var(--icon-color);"></path><path d="M88.53 50a55.77 55.77 0 0 1 14.3 30.92 56.35 56.35 0 0 1-17.67 17 15.46 15.46 0 0 1-23.11-13.44v-1.59A15 15 0 0 1 66.57 72l22-22z" fill="#999999" opacity=".8"></path></g></svg>`
15
16
@@ -145,7 +146,35 @@ export class HTMLGenerator {
145
146
file . downloads . push ( new Downloadable ( '_common-left-tree.html' , fileTree . outerHTML , rootDir ) ) ;
146
147
// TODO: 摆脱includeFileTree限制,定制优化index首页UI样式
147
148
if ( InvioSettingTab . settings . generateIndexPage ) {
148
- file . downloads . push ( new Downloadable ( 'index.html' , fileTree . outerHTML , rootDir ) ) ;
149
+ const indexPageHTML = `<!DOCTYPE html><html lang="zh"><head>
150
+ <title>${ prefix } </title>
151
+ <style>
152
+ .tree-container, .tree-footer {
153
+ max-width: 800px;
154
+ margin: 2rem auto;
155
+ padding: 1rem;
156
+ background: white;
157
+ box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
158
+ border-radius: 8px;
159
+ }
160
+ .tree-item.mod-tree-file {
161
+ padding: 1rem;
162
+ border-bottom: 1px solid #ddd;
163
+ }
164
+ a.tree-item-link {
165
+ text-decoration: none;
166
+ color: #2e8555;
167
+ font-weight: bold;
168
+ transition: color 0.3s;
169
+ }
170
+ .collapse-icon {
171
+ display: none;
172
+ }
173
+ .tree-scroll-area>.tree-item>.tree-item-contents { padding: 1rem; text-align: center; }
174
+ ${ WMS_FOOTER_STYLE }
175
+ </style>
176
+ </head><body>${ fileTree . outerHTML } <div class="tree-footer">${ WMS_FOOTER } </div></body></html>` ;
177
+ file . downloads . push ( new Downloadable ( 'index.html' , indexPageHTML , rootDir ) ) ;
149
178
}
150
179
}
151
180
0 commit comments