Remove word-wrap and set column max-width

This commit is contained in:
Radhi Fadlillah 2018-03-07 08:01:47 +07:00
parent df63d31e9a
commit d735ca1f8b
4 changed files with 15 additions and 12 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -90,7 +90,7 @@
<a v-for="tag in search.tags" @click="removeSearchParam('#'+tag)">#{{tag}}</a>
</div>
<div id="grid">
<div v-for="column in gridColumns" class="column">
<div v-for="column in gridColumns" class="column" :style="{maxWidth: columnWidth}">
<div v-for="item in column" class="bookmark" :class="{checked: isBookmarkChecked(item.index)}" :ref="'bookmark-'+item.index">
<a class="checkbox" @click="toggleBookmarkCheck(item.index)">
<i class="fas fa-check"></i>
@ -535,6 +535,12 @@
return finalContent;
},
columnWidth: function () {
var nColumn = Math.round(this.windowWidth / 500),
percent = Math.round(100 / nColumn * 1000) / 1000;
return percent + "%";
}
},
watch: {
'inputBookmark.url': function (newURL) {

View file

@ -538,6 +538,8 @@
color: @fontColor;
font-size: 1.3em;
font-weight: 600;
text-overflow: ellipsis;
overflow: hidden;
}
.bookmark-url {
.bookmark-time;
@ -586,6 +588,8 @@
.bookmark-excerpt {
padding: 16px 16px 0;
color: @fontColor;
text-overflow: ellipsis;
overflow: hidden;
}
.bookmark-tags {
display: flex;
@ -652,11 +656,4 @@
color: white;
}
}
@supports not (hyphens: auto) {
.bookmark-title,
.bookmark-url,
.bookmark-excerpt {
word-break: break-all;
}
}
}