diff --git a/client/src/assets/semantic-helper.css b/client/src/assets/semantic-helper.css index 6570dc4..f13e2d5 100644 --- a/client/src/assets/semantic-helper.css +++ b/client/src/assets/semantic-helper.css @@ -229,17 +229,18 @@ a:hover { .squire-box a { cursor: pointer; } - .note-card-text i, +/* .note-card-text i, .squire-box i { padding: 0.5em 0.99em; border: 1px solid #CCC; margin: 1px; border-radius: 9px; display: inline-block; - } + }*/ .squire-box p { margin-bottom: 0; } + .note-card-text blockquote, .squire-box blockquote { margin: 0; padding: 0.8em; @@ -249,6 +250,7 @@ a:hover { max-width:100%; height: auto; max-height: 200px; + margin: 10px 0 0; } .squire-box img { max-width:100%; diff --git a/client/src/components/NoteTitleDisplayCard.vue b/client/src/components/NoteTitleDisplayCard.vue index 120eb20..dbc9ebd 100644 --- a/client/src/components/NoteTitleDisplayCard.vue +++ b/client/src/components/NoteTitleDisplayCard.vue @@ -3,96 +3,87 @@ :style="{'background-color':color, 'color':fontColor, 'border-color':color }" :class="{'currently-open':currentlyOpen}" > - -
\
\<\/p\>/g,'')
+}
+
ProcessText.getUrlsFromString = (string) => {
const urlPattern = /(?:(?:https?|ftp|file):\/\/|www\.|ftp\.)(?:\([-A-Z0-9+&@#/%=~_|$?!:,.]*\)|[-A-Z0-9+&@#/%=~_|$?!:,.])*(?:\([-A-Z0-9+&@#/%=~_|$?!:,.]*\)|[A-Z0-9+&@#/%=~_|$])/igm
return string.match(urlPattern)
@@ -40,7 +52,19 @@ ProcessText.deduceNoteTitle = (inString) => {
//Remove inline styles that may be added by editor
inString = inString.replace(/style=".*?"/g,'')
- // inString = inString.replace('','')
+
+ const tagFreeLength = ProcessText.removeHtml(inString).length
+
+ if(tagFreeLength < 100){
+ title = ProcessText.stripBlankHtmlLines(inString)
+ return {title, sub}
+ }
+
+ //Primare Case - Short notes
+ if(tagFreeLength < 300){
+ sub = ProcessText.stripBlankHtmlLines(inString)
+ return {title, sub}
+ }
//Emergency ending tag if truncated. This will help regex find all the lines
inString += ''
@@ -60,7 +84,7 @@ ProcessText.deduceNoteTitle = (inString) => {
const endTags = ['