first commit

This commit is contained in:
2022-04-30 16:45:26 +09:00
commit 4cd21e759c
26 changed files with 4434 additions and 0 deletions

View File

@@ -0,0 +1,201 @@
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;
}
#airing_list {
display: none;
}
.cut-text {
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
width: 100%;
}
@media (min-width: 576px) {
.container {
max-width: 100%;
}
}
#screen_movie_list {
margin-top: 10px;
}
/* .spinner {*/
/* width: 40px;*/
/* height: 40px;*/
/* background-color: #333;*/
/* margin: 100px auto;*/
/* -webkit-animation: sk-rotateplane 1.2s infinite ease-in-out;*/
/* animation: sk-rotateplane 1.2s infinite ease-in-out;*/
/*}*/
/*@-webkit-keyframes sk-rotateplane {*/
/* 0% { -webkit-transform: perspective(120px) }*/
/* 50% { -webkit-transform: perspective(120px) rotateY(180deg) }*/
/* 100% { -webkit-transform: perspective(120px) rotateY(180deg) rotateX(180deg) }*/
/*}*/
/*@keyframes sk-rotateplane {*/
/* 0% {*/
/* transform: perspective(120px) rotateX(0deg) rotateY(0deg);*/
/* -webkit-transform: perspective(120px) rotateX(0deg) rotateY(0deg)*/
/* } 50% {*/
/* transform: perspective(120px) rotateX(-180.1deg) rotateY(0deg);*/
/* -webkit-transform: perspective(120px) rotateX(-180.1deg) rotateY(0deg)*/
/* } 100% {*/
/* transform: perspective(120px) rotateX(-180deg) rotateY(-179.9deg);*/
/* -webkit-transform: perspective(120px) rotateX(-180deg) rotateY(-179.9deg);*/
/* }*/
/*}*/
.spinner {
width: 40px;
height: 40px;
position: relative;
margin: 100px auto;
}
.double-bounce1,
.double-bounce2 {
width: 100%;
height: 100%;
border-radius: 50%;
background-color: #333;
opacity: 0.6;
position: absolute;
top: 0;
left: 0;
-webkit-animation: sk-bounce 2s infinite ease-in-out;
animation: sk-bounce 2s infinite ease-in-out;
}
.double-bounce2 {
-webkit-animation-delay: -1s;
animation-delay: -1s;
}
@-webkit-keyframes sk-bounce {
0%,
100% {
-webkit-transform: scale(0);
}
50% {
-webkit-transform: scale(1);
}
}
@keyframes sk-bounce {
0%,
100% {
transform: scale(0);
-webkit-transform: scale(0);
}
50% {
transform: scale(1);
-webkit-transform: scale(1);
}
}
.badge-on-image {
position: absolute;
top: 2px;
/*bottom: 2px; !* position where you want it *!*/
right: 2px;
padding: 5px 12px;
}

View File

