99 lines
4.6 KiB
HTML
99 lines
4.6 KiB
HTML
|
{% extends "home/base.html" %}
|
||
|
{% block content %}
|
||
|
{% load static %}
|
||
|
{% load humanize %}
|
||
|
<div class="title-bar">
|
||
|
<h1>Channel: {{ channel_info.channel_name }}</h1>
|
||
|
</div>
|
||
|
<div class="channel-banner">
|
||
|
{% if channel_info.channel_banner_url %}
|
||
|
<a href="/channel/{{ channel_info.channel_id }}/"><img src="/cache/channels/{{ channel_info.channel_id }}_banner.jpg" alt="channel_banner"></a>
|
||
|
{% endif %}
|
||
|
</div>
|
||
|
<div class="info-box info-box-3 padding-box">
|
||
|
<div class="info-box-item">
|
||
|
<div class="round-img">
|
||
|
<a href="{% url 'channel_id' channel_info.channel_id %}">
|
||
|
<img src="/cache/channels/{{ channel_info.channel_id }}_thumb.jpg" alt="channel-thumb">
|
||
|
</a>
|
||
|
</div>
|
||
|
<div>
|
||
|
<h3><a href="{% url 'channel_id' channel_info.channel_id %}">{{ channel_info.channel_name }}</a></h3>
|
||
|
{% if channel_info.channel_subs >= 1000000 %}
|
||
|
<span>Subscribers: {{ channel_info.channel_subs|intword }}</span>
|
||
|
{% else %}
|
||
|
<span>Subscribers: {{ channel_info.channel_subs|intcomma }}</span>
|
||
|
{% endif %}
|
||
|
</div>
|
||
|
</div>
|
||
|
<div class="info-box-item">
|
||
|
<div>
|
||
|
<p>Last refreshed: {{ channel_info.channel_last_refresh }}</p>
|
||
|
<p>Subscribed:
|
||
|
{% if channel_info.channel_subscribed %}
|
||
|
<button type="button" id="{{ channel_info.channel_id }}" onclick="unsubscribe(this.id)" title="Unsubscribe from {{ channel_info.channel_name }}">Unsubscribe</button>
|
||
|
{% else %}
|
||
|
false
|
||
|
{% endif %}
|
||
|
</p>
|
||
|
</div>
|
||
|
</div>
|
||
|
{% if videos %}
|
||
|
<div class="info-box-item">
|
||
|
<div>
|
||
|
{% if channel_info.channel_views >= 1000000 %}
|
||
|
<p>Channel views: {{ channel_info.channel_views|intword }}</p>
|
||
|
{% else %}
|
||
|
<p>Channel views: {{ channel_info.channel_views|intcomma }}</p>
|
||
|
{% endif %}
|
||
|
<p>Total Videos archived: {{ max_hits }}</p>
|
||
|
<p>Watched: <button title="Mark all videos from {{ channel_info.channel_name }} as watched" type="button" id="{{ channel_info.channel_id }}" onclick="isWatched(this.id)">Mark as watched</button></p>
|
||
|
<p>Channel id: {{ channel_info.channel_id }}</p>
|
||
|
</div>
|
||
|
</div>
|
||
|
{% endif %}
|
||
|
</div>
|
||
|
{% if channel_info.channel_description %}
|
||
|
<div class="info-box-item description-box">
|
||
|
<p>Description: <button onclick="textReveal()" id="text-reveal-button">Show</button></p>
|
||
|
<div id="text-reveal" class="description-text">
|
||
|
{{ channel_info.channel_description|linebreaks }}
|
||
|
</div>
|
||
|
</div>
|
||
|
{% endif %}
|
||
|
<div id="player" class="video-player"></div>
|
||
|
<h2>Videos</h2>
|
||
|
<div class="video-list">
|
||
|
{% if videos %}
|
||
|
{% for video in videos %}
|
||
|
<div class="video-item">
|
||
|
<a href="#player" data-src="/media/{{ video.source.media_url }}" data-thumb="/cache/videos/{{ video.source.youtube_id }}.jpg" data-title="{{ video.source.title }}" data-channel="{{ video.source.channel.channel_name }}" data-id="{{ video.source.youtube_id }}" onclick="createPlayer(this)">
|
||
|
<div class="video-thumb-wrap">
|
||
|
<div class="video-thumb">
|
||
|
<img src="/cache/videos/{{ video.source.youtube_id }}.jpg" alt="video-thumb">
|
||
|
</div>
|
||
|
<div class="video-play">
|
||
|
<img src="{% static 'img/icon-play.svg' %}" alt="play-icon">
|
||
|
</div>
|
||
|
</div>
|
||
|
</a>
|
||
|
<div class="video-desc">
|
||
|
<div class="video-desc-player" id="video-info-{{ video.source.youtube_id }}">
|
||
|
{% if video.source.player.watched %}
|
||
|
<img src="{% static 'img/icon-seen.svg' %}" alt="seen-icon" id="{{ video.source.youtube_id }}" class="seen-icon">
|
||
|
{% else %}
|
||
|
<img src="{% static 'img/icon-unseen.svg' %}" alt="unseen-icon" id="{{ video.source.youtube_id }}" onclick="isWatched(this.id)" class="unseen-icon" title="Mark as watched.">
|
||
|
{% endif %}
|
||
|
<span>{{ video.source.published }} | {{ video.source.player.duration_str }}</span>
|
||
|
</div>
|
||
|
<div>
|
||
|
<a class="video-more" href="{% url 'video' video.source.youtube_id %}"><h2>{{ video.source.title }}</h2></a>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
{% endfor %}
|
||
|
{% else %}
|
||
|
<h2>No videos found...</h2>
|
||
|
{% endif %}
|
||
|
</div>
|
||
|
{% endblock content %}
|