From de589f59a1c3bc21a013e4993b93e92582e43166 Mon Sep 17 00:00:00 2001 From: JonnyWong16 Date: Sat, 4 Nov 2017 23:12:05 -0700 Subject: [PATCH] A bit of CSS cleanup for activity cards --- data/interfaces/default/css/plexpy.css | 12 ++- .../default/current_activity_instance.html | 97 ++++++++++--------- data/interfaces/default/index.html | 2 +- 3 files changed, 58 insertions(+), 53 deletions(-) diff --git a/data/interfaces/default/css/plexpy.css b/data/interfaces/default/css/plexpy.css index b48099fc..60f42f8a 100644 --- a/data/interfaces/default/css/plexpy.css +++ b/data/interfaces/default/css/plexpy.css @@ -765,7 +765,7 @@ a .users-poster-face:hover { .dashboard-activity-info-scroller { height: 225px; width: 335px; - -webkit-flex-grow: 0; + -webkit-flex-grow: 1; flex-grow: 1; z-index: 1; } @@ -789,6 +789,10 @@ a .users-poster-face:hover { margin-bottom: 0; } .dashboard-activity-info-item { + display: flex; + flex-direction: row; + flex-wrap: nowrap; + align-items: baseline; width: 100%; margin-bottom: 5px; } @@ -803,14 +807,14 @@ a .users-poster-face:hover { text-align: right; text-transform: uppercase; line-height: 14px; - vertical-align: bottom; float: left; } .dashboard-activity-info-item .sub-value { - margin-left: 70px; + margin-left: 10px; text-align: left; line-height: 14px; - vertical-align: bottom; + -webkit-flex-grow: 1; + flex-grow: 1; } .dashboard-activity-info-time { position: absolute; diff --git a/data/interfaces/default/current_activity_instance.html b/data/interfaces/default/current_activity_instance.html index a0fc44ac..1be803c8 100644 --- a/data/interfaces/default/current_activity_instance.html +++ b/data/interfaces/default/current_activity_instance.html @@ -65,43 +65,44 @@ DOCUMENTATION :: END from plexpy import helpers import plexpy %> -
+
% if data['channel_stream'] == '0': -
+
% else: % if (data['art'] and data['art'].startswith('http')) or (data['thumb'] and data['thumb'].startswith('http')): -
+
% else: -
+
% endif % endif % if data['channel_stream'] == '0': % if data['media_type'] == 'movie': - % elif data['media_type'] == 'episode': - % elif data['media_type'] == 'track': - % elif data['media_type'] in ('photo', 'clip'): -
+
% else: -
+
% endif % else: % if data['channel_icon'].startswith('http'): -
+
% else: -
+
% endif % endif
@@ -111,13 +112,13 @@ DOCUMENTATION :: END else: no_terminate = '' %> -
+
% if _session['user_group'] == 'admin' and plexpy.CONFIG.PMS_PLEXPASS and data['session_id']: -
+
% endif @@ -135,7 +136,7 @@ DOCUMENTATION :: END
  • Quality
    -
    +
    % if data['media_type'] != 'photo' and data['quality_profile'] != 'Unknown': <% br = helpers.cast_to_int(data['stream_bitrate']) or '' @@ -154,7 +155,7 @@ DOCUMENTATION :: END % if data['optimized_version'] == '1':
  • Optimized
    -
    +
    ${data['optimized_version_profile']}
  • @@ -163,11 +164,11 @@ DOCUMENTATION :: END
    • % if _session['user_group'] == 'admin': -
      Stream
      \ +
      Stream
      \ % else:
      Stream
      % endif -
      +
      % if data['transcode_decision'] == 'transcode': Transcode % if data['transcode_throttled'] == '1': @@ -184,7 +185,7 @@ DOCUMENTATION :: END
    • Container
      -
      +
      % if data.get('stream_container_decision') == 'transcode': Transcode (${data['container'].upper()} → ${data['stream_container'].upper()}) % else: @@ -195,7 +196,7 @@ DOCUMENTATION :: END % if data['media_type'] in ('movie', 'episode', 'clip', 'photo'):
    • Video
      -
      +
      % if data['media_type'] in ('movie', 'episode', 'clip'): % if data.get('stream_video_decision') == 'transcode': <% @@ -220,7 +221,7 @@ DOCUMENTATION :: END % if data['media_type'] in ('movie', 'episode', 'clip', 'track'):
    • Audio
      -
      +
      % if data.get('stream_audio_decision') == 'transcode': Transcode (${plexpy.common.AUDIO_CODEC_OVERRIDES.get(data['audio_codec'], data['audio_codec'].upper())} ${data['audio_channel_layout'].split('(')[0].capitalize()} → ${plexpy.common.AUDIO_CODEC_OVERRIDES.get(data['stream_audio_codec'], data['stream_audio_codec'].upper())} ${data['stream_audio_channel_layout'].split('(')[0].capitalize()}) % elif data.get('stream_audio_decision') == 'copy': @@ -234,7 +235,7 @@ DOCUMENTATION :: END % if data['media_type'] in ('movie', 'episode', 'clip'):
    • Subtitle
      -
      +
      % if data['subtitles'] == '1': % if data['stream_subtitle_decision'] == 'transcode': Transcode (${data['subtitle_codec'].upper()} → ${data['stream_subtitle_codec'].upper()}) @@ -259,13 +260,13 @@ DOCUMENTATION :: END % if data['ip_address'] != 'N/A': ${'LAN' if data['local'] == '1' else 'WAN'}: ${data['ip_address']} - + % else: @@ -285,12 +286,12 @@ DOCUMENTATION :: END else: bw = str(bw) + ' kbps' %> - ${bw} - + ${bw} + % elif data['synced_version'] == '1' or data['channel_stream'] == '1': - None + None % else: - Unknown + Unknown % endif
    • @@ -301,23 +302,23 @@ DOCUMENTATION :: END
      % if data['view_offset']: ETA: - + -
      +
      - / + / % else: - ETA: Unknown
      0:00 / + ETA: Unknown
      0:00 / % endif @@ -326,8 +327,8 @@ DOCUMENTATION :: END
      -
      ${data['transcode_progress']}%
      -
      ${data['progress_percent']}%
      +
      ${data['transcode_progress']}%
      +
      ${data['progress_percent']}%
    @@ -340,7 +341,7 @@ DOCUMENTATION :: END % endif