mirror of
				https://github.com/zadam/trilium.git
				synced 2025-10-30 19:19:03 +01:00 
			
		
		
		
	basic book rendering of code and image notes
This commit is contained in:
		
							parent
							
								
									dd147a7209
								
							
						
					
					
						commit
						dec2c218f7
					
				
							
								
								
									
										6
									
								
								package-lock.json
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										6
									
								
								package-lock.json
									
									
									
										generated
									
									
									
								
							| @ -3063,9 +3063,9 @@ | ||||
|       "integrity": "sha512-kS/gEPzZs3Y1rRsbGX4UOSjtP/CeJP0CxSNZHYxGfVM/VgLcv0ZqM7C45YyTj2DI2g7+P9Dd24C+IMIg6D0nYQ==" | ||||
|     }, | ||||
|     "electron": { | ||||
|       "version": "6.0.10", | ||||
|       "resolved": "https://registry.npmjs.org/electron/-/electron-6.0.10.tgz", | ||||
|       "integrity": "sha512-eTFm6uTn7NKZE1OtSZSOxNuOrCXXeUR0U3vdF3R00byB7mrNe5AOaXEDDMwtzRGGY1jMuUX9Z7RvgXaCXRYSmw==", | ||||
|       "version": "6.0.11", | ||||
|       "resolved": "https://registry.npmjs.org/electron/-/electron-6.0.11.tgz", | ||||
|       "integrity": "sha512-mi1oHmeFIQrg+CDQ6lbugZAloOxuWPm/ecEKYe1230PGlDoWND7SYStiWQ2eI4YXAEOL/NvuY88ogemu1qhdBg==", | ||||
|       "dev": true, | ||||
|       "requires": { | ||||
|         "@types/node": "^10.12.18", | ||||
|  | ||||
| @ -79,7 +79,7 @@ | ||||
|     "xml2js": "0.4.22" | ||||
|   }, | ||||
|   "devDependencies": { | ||||
|     "electron": "6.0.10", | ||||
|     "electron": "6.0.11", | ||||
|     "electron-builder": "21.2.0", | ||||
|     "electron-compile": "6.4.4", | ||||
|     "electron-installer-debian": "2.0.1", | ||||
|  | ||||
| @ -36,6 +36,18 @@ class NoteDetailBook { | ||||
|                 return $content; | ||||
|             } | ||||
|         } | ||||
|         else if (note.type === 'code') { | ||||
|             const fullNote = await server.get('notes/' + note.noteId); | ||||
| 
 | ||||
|             if (fullNote.content.trim() === "") { | ||||
|                 return ""; | ||||
|             } | ||||
| 
 | ||||
|             return $("<pre>").text(fullNote.content); | ||||
|         } | ||||
|         else if (note.type === 'image') { | ||||
|             return $("<img>").attr("src", `api/images/${note.noteId}/${note.title}`); | ||||
|         } | ||||
|         else { | ||||
|             return "<em>Content of this note cannot be displayed in the book format</em>"; | ||||
|         } | ||||
|  | ||||
| @ -820,8 +820,9 @@ a.external:not(.no-arrow):after, a[href^="http://"]:not(.no-arrow):after, a[href | ||||
| } | ||||
| 
 | ||||
| .note-book { | ||||
|     border-radius: 5px; | ||||
|     border-radius: 10px; | ||||
|     background-color: var(--accented-background-color); | ||||
|     padding: 15px; | ||||
|     margin-top: 10px; | ||||
|     margin: 10px; | ||||
|     margin-left: 0; | ||||
| } | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 zadam
						zadam