Adapt full tweets title to custom navbar

This commit is contained in:
the1812 2019-08-10 13:46:08 +08:00
parent 256b772dbf
commit b817c9065c
11 changed files with 43 additions and 13 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

@ -523,6 +523,7 @@ function loadResources () {
'removeLiveWatermark', 'removeLiveWatermark',
'framePlayback', 'framePlayback',
'hideCategory', 'hideCategory',
'fullTweetsTitle',
] ]
for (const [key, data] of Object.entries(Resource.manifest)) { for (const [key, data] of Object.entries(Resource.manifest)) {
const resource = new Resource(data.path, { styles: data.styles, alwaysPreview: data.alwaysPreview }) const resource = new Resource(data.path, { styles: data.styles, alwaysPreview: data.alwaysPreview })

View File

@ -523,6 +523,7 @@ function loadResources () {
'removeLiveWatermark', 'removeLiveWatermark',
'framePlayback', 'framePlayback',
'hideCategory', 'hideCategory',
'fullTweetsTitle',
] ]
for (const [key, data] of Object.entries(Resource.manifest)) { for (const [key, data] of Object.entries(Resource.manifest)) {
const resource = new Resource(data.path, { styles: data.styles, alwaysPreview: data.alwaysPreview }) const resource = new Resource(data.path, { styles: data.styles, alwaysPreview: data.alwaysPreview })

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1 +1 @@
(()=>{return(e,l)=>{l.applyStyle("fullTweetsTitleStyle")}})(); (()=>{return(t,n)=>{const i=`\n.dynamic-m .info {\n height: auto !important;\n}\n.dynamic-m .info a {\n white-space: normal !important;\n}\n.custom-navbar .video-activity-card .title {\n display: block !important;\n max-height: unset !important;\n}\n.custom-navbar .video-activity-card .cover {\n height: unset !important;\n}\n`;return n.toggleStyle(i,"full-tweets-title")}})();

View File

@ -20,6 +20,7 @@ export function loadResources () {
'removeLiveWatermark', 'removeLiveWatermark',
'framePlayback', 'framePlayback',
'hideCategory', 'hideCategory',
'fullTweetsTitle',
] ]
for (const [key, data] of Object.entries(Resource.manifest)) { for (const [key, data] of Object.entries(Resource.manifest)) {
const resource = new Resource(data.path, { styles: data.styles, alwaysPreview: data.alwaysPreview }) const resource = new Resource(data.path, { styles: data.styles, alwaysPreview: data.alwaysPreview })

View File

@ -1231,12 +1231,22 @@ li.nav-item[report-id='playpage_dynamic'] .i-frame,
.custom-navbar .video-activity-card .cover { .custom-navbar .video-activity-card .cover {
width: var(--card-width); width: var(--card-width);
background-color: #8884; background-color: #8884;
height: calc(var(--card-width) / 16 * 10);
object-fit: cover;
} }
.custom-navbar .video-activity-card .title { .custom-navbar .video-activity-card .title {
font-size: 10pt; font-size: 10pt;
font-weight: bold; font-weight: bold;
margin: 8px 8px 2px 8px; margin: 8px 8px 2px 8px;
color: inherit; color: inherit;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
line-height: 1.4;
max-height: 2.8em;
word-break: break-all;
} }
.custom-navbar .video-activity-card .title:hover, .custom-navbar .video-activity-card .title:hover,
.custom-navbar .video-activity-card .up:hover .name { .custom-navbar .video-activity-card .up:hover .name {

View File

@ -1068,7 +1068,7 @@ class Activities extends NavbarComponent {
<div class="time">{{card.time}}</div> <div class="time">{{card.time}}</div>
<div @click.stop.prevent="toggleWatchlater()" class="watchlater"><i class="mdi" :class="{'mdi-clock-outline': !watchlater, 'mdi-check-circle': watchlater}"></i>{{watchlater ? '' : ''}}</div> <div @click.stop.prevent="toggleWatchlater()" class="watchlater"><i class="mdi" :class="{'mdi-clock-outline': !watchlater, 'mdi-check-circle': watchlater}"></i>{{watchlater ? '' : ''}}</div>
</div> </div>
<h1 class="title" :title="card.description">{{card.title}}</h1> <h1 class="title" :title="card.title">{{card.title}}</h1>
<a class="up" target="_blank" :href="card.upUrl" :title="card.upName"> <a class="up" target="_blank" :href="card.upUrl" :title="card.upName">
<dpi-img class="face" :size="24" :src="card.faceUrl"></dpi-img> <dpi-img class="face" :size="24" :src="card.faceUrl"></dpi-img>
<span class="name">{{card.upName}}</span> <span class="name">{{card.upName}}</span>

View File

@ -1 +1,16 @@
resources.applyStyle("fullTweetsTitleStyle"); const style = `
.dynamic-m .info {
height: auto !important;
}
.dynamic-m .info a {
white-space: normal !important;
}
.custom-navbar .video-activity-card .title {
display: block !important;
max-height: unset !important;
}
.custom-navbar .video-activity-card .cover {
height: unset !important;
}
`
export default resources.toggleStyle(style, 'full-tweets-title')