1581 lines
56 KiB
HTML
1581 lines
56 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 id="anime_downloader_wrapper" class="content-cloak" style="max-width: 100%;">
|
|
<div id="preloader">
|
|
<div class='demo'>
|
|
<!-- <div class="loader-inner">-->
|
|
<div class='circle'>
|
|
<div class='inner'></div>
|
|
</div>
|
|
<div class='circle'>
|
|
<div class='inner'></div>
|
|
</div>
|
|
<div class='circle'>
|
|
<div class='inner'></div>
|
|
</div>
|
|
<div class='circle'>
|
|
<div class='inner'></div>
|
|
</div>
|
|
<div class='circle'>
|
|
<div class='inner'></div>
|
|
</div>
|
|
<!-- </div>-->
|
|
</div>
|
|
</div>
|
|
<div class="search-input-container">
|
|
<div class="search-label"><i class="fa fa-link"></i> 작품 URL 또는 코드로 분석하기</div>
|
|
<div class="search-input-wrapper">
|
|
<input id="code" name="code" type="text" class="form-control custom-input" placeholder="링크애니 URL 또는 코드를 입력하세요...">
|
|
<div class="search-buttons">
|
|
<button id="analysis_btn" class="custom-btn btn-search"><i class="fa fa-magic"></i> 분석 시작</button>
|
|
<button id="go_linkkf_btn" class="custom-btn btn-reset">원래 사이트로 이동</button>
|
|
</div>
|
|
</div>
|
|
<div class="search-desc">
|
|
<em><i class="fa fa-info-circle"></i> 예) "https://linkkf.app/코드" 나 "코드" 직접 입력</em>
|
|
</div>
|
|
</div>
|
|
<form id="program_auto_form">
|
|
<div id="episode_list"></div>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
<!--전체-->
|
|
<script src="{{ url_for('.static', filename='js/sjva_ui14.js') }}"></script>
|
|
|
|
<script type="text/javascript">
|
|
const package_name = "{{arg['package_name'] }}";
|
|
const sub = "{{arg['sub'] }}";
|
|
const ohli24_url = "{{arg['ohli24_url']}}";
|
|
var current_data = null;
|
|
|
|
const params = new Proxy(new URLSearchParams(window.location.search), {
|
|
get: (searchParams, prop) => searchParams.get(prop),
|
|
})
|
|
|
|
const loader = document.getElementById("preloader");
|
|
|
|
const dismissLoadingScreen = function () {
|
|
loader.style.display = "none";
|
|
$('.demo').css("display", "none")
|
|
};
|
|
|
|
const wait3seconds = function () {
|
|
// Force parent container to be fluid to allow full width
|
|
$("#main_container").removeClass("container").addClass("container-fluid");
|
|
// REFERENCE: https://www.w3schools.com/jsref/met_win_settimeout.asp
|
|
const result = setTimeout(dismissLoadingScreen, 2000);
|
|
};
|
|
|
|
window.addEventListener("load", wait3seconds);
|
|
|
|
|
|
function findGetParameter(parameterName) {
|
|
let result = null,
|
|
tmp = [];
|
|
const items = location.search.substr(1).split("&");
|
|
for (let index = 0; index < items.length; index++) {
|
|
tmp = items[index].split("=");
|
|
if (tmp[0] === parameterName) result = decodeURIComponent(tmp[1]);
|
|
}
|
|
return result;
|
|
}
|
|
|
|
function analyze(wr_id, bo_table) {
|
|
// e.preventDefault();
|
|
const code = document.getElementById("code").value
|
|
// console.log(code)
|
|
$.ajax({
|
|
url: '/' + package_name + '/ajax/' + sub + '/analysis',
|
|
type: "POST",
|
|
cache: false,
|
|
data: {code: code, wr_id: wr_id, bo_table: bo_table},
|
|
dataType: "json",
|
|
success: function (ret) {
|
|
if (ret.ret === 'success' && ret.data != null) {
|
|
// {#// console.log(ret.code)#}
|
|
// console.log(ret.data)
|
|
make_program(ret.data)
|
|
} else {
|
|
$.notify('<strong>분석 실패</strong><br>' + ret.log, {type: 'warning'});
|
|
}
|
|
}
|
|
});
|
|
}
|
|
|
|
function make_program(data) {
|
|
current_data = data;
|
|
|
|
let str = "";
|
|
|
|
// 1. Info Card (Top)
|
|
str += `<div class='card p-4 mb-4 border-light' style="background: rgba(30,30,40,0.6); backdrop-filter: blur(10px);">`;
|
|
str += `<div class="row">`;
|
|
|
|
// Poster
|
|
str += `<div class="col-md-3 text-center mb-3 mb-md-0">`;
|
|
if (data.poster_url) {
|
|
str += `<img src="${data.poster_url}" class="img-fluid rounded shadow-lg" style="max-height: 350px; width: auto;">`;
|
|
}
|
|
str += `</div>`;
|
|
|
|
// Details
|
|
str += `<div class="col-md-9">`;
|
|
str += `<h2 class="font-weight-bold text-white mb-2">${data.title}</h2>`;
|
|
str += `<div class="mb-4">`;
|
|
str += `<span class="badge badge-primary mr-2" style="font-size: 1em; padding: 6px 12px;">Season ${data.season}</span>`;
|
|
str += `</div>`;
|
|
|
|
// Table for details
|
|
str += `<div class="row mb-4" style="font-size: 0.95em; color: #ccc;">`;
|
|
if(data.detail) {
|
|
for(let i in data.detail) {
|
|
const key = Object.keys(data.detail[i])[0];
|
|
const value = data.detail[i][key];
|
|
str += `<div class="col-md-6 mb-2"><span class="font-weight-bold text-info mr-2">${key}:</span> <span class="text-light">${value}</span></div>`;
|
|
}
|
|
}
|
|
str += `</div>`; // End detail row
|
|
|
|
// Actions Toolbar
|
|
str += `<div class="d-flex flex-wrap align-items-center gap-2 p-3 rounded" style="background: rgba(0,0,0,0.3); border: 1px solid rgba(255,255,255,0.05);">`;
|
|
|
|
// Standard Actions
|
|
if (data.first_exist_filepath) {
|
|
str += `<button class="btn btn-success btn-sm mr-2" onclick="play_video('${data.first_exist_filepath.replace(/\\/g, '\\\\')}', '${data.first_exist_filename}')"><i class="fa fa-play"></i> 재생</button>`;
|
|
}
|
|
str += `<button id="check_download_btn" class="btn btn-primary btn-sm mr-2"><i class="fa fa-download"></i> 선택 다운로드</button>`;
|
|
str += `<button id="all_check_on_btn" class="btn btn-outline-light btn-sm mr-1">전체 선택</button>`;
|
|
str += `<button id="all_check_off_btn" class="btn btn-outline-secondary btn-sm mr-3">해제</button>`;
|
|
str += `<button id="down_subtitle_btn" class="btn btn-outline-warning btn-sm mr-3">자막만 다운로드</button>`;
|
|
|
|
// Scheduling (Heart)
|
|
str += `<button id="add_whitelist" class="btn btn-outline-danger btn-sm mr-3" style="min-width: 120px;"><i class="bi bi-heart"></i> 스케쥴링 추가</button>`;
|
|
|
|
str += `</div>`; // End Action Toolbar Main
|
|
|
|
// Edit Tools (Secondary Toolbar)
|
|
str += `<div class="d-flex flex-wrap align-items-center gap-2 mt-2 p-2 rounded" style="">`;
|
|
str += `<span class="text-muted small mr-2">저장 옵션:</span>`;
|
|
str += `<input id="new_title" class="form-control form-control-sm mr-1" style="width:200px; background:#222; border:1px solid #444; color:#ddd;" value="${data.title}">`;
|
|
str += `<button id="apply_new_title_btn" class="btn btn-dark btn-sm mr-3">폴더명 변경</button>`;
|
|
str += `<input id="new_season" class="form-control form-control-sm mr-1" style="width:60px; background:#222; border:1px solid #444; color:#ddd;" value="${data.season}">`;
|
|
str += `<button id="apply_new_season_btn" class="btn btn-dark btn-sm mr-2">시즌 변경</button>`;
|
|
str += `<button id="search_tvdb_btn" class="btn btn-dark btn-sm">TVDB 확인</button>`;
|
|
str += `</div>`;
|
|
|
|
|
|
str += `</div>`; // End Col-9
|
|
str += `</div>`; // End Row
|
|
str += `</div>`; // End Card
|
|
|
|
// 2. Episode List
|
|
str += '<div class="episode-list-container">';
|
|
for (let i in data.episode) {
|
|
str += '<div class="episode-card">';
|
|
str += '<div class="episode-thumb">';
|
|
str += '<span class="episode-num">' + data.episode[i].ep_num + '화</span>';
|
|
str += '</div>';
|
|
str += '<div class="episode-info">';
|
|
str += '<div class="episode-title">' + data.episode[i].title + '</div>';
|
|
str += '<div class="episode-filename" title="' + data.episode[i].filename + '">' + data.episode[i].filename + '</div>';
|
|
str += '<div class="episode-actions">';
|
|
str += '<input id="checkbox_' + i + '" name="checkbox_' + i + '" type="checkbox" checked data-toggle="toggle" data-on="선택" data-off="-" data-onstyle="success" data-offstyle="secondary" data-size="small">';
|
|
str += m_button("add_queue_btn", "다운로드", [{key: "idx", value: i}]);
|
|
str += '</div>';
|
|
str += '</div>';
|
|
str += '</div>';
|
|
}
|
|
str += '</div>';
|
|
|
|
document.getElementById("episode_list").innerHTML = str;
|
|
$('input[id^="checkbox_"]').bootstrapToggle();
|
|
}
|
|
|
|
$(function () {
|
|
// URL 파라미터 처리 (code)
|
|
const urlCode = params.code || findGetParameter('code');
|
|
const currentCode = "{{arg['linkkf_current_code']}}";
|
|
|
|
const targetCode = urlCode || currentCode;
|
|
|
|
if (targetCode) {
|
|
document.getElementById("code").value = targetCode;
|
|
// wr_id, bo_table 등이 있으면 같이 전달
|
|
analyze(params.wr_id || findGetParameter('wr_id'), params.bo_table || findGetParameter('bo_table'));
|
|
}
|
|
});
|
|
|
|
$(document).ready(function () {
|
|
// console.log('wr_id::', params.wr_id)
|
|
});
|
|
|
|
// Enter 키로 검색 트리거
|
|
$("#code").on('keypress', function (e) {
|
|
if (e.which === 13) { // Enter key
|
|
e.preventDefault();
|
|
$("#analysis_btn").click();
|
|
}
|
|
});
|
|
|
|
$("#analysis_btn").unbind("click").bind('click', function (e) {
|
|
e.preventDefault();
|
|
e.stopPropagation()
|
|
const code = document.getElementById("code").value
|
|
// console.log(code)
|
|
$.ajax({
|
|
url: '/' + package_name + '/ajax/' + sub + '/analysis',
|
|
type: "POST",
|
|
cache: false,
|
|
data: {code: code},
|
|
dataType: "json",
|
|
success: function (ret) {
|
|
if (ret.ret === 'success' && ret.data != null) {
|
|
// {#// console.log(ret.code)#}
|
|
// console.log(ret.data)
|
|
make_program(ret.data)
|
|
} else {
|
|
$.notify('<strong>분석 실패</strong><br>' + ret.log, {type: 'warning'});
|
|
}
|
|
}
|
|
});
|
|
});
|
|
|
|
|
|
$("body").on('click', '#add_whitelist', function (e) {
|
|
e.preventDefault();
|
|
const code = document.getElementById("code").value || params.code;
|
|
const $btn = $(this);
|
|
$.ajax({
|
|
url: '/' + package_name + '/ajax/' + sub + '/add_whitelist',
|
|
type: "POST",
|
|
cache: false,
|
|
data: JSON.stringify({data_code: code}),
|
|
contentType: "application/json;charset=UTF-8",
|
|
dataType: "json",
|
|
success: function (ret) {
|
|
if (ret.ret) {
|
|
$.notify('<strong>스케쥴링 목록에 추가하였습니다.</strong>', {type: 'success'});
|
|
$btn.html('<i class="bi bi-heart-fill"></i> 추가됨').removeClass('btn-outline-danger').addClass('btn-danger');
|
|
} else {
|
|
if (ret.log == "이미 추가되어 있습니다.") {
|
|
$.notify('<strong>이미 추가되어 있습니다.</strong>', {type: 'warning'});
|
|
$btn.html('<i class="bi bi-heart-fill"></i> 추가됨').removeClass('btn-outline-danger').addClass('btn-danger');
|
|
} else {
|
|
$.notify('<strong>추가 실패</strong><br>' + ret.log, {type: 'warning'});
|
|
}
|
|
}
|
|
}
|
|
});
|
|
});
|
|
|
|
$("body").on('click', '#go_ohli24_btn', function (e) {
|
|
e.preventDefault();
|
|
window.open("{{arg['ohli24_url']}}", "_blank");
|
|
});
|
|
|
|
$("body").on('click', '#all_check_on_btn', function (e) {
|
|
e.preventDefault();
|
|
$('input[id^="checkbox_"]').bootstrapToggle('on')
|
|
});
|
|
|
|
$("body").on('click', '#all_check_off_btn', function (e) {
|
|
e.preventDefault();
|
|
$('input[id^="checkbox_"]').bootstrapToggle('off')
|
|
});
|
|
|
|
$("body").on('click', '#add_queue_btn', function (e) {
|
|
e.preventDefault();
|
|
let episode_data = current_data.episode[$(this).data('idx')];
|
|
// console.log('episode_data:::>', episode_data)
|
|
$.ajax({
|
|
url: '/' + package_name + '/ajax/' + sub + '/add_queue',
|
|
type: "POST",
|
|
cache: false,
|
|
data: {data: JSON.stringify(episode_data)},
|
|
dataType: "json",
|
|
success: function (ret) {
|
|
// console.log('#add_queue_btn::ret >>', ret)
|
|
if (ret.ret == 'enqueue_db_append' || ret.ret == 'enqueue_db_exist' || ret.ret == 'enqueue_gdm_success') {
|
|
$.notify('<strong>다운로드 작업을 추가 하였습니다.</strong>', {type: 'success'});
|
|
} else if (ret.ret == 'queue_exist') {
|
|
$.notify('<strong>이미 큐에 있습니다. 삭제 후 추가하세요.</strong>', {type: 'warning'});
|
|
} else if (ret.ret == 'db_completed') {
|
|
$.notify('<strong>DB에 완료 기록이 있습니다.</strong>', {type: 'warning'});
|
|
} else if (ret.ret == 'file_exists') {
|
|
$.notify('<strong>파일이 이미 존재합니다.</strong>', {type: 'warning'});
|
|
} else if (ret.ret == 'extract_failed') {
|
|
$.notify('<strong>추가 실패: 영상 주소 추출에 실패하였습니다.</strong>', {type: 'warning'});
|
|
} else {
|
|
const msg = ret.log || '알 수 없는 이유로 추가에 실패하였습니다.';
|
|
$.notify('<strong>추가 실패</strong><br>' + msg, {type: 'warning'});
|
|
}
|
|
}
|
|
});
|
|
|
|
});
|
|
|
|
$("body").on('click', '#check_download_btn', function (e) {
|
|
e.preventDefault();
|
|
let selected_data = [];
|
|
$('input[id^="checkbox_"]').each(function() {
|
|
if ($(this).prop('checked')) {
|
|
let idx = parseInt($(this).attr('id').split('_')[1]);
|
|
selected_data.push(current_data.episode[idx]);
|
|
}
|
|
});
|
|
if (selected_data.length == 0) {
|
|
$.notify('<strong>선택하세요.</strong>', {type: 'warning'});
|
|
return;
|
|
}
|
|
$.ajax({
|
|
url: '/' + package_name + '/ajax/' + sub + '/add_queue_checked_list',
|
|
type: "POST",
|
|
cache: false,
|
|
data: {data: JSON.stringify(selected_data)},
|
|
dataType: "json",
|
|
success: function (ret) {
|
|
$.notify('<strong>백그라운드로 작업을 추가합니다.</strong>', {type: 'success'});
|
|
}
|
|
});
|
|
});
|
|
|
|
$("body").on('click', '#down_subtitle_btn', function (e) {
|
|
e.preventDefault();
|
|
let selected_data = [];
|
|
$('input[id^="checkbox_"]').each(function() {
|
|
if ($(this).prop('checked')) {
|
|
let idx = parseInt($(this).attr('id').split('_')[1]);
|
|
selected_data.push(current_data.episode[idx]);
|
|
}
|
|
});
|
|
if (selected_data.length == 0) {
|
|
$.notify('<strong>선택하세요.</strong>', {type: 'warning'});
|
|
return;
|
|
}
|
|
$.ajax({
|
|
url: '/' + package_name + '/ajax/' + sub + '/add_sub_queue_checked_list',
|
|
type: "POST",
|
|
cache: false,
|
|
data: {data: JSON.stringify(selected_data)},
|
|
dataType: "json",
|
|
success: function (ret) {
|
|
if (ret.ret == "success") {
|
|
$.notify('<strong>백그라운드로 자막 다운로드를 시작합니다.</strong>', {type: 'success'});
|
|
} else {
|
|
const msg = ret.log || '알 수 없는 이유로 요청에 실패하였습니다.';
|
|
$.notify('<strong>자막 다운로드 요청 실패: ' + msg + '</strong>', {type: 'warning'});
|
|
}
|
|
}
|
|
});
|
|
});
|
|
</script>
|
|
<style>
|
|
#anime_downloader_wrapper {
|
|
font-family: NanumSquareNeo, system-ui, -apple-system, Segoe UI, Roboto, Helvetica Neue, Noto Sans, Liberation Sans, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji;
|
|
}
|
|
|
|
body {
|
|
background-image: linear-gradient(90deg, #022c22, #064e3b, #065f46);
|
|
}
|
|
|
|
#anime_downloader_wrapper {
|
|
color: #ecfdf5;
|
|
padding: 5px;
|
|
}
|
|
|
|
/* Navigation (Tabs) Optimization */
|
|
/* Navigation Menu Override */
|
|
ul.nav.nav-pills.bg-light {
|
|
background-color: rgba(6, 78, 59, 0.4) !important;
|
|
backdrop-filter: blur(10px);
|
|
border: 1px solid rgba(16, 185, 129, 0.1);
|
|
border-radius: 50rem !important;
|
|
padding: 6px !important;
|
|
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2) !important;
|
|
display: inline-flex !important;
|
|
gap: 4px;
|
|
margin-bottom: 20px;
|
|
}
|
|
|
|
ul.nav.nav-pills .nav-link {
|
|
color: #d1fae5 !important;
|
|
font-weight: 600 !important;
|
|
padding: 8px 20px !important;
|
|
border-radius: 50rem !important;
|
|
transition: all 0.3s ease !important;
|
|
border: 1px solid transparent !important;
|
|
}
|
|
|
|
ul.nav.nav-pills .nav-link:hover {
|
|
background-color: rgba(16, 185, 129, 0.1) !important;
|
|
color: #fff !important;
|
|
transform: translateY(-1px);
|
|
}
|
|
|
|
ul.nav.nav-pills .nav-link.active {
|
|
background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
|
|
color: #fff !important;
|
|
box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3) !important;
|
|
}
|
|
|
|
/* Search Input Polishing */
|
|
.search-input-container {
|
|
background: rgba(6, 78, 59, 0.4);
|
|
backdrop-filter: blur(12px);
|
|
padding: 24px;
|
|
border-radius: 20px;
|
|
border: 1px solid rgba(16, 185, 129, 0.2);
|
|
margin-bottom: 30px;
|
|
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
|
|
}
|
|
|
|
.search-label {
|
|
font-size: 16px;
|
|
font-weight: 700;
|
|
color: #ecfdf5;
|
|
margin-bottom: 12px;
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
}
|
|
|
|
.search-input-wrapper {
|
|
display: flex;
|
|
gap: 12px;
|
|
flex-wrap: wrap;
|
|
}
|
|
|
|
.custom-input {
|
|
background-color: rgba(2, 44, 34, 0.6) !important;
|
|
border: 1px solid rgba(16, 185, 129, 0.3) !important;
|
|
color: #fff !important;
|
|
border-radius: 12px !important;
|
|
padding: 12px 18px !important;
|
|
height: 50px !important;
|
|
flex: 1;
|
|
min-width: 300px;
|
|
font-size: 15px;
|
|
transition: all 0.2s;
|
|
}
|
|
|
|
.custom-input:focus {
|
|
border-color: #10b981 !important;
|
|
box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2) !important;
|
|
background-color: rgba(2, 44, 34, 0.8) !important;
|
|
}
|
|
|
|
.search-buttons {
|
|
display: flex;
|
|
gap: 10px;
|
|
}
|
|
|
|
.custom-btn {
|
|
height: 50px;
|
|
padding: 0 24px;
|
|
border-radius: 12px;
|
|
font-weight: 700;
|
|
cursor: pointer;
|
|
transition: all 0.2s;
|
|
border: none;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
gap: 8px;
|
|
}
|
|
|
|
.btn-search {
|
|
background: linear-gradient(135deg, #10b981, #059669);
|
|
color: white;
|
|
box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
|
|
}
|
|
|
|
.btn-search:hover {
|
|
transform: translateY(-2px);
|
|
box-shadow: 0 6px 16px rgba(16, 185, 129, 0.4);
|
|
}
|
|
|
|
.btn-reset {
|
|
background: rgba(255, 255, 255, 0.05);
|
|
color: #6ee7b7;
|
|
border: 1px solid rgba(16, 185, 129, 0.2);
|
|
}
|
|
|
|
.btn-reset:hover {
|
|
background: rgba(255, 255, 255, 0.1);
|
|
color: #fff;
|
|
}
|
|
|
|
.search-desc {
|
|
margin-top: 12px;
|
|
font-size: 13px;
|
|
color: #6ee7b7;
|
|
opacity: 0.7;
|
|
}
|
|
|
|
button.code-button {
|
|
min-width: 82px !important;
|
|
}
|
|
|
|
.tooltip {
|
|
position: relative;
|
|
display: block;
|
|
}
|
|
|
|
[data-tooltip-text]:hover {
|
|
position: relative;
|
|
}
|
|
|
|
[data-tooltip-text]:after {
|
|
-webkit-transition: bottom 0.3s ease-in-out, opacity 0.3s ease-in-out;
|
|
-moz-transition: bottom 0.3s ease-in-out, opacity 0.3s ease-in-out;
|
|
transition: bottom 0.3s ease-in-out, opacity 0.3s ease-in-out;
|
|
|
|
background-color: rgba(0, 0, 0, 0.8);
|
|
|
|
-webkit-box-shadow: 0px 0px 3px 1px rgba(50, 50, 50, 0.4);
|
|
-moz-box-shadow: 0px 0px 3px 1px rgba(50, 50, 50, 0.4);
|
|
box-shadow: 0px 0px 3px 1px rgba(50, 50, 50, 0.4);
|
|
|
|
-webkit-border-radius: 5px;
|
|
-moz-border-radius: 5px;
|
|
border-radius: 5px;
|
|
|
|
color: #ffffff;
|
|
font-size: 12px;
|
|
margin-bottom: 10px;
|
|
padding: 7px 12px;
|
|
position: absolute;
|
|
width: auto;
|
|
min-width: 50px;
|
|
max-width: 300px;
|
|
word-wrap: break-word;
|
|
|
|
z-index: 9999;
|
|
|
|
opacity: 0;
|
|
left: -9999px;
|
|
top: 90%;
|
|
|
|
content: attr(data-tooltip-text);
|
|
}
|
|
|
|
[data-tooltip-text]:hover:after {
|
|
top: 230%;
|
|
left: 0;
|
|
opacity: 1;
|
|
}
|
|
|
|
[data-tooltip-text]:hover {
|
|
position: relative;
|
|
}
|
|
|
|
[data-tooltip-text]:after {
|
|
-webkit-transition: bottom 0.3s ease-in-out, opacity 0.3s ease-in-out;
|
|
-moz-transition: bottom 0.3s ease-in-out, opacity 0.3s ease-in-out;
|
|
transition: bottom 0.3s ease-in-out, opacity 0.3s ease-in-out;
|
|
|
|
background-color: rgba(0, 0, 0, 0.8);
|
|
|
|
-webkit-box-shadow: 0px 0px 3px 1px rgba(50, 50, 50, 0.4);
|
|
-moz-box-shadow: 0px 0px 3px 1px rgba(50, 50, 50, 0.4);
|
|
box-shadow: 0px 0px 3px 1px rgba(50, 50, 50, 0.4);
|
|
|
|
-webkit-border-radius: 5px;
|
|
-moz-border-radius: 5px;
|
|
border-radius: 5px;
|
|
|
|
color: #ffffff;
|
|
font-size: 12px;
|
|
margin-bottom: 10px;
|
|
padding: 7px 12px;
|
|
position: absolute;
|
|
width: auto;
|
|
min-width: 50px;
|
|
max-width: 300px;
|
|
word-wrap: break-word;
|
|
|
|
z-index: 9999;
|
|
|
|
opacity: 0;
|
|
left: -9999px;
|
|
top: -210% !important;
|
|
|
|
content: attr(data-tooltip-text);
|
|
}
|
|
|
|
[data-tooltip-text]:hover:after {
|
|
top: 130%;
|
|
left: 0;
|
|
opacity: 1;
|
|
}
|
|
|
|
.card {
|
|
border: none;
|
|
box-shadow: inset 1px 1px hsl(0deg 0% 100% / 10%), inset -1px -1px hsl(0deg 0% 100% / 5%), 0 12px 24px rgba(0,0,0,0.3);
|
|
background-color: rgba(6, 78, 59, 0.4);
|
|
backdrop-filter: blur(12px);
|
|
}
|
|
|
|
.card.border-light {
|
|
border-radius: 20px;
|
|
border: 1px solid rgba(16, 185, 129, 0.2) !important;
|
|
}
|
|
|
|
/* 에피소드 목록 컨테이너 */
|
|
.episode-list-container {
|
|
margin-top: 20px;
|
|
display: grid;
|
|
grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
|
|
gap: 10px;
|
|
}
|
|
|
|
/* 에피소드 카드 */
|
|
.episode-card {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 12px;
|
|
padding: 12px 14px;
|
|
background: linear-gradient(135deg, rgba(30, 41, 59, 0.85) 0%, rgba(15, 23, 42, 0.85) 100%);
|
|
border-radius: 8px;
|
|
border: 1px solid rgba(148, 163, 184, 0.12);
|
|
transition: all 0.2s ease;
|
|
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
|
|
}
|
|
|
|
.episode-card:hover {
|
|
background: linear-gradient(135deg, rgba(51, 65, 85, 0.95) 0%, rgba(30, 41, 59, 0.95) 100%);
|
|
border-color: rgba(96, 165, 250, 0.5);
|
|
transform: translateY(-2px);
|
|
box-shadow: 0 4px 15px rgba(96, 165, 250, 0.2);
|
|
}
|
|
|
|
/* 에피소드 썸네일 */
|
|
.episode-thumb {
|
|
position: relative;
|
|
width: 40px;
|
|
min-width: 40px;
|
|
height: 40px;
|
|
border-radius: 8px;
|
|
overflow: hidden;
|
|
background: linear-gradient(135deg, #10b981 0%, #059669 100%);
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
/* 에피소드 번호 배지 */
|
|
.episode-num {
|
|
color: white;
|
|
font-size: 11px;
|
|
font-weight: 700;
|
|
}
|
|
|
|
/* 에피소드 정보 */
|
|
.episode-info {
|
|
flex: 1;
|
|
display: flex;
|
|
flex-direction: row;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
gap: 10px;
|
|
min-width: 0;
|
|
}
|
|
|
|
.episode-title {
|
|
color: #e2e8f0;
|
|
font-weight: 600;
|
|
font-size: 14px;
|
|
line-height: 1.3;
|
|
flex: 1;
|
|
min-width: 0;
|
|
}
|
|
|
|
.episode-filename {
|
|
color: #64748b;
|
|
font-size: 11px;
|
|
white-space: nowrap;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
flex-shrink: 0;
|
|
max-width: 40%;
|
|
}
|
|
|
|
/* 에피소드 액션 버튼 */
|
|
.episode-actions {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
margin-top: 4px;
|
|
}
|
|
|
|
.episode-actions .btn {
|
|
font-size: 11px;
|
|
padding: 3px 10px;
|
|
border-radius: 4px;
|
|
}
|
|
|
|
.episode-actions .toggle {
|
|
transform: scale(0.85);
|
|
}
|
|
|
|
/* 모바일 반응형 - Bootstrap 모든 레이아웃 강제 덮어쓰기 */
|
|
@media (max-width: 768px) {
|
|
/* 전체 페이지 기본 설정 */
|
|
body {
|
|
overflow-x: hidden !important;
|
|
padding: 0 !important;
|
|
margin: 0 !important;
|
|
}
|
|
|
|
/* 모든 컨테이너/row 폭 100% 강제 */
|
|
.container, .container-fluid, .container-sm, .container-md, .container-lg,
|
|
.row, form, #program_list, #program_auto_form, #episode_list {
|
|
width: 100% !important;
|
|
max-width: 100% !important;
|
|
padding-left: 10px !important;
|
|
padding-right: 10px !important;
|
|
margin-left: 0 !important;
|
|
margin-right: 0 !important;
|
|
box-sizing: border-box !important;
|
|
}
|
|
|
|
/* form-group 및 모든 col 클래스 */
|
|
.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 마진 제거 */
|
|
.row {
|
|
margin-left: 0 !important;
|
|
margin-right: 0 !important;
|
|
}
|
|
|
|
/* 상단 정보 카드 */
|
|
.card.p-lg-5, .card.border-light {
|
|
width: calc(100% - 20px) !important;
|
|
max-width: 100% !important;
|
|
padding: 15px !important;
|
|
margin: 10px !important;
|
|
border-radius: 12px !important;
|
|
box-sizing: border-box !important;
|
|
}
|
|
|
|
.card.p-lg-5 > .row {
|
|
display: flex !important;
|
|
flex-direction: column !important;
|
|
width: 100% !important;
|
|
margin: 0 !important;
|
|
}
|
|
|
|
/* 메인 썸네일 - 중앙 정렬 */
|
|
.card.p-lg-5 > .row > [class*="col-"]:first-child {
|
|
flex: 0 0 100% !important;
|
|
max-width: 100% !important;
|
|
text-align: center !important;
|
|
margin-bottom: 15px !important;
|
|
padding: 0 !important;
|
|
}
|
|
|
|
.card.p-lg-5 > .row > [class*="col-"]:first-child img {
|
|
width: 70% !important;
|
|
max-width: 220px !important;
|
|
height: auto !important;
|
|
border-radius: 10px !important;
|
|
box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4) !important;
|
|
}
|
|
|
|
/* 정보 테이블 각 행 - 카드 스타일 */
|
|
.card.p-lg-5 .row .row {
|
|
display: flex !important;
|
|
flex-direction: row !important;
|
|
flex-wrap: nowrap !important;
|
|
align-items: flex-start !important;
|
|
width: 100% !important;
|
|
max-width: 100% !important;
|
|
margin: 0 0 6px 0 !important;
|
|
padding: 10px 12px !important;
|
|
background: rgba(255, 255, 255, 0.06) !important;
|
|
border-radius: 8px !important;
|
|
box-sizing: border-box !important;
|
|
}
|
|
|
|
/* 정보 라벨 */
|
|
.card.p-lg-5 .row .row > [class*="col-"]:first-child {
|
|
flex: 0 0 60px !important;
|
|
max-width: 60px !important;
|
|
min-width: 60px !important;
|
|
font-size: 11px !important;
|
|
font-weight: 600 !important;
|
|
color: #94a3b8 !important;
|
|
text-align: left !important;
|
|
padding: 0 5px 0 0 !important;
|
|
}
|
|
|
|
/* 정보 값 */
|
|
.card.p-lg-5 .row .row > [class*="col-"]:last-child {
|
|
flex: 1 1 auto !important;
|
|
max-width: none !important;
|
|
font-size: 12px !important;
|
|
color: #e2e8f0 !important;
|
|
word-break: break-word !important;
|
|
text-align: left !important;
|
|
padding: 0 !important;
|
|
}
|
|
|
|
/* 버튼 그룹 */
|
|
.form-inline {
|
|
display: flex !important;
|
|
flex-wrap: wrap !important;
|
|
gap: 6px !important;
|
|
margin-bottom: 10px !important;
|
|
}
|
|
|
|
.form-inline .btn {
|
|
font-size: 11px;
|
|
padding: 6px 10px;
|
|
}
|
|
|
|
.form-inline input.form-control {
|
|
width: 100% !important;
|
|
margin-bottom: 8px !important;
|
|
}
|
|
|
|
/* 에피소드 목록 - 화면 폭에 꽉 차게 */
|
|
.episode-list-container {
|
|
display: flex !important;
|
|
flex-direction: column !important;
|
|
gap: 8px !important;
|
|
width: 100% !important;
|
|
max-width: 100% !important;
|
|
padding: 0 !important;
|
|
margin: 15px 0 !important;
|
|
box-sizing: border-box !important;
|
|
}
|
|
|
|
.episode-card {
|
|
display: flex !important;
|
|
align-items: center !important;
|
|
width: 100% !important;
|
|
max-width: 100% !important;
|
|
padding: 10px 12px !important;
|
|
gap: 10px !important;
|
|
margin: 0 !important;
|
|
box-sizing: border-box !important;
|
|
}
|
|
|
|
.episode-thumb {
|
|
width: 40px !important;
|
|
min-width: 40px !important;
|
|
height: 40px !important;
|
|
flex-shrink: 0 !important;
|
|
}
|
|
|
|
.episode-info {
|
|
flex: 1 !important;
|
|
min-width: 0 !important;
|
|
flex-direction: row !important;
|
|
align-items: center !important;
|
|
justify-content: space-between !important;
|
|
}
|
|
|
|
.episode-title {
|
|
font-size: 12px !important;
|
|
flex: 1 !important;
|
|
min-width: 0 !important;
|
|
}
|
|
|
|
.episode-filename {
|
|
font-size: 10px !important;
|
|
color: #64748b !important;
|
|
flex-shrink: 0 !important;
|
|
max-width: 35% !important;
|
|
margin-left: 8px !important;
|
|
}
|
|
|
|
.episode-actions {
|
|
display: flex !important;
|
|
flex-wrap: wrap !important;
|
|
gap: 6px !important;
|
|
margin-top: 5px !important;
|
|
}
|
|
|
|
.episode-actions .btn {
|
|
font-size: 10px !important;
|
|
padding: 4px 10px !important;
|
|
}
|
|
|
|
.episode-actions .toggle {
|
|
transform: scale(0.85) !important;
|
|
}
|
|
}
|
|
|
|
/* 더 작은 화면 (400px 이하) */
|
|
@media (max-width: 400px) {
|
|
.episode-thumb {
|
|
width: 35px !important;
|
|
min-width: 35px !important;
|
|
height: 35px !important;
|
|
}
|
|
|
|
.episode-num {
|
|
font-size: 9px !important;
|
|
}
|
|
|
|
.episode-title {
|
|
font-size: 11px !important;
|
|
}
|
|
|
|
.episode-filename {
|
|
max-width: 30% !important;
|
|
}
|
|
|
|
.episode-actions .btn {
|
|
font-size: 9px !important;
|
|
padding: 3px 8px !important;
|
|
}
|
|
}
|
|
|
|
#airing_list {
|
|
display: none;
|
|
}
|
|
|
|
.cut-text {
|
|
text-overflow: ellipsis;
|
|
overflow: hidden;
|
|
white-space: nowrap;
|
|
width: 100%;
|
|
}
|
|
|
|
#screen_movie_list {
|
|
margin-top: 10px;
|
|
}
|
|
|
|
/*@import url(https://fonts.googleapis.com/css?family=Lato);*/
|
|
/*a {*/
|
|
/* position: fixed;*/
|
|
/* bottom: 2%;*/
|
|
/* display: block;*/
|
|
/* text-align: center;*/
|
|
/* color: #0fa;*/
|
|
/* font-family: "Lato", sans-serif;*/
|
|
/* text-decoration: none !important;*/
|
|
/* width: 100%;*/
|
|
/*}*/
|
|
|
|
/*body, html {*/
|
|
/* width: 100%;*/
|
|
/* height: 100%;*/
|
|
/* overflow: hidden;*/
|
|
/*}*/
|
|
|
|
/*body {*/
|
|
/* background: linear-gradient(90deg, #00b377, #00d68f);*/
|
|
/* box-shadow: inset 0px 0px 90px rgba(0, 0, 0, 0.5);*/
|
|
/* margin: 0px;*/
|
|
/* padding: 0px;*/
|
|
/*}*/
|
|
|
|
.demo {
|
|
width: 100px;
|
|
height: 102px;
|
|
border-radius: 100%;
|
|
position: absolute;
|
|
top: 45%;
|
|
left: calc(50% - 50px);
|
|
}
|
|
|
|
.circle {
|
|
width: 100%;
|
|
height: 100%;
|
|
position: absolute;
|
|
}
|
|
|
|
.circle .inner {
|
|
width: 100%;
|
|
height: 100%;
|
|
border-radius: 100%;
|
|
border: 5px solid rgba(0, 255, 170, 0.7);
|
|
border-right: none;
|
|
border-top: none;
|
|
background-clip: padding;
|
|
box-shadow: inset 0px 0px 10px rgba(0, 255, 170, 0.15);
|
|
}
|
|
|
|
@-webkit-keyframes spin {
|
|
from {
|
|
transform: rotate(0deg);
|
|
}
|
|
to {
|
|
transform: rotate(360deg);
|
|
}
|
|
}
|
|
|
|
@keyframes spin {
|
|
from {
|
|
transform: rotate(0deg);
|
|
}
|
|
to {
|
|
transform: rotate(360deg);
|
|
}
|
|
}
|
|
|
|
.circle:nth-of-type(0) {
|
|
transform: rotate(0deg);
|
|
}
|
|
|
|
.circle:nth-of-type(0) .inner {
|
|
-webkit-animation: spin 2s infinite linear;
|
|
animation: spin 2s infinite linear;
|
|
}
|
|
|
|
.circle:nth-of-type(1) {
|
|
transform: rotate(70deg);
|
|
}
|
|
|
|
.circle:nth-of-type(1) .inner {
|
|
-webkit-animation: spin 2s infinite linear;
|
|
animation: spin 2s infinite linear;
|
|
}
|
|
|
|
.circle:nth-of-type(2) {
|
|
transform: rotate(140deg);
|
|
}
|
|
|
|
.circle:nth-of-type(2) .inner {
|
|
-webkit-animation: spin 2s infinite linear;
|
|
animation: spin 2s infinite linear;
|
|
}
|
|
|
|
.demo {
|
|
-webkit-animation: spin 5s infinite linear;
|
|
animation: spin 5s infinite linear;
|
|
background: rgba(0, 0, 0, 0.2);
|
|
background: radial-gradient(#222, #000);
|
|
bottom: 0;
|
|
left: 0;
|
|
overflow: hidden;
|
|
/*position: fixed;*/
|
|
right: 0;
|
|
/*top: 0;*/
|
|
z-index: 99999;
|
|
opacity: 0.5;
|
|
margin: 0 auto;
|
|
transform: translate(-50%, -50%);
|
|
position: absolute;
|
|
top: 50%;
|
|
|
|
}
|
|
|
|
.circle {
|
|
width: 100%;
|
|
height: 100%;
|
|
position: absolute;
|
|
}
|
|
|
|
.circle .inner {
|
|
width: 100%;
|
|
height: 100%;
|
|
border-radius: 100%;
|
|
border: 5px solid rgba(0, 255, 170, 0.7);
|
|
border-right: none;
|
|
border-top: none;
|
|
background-clip: padding;
|
|
box-shadow: inset 0px 0px 10px rgba(0, 255, 170, 0.15);
|
|
}
|
|
|
|
.loader-inner {
|
|
bottom: 0;
|
|
height: 60px;
|
|
left: 0;
|
|
margin: auto;
|
|
position: absolute;
|
|
right: 0;
|
|
top: 0;
|
|
width: 100px;
|
|
}
|
|
|
|
#preloader {
|
|
/*background-color: green;*/
|
|
/*color: white;*/
|
|
/*height: 100vh;*/
|
|
/*width: 100%;*/
|
|
/*position: fixed;*/
|
|
/*z-index: 100;*/
|
|
background: rgba(0, 0, 0, 0.2);
|
|
background: radial-gradient(#222, #000);
|
|
bottom: 0;
|
|
left: 0;
|
|
overflow: hidden;
|
|
position: fixed;
|
|
right: 0;
|
|
top: 0;
|
|
z-index: 99999;
|
|
opacity: 0.5;
|
|
}
|
|
|
|
/* 로딩 인디케이터 오버라이드 */
|
|
#loading {
|
|
background: rgba(15, 23, 42, 0.85) !important;
|
|
backdrop-filter: blur(8px) !important;
|
|
}
|
|
|
|
#loading img,
|
|
#loading svg {
|
|
display: none !important;
|
|
visibility: hidden !important;
|
|
width: 0 !important;
|
|
height: 0 !important;
|
|
}
|
|
|
|
#loading::before {
|
|
content: '';
|
|
position: fixed;
|
|
top: 50%;
|
|
left: 50%;
|
|
transform: translate(-50%, -50%);
|
|
width: 50px;
|
|
height: 50px;
|
|
border: 4px solid rgba(96, 165, 250, 0.2);
|
|
border-top-color: #60a5fa;
|
|
border-radius: 50%;
|
|
animation: loader-spin 0.8s linear infinite;
|
|
z-index: 100001;
|
|
}
|
|
|
|
@keyframes loader-spin {
|
|
to { transform: translate(-50%, -50%) rotate(360deg); }
|
|
}
|
|
|
|
#modal_loading img,
|
|
#modal_loading svg {
|
|
display: none !important;
|
|
visibility: hidden !important;
|
|
width: 0 !important;
|
|
height: 0 !important;
|
|
}
|
|
|
|
#modal_loading::before {
|
|
content: '';
|
|
position: absolute;
|
|
top: 50%;
|
|
left: 50%;
|
|
transform: translate(-50%, -50%);
|
|
width: 40px;
|
|
height: 40px;
|
|
border: 3px solid rgba(96, 165, 250, 0.2);
|
|
border-top-color: #60a5fa;
|
|
border-radius: 50%;
|
|
animation: loader-spin 0.8s linear infinite;
|
|
}
|
|
/* Navigation Menu Override */
|
|
ul.nav.nav-pills.bg-light {
|
|
background-color: rgba(30, 41, 59, 0.6) !important;
|
|
backdrop-filter: blur(10px);
|
|
border: 1px solid rgba(255, 255, 255, 0.08);
|
|
border-radius: 50rem !important;
|
|
padding: 6px !important;
|
|
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2) !important;
|
|
display: inline-flex !important;
|
|
flex-wrap: wrap;
|
|
justify-content: center;
|
|
width: auto !important;
|
|
margin-bottom: 20px;
|
|
}
|
|
|
|
ul.nav.nav-pills .nav-item {
|
|
margin: 0 2px;
|
|
}
|
|
|
|
ul.nav.nav-pills .nav-link {
|
|
border-radius: 50rem !important;
|
|
padding: 8px 20px !important;
|
|
color: #94a3b8 !important;
|
|
font-weight: 600;
|
|
transition: all 0.3s ease;
|
|
}
|
|
|
|
ul.nav.nav-pills .nav-link:hover {
|
|
background-color: rgba(255, 255, 255, 0.1);
|
|
color: #fff !important;
|
|
transform: translateY(-1px);
|
|
}
|
|
|
|
ul.nav.nav-pills .nav-link.active {
|
|
background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%) !important;
|
|
color: #fff !important;
|
|
box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
|
|
}
|
|
</style>
|
|
|
|
<style>
|
|
/* Smooth Load Transition */
|
|
.content-cloak,
|
|
#menu_module_div,
|
|
#menu_page_div {
|
|
opacity: 0;
|
|
transition: opacity 0.5s ease-out;
|
|
}
|
|
|
|
/* Staggered Delays for Natural Top-Down Flow */
|
|
#menu_module_div.visible {
|
|
opacity: 1;
|
|
transition-delay: 0ms;
|
|
}
|
|
|
|
#menu_page_div.visible {
|
|
opacity: 1;
|
|
transition-delay: 150ms;
|
|
}
|
|
|
|
.content-cloak.visible {
|
|
opacity: 1;
|
|
transition-delay: 300ms;
|
|
}
|
|
|
|
/* Navigation Menu Override (Top Sub-menu) */
|
|
ul.nav.nav-pills.bg-light {
|
|
background-color: rgba(30, 41, 59, 0.6) !important;
|
|
backdrop-filter: blur(10px);
|
|
border: 1px solid rgba(255, 255, 255, 0.08);
|
|
border-radius: 50rem !important;
|
|
padding: 6px !important;
|
|
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2) !important;
|
|
display: inline-flex !important;
|
|
flex-wrap: wrap;
|
|
justify-content: center;
|
|
width: auto !important;
|
|
margin-bottom: 20px;
|
|
}
|
|
|
|
ul.nav.nav-pills .nav-item { margin: 0 2px; }
|
|
ul.nav.nav-pills .nav-link {
|
|
border-radius: 50rem !important;
|
|
padding: 8px 20px !important;
|
|
color: #94a3b8 !important;
|
|
font-weight: 600;
|
|
transition: all 0.3s ease;
|
|
}
|
|
ul.nav.nav-pills .nav-link:hover {
|
|
background-color: rgba(255, 255, 255, 0.1);
|
|
color: #fff !important;
|
|
transform: translateY(-1px);
|
|
}
|
|
ul.nav.nav-pills .nav-link.active {
|
|
background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%) !important;
|
|
color: #fff !important;
|
|
box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
|
|
}
|
|
</style>
|
|
|
|
<style>
|
|
/* Smooth Load */
|
|
.content-cloak, #menu_module_div, #menu_page_div { opacity: 0; transition: opacity 0.5s ease-out; }
|
|
.content-cloak.visible, #menu_module_div.visible, #menu_page_div.visible { opacity: 1; }
|
|
</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>
|
|
/* 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;
|
|
}
|
|
}
|
|
</style>
|
|
|
|
<!-- Video Player Modal (Copied from List page) -->
|
|
<div class="modal fade" id="videoModal" tabindex="-1" role="dialog" aria-hidden="true">
|
|
<div class="modal-dialog modal-lg" style="max-width: 90%; margin: 1.75rem auto;">
|
|
<div class="modal-content" style="background: #0f172a; border: 1px solid rgba(16, 185, 129, 0.2); border-radius: 16px;">
|
|
<div class="modal-header" style="border-bottom: 1px solid rgba(255,255,255,0.05); padding: 15px 20px;">
|
|
<h5 class="modal-title" style="color: #ecfdf5; font-weight: 700; display: flex; align-items: center; gap: 10px;">
|
|
<i class="fa fa-youtube-play" style="color: #10b981;"></i>
|
|
<span id="current-video-title">Video Player</span>
|
|
</h5>
|
|
<button type="button" class="close" data-dismiss="modal" aria-label="Close" style="color: #94a3b8; text-shadow: none; opacity: 1;">
|
|
<span aria-hidden="true">×</span>
|
|
</button>
|
|
</div>
|
|
<div class="modal-body p-0" style="display: flex; flex-direction: column; height: 80vh;">
|
|
<div style="flex-grow: 1; background: black; position: relative;">
|
|
<video id="video-player" class="video-js vjs-big-play-centered vjs-theme-forest" controls preload="auto" style="width: 100%; height: 100%;"></video>
|
|
</div>
|
|
|
|
<!-- Playlist Control Bar -->
|
|
<div style="height: 60px; background: rgba(6, 78, 59, 0.3); border-top: 1px solid rgba(16, 185, 129, 0.1); display: flex; align-items: center; justify-content: space-between; padding: 0 20px;">
|
|
<div style="display: flex; align-items: center; gap: 15px;">
|
|
<button id="btn-prev-ep" class="playlist-nav-btn" title="이전 에피소드"><i class="fa fa-step-backward"></i></button>
|
|
<button id="btn-next-ep" class="playlist-nav-btn" title="다음 에피소드"><i class="fa fa-step-forward"></i></button>
|
|
<span id="playlist-progress" style="color: #d1fae5; font-weight: 600; font-size: 14px;"></span>
|
|
</div>
|
|
<button id="btn-toggle-playlist" class="playlist-toggle-btn active">
|
|
<i class="fa fa-list"></i> 플레이리스트
|
|
</button>
|
|
</div>
|
|
|
|
<!-- Playlist Drawer -->
|
|
<div id="playlist-list-container" style="height: 0px; background: rgba(2, 44, 34, 0.95); transition: height 0.3s ease; overflow-y: auto; border-top: 1px solid rgba(16, 185, 129, 0.1); display: none;">
|
|
<div id="playlist-list" style="padding: 10px;">
|
|
<!-- JS generated items -->
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<link href="https://vjs.zencdn.net/7.20.3/video-js.css" rel="stylesheet" />
|
|
<script src="https://vjs.zencdn.net/7.20.3/video.min.js"></script>
|
|
|
|
<style>
|
|
/* VideoJS Customization */
|
|
.vjs-theme-forest { --vjs-theme-forest--emerald: #10b981; }
|
|
.video-js.vjs-theme-forest .vjs-big-play-button { background-color: #10b981; border-color: #34d399; }
|
|
|
|
.playlist-nav-btn {
|
|
width: 40px; height: 40px; background: linear-gradient(135deg, #10b981, #059669);
|
|
border: none; border-radius: 50%; color: white; font-size: 14px;
|
|
cursor: pointer; transition: all 0.2s ease; display: flex; align-items: center; justify-content: center;
|
|
}
|
|
.playlist-nav-btn:hover { transform: scale(1.1); box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4); }
|
|
.playlist-nav-btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }
|
|
|
|
.playlist-toggle-btn {
|
|
padding: 8px 14px; background: rgba(16, 185, 129, 0.1); border: 1px solid rgba(16, 185, 129, 0.2);
|
|
border-radius: 8px; color: #6ee7b7; font-size: 13px; cursor: pointer; transition: all 0.2s ease;
|
|
}
|
|
.playlist-toggle-btn:hover { background: rgba(16, 185, 129, 0.2); color: #ecfdf5; }
|
|
.playlist-toggle-btn.active { background: rgba(16, 185, 129, 0.3); border-color: #10b981; color: #10b981; }
|
|
|
|
.playlist-item {
|
|
padding: 10px 12px; border-radius: 6px; cursor: pointer; transition: all 0.2s;
|
|
color: #d1fae5; font-size: 13px; display: flex; align-items: center; gap: 8px; border-bottom: 1px solid rgba(16, 185, 129, 0.05);
|
|
}
|
|
.playlist-item:hover { background: rgba(16, 185, 129, 0.1); color: #fff; }
|
|
.playlist-item.active { background: rgba(16, 185, 129, 0.2); color: #10b981; font-weight: 600; border-left: 3px solid #10b981; }
|
|
|
|
/* ========== Mobile Video Modal Fix ========== */
|
|
@media (max-width: 768px) {
|
|
/* 모달 크기 조정 */
|
|
#videoModal .modal-dialog {
|
|
margin: 10px auto !important;
|
|
max-width: calc(100vw - 20px) !important;
|
|
}
|
|
|
|
/* 모달 바디 높이 조정 */
|
|
#videoModal .modal-body {
|
|
height: auto !important;
|
|
max-height: 75vh !important;
|
|
}
|
|
|
|
/* 비디오 높이 제한 */
|
|
#video-player, .video-js {
|
|
max-height: 40vh !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;
|
|
}
|
|
|
|
#playlist-progress {
|
|
font-size: 12px !important;
|
|
}
|
|
}
|
|
|
|
/* 초소형 모바일 (400px 미만) */
|
|
@media (max-width: 400px) {
|
|
#video-player, .video-js {
|
|
max-height: 35vh !important;
|
|
}
|
|
|
|
#playlist-list-container {
|
|
max-height: 15vh !important;
|
|
}
|
|
}
|
|
</style>
|
|
|
|
<script>
|
|
var videoPlayer = null;
|
|
var playlist = [];
|
|
var currentPlaylistIndex = 0;
|
|
var currentPlayingPath = null;
|
|
var playlistRefreshInterval = null;
|
|
|
|
function play_video(path, filename) {
|
|
if (!path) {
|
|
$.notify('파일 경로를 찾을 수 없습니다.', { type: 'warning' });
|
|
return;
|
|
}
|
|
|
|
// 플레이리스트 정보 가져오기
|
|
$.get('/' + package_name + '/ajax/' + sub + '/get_playlist?path=' + encodeURIComponent(path), function(data) {
|
|
playlist = data.playlist || [{path: path, name: filename}];
|
|
currentPlaylistIndex = data.current_index || 0;
|
|
currentPlayingPath = path;
|
|
|
|
$('#videoModal').modal('show');
|
|
|
|
if (!videoPlayer) {
|
|
videoPlayer = videojs('video-player', {
|
|
fluid: true,
|
|
playbackRates: [0.5, 1, 1.25, 1.5, 2]
|
|
});
|
|
|
|
videoPlayer.on('ended', function() {
|
|
if (currentPlaylistIndex < playlist.length - 1) {
|
|
playVideoAtIndex(currentPlaylistIndex + 1);
|
|
}
|
|
});
|
|
}
|
|
|
|
playVideoAtIndex(currentPlaylistIndex);
|
|
renderPlaylistItems();
|
|
|
|
// 실시간 갱신 시작 (10초)
|
|
if (playlistRefreshInterval) clearInterval(playlistRefreshInterval);
|
|
playlistRefreshInterval = setInterval(refreshPlaylistData, 10000);
|
|
|
|
// Open playlist drawer by default
|
|
$('#playlist-list-container').show().css('height', '200px');
|
|
});
|
|
}
|
|
|
|
function playVideoAtIndex(index) {
|
|
if (index < 0 || index >= playlist.length) return;
|
|
currentPlaylistIndex = index;
|
|
var item = playlist[index];
|
|
currentPlayingPath = item.path;
|
|
|
|
var streamUrl = '/' + package_name + '/ajax/' + sub + '/stream_video?path=' + encodeURIComponent(item.path);
|
|
|
|
if (videoPlayer) {
|
|
videoPlayer.src({ type: 'video/mp4', src: streamUrl });
|
|
videoPlayer.play();
|
|
}
|
|
|
|
$('#current-video-title').text(item.name);
|
|
updatePlaylistUI();
|
|
}
|
|
|
|
function updatePlaylistUI() {
|
|
var total = playlist.length;
|
|
var current = currentPlaylistIndex + 1;
|
|
$('#playlist-progress').text(current + ' / ' + total + ' 에피소드');
|
|
|
|
// 버튼 활성/비활성
|
|
$('#btn-prev-ep').toggle(currentPlaylistIndex > 0);
|
|
$('#btn-next-ep').toggle(currentPlaylistIndex < playlist.length - 1);
|
|
|
|
// 리스트 하이라이트
|
|
$('#playlist-list .playlist-item').removeClass('active');
|
|
$('#playlist-list .playlist-item').eq(currentPlaylistIndex).addClass('active');
|
|
}
|
|
|
|
function refreshPlaylistData(slient = true) {
|
|
if (!currentPlayingPath || !$('#videoModal').is(':visible')) return;
|
|
|
|
$.get('/' + package_name + '/ajax/' + sub + '/get_playlist?path=' + encodeURIComponent(currentPlayingPath), function(data) {
|
|
if (data.playlist && data.playlist.length > 0) {
|
|
var oldLength = playlist.length;
|
|
playlist = data.playlist;
|
|
currentPlaylistIndex = data.current_index;
|
|
|
|
if (playlist.length > oldLength) {
|
|
$.notify('새로운 에피소드가 감지되어 플레이리스트가 업데이트되었습니다.', { type: 'success' });
|
|
}
|
|
|
|
renderPlaylistItems();
|
|
updatePlaylistUI();
|
|
}
|
|
});
|
|
}
|
|
|
|
function renderPlaylistItems() {
|
|
var str = '';
|
|
for (var i = 0; i < playlist.length; i++) {
|
|
var item = playlist[i];
|
|
var isActive = (i === currentPlaylistIndex) ? 'active' : '';
|
|
str += '<div class="playlist-item ' + isActive + '" onclick="playVideoAtIndex(' + i + ')">';
|
|
str += '<i class="fa ' + (isActive ? 'fa-play-circle' : 'fa-play') + '"></i>';
|
|
str += '<span>' + item.name + '</span>';
|
|
str += '</div>';
|
|
}
|
|
$('#playlist-list').html(str);
|
|
}
|
|
|
|
// 모달 닫힐 때 중지
|
|
$('#videoModal').on('hidden.bs.modal', function () {
|
|
if (videoPlayer) {
|
|
videoPlayer.pause();
|
|
}
|
|
if (playlistRefreshInterval) {
|
|
clearInterval(playlistRefreshInterval);
|
|
playlistRefreshInterval = null;
|
|
}
|
|
currentPlayingPath = null;
|
|
});
|
|
|
|
// 플레이리스트 컨트롤러 핸들러
|
|
$('#btn-prev-ep').click(function() { playVideoAtIndex(currentPlaylistIndex - 1); });
|
|
$('#btn-next-ep').click(function() { playVideoAtIndex(currentPlaylistIndex + 1); });
|
|
$('#btn-toggle-playlist').click(function() {
|
|
$(this).toggleClass('active');
|
|
var container = $('#playlist-list-container');
|
|
if (container.is(':visible')) {
|
|
container.css('height', '0');
|
|
setTimeout(function() { container.hide(); }, 300);
|
|
} else {
|
|
container.show();
|
|
setTimeout(function() { container.css('height', '200px'); }, 10);
|
|
}
|
|
});
|
|
</script>
|
|
{% endblock %}
|