1025 lines
38 KiB
HTML
1025 lines
38 KiB
HTML
{% extends "base.html" %}
|
|
{% block content %}
|
|
<link rel="stylesheet" href="{{ url_for('.static', filename='css/mobile_custom.css') }}"/>
|
|
<link rel="stylesheet" href="{{ url_for('.static', filename='css/' ~ arg['sub'] ~ '.css') }}"/>
|
|
|
|
|
|
<div class="content-cloak">
|
|
<form id="form_search" class="form-inline" style="text-align:left; width:100%;">
|
|
<div class="search-container">
|
|
<div class="search-group-left">
|
|
<select id="order" name="order" class="form-control custom-select">
|
|
<option value="desc">최근순</option>
|
|
<option value="asc">오래된 순</option>
|
|
</select>
|
|
<select id="option" name="option" class="form-control custom-select">
|
|
<option value="all">전체</option>
|
|
<option value="completed">완료</option>
|
|
</select>
|
|
</div>
|
|
<div class="search-group-right">
|
|
<input id="search_word" name="search_word" class="form-control custom-input" type="text" placeholder="검색어를 입력하세요..." aria-label="Search">
|
|
<button id="search" class="btn custom-btn btn-search"><i class="fa fa-search"></i></button>
|
|
<button id="reset_btn" class="btn custom-btn btn-reset"><i class="fa fa-refresh"></i></button>
|
|
</div>
|
|
</div>
|
|
</form>
|
|
<div id='page1'></div>
|
|
{# {{ macros.m_hr_head_top() }} #}
|
|
{# {{ macros.m_row_start('0') }} #}
|
|
{# {{ macros.m_col(2, macros.m_strong('Poster')) }} #}
|
|
{# {{ macros.m_col(10, macros.m_strong('Info')) }} #}
|
|
{# {{ macros.m_row_end() }} #}
|
|
{# {{ macros.m_hr_head_bottom() }} #}
|
|
<div id="list_div"></div>
|
|
<div id='page2'></div>
|
|
</div>
|
|
|
|
<!-- Custom Confirmation Modal -->
|
|
<div class="modal fade" id="confirmModal" tabindex="-1" role="dialog" aria-hidden="true">
|
|
<div class="modal-dialog modal-dialog-centered" role="document">
|
|
<div class="modal-content animate__animated animate__zoomIn" style="background: #1e293b; border: 1px solid rgba(59, 130, 246, 0.3); border-radius: 20px; box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);">
|
|
<div class="modal-body text-center" style="padding: 40px 30px;">
|
|
<div style="width: 70px; height: 70px; background: rgba(239, 68, 68, 0.1); border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto 24px;">
|
|
<i class="fa fa-trash animate__animated animate__shakeX animate__infinite" style="color: #ef4444; font-size: 30px;"></i>
|
|
</div>
|
|
<h4 style="color: #f1f5f9; font-weight: 700; margin-bottom: 12px;">정말 삭제하시겠습니까?</h4>
|
|
<p style="color: #94a3b8; font-size: 15px; margin-bottom: 32px;">한 번 삭제된 기록은 다시 복구할 수 없습니다.</p>
|
|
<div style="display: flex; gap: 12px; justify-content: center;">
|
|
<button type="button" class="custom-btn btn-reset" data-dismiss="modal" style="width: 120px;">취소</button>
|
|
<button type="button" id="confirmDeleteBtn" class="custom-btn" style="width: 120px; background: #ef4444; color: white;">삭제하기</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Animate.css & Video.js -->
|
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.1.1/animate.min.css"/>
|
|
<link href="https://vjs.zencdn.net/8.10.0/video-js.css" rel="stylesheet" />
|
|
<script src="https://vjs.zencdn.net/8.10.0/video.min.js"></script>
|
|
|
|
<!-- Video Player Modal -->
|
|
<div class="modal fade" id="videoModal" tabindex="-1" role="dialog" aria-labelledby="videoModalLabel" aria-hidden="true">
|
|
<div class="modal-dialog modal-xl" role="document">
|
|
<div class="modal-content" style="background: #0f172a; border-radius: 12px;">
|
|
<div class="modal-header" style="border-bottom: 1px solid rgba(255,255,255,0.1);">
|
|
<h5 class="modal-title" id="videoModalLabel" style="color: #f1f5f9;">비디오 플레이어</h5>
|
|
<button type="button" class="close" data-dismiss="modal" aria-label="Close" style="color: #f1f5f9;">
|
|
<span aria-hidden="true">×</span>
|
|
</button>
|
|
</div>
|
|
<div class="modal-body" style="padding: 0;">
|
|
<video id="video-player" class="video-js vjs-big-play-centered vjs-theme-fantasy" controls preload="auto" style="width: 100%; height: auto; max-height: 75vh;">
|
|
<p class="vjs-no-js">JavaScript가 필요합니다.</p>
|
|
</video>
|
|
<!-- 플레이리스트 컨트롤 UI -->
|
|
<div class="playlist-controls" style="padding: 12px 16px; background: linear-gradient(135deg, rgba(15, 23, 42, 0.95) 0%, rgba(30, 41, 59, 0.95) 100%); border-top: 1px solid rgba(255,255,255,0.1);">
|
|
<!-- 현재 재생 정보 + 버튼 -->
|
|
<div style="display: flex; align-items: center; gap: 12px; flex-wrap: wrap;">
|
|
<button id="btn-prev-ep" class="playlist-nav-btn" style="display: none;" title="이전 에피소드">
|
|
<i class="fa fa-step-backward"></i>
|
|
</button>
|
|
<div style="flex: 1; min-width: 200px;">
|
|
<div id="current-video-title" style="color: #fbbf24; font-weight: 600; font-size: 14px;"></div>
|
|
<div id="playlist-progress" style="color: #64748b; font-size: 12px; margin-top: 2px;"></div>
|
|
</div>
|
|
<button id="btn-next-ep" class="playlist-nav-btn" style="display: none;" title="다음 에피소드">
|
|
<i class="fa fa-step-forward"></i>
|
|
</button>
|
|
<button id="btn-toggle-playlist" class="playlist-toggle-btn" title="에피소드 목록">
|
|
<i class="fa fa-list"></i>
|
|
</button>
|
|
</div>
|
|
|
|
<!-- 에피소드 목록 (접히는) -->
|
|
<div id="playlist-list-container" style="display: none; margin-top: 12px; max-height: 200px; overflow-y: auto; background: rgba(0,0,0,0.3); border-radius: 8px; padding: 8px;">
|
|
<div id="playlist-list"></div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<style>
|
|
</style>
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<script src="{{ url_for('.static', filename='js/sjva_global1.js') }}"></script>
|
|
<script src="{{ url_for('.static', filename='js/sjva_ui14.js') }}"></script>
|
|
<script type="text/javascript">
|
|
var package_name = "{{arg['package_name']}}";
|
|
var sub = "{{arg['sub']}}";
|
|
var current_data = null;
|
|
|
|
$(document).ready(function () {
|
|
global_sub_request_search('1');
|
|
});
|
|
|
|
function global_sub_request_search(page, move_top = true) {
|
|
// console.log('........................')
|
|
var formData = get_formdata('#form_search')
|
|
formData += '&page=' + page;
|
|
$.ajax({
|
|
url: '/' + package_name + '/ajax/' + sub + '/web_list3',
|
|
type: "POST",
|
|
cache: false,
|
|
data: formData,
|
|
dataType: "json",
|
|
success: function (data) {
|
|
// console.log(data)
|
|
current_data = data;
|
|
if (move_top) {
|
|
window.scrollTo(0,0);
|
|
}
|
|
make_list(data.list);
|
|
make_page_html(data.paging);
|
|
}
|
|
});
|
|
}
|
|
|
|
$("#search").click(function (e) {
|
|
e.preventDefault();
|
|
global_sub_request_search('1');
|
|
});
|
|
|
|
$("body").on('click', '#page', function (e) {
|
|
e.preventDefault();
|
|
global_sub_request_search($(this).data('page'));
|
|
});
|
|
|
|
$("#reset_btn").click(function (e) {
|
|
e.preventDefault();
|
|
document.getElementById("order").value = 'desc';
|
|
document.getElementById("option").value = 'all';
|
|
document.getElementById("search_word").value = '';
|
|
global_sub_request_search('1')
|
|
});
|
|
|
|
|
|
$("body").on('click', '#json_btn', function (e) {
|
|
e.preventDefault();
|
|
var id = $(this).data('id');
|
|
for (i in current_data.list) {
|
|
if (current_data.list[i].id == id) {
|
|
m_modal(current_data.list[i])
|
|
}
|
|
}
|
|
});
|
|
|
|
$("body").on('click', '#self_search_btn', function (e) {
|
|
e.preventDefault();
|
|
var search_word = $(this).data('title');
|
|
document.getElementById("search_word").value = search_word;
|
|
global_sub_request_search('1')
|
|
});
|
|
|
|
var targetDeleteId = null;
|
|
|
|
$("body").on('click', '.btn-remove', function (e) {
|
|
e.preventDefault();
|
|
targetDeleteId = $(this).data('id');
|
|
$('#confirmModal').modal('show');
|
|
});
|
|
|
|
$('#confirmDeleteBtn').click(function() {
|
|
if (!targetDeleteId) return;
|
|
|
|
$.ajax({
|
|
url: '/' + package_name + '/ajax/' + sub + '/db_remove',
|
|
type: "POST",
|
|
cache: false,
|
|
data: {id: targetDeleteId},
|
|
dataType: "json",
|
|
success: function (data) {
|
|
$('#confirmModal').modal('hide');
|
|
if (data) {
|
|
$.notify('<strong>성공적으로 삭제되었습니다.</strong>', {
|
|
type: 'success'
|
|
});
|
|
global_sub_request_search(current_data.paging.current_page, false)
|
|
} else {
|
|
$.notify('<strong>삭제 실패</strong>', {
|
|
type: 'warning'
|
|
});
|
|
}
|
|
}
|
|
});
|
|
});
|
|
|
|
$("body").on('click', '.btn-request', function (e) {
|
|
e.preventDefault();
|
|
var content_code = $(this).data('content_code');
|
|
$(location).attr('href', '/' + package_name + '/' + sub + '/request?content_code=' + content_code)
|
|
});
|
|
|
|
$("body").on('click', '.btn-json', function (e) {
|
|
e.preventDefault();
|
|
var id = $(this).data('id');
|
|
for (i in current_data.list) {
|
|
if (current_data.list[i].id == id) {
|
|
m_modal(current_data.list[i])
|
|
}
|
|
}
|
|
});
|
|
|
|
$("body").on('click', '.btn-self-search', function (e) {
|
|
e.preventDefault();
|
|
var search_word = $(this).data('title');
|
|
document.getElementById("search_word").value = search_word;
|
|
global_sub_request_search('1')
|
|
});
|
|
|
|
// 비디오 보기 버튼 클릭 핸들러 (플레이리스트 지원)
|
|
var videoPlayer = null;
|
|
var playlist = [];
|
|
var currentPlaylistIndex = 0;
|
|
|
|
function playVideoAtIndex(index) {
|
|
if (index < 0 || index >= playlist.length) return;
|
|
currentPlaylistIndex = index;
|
|
var item = playlist[index];
|
|
var streamUrl = '/' + package_name + '/ajax/' + sub + '/stream_video?path=' + encodeURIComponent(item.path);
|
|
|
|
if (videoPlayer) {
|
|
videoPlayer.src({ type: 'video/mp4', src: streamUrl });
|
|
videoPlayer.play();
|
|
}
|
|
|
|
// 플레이리스트 UI 업데이트 (현재 파일명, 버튼 상태, 목록 표시)
|
|
updatePlaylistUI();
|
|
}
|
|
|
|
$("body").on('click', '.btn-watch', function (e) {
|
|
e.preventDefault();
|
|
var filePath = $(this).data('path');
|
|
|
|
// 플레이리스트 API 호출
|
|
$.ajax({
|
|
url: '/' + package_name + '/ajax/' + sub + '/get_playlist?path=' + encodeURIComponent(filePath),
|
|
type: 'GET',
|
|
dataType: 'json',
|
|
success: function(data) {
|
|
playlist = data.playlist || [];
|
|
currentPlaylistIndex = data.current_index || 0;
|
|
currentPlayingPath = filePath; // 실시간 갱신용 경로 저장
|
|
|
|
var streamUrl = '/' + package_name + '/ajax/' + sub + '/stream_video?path=' + encodeURIComponent(filePath);
|
|
|
|
// Video.js 초기화
|
|
if (!videoPlayer) {
|
|
videoPlayer = videojs('video-player', {
|
|
controls: true,
|
|
autoplay: false,
|
|
preload: 'auto',
|
|
fluid: true,
|
|
playbackRates: [0.5, 1, 1.5, 2],
|
|
controlBar: {
|
|
skipButtons: { forward: 10, backward: 10 }
|
|
}
|
|
});
|
|
|
|
// 비디오 종료 시 다음 에피소드 자동 재생
|
|
videoPlayer.on('ended', function() {
|
|
if (currentPlaylistIndex < playlist.length - 1) {
|
|
currentPlaylistIndex++;
|
|
playVideoAtIndex(currentPlaylistIndex);
|
|
}
|
|
});
|
|
}
|
|
|
|
videoPlayer.src({ type: 'video/mp4', src: streamUrl });
|
|
|
|
// 플레이리스트 UI 업데이트
|
|
updatePlaylistUI();
|
|
|
|
// 모달 열기
|
|
$('#videoModal').modal('show');
|
|
},
|
|
error: function() {
|
|
// 에러 시 기본 동작
|
|
var streamUrl = '/' + package_name + '/ajax/' + sub + '/stream_video?path=' + encodeURIComponent(filePath);
|
|
if (!videoPlayer) {
|
|
videoPlayer = videojs('video-player', { controls: true, fluid: true });
|
|
}
|
|
videoPlayer.src({ type: 'video/mp4', src: streamUrl });
|
|
$('#videoModal').modal('show');
|
|
}
|
|
});
|
|
});
|
|
|
|
// 플레이리스트 UI 업데이트 함수
|
|
function updatePlaylistUI() {
|
|
if (!playlist || playlist.length === 0) return;
|
|
|
|
var currentFile = playlist[currentPlaylistIndex];
|
|
$('#current-video-title').text(currentFile ? currentFile.name : '');
|
|
$('#playlist-progress').text((currentPlaylistIndex + 1) + ' / ' + playlist.length + ' 에피소드');
|
|
|
|
// 이전/다음 버튼 표시
|
|
if (currentPlaylistIndex > 0) {
|
|
$('#btn-prev-ep').show();
|
|
} else {
|
|
$('#btn-prev-ep').hide();
|
|
}
|
|
if (currentPlaylistIndex < playlist.length - 1) {
|
|
$('#btn-next-ep').show();
|
|
} else {
|
|
$('#btn-next-ep').hide();
|
|
}
|
|
|
|
// 에피소드 목록 렌더링
|
|
var listHtml = '';
|
|
for (var i = 0; i < playlist.length; i++) {
|
|
var isActive = (i === currentPlaylistIndex) ? 'active' : '';
|
|
listHtml += '<div class="playlist-item ' + isActive + '" data-index="' + i + '">';
|
|
listHtml += '<span class="ep-num">E' + (i + 1) + '</span>';
|
|
listHtml += '<span>' + playlist[i].name + '</span>';
|
|
listHtml += '</div>';
|
|
}
|
|
$('#playlist-list').html(listHtml);
|
|
}
|
|
|
|
// 이전 에피소드 버튼
|
|
$('#btn-prev-ep').click(function() {
|
|
if (currentPlaylistIndex > 0) {
|
|
currentPlaylistIndex--;
|
|
playVideoAtIndex(currentPlaylistIndex);
|
|
}
|
|
});
|
|
|
|
// 다음 에피소드 버튼
|
|
$('#btn-next-ep').click(function() {
|
|
if (currentPlaylistIndex < playlist.length - 1) {
|
|
currentPlaylistIndex++;
|
|
playVideoAtIndex(currentPlaylistIndex);
|
|
}
|
|
});
|
|
|
|
// 목록 토글 버튼
|
|
$('#btn-toggle-playlist').click(function() {
|
|
$(this).toggleClass('active');
|
|
$('#playlist-list-container').slideToggle(200);
|
|
});
|
|
|
|
// 목록 아이템 클릭
|
|
$(document).on('click', '.playlist-item', function() {
|
|
var index = parseInt($(this).data('index'));
|
|
if (index !== currentPlaylistIndex) {
|
|
currentPlaylistIndex = index;
|
|
playVideoAtIndex(index);
|
|
}
|
|
});
|
|
|
|
// 모달 닫을 때 비디오 정지 + 포커스 해제 (aria-hidden 경고 방지)
|
|
var playlistRefreshInterval = null;
|
|
var currentPlayingPath = null; // 현재 재생 중인 파일 경로 저장
|
|
|
|
function startPlaylistRefresh() {
|
|
if (playlistRefreshInterval) return;
|
|
playlistRefreshInterval = setInterval(function() {
|
|
if (!currentPlayingPath) return;
|
|
$.ajax({
|
|
url: '/' + package_name + '/ajax/' + sub + '/get_playlist?path=' + encodeURIComponent(currentPlayingPath),
|
|
type: 'GET',
|
|
dataType: 'json',
|
|
success: function(data) {
|
|
var newPlaylist = data.playlist || [];
|
|
// 새 에피소드 추가됐는지 확인
|
|
if (newPlaylist.length > playlist.length) {
|
|
var addedCount = newPlaylist.length - playlist.length;
|
|
playlist = newPlaylist;
|
|
updatePlaylistUI();
|
|
// 알림 표시
|
|
$.notify('<i class="fa fa-download"></i> ' + addedCount + '개 에피소드 추가됨!', {type: 'success'});
|
|
}
|
|
}
|
|
});
|
|
}, 10000); // 10초마다 체크
|
|
}
|
|
|
|
function stopPlaylistRefresh() {
|
|
if (playlistRefreshInterval) {
|
|
clearInterval(playlistRefreshInterval);
|
|
playlistRefreshInterval = null;
|
|
}
|
|
}
|
|
|
|
$('#videoModal').on('show.bs.modal', function() {
|
|
startPlaylistRefresh();
|
|
});
|
|
|
|
$('#videoModal').on('hide.bs.modal', function () {
|
|
stopPlaylistRefresh();
|
|
// 포커스된 요소에서 포커스 해제 (aria-hidden 경고 방지)
|
|
document.activeElement.blur();
|
|
// 목록 닫기
|
|
$('#playlist-list-container').hide();
|
|
$('#btn-toggle-playlist').removeClass('active');
|
|
});
|
|
|
|
$('#videoModal').on('hidden.bs.modal', function () {
|
|
if (videoPlayer) {
|
|
videoPlayer.pause();
|
|
}
|
|
currentPlayingPath = null;
|
|
});
|
|
|
|
function make_list(data) {
|
|
let str = '';
|
|
for (let i in data) {
|
|
const item = data[i];
|
|
const statusClass = (item.status == 'completed') ? 'status-completed' :
|
|
(item.status == 'downloading') ? 'status-downloading' :
|
|
(item.status == 'failed') ? 'status-failed' : 'status-wait';
|
|
const statusText = (item.status == 'completed') ? 'COMPLETED' :
|
|
(item.status == 'downloading') ? 'DOWNLOADING' :
|
|
(item.status == 'failed') ? 'FAIL' : 'WAITING';
|
|
|
|
// Thumbnail
|
|
let imgHtml = '';
|
|
let badgeHtml = '';
|
|
if (item.episode_no) {
|
|
badgeHtml = `<div class="episode-badge">${item.episode_no}화</div>`;
|
|
}
|
|
|
|
if (item.thumbnail) {
|
|
imgHtml = `${badgeHtml}<img src="${item.thumbnail}" onerror="this.src='https://via.placeholder.com/60x80?text=No+Img'">`;
|
|
} else {
|
|
imgHtml = `${badgeHtml}<img src="https://via.placeholder.com/60x80?text=No+Img">`;
|
|
}
|
|
|
|
// Date
|
|
let createdDate = item.created_time ? item.created_time.split(' ')[0] : '';
|
|
let completedDate = item.completed_time ? item.completed_time.split(' ')[0] : '';
|
|
let dateHtml = `<span class="meta-tag" title="요청일: ${item.created_time}"><i class="fa fa-clock-o"></i> ${createdDate}</span>`;
|
|
if (completedDate) {
|
|
dateHtml += `<span class="meta-tag" title="완료일: ${item.completed_time}"><i class="fa fa-check-circle"></i> ${completedDate}</span>`;
|
|
}
|
|
|
|
// Subtitle Line
|
|
let subtitleHtml = '';
|
|
if (item.episode_title) {
|
|
subtitleHtml = `<div class="episode-subtitle text-muted">${item.episode_title}</div>`;
|
|
}
|
|
|
|
str += `
|
|
<div class="episode-card">
|
|
<div class="episode-card-body">
|
|
<!-- Left: Thumb -->
|
|
<div class="episode-thumb">${imgHtml}</div>
|
|
|
|
<!-- Center: Main Info -->
|
|
<div class="episode-main-info">
|
|
<div class="episode-title" title="${item.title}">${item.title}</div>
|
|
${subtitleHtml}
|
|
<div class="episode-meta">
|
|
<span class="status-badge ${statusClass}">${statusText}</span>
|
|
<span class="meta-tag">S${item.season}</span>
|
|
<span class="meta-tag">E${item.episode_no}</span>
|
|
</div>
|
|
<div class="file-path" title="${item.savepath}/${item.filename}">
|
|
<i class="fa fa-folder-open-o"></i> ${item.filename}
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Right: Date & Actions -->
|
|
<div class="episode-right-col">
|
|
<div class="date-info">${dateHtml}</div>
|
|
<div class="episode-actions">
|
|
<button data-content_code="${item.content_code}" class="btn btn-outline-info btn-request">
|
|
<i class="fa fa-search"></i> 작품보기
|
|
</button>
|
|
<button data-title="${item.title}" class="btn btn-outline-secondary btn-self-search">
|
|
<i class="fa fa-list"></i> 목록검색
|
|
</button>
|
|
<button data-id="${item.id}" class="btn btn-outline-dark btn-json">
|
|
<i class="fa fa-code"></i> JSON
|
|
</button>
|
|
<button data-id="${item.id}" class="btn btn-outline-danger btn-remove">
|
|
<i class="fa fa-trash"></i> 삭제
|
|
</button>
|
|
${item.status == 'completed' ? `<button data-path="${item.savepath}/${item.filename}" class="btn btn-outline-success btn-watch"><i class="fa fa-play"></i> 보기</button>` : ''}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
`;
|
|
}
|
|
document.getElementById("list_div").innerHTML = str;
|
|
}
|
|
|
|
|
|
</script>
|
|
|
|
/* General Layout Tweaks */
|
|
.container-fluid {
|
|
padding-left: 4px !important;
|
|
padding-right: 4px !important;
|
|
max-width: 100%;
|
|
margin: 0 auto;
|
|
}
|
|
|
|
.content-cloak {
|
|
padding-top: 10px;
|
|
}
|
|
|
|
/* Search Bar Design */
|
|
.search-container {
|
|
background: rgba(30, 41, 59, 0.7);
|
|
backdrop-filter: blur(10px);
|
|
border: 1px solid rgba(255, 255, 255, 0.08);
|
|
border-radius: 12px;
|
|
padding: 10px;
|
|
margin-bottom: 20px;
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
gap: 10px;
|
|
align-items: center;
|
|
box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
|
|
}
|
|
|
|
.search-group-left {
|
|
display: flex;
|
|
gap: 8px;
|
|
flex: 0 0 auto;
|
|
}
|
|
|
|
.search-group-right {
|
|
display: flex;
|
|
gap: 8px;
|
|
flex: 1;
|
|
}
|
|
|
|
/* Custom Form Controls */
|
|
.custom-select, .custom-input {
|
|
background-color: rgba(15, 23, 42, 0.6) !important;
|
|
border: 1px solid rgba(148, 163, 184, 0.2) !important;
|
|
color: #e2e8f0 !important;
|
|
border-radius: 8px !important;
|
|
padding: 6px 12px !important;
|
|
height: 38px !important;
|
|
font-size: 13px !important;
|
|
transition: all 0.2s;
|
|
}
|
|
|
|
.custom-select:focus, .custom-input:focus {
|
|
border-color: #3b82f6 !important;
|
|
box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2) !important;
|
|
outline: none;
|
|
}
|
|
|
|
.custom-btn {
|
|
border-radius: 8px !important;
|
|
padding: 0 16px !important;
|
|
height: 38px !important;
|
|
font-weight: 600 !important;
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 6px;
|
|
transition: all 0.2s;
|
|
border: none !important;
|
|
}
|
|
|
|
.btn-search {
|
|
background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
|
|
color: white !important;
|
|
}
|
|
.btn-search:hover { box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3); transform: translateY(-1px); }
|
|
|
|
.btn-reset {
|
|
background: rgba(148, 163, 184, 0.1);
|
|
color: #94a3b8 !important;
|
|
}
|
|
.btn-reset:hover { background: rgba(148, 163, 184, 0.2); color: white !important; }
|
|
|
|
/* List Container - List View */
|
|
#list_div {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 8px;
|
|
padding: 0 5px;
|
|
width: 100%;
|
|
}
|
|
|
|
/* Episode Card Style */
|
|
.episode-card {
|
|
display: flex;
|
|
flex-direction: column;
|
|
background: linear-gradient(135deg, rgba(30, 41, 59, 0.85) 0%, rgba(15, 23, 42, 0.85) 100%);
|
|
border-radius: 12px;
|
|
border: 1px solid rgba(148, 163, 184, 0.12);
|
|
overflow: hidden;
|
|
transition: all 0.2s ease;
|
|
box-shadow: 0 1px 3px rgba(0,0,0,0.1);
|
|
position: relative;
|
|
}
|
|
|
|
.episode-card:hover {
|
|
transform: translateY(-2px);
|
|
box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
|
|
border-color: rgba(96, 165, 250, 0.4);
|
|
background: linear-gradient(135deg, rgba(30, 41, 59, 0.95) 0%, rgba(15, 23, 42, 0.95) 100%);
|
|
z-index: 10;
|
|
}
|
|
|
|
.episode-card-body {
|
|
padding: 10px;
|
|
display: flex;
|
|
flex-direction: row; /* Mobile Default: Row for proper structure */
|
|
flex-wrap: wrap; /* Allow wrapping on small mobile */
|
|
width: 100%;
|
|
}
|
|
|
|
/* Inner Components */
|
|
.episode-thumb {
|
|
width: 60px;
|
|
height: 80px;
|
|
flex-shrink: 0;
|
|
margin-right: 12px;
|
|
border-radius: 8px;
|
|
overflow: hidden;
|
|
background-color: #1e293b;
|
|
}
|
|
|
|
.episode-thumb img {
|
|
width: 100%;
|
|
height: 100%;
|
|
object-fit: cover;
|
|
}
|
|
|
|
.episode-badge {
|
|
position: absolute;
|
|
top: 5px;
|
|
left: 5px;
|
|
background: #facc15; /* Amber/Yellow 400 */
|
|
color: #000;
|
|
padding: 2px 6px;
|
|
border-radius: 4px;
|
|
font-size: 11px;
|
|
font-weight: 800;
|
|
z-index: 5;
|
|
box-shadow: 0 2px 4px rgba(0,0,0,0.3);
|
|
border: 1px solid rgba(0,0,0,0.1);
|
|
pointer-events: none;
|
|
text-transform: uppercase;
|
|
}
|
|
|
|
.episode-main-info {
|
|
flex: 1;
|
|
min-width: 0;
|
|
display: flex;
|
|
flex-direction: column;
|
|
justify-content: center;
|
|
}
|
|
|
|
.episode-title {
|
|
color: #f1f5f9;
|
|
font-weight: 600;
|
|
font-size: 14px;
|
|
line-height: 1.4;
|
|
margin-bottom: 2px;
|
|
word-break: break-all;
|
|
}
|
|
|
|
.episode-subtitle {
|
|
font-size: 12px;
|
|
color: #94a3b8;
|
|
margin-bottom: 4px;
|
|
line-height: 1.3;
|
|
display: block;
|
|
}
|
|
|
|
.episode-meta {
|
|
font-size: 11px;
|
|
color: #94a3b8;
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
gap: 6px;
|
|
align-items: center;
|
|
margin-bottom: 4px;
|
|
}
|
|
|
|
.meta-tag {
|
|
background: rgba(148, 163, 184, 0.1);
|
|
padding: 1px 5px;
|
|
border-radius: 4px;
|
|
color: #cbd5e1;
|
|
}
|
|
|
|
.status-badge {
|
|
font-size: 10px;
|
|
font-weight: 700;
|
|
padding: 2px 5px;
|
|
border-radius: 4px;
|
|
text-transform: uppercase;
|
|
min-width: 60px;
|
|
text-align: center;
|
|
}
|
|
.status-completed { background: rgba(16, 185, 129, 0.2); color: #34d399; }
|
|
.status-wait { background: rgba(245, 158, 11, 0.2); color: #fbbf24; }
|
|
.status-downloading { background: rgba(59, 130, 246, 0.2); color: #60a5fa; }
|
|
.status-failed { background: rgba(239, 68, 68, 0.2); color: #f87171; }
|
|
|
|
.file-path {
|
|
font-size: 11px;
|
|
color: #64748b;
|
|
word-break: break-all;
|
|
margin-top: 2px;
|
|
display: block;
|
|
}
|
|
|
|
/* Right Column (Mobile) */
|
|
.episode-right-col {
|
|
width: 100%;
|
|
margin-top: 10px;
|
|
padding-top: 10px;
|
|
border-top: 1px solid rgba(255, 255, 255, 0.05);
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 8px;
|
|
}
|
|
|
|
.date-info {
|
|
font-size: 11px;
|
|
color: #94a3b8;
|
|
display: flex;
|
|
gap: 10px;
|
|
}
|
|
|
|
.episode-actions {
|
|
display: grid;
|
|
grid-template-columns: repeat(4, 1fr);
|
|
gap: 5px;
|
|
}
|
|
|
|
.episode-actions .btn {
|
|
font-size: 11px !important;
|
|
padding: 4px 8px !important;
|
|
white-space: nowrap;
|
|
width: 100%;
|
|
}
|
|
|
|
/* Desktop List View Transformation */
|
|
@media (min-width: 768px) {
|
|
.episode-card {
|
|
flex-direction: row;
|
|
align-items: center;
|
|
padding: 10px;
|
|
min-height: 80px;
|
|
}
|
|
|
|
.episode-card-body {
|
|
flex-wrap: nowrap;
|
|
align-items: stretch;
|
|
padding: 0;
|
|
width: 100%;
|
|
}
|
|
|
|
.episode-thumb {
|
|
margin-right: 15px;
|
|
margin-bottom: 0;
|
|
}
|
|
|
|
.episode-main-info {
|
|
margin-bottom: 0;
|
|
justify-content: center;
|
|
}
|
|
|
|
.episode-title {
|
|
font-size: 15px;
|
|
word-break: keep-all;
|
|
}
|
|
|
|
.episode-right-col {
|
|
width: auto;
|
|
margin-top: 0;
|
|
padding-top: 0;
|
|
border-top: none;
|
|
margin-left: auto; /* Push to right */
|
|
align-items: flex-end;
|
|
justify-content: center;
|
|
min-width: 220px;
|
|
}
|
|
|
|
.date-info {
|
|
justify-content: flex-end;
|
|
margin-bottom: 5px;
|
|
order: -1;
|
|
}
|
|
|
|
.episode-actions {
|
|
display: flex;
|
|
flex-direction: row;
|
|
gap: 5px;
|
|
}
|
|
|
|
.episode-actions .btn {
|
|
width: auto;
|
|
}
|
|
|
|
.episode-thumb img {
|
|
width: 100%;
|
|
height: 100%;
|
|
object-fit: cover;
|
|
}
|
|
}
|
|
|
|
/* Hide Original Headers */
|
|
.show-grid { margin-bottom: 20px; }
|
|
.container-fluid > div:nth-child(3), /* Head Top HR */
|
|
.container-fluid > div:nth-child(4), /* Headers Row */
|
|
.container-fluid > div:nth-child(5) /* Head Bottom HR */
|
|
{
|
|
display: none !important;
|
|
}
|
|
</style>
|
|
|
|
<script type="text/javascript">
|
|
$(document).ready(function(){
|
|
// Smooth Load Trigger
|
|
setTimeout(function() {
|
|
$('.content-cloak, #menu_module_div, #menu_page_div').addClass('visible');
|
|
}, 100);
|
|
});
|
|
</script>
|
|
<style>
|
|
/* Desktop Full Width Override - .container max-width 제거 */
|
|
#main_container.container {
|
|
max-width: 100% !important;
|
|
padding-left: 8px !important;
|
|
padding-right: 8px !important;
|
|
}
|
|
|
|
/* Mobile Margin Fix */
|
|
@media (max-width: 768px) {
|
|
body { overflow-x: hidden !important; padding: 0 !important; margin: 0 !important; }
|
|
.container, .container-fluid, .row, form, #program_list, #program_auto_form, #episode_list, .queue-container, #yommi_wrapper, #main_container {
|
|
width: 100% !important; max-width: 100% !important;
|
|
padding-left: 4px !important; padding-right: 4px !important;
|
|
margin-left: 0 !important; margin-right: 0 !important;
|
|
box-sizing: border-box !important;
|
|
}
|
|
.form-group, .form-inline, [class*="col-"] {
|
|
flex: 0 0 100% !important; max-width: 100% !important; width: 100% !important;
|
|
padding-left: 0 !important; padding-right: 0 !important;
|
|
}
|
|
.row { margin-left: 0 !important; margin-right: 0 !important; }
|
|
.card, .card.p-4, .card.p-lg-5, .card.border-light {
|
|
width: calc(100% - 8px) !important; max-width: 100% !important;
|
|
padding: 8px !important; margin: 4px !important;
|
|
border-radius: 12px !important; box-sizing: border-box !important;
|
|
}
|
|
.badge {
|
|
white-space: normal !important; text-align: left !important;
|
|
line-height: 1.4 !important; height: auto !important; display: inline-block !important;
|
|
}
|
|
|
|
/* Mobile Nav Pills - blur 제거하고 solid background 사용 */
|
|
ul.nav.nav-pills.bg-light {
|
|
background-color: #1e293b !important;
|
|
backdrop-filter: none !important;
|
|
-webkit-backdrop-filter: none !important;
|
|
border-radius: 12px !important;
|
|
padding: 4px !important;
|
|
flex-wrap: wrap;
|
|
gap: 4px;
|
|
}
|
|
|
|
ul.nav.nav-pills .nav-link {
|
|
padding: 6px 12px !important;
|
|
font-size: 12px !important;
|
|
}
|
|
}
|
|
/* Pagination Styling */
|
|
.btn-toolbar {
|
|
justify-content: center;
|
|
margin: 20px 0;
|
|
}
|
|
|
|
#page1 .btn-group .btn, #page2 .btn-group .btn {
|
|
background: rgba(30, 41, 59, 0.6);
|
|
border: 1px solid rgba(255, 255, 255, 0.1);
|
|
color: #94a3b8;
|
|
padding: 6px 14px;
|
|
margin: 0 2px;
|
|
border-radius: 6px;
|
|
transition: all 0.2s;
|
|
}
|
|
|
|
#page1 .btn-group .btn:hover, #page2 .btn-group .btn:hover {
|
|
background: rgba(255, 255, 255, 0.1);
|
|
color: white;
|
|
transform: translateY(-1px);
|
|
}
|
|
|
|
#page1 .btn-group .btn[disabled], #page2 .btn-group .btn[disabled] {
|
|
background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
|
|
color: white;
|
|
border-color: transparent;
|
|
opacity: 1;
|
|
box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
|
|
}
|
|
|
|
/* JSON Modal 팝업 폭 확대 */
|
|
.modal-dialog {
|
|
max-width: 90% !important;
|
|
width: 900px !important;
|
|
}
|
|
|
|
.modal-content {
|
|
background: rgba(15, 23, 42, 0.95) !important;
|
|
border: 1px solid rgba(148, 163, 184, 0.2) !important;
|
|
border-radius: 12px !important;
|
|
}
|
|
|
|
.modal-body pre {
|
|
background: rgba(0, 0, 0, 0.5) !important;
|
|
color: #4ade80 !important;
|
|
padding: 15px !important;
|
|
border-radius: 8px !important;
|
|
max-height: 70vh !important;
|
|
overflow: auto !important;
|
|
font-size: 12px !important;
|
|
}
|
|
|
|
/* ========== Mobile Video Modal Fix ========== */
|
|
@media (max-width: 768px) {
|
|
/* 모달 크기 조정 - 비디오 모달만 */
|
|
#videoModal .modal-dialog {
|
|
margin: 10px auto !important;
|
|
max-width: calc(100vw - 20px) !important;
|
|
width: auto !important;
|
|
}
|
|
|
|
/* 비디오 높이 제한 */
|
|
#video-player, .video-js {
|
|
max-height: 45vh !important;
|
|
}
|
|
|
|
/* 플레이리스트 높이 제한 */
|
|
#playlist-list-container {
|
|
max-height: 25vh !important;
|
|
}
|
|
|
|
/* 플레이리스트 컨트롤 간소화 */
|
|
.playlist-controls {
|
|
padding: 8px 12px !important;
|
|
}
|
|
.playlist-controls > div {
|
|
gap: 8px !important;
|
|
}
|
|
#current-video-title {
|
|
font-size: 12px !important;
|
|
min-width: auto !important;
|
|
}
|
|
#playlist-progress {
|
|
font-size: 10px !important;
|
|
}
|
|
|
|
/* 아이템 액션 버튼 스크롤 */
|
|
.item-actions {
|
|
flex-wrap: nowrap !important;
|
|
overflow-x: auto !important;
|
|
-webkit-overflow-scrolling: touch;
|
|
padding-bottom: 4px;
|
|
}
|
|
.action-btn {
|
|
flex-shrink: 0;
|
|
}
|
|
}
|
|
|
|
/* 초소형 모바일 (400px 미만) */
|
|
@media (max-width: 400px) {
|
|
#video-player, .video-js {
|
|
max-height: 35vh !important;
|
|
}
|
|
|
|
#playlist-list-container {
|
|
max-height: 20vh !important;
|
|
}
|
|
|
|
.playlist-nav-btn {
|
|
width: 32px !important;
|
|
height: 32px !important;
|
|
font-size: 12px !important;
|
|
}
|
|
|
|
.playlist-toggle-btn {
|
|
padding: 6px 10px !important;
|
|
font-size: 11px !important;
|
|
}
|
|
}
|
|
|
|
/* Mobile Nav Pills Fix */
|
|
@media (max-width: 768px) {
|
|
ul.nav.nav-pills.bg-light {
|
|
margin-top: 50px !important;
|
|
margin-bottom: 10px !important;
|
|
}
|
|
}
|
|
|
|
</style>
|
|
|
|
{% endblock %} |