@@ -0,0 +1,192 @@
{% extends "base.html" %}
{% block content %}
<!--{# <div>#}-->
<!--{# #}-->
<!--{# </div>#}-->
<div>
<form id="form_search" class="form-inline" style="text-align:left">
<div class="container-fluid">
<div class="row show-grid">
<span class="col-md-4">
<select id="order" name="order" class="form-control form-control-sm">
<option value="desc">최근순</option>
<option value="asc">오래된순</option>
</select>
<select id="option" name="option" class="form-control form-control-sm">
<option value="all">전체</option>
<option value="completed">완료</option>
</select>
</span>
<span class="col-md-8">
<input id="search_word" name="search_word" class="form-control form-control-sm w-75" type="text" placeholder="" aria-label="Search">
<button id="search" class="btn btn-sm btn-outline-success">검색</button>
<button id="reset_btn" class="btn btn-sm btn-outline-success">리셋</button>
</span>
</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>
<script type="text/javascript">
const package_name = "{{arg['package_name']}}";
// {#const sub = "{{arg['sub']}}";#}
// {#const sub = "list";#}
const sub = ""
let current_data = null;
const get_list = (page, move_top=true) => {
let formData = get_formdata('#form_search')
// console.log(formData)
formData += '&page=' + page;
$.ajax({
url: '/' + package_name + '/ajax/web_list',
type: "POST",
cache: false,
data: formData,
dataType: 'json',
success: (data) => {
current_data = data;
if (data) {
if (move_top)
window.scrollTo(0,0);
make_list(data.list)
// {#console.log(data)#}
// {#console.log(ret.data)#}
} else {
$.notify('<strong>분석 실패</strong><br>' + ret.log, {type: 'warning'});
}
}
});
}
function sub_request_search(page, move_top=true) {
let formData = get_formdata('#form_search')
// console.log(formData)
formData += '&page=' + page;
$.ajax({
url: '/' + package_name + '/ajax/web_list',
type: "POST",
cache: false,
data: formData,
dataType: "json",
success: function (data) {
current_data = data;
if (move_top)
window.scrollTo(0,0);
make_list(data.list)
make_page_html(data.paging)
}
});
}
$("body").on('click', '#remove_btn', function(e) {
e.preventDefault();
let id = $(this).data('id');
$.ajax({
url: '/'+package_name+'/ajax/db_remove',
type: "POST",
cache: false,
data: {id:id},
dataType: "json",
success: function (data) {
if (data) {
$.notify('<strong>삭제되었습니다.</strong>', {
type: 'success'
});
sub_request_search(current_data.paging.current_page, false)
// get_list()
} else {
$.notify('<strong>삭제 실패</strong>', {
type: 'warning'
});
}
}
});
});
$(document).ready(function(){
// {#global_sub_request_search('1');#}
get_list(1)
});
$("body").on('click', '#page', function(e){
e.preventDefault();
sub_request_search($(this).data('page'));
});
$("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();
let search_word = $(this).data('title');
document.getElementById("search_word").value = search_word;
sub_request_search('1')
});
$("body").on('click', '#request_btn', function(e){
e.preventDefault();
var content_code = $(this).data('content_code');
$(location).attr('href', '/' + package_name + '/request?code=' + content_code)
});
function make_list(data) {
//console.log(data)
let tmp, tmp2 = '';
// console.log(data)
if (data.length > 0) {
let str = ''
for (let i in data) {
console.log(data[i])
str += m_row_start();
str += m_col(1, data[i].id);
tmp = (data[i].status == 'completed') ? '완료' : '미완료';
str += m_col(1, tmp);
tmp = data[i].created_time + '(추가)<br/>';
if (data[i].completed_time != null)
tmp += data[i].completed_time + '(완료)';
str += m_col(3, tmp)
tmp_save_path = (data[i].contents_json.save_path) ? (data[i].contents_json.save_path) : ''
tmp = tmp_save_path + '<br />' + data[i].contents_json.filename + '<br /><br />';
tmp2 = m_button('json_btn', 'JSON', [{'key': 'id', 'value': data[i].id}]);
tmp2 += m_button('request_btn', '작품 검색', [{'key': 'content_code', 'value': data[i].contents_json.program_code}]);
tmp2 += m_button('self_search_btn', '목록 검색', [{'key': 'title', 'value': data[i].contents_json.program_title}]);
tmp2 += m_button('remove_btn', '삭제', [{'key': 'id', 'value': data[i].id}]);
tmp += m_button_group(tmp2)
str += m_col(7, tmp)
str += m_row_end();
if (i != data.length - 1) str += m_hr();
}
document.getElementById("list_div").innerHTML = str;
} else {
console.log('')
return false;
}
}
</script>
<style>
@media (min-width: 576px) {
.container {
max-width: 98%;
}
}
</style>
{% endblock %}

117
static/css/inflearn_request.css Executable file
View File

@@ -0,0 +1,117 @@
brg['current_code']}}";utton.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;
}
#airing_list {
display: none;
}
@media (min-width: 992px) {
.container {
max-width: 96%;
}
}
@media (min-width: 768px) {
.container {
max-width: 94%;
}
}
@media (min-width: 576px) {
.container {
max-width: 96%;
}
.form-inline .form-control {
width: 98%;
}