This repository has been archived on 2022-06-28. You can view files and clone it, but cannot push or open issues or pull requests.
Yotter/app/templates/ytsearch.html

97 lines
4.0 KiB
HTML
Raw Normal View History

{% extends "base.html" %}
{% block content %}
<div class="ui center aligned text container">
<form action="{{url_for('ytsearch', _method='GET')}}">
<div class="ui search">
<input class="prompt" name="q" type="text" placeholder="Search...">
<select name="s" id="sort">
<option value="0">Relevance</option>
<option value="3">Views</option>
<option value="2">Date</option>
<option value="1">Rating</option>
</select>
</div>
</form>
2020-10-05 21:44:16 +05:30
</div>
<div class="ui text container"></div>
2020-09-11 14:10:02 +05:30
{% if results %}
{% if results.channels %}
<h3 class="ui dividing header">Users</h3>
{% endif %}
<div class="ui relaxed divided list">
{% for res in results.channels %}
2020-08-17 14:32:18 +05:30
<div class="item">
2020-09-11 14:04:24 +05:30
<div class="image">
2020-10-17 16:39:08 +05:30
{% if config.isInstance %}
2020-09-27 00:07:44 +05:30
<img src="{{res.thumbnail}}" alt="Avatar">
{% else %}
<img alt="Avatar" src="{{ url_for('img', url=res.thumbnail) }}">
{% endif %}
2020-09-11 14:04:24 +05:30
</div>
<div class="content">
<a class = "header" href="{{ url_for('channel', id=res.channelId)}}">{{res.username}}</a>
<div class="meta">
<span>{{res.description}}</span>
</div>
<div class="description">
<p></p>
</div>
<div class="extra">
<div class="ui label">
<i class="user icon"></i> {{res.suscribers}}
</div>
<div class="ui label">
<i class="video icon"></i> {{res.videos}}
</div>
{% if restricted or current_user.is_authenticated %}
<div class="right floated content">
{% if not current_user.is_following_yt(res.channelId) %}
2020-08-17 14:32:18 +05:30
<form action="{{ url_for('ytfollow', channelId=res.channelId) }}" method="post">
{{ btform.hidden_tag() }}
{{ btform.submit(value='Follow') }}
</form>
2020-09-11 14:04:24 +05:30
{% else %}
2020-08-17 14:32:18 +05:30
<form action="{{ url_for('ytunfollow', channelId=res.channelId) }}" method="post">
{{ btform.hidden_tag() }}
{{ btform.submit(value='Unfollow') }}
</form>
2020-09-11 14:04:24 +05:30
{% endif %}
</div>
2020-08-17 14:32:18 +05:30
{% endif %}
2020-09-11 14:04:24 +05:30
</div>
2020-08-17 14:32:18 +05:30
</div>
</div>
2020-07-31 15:58:52 +05:30
{% endfor %}
</div>
{% endif %}
2020-08-17 14:32:18 +05:30
<div class="ui middle aligned divided list">
2020-09-11 14:04:24 +05:30
{% if results.videos %}
2020-08-30 13:35:16 +05:30
<h3 class="ui dividing header">Videos</h3>
2020-08-17 14:32:18 +05:30
<div class="ui centered cards">
2020-09-11 14:04:24 +05:30
{% for video in results.videos %}
2020-08-17 14:32:18 +05:30
{% include '_video_item.html' %}
{% endfor %}
</div>
{% endif %}
</div>
{%if ppage%}
<div class="ui text container center aligned">
<a href="{{ppage}}"><button class="ui labeled icon button">
<i class="left arrow icon"></i>
Prev
</button></a>
<a href="{{npage}}"><button class="ui right labeled icon button">
<i class="right arrow icon"></i>
Next
</button></a>
</div>
{%endif%}
</div>
{% endblock %}