mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-07-27 18:12:29 +08:00
chore(share): bring back CSS
This commit is contained in:
parent
098cd19b18
commit
7451c2701e
@ -252,6 +252,11 @@
|
|||||||
"glob": "**/*",
|
"glob": "**/*",
|
||||||
"input": "packages/share-theme/src/templates",
|
"input": "packages/share-theme/src/templates",
|
||||||
"output": "share-theme/templates"
|
"output": "share-theme/templates"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"glob": "**/*",
|
||||||
|
"input": "packages/share-theme/dist",
|
||||||
|
"output": "share-theme/public"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -13,10 +13,7 @@
|
|||||||
<link rel="shortcut icon" href="../favicon.ico">
|
<link rel="shortcut icon" href="../favicon.ico">
|
||||||
<% } %>
|
<% } %>
|
||||||
<script src="<%= appPath %>/share.js" type="module"></script>
|
<script src="<%= appPath %>/share.js" type="module"></script>
|
||||||
<link href="<%= assetPath %>/src/share.css" rel="stylesheet">
|
<link href="assets/styles.css" rel="stylesheet">
|
||||||
<% if (!note.isLabelTruthy("shareOmitDefaultCss")) { %>
|
|
||||||
<link href="<%= assetPath %>/stylesheets/share.css" rel="stylesheet">
|
|
||||||
<% } %>
|
|
||||||
<% for (const cssRelation of note.getRelations("shareCss")) { %>
|
<% for (const cssRelation of note.getRelations("shareCss")) { %>
|
||||||
<link href="api/notes/<%= cssRelation.value %>/download" rel="stylesheet">
|
<link href="api/notes/<%= cssRelation.value %>/download" rel="stylesheet">
|
||||||
<% } %>
|
<% } %>
|
||||||
|
@ -48,6 +48,7 @@ async function register(app: express.Application) {
|
|||||||
app.use(`/assets/vX/stylesheets`, express.static(path.join(srcRoot, "public/stylesheets")));
|
app.use(`/assets/vX/stylesheets`, express.static(path.join(srcRoot, "public/stylesheets")));
|
||||||
app.use(`/${assetUrlFragment}/libraries`, persistentCacheStatic(path.join(srcRoot, "public/libraries")));
|
app.use(`/${assetUrlFragment}/libraries`, persistentCacheStatic(path.join(srcRoot, "public/libraries")));
|
||||||
app.use(`/assets/vX/libraries`, express.static(path.join(srcRoot, "..", "libraries")));
|
app.use(`/assets/vX/libraries`, express.static(path.join(srcRoot, "..", "libraries")));
|
||||||
|
app.use(`/share/assets`, express.static(path.join(resourceDir, "share-theme", "public")));
|
||||||
}
|
}
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
@ -51,6 +51,9 @@ const customServerYml = `- url: "{protocol}://{domain}:{port}/etapi"
|
|||||||
<% if (note.type === "text" || note.type === "book") { %>
|
<% if (note.type === "text" || note.type === "book") { %>
|
||||||
<link href="../<%= assetPath %>/libraries/ckeditor/ckeditor-content.css" rel="stylesheet">
|
<link href="../<%= assetPath %>/libraries/ckeditor/ckeditor-content.css" rel="stylesheet">
|
||||||
<% } %>
|
<% } %>
|
||||||
|
<% if (!note.isLabelTruthy("shareOmitDefaultCss")) { %>
|
||||||
|
<link href="assets/styles.css" rel="stylesheet">
|
||||||
|
<% } %>
|
||||||
<% for (const cssRelation of note.getRelations("shareCss")) { %>
|
<% for (const cssRelation of note.getRelations("shareCss")) { %>
|
||||||
<link href="api/notes/<%= cssRelation.value %>/download" rel="stylesheet">
|
<link href="api/notes/<%= cssRelation.value %>/download" rel="stylesheet">
|
||||||
<% } %>
|
<% } %>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user