Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f55b92868c
|
||
|
|
f5e416beeb
|
||
|
|
d6824425f1
|
||
|
|
d880bcaa3a
|
Generated
+2
-2
@@ -1,11 +1,11 @@
|
|||||||
{
|
{
|
||||||
"name": "cerebellum",
|
"name": "dynamicbrain",
|
||||||
"version": "2.0.0",
|
"version": "2.0.0",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "cerebellum",
|
"name": "dynamicbrain",
|
||||||
"version": "2.0.0",
|
"version": "2.0.0",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@dr.pogodin/react-helmet": "^3.2.3",
|
"@dr.pogodin/react-helmet": "^3.2.3",
|
||||||
|
|||||||
@@ -317,4 +317,5 @@ ul.mainmenu {
|
|||||||
selector on white. */
|
selector on white. */
|
||||||
.leftcolumn .blockContent select {
|
.leftcolumn .blockContent select {
|
||||||
background-color: #ffffff;
|
background-color: #ffffff;
|
||||||
|
color: #000000;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -77,4 +77,5 @@
|
|||||||
.database :global(.fieldDate input),
|
.database :global(.fieldDate input),
|
||||||
.database :global(.listTable select) {
|
.database :global(.listTable select) {
|
||||||
background-color: #ffffff;
|
background-color: #ffffff;
|
||||||
|
color: #000000;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,6 +18,7 @@
|
|||||||
margin: 3px 3px 10px;
|
margin: 3px 3px 10px;
|
||||||
/* sanitize.css forms.css leaves buttons transparent */
|
/* sanitize.css forms.css leaves buttons transparent */
|
||||||
background-color: #ffffff;
|
background-color: #ffffff;
|
||||||
|
color: #000000;
|
||||||
}
|
}
|
||||||
|
|
||||||
.indexTree div span {
|
.indexTree div span {
|
||||||
@@ -43,26 +44,37 @@
|
|||||||
display: inline-block;
|
display: inline-block;
|
||||||
height: 20px;
|
height: 20px;
|
||||||
width: 9px;
|
width: 9px;
|
||||||
background: url(../assets/images/tree_line.png);
|
background: url(../assets/images/tree_line.png) no-repeat -18px 0;
|
||||||
}
|
}
|
||||||
.indexTree:global(.rc-tree .rc-tree-treenode .rc-tree-indent .rc-tree-indent-unit:not(:last-child)) {
|
/* treeData has a single root, so the first indent unit never carries a line. */
|
||||||
|
.indexTree:global(.rc-tree .rc-tree-treenode .rc-tree-indent .rc-tree-indent-unit:first-child) {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
.indexTree:global(.rc-tree .rc-tree-treenode .rc-tree-indent .rc-tree-indent-unit:not(.rc-tree-indent-unit-end)) {
|
||||||
background-position: -9px 0;
|
background-position: -9px 0;
|
||||||
}
|
}
|
||||||
.indexTree:global(
|
/* The node's own branch (├ or └) is drawn after the indent units. */
|
||||||
.rc-tree .rc-tree-treenode .rc-tree-indent .rc-tree-indent-unit:not(:last-child).rc-tree-indent-unit-end
|
.indexTree:global(.rc-tree .rc-tree-treenode .rc-tree-indent)::after {
|
||||||
) {
|
content: "";
|
||||||
background-position: -18px 0;
|
display: inline-block;
|
||||||
|
vertical-align: bottom;
|
||||||
|
height: 20px;
|
||||||
|
width: 9px;
|
||||||
|
background: url(../assets/images/tree_line.png) no-repeat 0 0;
|
||||||
}
|
}
|
||||||
.indexTree:global(.rc-tree .rc-tree-treenode .rc-tree-indent .rc-tree-indent-unit:last-child.rc-tree-indent-unit-end) {
|
.indexTree:global(.rc-tree .rc-tree-treenode.rc-tree-treenode-leaf-last .rc-tree-indent)::after {
|
||||||
background-position: -27px 0;
|
background-position: -27px 0;
|
||||||
}
|
}
|
||||||
|
.indexTree:global(.rc-tree .rc-tree-treenode:first-child .rc-tree-indent)::after {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
.indexTree:global(.rc-tree .rc-tree-treenode .rc-tree-switcher) {
|
.indexTree:global(.rc-tree .rc-tree-treenode .rc-tree-switcher) {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
height: 20px;
|
height: 20px;
|
||||||
width: 16px;
|
width: 16px;
|
||||||
margin-right: 2px;
|
margin-right: 2px;
|
||||||
background: url(../assets/images/tree_node.png);
|
background: url(../assets/images/tree_node.png) no-repeat;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
.indexTree:global(.rc-tree .rc-tree-treenode:first-child .rc-tree-switcher.rc-tree-switcher-noop) {
|
.indexTree:global(.rc-tree .rc-tree-treenode:first-child .rc-tree-switcher.rc-tree-switcher-noop) {
|
||||||
|
|||||||
+28
-1
@@ -20,7 +20,34 @@ const staticContents = (): Plugin => {
|
|||||||
// browser revalidates against the ETag instead of falling back to
|
// browser revalidates against the ETag instead of falling back to
|
||||||
// heuristic caching. Without it a re-dump, or another site served
|
// heuristic caching. Without it a re-dump, or another site served
|
||||||
// from the same localhost port, is answered from a stale cache.
|
// from the same localhost port, is answered from a stale cache.
|
||||||
middlewares.use(sirv(dir, { dev, etag: true, maxAge: 0 }));
|
const serve = sirv(dir, { dev, etag: true, maxAge: 0 });
|
||||||
|
middlewares.use((req, res, next) => {
|
||||||
|
// sirv decodes the path with decodeURI, which leaves reserved
|
||||||
|
// characters such as %26 (&) and %23 (#) encoded, so a file like
|
||||||
|
// `CFP&Reg.png` is not found. sirv reuses `req._parsedUrl` when
|
||||||
|
// it was parsed from the same `req.url`, so hand it the path
|
||||||
|
// decoded the way Apache resolves it.
|
||||||
|
const raw = req.url ?? '/';
|
||||||
|
const idx = raw.search(/[?#]/);
|
||||||
|
const pathname = idx === -1 ? raw : raw.slice(0, idx);
|
||||||
|
if (pathname.includes('%')) {
|
||||||
|
try {
|
||||||
|
const decoded = pathname.split('/').map(decodeURIComponent).join('/');
|
||||||
|
if (!decoded.includes('%')) {
|
||||||
|
(req as typeof req & { _parsedUrl?: object })._parsedUrl = {
|
||||||
|
pathname: decoded,
|
||||||
|
search: '',
|
||||||
|
query: undefined,
|
||||||
|
hash: undefined,
|
||||||
|
raw,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
} catch {
|
||||||
|
// leave malformed escapes to sirv
|
||||||
|
}
|
||||||
|
}
|
||||||
|
serve(req, res, next);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
return {
|
return {
|
||||||
|
|||||||
Reference in New Issue
Block a user