mirror of
				https://github.com/zadam/trilium.git
				synced 2025-10-31 02:16:05 +01:00 
			
		
		
		
	removed detail.css, added to individual type widgets
This commit is contained in:
		| @@ -259,8 +259,7 @@ export default class NoteDetailWidget extends TabAwareWidget { | |||||||
|                 "libraries/bootstrap/css/bootstrap.min.css", |                 "libraries/bootstrap/css/bootstrap.min.css", | ||||||
|                 "stylesheets/print.css", |                 "stylesheets/print.css", | ||||||
|                 "stylesheets/relation_map.css", |                 "stylesheets/relation_map.css", | ||||||
|                 "stylesheets/themes.css", |                 "stylesheets/themes.css" | ||||||
|                 "stylesheets/detail.css" |  | ||||||
|             ], |             ], | ||||||
|             debug: true |             debug: true | ||||||
|         }); |         }); | ||||||
|   | |||||||
| @@ -35,6 +35,76 @@ const ZOOMS = { | |||||||
|  |  | ||||||
| const TPL = ` | const TPL = ` | ||||||
| <div class="note-detail-book note-detail-printable"> | <div class="note-detail-book note-detail-printable"> | ||||||
|  |     <style> | ||||||
|  |     /* | ||||||
|  |      * We have specific CSS file here instead of being part of the respective widgets to also include this in the printing process | ||||||
|  |      */ | ||||||
|  |      | ||||||
|  |     .note-detail-book { | ||||||
|  |         height: 100%; | ||||||
|  |         padding: 10px; | ||||||
|  |         position: relative; | ||||||
|  |     } | ||||||
|  |      | ||||||
|  |     .note-detail-book-content { | ||||||
|  |         display: flex; | ||||||
|  |         flex-wrap: wrap; | ||||||
|  |         overflow: auto; | ||||||
|  |         height: 100%; | ||||||
|  |         align-content: start; | ||||||
|  |     } | ||||||
|  |      | ||||||
|  |     .note-book-card { | ||||||
|  |         border-radius: 10px; | ||||||
|  |         background-color: var(--accented-background-color); | ||||||
|  |         padding: 15px; | ||||||
|  |         padding-bottom: 5px; | ||||||
|  |         margin: 5px; | ||||||
|  |         margin-left: 0; | ||||||
|  |         overflow: hidden; | ||||||
|  |         display: flex; | ||||||
|  |         flex-direction: column; | ||||||
|  |         flex-shrink: 0; | ||||||
|  |     } | ||||||
|  |      | ||||||
|  |     .note-book-card .note-book-card { | ||||||
|  |         border: 1px solid var(--main-border-color); | ||||||
|  |     } | ||||||
|  |      | ||||||
|  |     .note-book-content { | ||||||
|  |         overflow: hidden; | ||||||
|  |     } | ||||||
|  |      | ||||||
|  |     .note-book-card.type-image .note-book-content, .note-book-card.type-file .note-book-content, .note-book-card.type-protected-session .note-book-content { | ||||||
|  |         display: flex; | ||||||
|  |         align-items: center; | ||||||
|  |         justify-content: center; | ||||||
|  |         text-align: center; | ||||||
|  |     } | ||||||
|  |      | ||||||
|  |     .note-book-card.type-image .note-book-content img, .note-book-card.type-text .note-book-content img { | ||||||
|  |         max-width: 100%; | ||||||
|  |         max-height: 100%; | ||||||
|  |     } | ||||||
|  |      | ||||||
|  |     .note-book-title { | ||||||
|  |         flex-grow: 0; | ||||||
|  |     } | ||||||
|  |      | ||||||
|  |     .note-book-content { | ||||||
|  |         flex-grow: 1; | ||||||
|  |     } | ||||||
|  |      | ||||||
|  |     .note-book-auto-message { | ||||||
|  |         background-color: var(--accented-background-color); | ||||||
|  |         text-align: center; | ||||||
|  |         width: 100%; | ||||||
|  |         border-radius: 10px; | ||||||
|  |         padding: 5px; | ||||||
|  |         margin-top: 5px; | ||||||
|  |     } | ||||||
|  |     </style> | ||||||
|  |  | ||||||
|     <div class="btn-group floating-button" style="right: 20px; top: 20px;"> |     <div class="btn-group floating-button" style="right: 20px; top: 20px;"> | ||||||
|         <button type="button" |         <button type="button" | ||||||
|                 class="expand-children-button btn icon-button bx bx-move-vertical" |                 class="expand-children-button btn icon-button bx bx-move-vertical" | ||||||
|   | |||||||
| @@ -6,9 +6,25 @@ import TypeWidget from "./type_widget.js"; | |||||||
| const TPL = ` | const TPL = ` | ||||||
| <div class="note-detail-file note-detail-printable"> | <div class="note-detail-file note-detail-printable"> | ||||||
|     <style> |     <style> | ||||||
|         .file-table td { |         .note-detail-file { | ||||||
|  |             padding: 10px; | ||||||
|  |             display: flex; | ||||||
|  |             flex-direction: column; | ||||||
|  |             height: 100%; | ||||||
|  |         } | ||||||
|  |          | ||||||
|  |         .file-table th, .file-table td { | ||||||
|  |             padding: 5px; | ||||||
|             overflow-wrap: anywhere; |             overflow-wrap: anywhere; | ||||||
|         } |         } | ||||||
|  |          | ||||||
|  |         .file-preview-content { | ||||||
|  |             background-color: var(--accented-background-color); | ||||||
|  |             padding: 15px; | ||||||
|  |             max-height: 300px; | ||||||
|  |             overflow: auto; | ||||||
|  |             margin: 10px; | ||||||
|  |         } | ||||||
|     </style> |     </style> | ||||||
|  |  | ||||||
|     <table class="file-table"> |     <table class="file-table"> | ||||||
|   | |||||||
| @@ -5,6 +5,18 @@ import TypeWidget from "./type_widget.js"; | |||||||
|  |  | ||||||
| const TPL = ` | const TPL = ` | ||||||
| <div class="note-detail-image note-detail-printable"> | <div class="note-detail-image note-detail-printable"> | ||||||
|  |     <style> | ||||||
|  |         .note-detail-image { | ||||||
|  |             text-align: center; | ||||||
|  |             height: 100%; | ||||||
|  |             overflow: auto; | ||||||
|  |         } | ||||||
|  |          | ||||||
|  |         .note-detail-image-view { | ||||||
|  |             max-width: 100%; | ||||||
|  |         } | ||||||
|  |     </style> | ||||||
|  |  | ||||||
|     <div class="no-print" style="display: flex; justify-content: space-evenly; margin: 10px;"> |     <div class="no-print" style="display: flex; justify-content: space-evenly; margin: 10px;"> | ||||||
|         <button class="image-download btn btn-sm btn-primary" type="button">Download</button> |         <button class="image-download btn btn-sm btn-primary" type="button">Download</button> | ||||||
|  |  | ||||||
|   | |||||||
| @@ -1,97 +0,0 @@ | |||||||
| /* |  | ||||||
|  * We have specific CSS file here instead of being part of the respective widgets to also include this in the printing process |  | ||||||
|  */ |  | ||||||
|  |  | ||||||
| .note-detail-book { |  | ||||||
|     height: 100%; |  | ||||||
|     padding: 10px; |  | ||||||
|     position: relative; |  | ||||||
| } |  | ||||||
|  |  | ||||||
| .note-detail-book-content { |  | ||||||
|     display: flex; |  | ||||||
|     flex-wrap: wrap; |  | ||||||
|     overflow: auto; |  | ||||||
|     height: 100%; |  | ||||||
|     align-content: start; |  | ||||||
| } |  | ||||||
|  |  | ||||||
| .note-book-card { |  | ||||||
|     border-radius: 10px; |  | ||||||
|     background-color: var(--accented-background-color); |  | ||||||
|     padding: 15px; |  | ||||||
|     padding-bottom: 5px; |  | ||||||
|     margin: 5px; |  | ||||||
|     margin-left: 0; |  | ||||||
|     overflow: hidden; |  | ||||||
|     display: flex; |  | ||||||
|     flex-direction: column; |  | ||||||
|     flex-shrink: 0; |  | ||||||
| } |  | ||||||
|  |  | ||||||
| .note-book-card .note-book-card { |  | ||||||
|     border: 1px solid var(--main-border-color); |  | ||||||
| } |  | ||||||
|  |  | ||||||
| .note-book-content { |  | ||||||
|     overflow: hidden; |  | ||||||
| } |  | ||||||
|  |  | ||||||
| .note-book-card.type-image .note-book-content, .note-book-card.type-file .note-book-content, .note-book-card.type-protected-session .note-book-content { |  | ||||||
|     display: flex; |  | ||||||
|     align-items: center; |  | ||||||
|     justify-content: center; |  | ||||||
|     text-align: center; |  | ||||||
| } |  | ||||||
|  |  | ||||||
| .note-book-card.type-image .note-book-content img, .note-book-card.type-text .note-book-content img { |  | ||||||
|     max-width: 100%; |  | ||||||
|     max-height: 100%; |  | ||||||
| } |  | ||||||
|  |  | ||||||
| .note-book-title { |  | ||||||
|     flex-grow: 0; |  | ||||||
| } |  | ||||||
|  |  | ||||||
| .note-book-content { |  | ||||||
|     flex-grow: 1; |  | ||||||
| } |  | ||||||
|  |  | ||||||
| .note-book-auto-message { |  | ||||||
|     background-color: var(--accented-background-color); |  | ||||||
|     text-align: center; |  | ||||||
|     width: 100%; |  | ||||||
|     border-radius: 10px; |  | ||||||
|     padding: 5px; |  | ||||||
|     margin-top: 5px; |  | ||||||
| } |  | ||||||
|  |  | ||||||
| .note-detail-image { |  | ||||||
|     text-align: center; |  | ||||||
|     height: 100%; |  | ||||||
|     overflow: auto; |  | ||||||
| } |  | ||||||
|  |  | ||||||
| .note-detail-image-view { |  | ||||||
|     max-width: 100%; |  | ||||||
| } |  | ||||||
|  |  | ||||||
| .note-detail-file { |  | ||||||
|     padding: 10px; |  | ||||||
|     display: flex; |  | ||||||
|     flex-direction: column; |  | ||||||
|     height: 100%; |  | ||||||
| } |  | ||||||
|  |  | ||||||
| .file-table th, .file-table td { |  | ||||||
|     padding: 10px; |  | ||||||
|     font-size: larger; |  | ||||||
| } |  | ||||||
|  |  | ||||||
| .file-preview-content { |  | ||||||
|     background-color: var(--accented-background-color); |  | ||||||
|     padding: 15px; |  | ||||||
|     max-height: 300px; |  | ||||||
|     overflow: auto; |  | ||||||
|     margin: 10px; |  | ||||||
| } |  | ||||||
| @@ -8,8 +8,8 @@ function sanitize(dirtyHtml) { | |||||||
|             // h1 is removed since that should be note's title |             // h1 is removed since that should be note's title | ||||||
|             'h2', 'h3', 'h4', 'h5', 'h6', 'blockquote', 'p', 'a', 'ul', 'ol', |             'h2', 'h3', 'h4', 'h5', 'h6', 'blockquote', 'p', 'a', 'ul', 'ol', | ||||||
|             'li', 'b', 'i', 'strong', 'em', 'strike', 'abbr', 'code', 'hr', 'br', 'div', |             'li', 'b', 'i', 'strong', 'em', 'strike', 'abbr', 'code', 'hr', 'br', 'div', | ||||||
|             'table', 'thead', 'caption', 'tbody', 'tr', 'th', 'td', 'pre', 'section', 'figure', 'span', |             'table', 'thead', 'caption', 'tbody', 'tr', 'th', 'td', 'pre', 'section', 'img', | ||||||
|             'label', 'input' |             'figure', 'span', 'label', 'input' | ||||||
|         ], |         ], | ||||||
|         allowedAttributes: { |         allowedAttributes: { | ||||||
|             'a': [ 'href', 'class' ], |             'a': [ 'href', 'class' ], | ||||||
|   | |||||||
| @@ -81,7 +81,6 @@ | |||||||
|  |  | ||||||
| <link href="stylesheets/themes.css" rel="stylesheet"> | <link href="stylesheets/themes.css" rel="stylesheet"> | ||||||
| <link href="stylesheets/style.css" rel="stylesheet"> | <link href="stylesheets/style.css" rel="stylesheet"> | ||||||
| <link href="stylesheets/detail.css" rel="stylesheet"> |  | ||||||
|  |  | ||||||
| <script> | <script> | ||||||
|     $("body").show(); |     $("body").show(); | ||||||
|   | |||||||
| @@ -135,7 +135,6 @@ | |||||||
|  |  | ||||||
| <link href="stylesheets/themes.css" rel="stylesheet"> | <link href="stylesheets/themes.css" rel="stylesheet"> | ||||||
| <link href="stylesheets/style.css" rel="stylesheet"> | <link href="stylesheets/style.css" rel="stylesheet"> | ||||||
| <link href="stylesheets/detail.css" rel="stylesheet"> |  | ||||||
|  |  | ||||||
| <link rel="stylesheet" type="text/css" href="libraries/boxicons/css/boxicons.min.css"> | <link rel="stylesheet" type="text/css" href="libraries/boxicons/css/boxicons.min.css"> | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user