mirror of
				https://github.com/TriliumNext/Notes.git
				synced 2025-10-31 21:11:30 +08:00 
			
		
		
		
	chore(share): bring back CSS
This commit is contained in:
		
							parent
							
								
									098cd19b18
								
							
						
					
					
						commit
						7451c2701e
					
				| @ -252,6 +252,11 @@ | ||||
|                 "glob": "**/*", | ||||
|                 "input": "packages/share-theme/src/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"> | ||||
|     <% } %> | ||||
|     <script src="<%= appPath %>/share.js" type="module"></script> | ||||
|     <link href="<%= assetPath %>/src/share.css" rel="stylesheet"> | ||||
|     <% if (!note.isLabelTruthy("shareOmitDefaultCss")) { %> | ||||
|         <link href="<%= assetPath %>/stylesheets/share.css" rel="stylesheet"> | ||||
|     <% } %> | ||||
|     <link href="assets/styles.css" rel="stylesheet"> | ||||
|     <% for (const cssRelation of note.getRelations("shareCss")) { %> | ||||
|         <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(`/${assetUrlFragment}/libraries`, persistentCacheStatic(path.join(srcRoot, "public/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 { | ||||
|  | ||||
| @ -51,6 +51,9 @@ const customServerYml = `- url: "{protocol}://{domain}:{port}/etapi" | ||||
|     <% if (note.type === "text" || note.type === "book") { %> | ||||
|         <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")) { %> | ||||
|         <link href="api/notes/<%= cssRelation.value %>/download" rel="stylesheet"> | ||||
|     <% } %> | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Elian Doran
						Elian Doran