note preview, closes #1

This commit is contained in:
Mo Bitar
2017-01-21 19:35:26 -06:00
parent a5976b0416
commit e06b98059f
2 changed files with 18 additions and 2 deletions

View File

@@ -41,8 +41,9 @@
.note {
width: 100%;
// max-width: 100%;
padding: 15px;
height: 70px;
// height: 70px;
border-bottom: 1px solid $bg-color;
cursor: pointer;
background-color: white;
@@ -58,6 +59,19 @@
margin-top: 4px;
}
.note-preview {
font-size: 15px;
margin-top: 1px;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 1; /* number of lines to show */
$line-height: 18px;
line-height: $line-height; /* fallback */
max-height: calc(#{$line-height} * 1); /* fallback */
}
&.selected {
background-color: $blue-color;
color: white;

View File

@@ -20,6 +20,8 @@
.note{"ng-repeat" => "note in ctrl.tag.notes | filter: ctrl.filterNotes",
"ng-click" => "ctrl.selectNote(note)", "ng-class" => "{'selected' : ctrl.selectedNote == note}"}
.name
.name{"ng-if" => "note.title"}
{{note.title}}
.note-preview
{{note.text}}
.date {{(note.created_at | appDateTime) || 'Now'}}