2022.01.31 anilife 버그 픽스 (.01)
This commit is contained in:
112
logic_anilife.py
112
logic_anilife.py
@@ -178,43 +178,59 @@ class LogicAniLife(LogicModuleBase):
|
||||
import time
|
||||
|
||||
cookie = None
|
||||
# browser_args = [
|
||||
# "--window-size=1300,570",
|
||||
# "--window-position=000,000",
|
||||
# "--disable-dev-shm-usage",
|
||||
# "--no-sandbox",
|
||||
# "--disable-web-security",
|
||||
# "--disable-features=site-per-process",
|
||||
# "--disable-setuid-sandbox",
|
||||
# "--disable-accelerated-2d-canvas",
|
||||
# "--no-first-run",
|
||||
# "--no-zygote",
|
||||
# # '--single-process',
|
||||
# "--disable-gpu",
|
||||
# # "--use-gl=egl",
|
||||
# "--disable-blink-features=AutomationControlled",
|
||||
# # "--disable-background-networking",
|
||||
# # "--enable-features=NetworkService,NetworkServiceInProcess",
|
||||
# "--disable-background-timer-throttling",
|
||||
# "--disable-backgrounding-occluded-windows",
|
||||
# "--disable-breakpad",
|
||||
# "--disable-client-side-phishing-detection",
|
||||
# "--disable-component-extensions-with-background-pages",
|
||||
# "--disable-default-apps",
|
||||
# "--disable-extensions",
|
||||
# "--disable-features=Translate",
|
||||
# "--disable-hang-monitor",
|
||||
# "--disable-ipc-flooding-protection",
|
||||
# "--disable-popup-blocking",
|
||||
# "--disable-prompt-on-repost",
|
||||
# # "--disable-renderer-backgrounding",
|
||||
# "--disable-sync",
|
||||
# "--force-color-profile=srgb",
|
||||
# # "--metrics-recording-only",
|
||||
# # "--enable-automation",
|
||||
# "--password-store=basic",
|
||||
# # "--use-mock-keychain",
|
||||
# # "--hide-scrollbars",
|
||||
# "--mute-audio",
|
||||
# ]
|
||||
browser_args = [
|
||||
"--window-size=1300,570",
|
||||
"--window-position=000,000",
|
||||
"--disable-dev-shm-usage",
|
||||
"--window-position=0,0",
|
||||
# "--disable-dev-shm-usage",
|
||||
"--no-sandbox",
|
||||
"--disable-web-security",
|
||||
"--disable-features=site-per-process",
|
||||
"--disable-setuid-sandbox",
|
||||
"--disable-accelerated-2d-canvas",
|
||||
"--no-first-run",
|
||||
"--no-zygote",
|
||||
# '--single-process',
|
||||
# "--disable-web-security",
|
||||
# "--disable-features=site-per-process",
|
||||
# "--disable-setuid-sandbox",
|
||||
# "--disable-accelerated-2d-canvas",
|
||||
# "--no-first-run",
|
||||
# "--no-zygote",
|
||||
# "--single-process",
|
||||
"--disable-gpu",
|
||||
"--use-gl=egl",
|
||||
"--disable-blink-features=AutomationControlled",
|
||||
"--disable-background-networking",
|
||||
"--enable-features=NetworkService,NetworkServiceInProcess",
|
||||
"--disable-background-timer-throttling",
|
||||
"--disable-backgrounding-occluded-windows",
|
||||
"--disable-breakpad",
|
||||
"--disable-client-side-phishing-detection",
|
||||
"--disable-component-extensions-with-background-pages",
|
||||
"--disable-default-apps",
|
||||
"--disable-extensions",
|
||||
"--disable-features=Translate",
|
||||
"--disable-hang-monitor",
|
||||
"--disable-ipc-flooding-protection",
|
||||
"--disable-popup-blocking",
|
||||
"--disable-prompt-on-repost",
|
||||
"--disable-renderer-backgrounding",
|
||||
"--disable-sync",
|
||||
"--force-color-profile=srgb",
|
||||
"--metrics-recording-only",
|
||||
"--enable-automation",
|
||||
"--password-store=basic",
|
||||
"--use-mock-keychain",
|
||||
"--hide-scrollbars",
|
||||
# "--use-gl=egl",
|
||||
"--mute-audio",
|
||||
]
|
||||
# scraper = cloudscraper.create_scraper(
|
||||
@@ -302,7 +318,8 @@ class LogicAniLife(LogicModuleBase):
|
||||
url, wait_until="load", referer=LogicAniLife.headers["Referer"]
|
||||
)
|
||||
# page.wait_for_timeout(10000)
|
||||
await asyncio.sleep(2.9)
|
||||
# await asyncio.sleep(2.9)
|
||||
await asyncio.sleep(1)
|
||||
|
||||
# await page.reload()
|
||||
|
||||
@@ -313,11 +330,13 @@ class LogicAniLife(LogicModuleBase):
|
||||
print(f"page.url:: {page.url}")
|
||||
LogicAniLife.origin_url = page.url
|
||||
|
||||
# print(page.content())
|
||||
temp_content = await page.content()
|
||||
#
|
||||
# print(temp_content)
|
||||
|
||||
print(f"run at {time.time() - start} sec")
|
||||
|
||||
return await page.content()
|
||||
return temp_content
|
||||
except Exception as e:
|
||||
logger.error("Exception:%s", e)
|
||||
logger.error(traceback.format_exc())
|
||||
@@ -922,8 +941,25 @@ class LogicAniLife(LogicModuleBase):
|
||||
return jsonify(ModelAniLifeItem.web_list(request))
|
||||
elif sub == "db_remove":
|
||||
return jsonify(ModelAniLifeItem.delete_by_id(req.form["id"]))
|
||||
elif sub == "add_whitelist":
|
||||
try:
|
||||
# params = request.get_data()
|
||||
# logger.debug(f"params: {params}")
|
||||
# data_code = request.args.get("data_code")
|
||||
params = request.get_json()
|
||||
logger.debug(f"params:: {params}")
|
||||
if params is not None:
|
||||
code = params["data_code"]
|
||||
logger.debug(f"params: {code}")
|
||||
ret = LogicOhli24.add_whitelist(code)
|
||||
else:
|
||||
ret = LogicOhli24.add_whitelist()
|
||||
return jsonify(ret)
|
||||
except Exception as e:
|
||||
P.logger.error("Exception:%s", e)
|
||||
logger.error("Exception:%s", e)
|
||||
logger.error(traceback.format_exc())
|
||||
except Exception as e:
|
||||
P.logger.error(f"Exception: {str(e)}")
|
||||
P.logger.error(traceback.format_exc())
|
||||
|
||||
@staticmethod
|
||||
@@ -1268,7 +1304,7 @@ class AniLifeQueueEntity(FfmpegQueueEntity):
|
||||
db_entity = ModelAniLifeItem.get_by_anilife_id(self.info["_id"])
|
||||
if db_entity is not None:
|
||||
db_entity.status = "completed"
|
||||
db_entity.complated_time = datetime.now()
|
||||
db_entity.completed_time = datetime.now()
|
||||
db_entity.save()
|
||||
|
||||
def make_episode_info(self):
|
||||
|
||||
@@ -1,21 +1,21 @@
|
||||
{% extends "base.html" %} {% block content %}
|
||||
<div id="preloader">
|
||||
<div class='demo'>
|
||||
<div class="demo">
|
||||
<!-- <div class="loader-inner">-->
|
||||
<div class='circle'>
|
||||
<div class='inner'></div>
|
||||
<div class="circle">
|
||||
<div class="inner"></div>
|
||||
</div>
|
||||
<div class='circle'>
|
||||
<div class='inner'></div>
|
||||
<div class="circle">
|
||||
<div class="inner"></div>
|
||||
</div>
|
||||
<div class='circle'>
|
||||
<div class='inner'></div>
|
||||
<div class="circle">
|
||||
<div class="inner"></div>
|
||||
</div>
|
||||
<div class='circle'>
|
||||
<div class='inner'></div>
|
||||
<div class="circle">
|
||||
<div class="inner"></div>
|
||||
</div>
|
||||
<div class='circle'>
|
||||
<div class='inner'></div>
|
||||
<div class="circle">
|
||||
<div class="inner"></div>
|
||||
</div>
|
||||
<!-- </div>-->
|
||||
</div>
|
||||
@@ -29,26 +29,15 @@
|
||||
aria-label="Search"
|
||||
aria-describedby="search-addon"
|
||||
/>
|
||||
<button id="btn_search" type="button" class="btn btn-primary">
|
||||
search
|
||||
</button>
|
||||
<button id="btn_search" type="button" class="btn btn-primary">search</button>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<div
|
||||
id="anime_category"
|
||||
class="btn-group"
|
||||
role="group"
|
||||
aria-label="Basic example"
|
||||
>
|
||||
<div id="anime_category" class="btn-group" role="group" aria-label="Basic example">
|
||||
<button id="ing" type="button" class="btn btn-success">방영중</button>
|
||||
<button id="theater" type="button" class="btn btn-primary">극장판</button>
|
||||
<button id="complete_anilist" type="button" class="btn btn-dark">
|
||||
완결
|
||||
</button>
|
||||
<button id="top20" type="button" class="btn btn-grey">
|
||||
Top20
|
||||
</button>
|
||||
<button id="complete_anilist" type="button" class="btn btn-dark">완결</button>
|
||||
<button id="top20" type="button" class="btn btn-grey">Top20</button>
|
||||
</div>
|
||||
<form id="airing_list_form">
|
||||
<div id="airing_list"></div>
|
||||
@@ -62,66 +51,65 @@
|
||||
</div>
|
||||
<!--전체-->
|
||||
|
||||
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/lozad/dist/lozad.min.js"></script>
|
||||
<script
|
||||
type="text/javascript"
|
||||
src="https://cdn.jsdelivr.net/npm/lozad/dist/lozad.min.js"
|
||||
></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery.lazyload/1.9.1/jquery.lazyload.min.js"
|
||||
src="https://cdnjs.cloudflare.com/ajax/libs/jquery.lazyload/1.9.1/jquery.lazyload.min.js"
|
||||
integrity="sha512-jNDtFf7qgU0eH/+Z42FG4fw3w7DM/9zbgNPe3wfJlCylVDTT3IgKW5r92Vy9IHa6U50vyMz5gRByIu4YIXFtaQ=="
|
||||
crossorigin="anonymous" referrerpolicy="no-referrer"></script>
|
||||
crossorigin="anonymous"
|
||||
referrerpolicy="no-referrer"
|
||||
></script>
|
||||
<script type="text/javascript">
|
||||
const package_name = "{{arg['package_name'] }}";
|
||||
const sub = "{{arg['sub'] }}";
|
||||
const anilife_url = "{{arg['anilife_url']}}";
|
||||
let current_data = null;
|
||||
let page = 1;
|
||||
const package_name = "{{arg['package_name'] }}"
|
||||
const sub = "{{arg['sub'] }}"
|
||||
const anilife_url = "{{arg['anilife_url']}}"
|
||||
let current_data = null
|
||||
let page = 1
|
||||
let next_page = Number
|
||||
let current_cate = ''
|
||||
let current_query = ''
|
||||
let current_cate = ""
|
||||
let current_query = ""
|
||||
|
||||
const observer = lozad('.lozad', {
|
||||
rootMargin: '10px 0px', // syntax similar to that of CSS Margin
|
||||
const observer = lozad(".lozad", {
|
||||
rootMargin: "10px 0px", // syntax similar to that of CSS Margin
|
||||
threshold: 0.1, // ratio of element convergence
|
||||
enableAutoReload: true // it will reload the new image when validating attributes changes
|
||||
});
|
||||
observer.observe();
|
||||
const loader = document.getElementById("preloader");
|
||||
enableAutoReload: true, // it will reload the new image when validating attributes changes
|
||||
})
|
||||
observer.observe()
|
||||
const loader = document.getElementById("preloader")
|
||||
|
||||
const dismissLoadingScreen = async function () {
|
||||
console.log("Before the delay")
|
||||
// await delay(2.5);
|
||||
loader.style.display = "none";
|
||||
};
|
||||
|
||||
loader.style.display = "none"
|
||||
}
|
||||
|
||||
const get_anime_list = (type, page) => {
|
||||
console.log(`type: ${type}, page: ${page}`)
|
||||
let url = ''
|
||||
let data = {"page": page, "type": type}
|
||||
let url = ""
|
||||
let data = { page: page, type: type }
|
||||
|
||||
switch (type) {
|
||||
case 'ing':
|
||||
url = '/' + package_name + '/ajax/' + sub + '/anime_list'
|
||||
current_cate = 'ing'
|
||||
break;
|
||||
case 'movie':
|
||||
url = '/' + package_name + '/ajax/' + sub + '/screen_movie_list'
|
||||
current_cate = 'movie'
|
||||
break;
|
||||
case 'theater':
|
||||
url = '/' + package_name + '/ajax/' + sub + '/anime_list'
|
||||
current_cate = 'theater'
|
||||
break;
|
||||
case 'fin':
|
||||
url = '/' + package_name + '/ajax/' + sub + '/complete_list'
|
||||
current_cate = 'fin'
|
||||
case "ing":
|
||||
url = "/" + package_name + "/ajax/" + sub + "/anime_list"
|
||||
current_cate = "ing"
|
||||
break
|
||||
case 'top20':
|
||||
url = '/' + package_name + '/ajax/' + sub + '/anime_list'
|
||||
current_cate = 'top20'
|
||||
case "movie":
|
||||
url = "/" + package_name + "/ajax/" + sub + "/screen_movie_list"
|
||||
current_cate = "movie"
|
||||
break
|
||||
case "theater":
|
||||
url = "/" + package_name + "/ajax/" + sub + "/anime_list"
|
||||
current_cate = "theater"
|
||||
break
|
||||
case "fin":
|
||||
url = "/" + package_name + "/ajax/" + sub + "/complete_list"
|
||||
current_cate = "fin"
|
||||
break
|
||||
case "top20":
|
||||
url = "/" + package_name + "/ajax/" + sub + "/anime_list"
|
||||
current_cate = "top20"
|
||||
break
|
||||
default:
|
||||
break;
|
||||
break
|
||||
}
|
||||
|
||||
$.ajax({
|
||||
@@ -132,18 +120,18 @@
|
||||
dataType: "json",
|
||||
success: (ret) => {
|
||||
current_screen_movie_data = ret
|
||||
console.log('ret::>', ret)
|
||||
console.log("ret::>", ret)
|
||||
|
||||
if (current_screen_movie_data !== '') {
|
||||
if (current_screen_movie_data !== "") {
|
||||
if (type === "ing") {
|
||||
make_airing_list(ret.data, page)
|
||||
observer.observe();
|
||||
observer.observe()
|
||||
} else if (type === "fin") {
|
||||
make_screen_movie_list(ret.data, page)
|
||||
observer.observe();
|
||||
observer.observe()
|
||||
} else if (type === "theater") {
|
||||
make_screen_movie_list(ret.data, page)
|
||||
observer.observe();
|
||||
observer.observe()
|
||||
} else {
|
||||
make_screen_movie_list(ret.data, page)
|
||||
}
|
||||
@@ -152,165 +140,193 @@
|
||||
}
|
||||
dismissLoadingScreen()
|
||||
next_page = page + 1
|
||||
}
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
function make_airing_list(data, page) {
|
||||
let str = ''
|
||||
let tmp = ''
|
||||
console.log("call make_airing_list()")
|
||||
let str = ""
|
||||
let tmp = ""
|
||||
|
||||
str += '<div>';
|
||||
str += '<button type="button" class="btn btn-info">Page <span class="badge bg-warning">' + page + '</span></button>';
|
||||
str += '</div>';
|
||||
str += '<div id="inner_screen_movie" class="row infinite-scroll">';
|
||||
str += "<div>"
|
||||
str +=
|
||||
'<button type="button" class="btn btn-info">Page <span class="badge bg-warning">' +
|
||||
page +
|
||||
"</span></button>"
|
||||
str += "</div>"
|
||||
str += '<div id="inner_screen_movie" class="row infinite-scroll">'
|
||||
for (let i in data.anime_list) {
|
||||
|
||||
tmp = '<div class="col-6 col-sm-4 col-md-3">';
|
||||
tmp += '<div class="card">';
|
||||
tmp = '<div class="col-6 col-sm-4 col-md-3">'
|
||||
tmp += '<div class="card">'
|
||||
// tmp += '<img class="lozad" data-src="' + data.anime_list[i].image_link + '" />';
|
||||
tmp += '<img class="lazyload" src="../static/img_loader_x200.svg" data-original="' + data.anime_list[i].image_link + '" style="cursor: pointer" onclick="location.href=\'./request?code=' + data.anime_list[i].code + '\'"/>';
|
||||
tmp +=
|
||||
'<img class="lazyload" src="../static/img_loader_x200.svg" data-original="' +
|
||||
data.anime_list[i].image_link +
|
||||
'" style="cursor: pointer" onclick="location.href=\'./request?code=' +
|
||||
data.anime_list[i].code +
|
||||
"'\"/>"
|
||||
tmp += '<div class="card-body">'
|
||||
// {#tmp += '<button id="code_button" data-code="' + data.episode[i].code + '" type="button" class="btn btn-primary code-button bootstrap-tooltip" data-toggle="button" data-tooltip="true" aria-pressed="true" autocomplete="off" data-placement="top">' +#}
|
||||
// {# '<span data-tooltip-text="'+data.episode[i].title+'">' + data.episode[i].code + '</span></button></div>';#}
|
||||
tmp += '<h5 class="card-title">' + data.anime_list[i].title + '</h5>';
|
||||
tmp += '<p class="card-text">' + data.anime_list[i].code + '</p>';
|
||||
tmp += '<a href="./request?code=' + data.anime_list[i].code + '" class="btn btn-primary cut-text">' + data.anime_list[i].title + '</a>';
|
||||
tmp += '</div>';
|
||||
tmp += '</div>';
|
||||
tmp += '</div>';
|
||||
tmp += '<h5 class="card-title">' + data.anime_list[i].title + "</h5>"
|
||||
tmp +=
|
||||
'<p class="card-text">' +
|
||||
// data.anime_list[i].code +
|
||||
'<button id="add_whitelist" name="add_whitelist" class="btn btn-sm btn-favorite mb-1" data-code="' +
|
||||
data.anime_list[i].code +
|
||||
'"><i class="bi bi-heart-fill"></i></button></p>'
|
||||
tmp +=
|
||||
'<a href="./request?code=' +
|
||||
data.anime_list[i].code +
|
||||
'" class="btn btn-primary cut-text">' +
|
||||
data.anime_list[i].title +
|
||||
"</a>"
|
||||
// tmp +=
|
||||
// '<button id="add_whitelist" name="add_whitelist" class="btn btn-sm btn-favorite mb-1" data-code="' +
|
||||
// data.anime_list[i].code +
|
||||
// '"><i class="bi bi-heart-fill"></i></button>';
|
||||
tmp += "</div><!-- .card -->"
|
||||
tmp += "</div>"
|
||||
tmp += "</div>"
|
||||
str += tmp
|
||||
|
||||
}
|
||||
str += '</div>';
|
||||
str += m_hr_black();
|
||||
str += "</div>"
|
||||
// str += '</div><!-- .card-columns -->';
|
||||
str += m_hr_black()
|
||||
|
||||
if (page > 1) {
|
||||
|
||||
const temp = document.createElement('div')
|
||||
temp.innerHTML = str;
|
||||
const temp = document.createElement("div")
|
||||
temp.innerHTML = str
|
||||
while (temp.firstChild) {
|
||||
document.getElementById("screen_movie_list").appendChild(temp.firstChild);
|
||||
document.getElementById("screen_movie_list").appendChild(temp.firstChild)
|
||||
}
|
||||
page++
|
||||
|
||||
} else {
|
||||
|
||||
document.getElementById("screen_movie_list").innerHTML = str;
|
||||
|
||||
document.getElementById("screen_movie_list").innerHTML = str
|
||||
}
|
||||
|
||||
$("img.lazyload").lazyload({
|
||||
threshold: 10,
|
||||
effect: "fadeIn",
|
||||
});
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
function make_search_result_list(data, page) {
|
||||
let str = ''
|
||||
let tmp = ''
|
||||
let str = ""
|
||||
let tmp = ""
|
||||
|
||||
console.log(data.anime_list, page)
|
||||
|
||||
str += '<div>';
|
||||
str += '<button type="button" class="btn btn-info">Page <span class="badge bg-warning">' + page + '</span></button>';
|
||||
str += '</div>';
|
||||
str += '<div id="inner_screen_movie" class="row infinite-scroll">';
|
||||
str += "<div>"
|
||||
str +=
|
||||
'<button type="button" class="btn btn-info">Page <span class="badge bg-warning">' +
|
||||
page +
|
||||
"</span></button>"
|
||||
str += "</div>"
|
||||
str += '<div id="inner_screen_movie" class="row infinite-scroll">'
|
||||
for (let i in data.anime_list) {
|
||||
if (data.anime_list[i].wr_id !== '') {
|
||||
if (data.anime_list[i].wr_id !== "") {
|
||||
const re = /bo_table=([^&]+)/
|
||||
const bo_table = data.anime_list[i].link.match(re)
|
||||
// console.log(bo_table)
|
||||
request_url = './request?code=' + data.anime_list[i].code + '&wr_id=' + data.anime_list[i].wr_id + '&bo_table=' + bo_table[1]
|
||||
request_url =
|
||||
"./request?code=" +
|
||||
data.anime_list[i].code +
|
||||
"&wr_id=" +
|
||||
data.anime_list[i].wr_id +
|
||||
"&bo_table=" +
|
||||
bo_table[1]
|
||||
} else {
|
||||
request_url = './request?code=' + data.anime_list[i].code
|
||||
request_url = "./request?code=" + data.anime_list[i].code
|
||||
}
|
||||
|
||||
tmp = '<div class="col-sm-4">';
|
||||
tmp += '<div class="card">';
|
||||
tmp += '<img class="card-img-top" src="' + data.anime_list[i].image_link + '" />';
|
||||
tmp = '<div class="col-sm-4">'
|
||||
tmp += '<div class="card">'
|
||||
tmp += '<img class="card-img-top" src="' + data.anime_list[i].image_link + '" />'
|
||||
tmp += '<div class="card-body">'
|
||||
// {#tmp += '<button id="code_button" data-code="' + data.episode[i].code + '" type="button" class="btn btn-primary code-button bootstrap-tooltip" data-toggle="button" data-tooltip="true" aria-pressed="true" autocomplete="off" data-placement="top">' +#}
|
||||
// {# '<span data-tooltip-text="'+data.episode[i].title+'">' + data.episode[i].code + '</span></button></div>';#}
|
||||
tmp += '<h5 class="card-title">' + data.anime_list[i].title + '</h5>';
|
||||
tmp += '<p class="card-text">' + data.anime_list[i].code + '</p>';
|
||||
tmp += '<a href="' + request_url + '" class="btn btn-primary cut-text">' + data.anime_list[i].title + '</a>';
|
||||
tmp += '</div>';
|
||||
tmp += '</div>';
|
||||
tmp += '</div>';
|
||||
tmp += '<h5 class="card-title">' + data.anime_list[i].title + "</h5>"
|
||||
tmp += '<p class="card-text">' + data.anime_list[i].code + "</p>"
|
||||
tmp +=
|
||||
'<a href="' +
|
||||
request_url +
|
||||
'" class="btn btn-primary cut-text">' +
|
||||
data.anime_list[i].title +
|
||||
"</a>"
|
||||
tmp += "</div>"
|
||||
tmp += "</div>"
|
||||
tmp += "</div>"
|
||||
str += tmp
|
||||
|
||||
}
|
||||
str += '</div>';
|
||||
str += m_hr_black();
|
||||
str += "</div>"
|
||||
str += m_hr_black()
|
||||
|
||||
if (page > 1) {
|
||||
|
||||
const temp = document.createElement('div')
|
||||
temp.innerHTML = str;
|
||||
const temp = document.createElement("div")
|
||||
temp.innerHTML = str
|
||||
while (temp.firstChild) {
|
||||
document.getElementById("screen_movie_list").appendChild(temp.firstChild);
|
||||
document.getElementById("screen_movie_list").appendChild(temp.firstChild)
|
||||
}
|
||||
page++
|
||||
|
||||
} else {
|
||||
document.getElementById("screen_movie_list").innerHTML = str;
|
||||
document.getElementById("screen_movie_list").innerHTML = str
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function make_screen_movie_list(data, page) {
|
||||
let str = ''
|
||||
let tmp = ''
|
||||
let str = ""
|
||||
let tmp = ""
|
||||
|
||||
console.log(data.anime_list, page)
|
||||
|
||||
str += '<div>';
|
||||
str += '<button type="button" class="btn btn-info">Page <span class="badge bg-warning">' + page + '</span></button>';
|
||||
str += '</div>';
|
||||
str += '<div id="inner_screen_movie" class="row infinite-scroll">';
|
||||
str += "<div>"
|
||||
str +=
|
||||
'<button type="button" class="btn btn-info">Page <span class="badge bg-warning">' +
|
||||
page +
|
||||
"</span></button>"
|
||||
str += "</div>"
|
||||
str += '<div id="inner_screen_movie" class="row infinite-scroll">'
|
||||
for (let i in data.anime_list) {
|
||||
|
||||
tmp = '<div class="col-sm-4">';
|
||||
tmp += '<div class="card">';
|
||||
tmp += '<img class="card-img-top" src="' + data.anime_list[i].image_link + '" />';
|
||||
tmp = '<div class="col-sm-4">'
|
||||
tmp += '<div class="card">'
|
||||
tmp += '<img class="card-img-top" src="' + data.anime_list[i].image_link + '" />'
|
||||
tmp += '<div class="card-body">'
|
||||
tmp += '<h5 class="card-title">' + data.anime_list[i].title + '</h5>';
|
||||
tmp += '<p class="card-text">' + data.anime_list[i].code + '</p>';
|
||||
tmp += '<a href="./request?code=' + data.anime_list[i].code + '" class="btn btn-primary cut-text">' + data.anime_list[i].title + '</a>';
|
||||
tmp += '</div>';
|
||||
tmp += '</div>';
|
||||
tmp += '</div>';
|
||||
tmp += '<h5 class="card-title">' + data.anime_list[i].title + "</h5>"
|
||||
tmp += '<p class="card-text">' + data.anime_list[i].code + "</p>"
|
||||
tmp +=
|
||||
'<a href="./request?code=' +
|
||||
data.anime_list[i].code +
|
||||
'" class="btn btn-primary cut-text">' +
|
||||
data.anime_list[i].title +
|
||||
"</a>"
|
||||
tmp += "</div>"
|
||||
tmp += "</div>"
|
||||
tmp += "</div>"
|
||||
str += tmp
|
||||
|
||||
}
|
||||
str += '</div>';
|
||||
str += m_hr_black();
|
||||
str += "</div>"
|
||||
str += m_hr_black()
|
||||
|
||||
if (page > 1) {
|
||||
|
||||
const temp = document.createElement('div')
|
||||
temp.innerHTML = str;
|
||||
const temp = document.createElement("div")
|
||||
temp.innerHTML = str
|
||||
while (temp.firstChild) {
|
||||
document.getElementById("screen_movie_list").appendChild(temp.firstChild);
|
||||
document.getElementById("screen_movie_list").appendChild(temp.firstChild)
|
||||
}
|
||||
page++
|
||||
|
||||
} else {
|
||||
document.getElementById("screen_movie_list").innerHTML = str;
|
||||
document.getElementById("screen_movie_list").innerHTML = str
|
||||
}
|
||||
|
||||
$("img.lazyload").lazyload({
|
||||
threshold: 10,
|
||||
effect: "fadeIn",
|
||||
});
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
$(document).ready(function () {
|
||||
|
||||
// if ( "{{arg['anilife_current_code']}}" !== "" ) {
|
||||
// document.getElementById("code").value = "{{arg['anilife_current_code']}}";
|
||||
// // 값이 공백이 아니면 분석 버튼 계속 누름
|
||||
@@ -319,177 +335,200 @@
|
||||
$("#input_search").keydown(function (key) {
|
||||
if (key.keyCode === 13) {
|
||||
// alert("엔터키를 눌렀습니다.");
|
||||
$("#btn_search").trigger("click");
|
||||
$("#btn_search").trigger("click")
|
||||
}
|
||||
})
|
||||
|
||||
get_anime_list("ing", 1)
|
||||
|
||||
|
||||
const observer = lozad('.lozad', {
|
||||
rootMargin: '10px 0px', // syntax similar to that of CSS Margin
|
||||
const observer = lozad(".lozad", {
|
||||
rootMargin: "10px 0px", // syntax similar to that of CSS Margin
|
||||
threshold: 0.1, // ratio of element convergence
|
||||
enableAutoReload: true // it will reload the new image when validating attributes changes
|
||||
});
|
||||
observer.observe();
|
||||
|
||||
});
|
||||
enableAutoReload: true, // it will reload the new image when validating attributes changes
|
||||
})
|
||||
observer.observe()
|
||||
})
|
||||
|
||||
$("body").on("click", "#btn_search", function (e) {
|
||||
e.preventDefault();
|
||||
let query = $("#input_search").val();
|
||||
console.log(query);
|
||||
e.preventDefault()
|
||||
let query = $("#input_search").val()
|
||||
console.log(query)
|
||||
current_cate = "search"
|
||||
current_query = query
|
||||
|
||||
if ($("#input_search").val() === "") {
|
||||
console.log("search keyword nothing");
|
||||
return false;
|
||||
console.log("search keyword nothing")
|
||||
return false
|
||||
}
|
||||
|
||||
$.ajax({
|
||||
url: "/" + package_name + "/ajax/" + sub + "/search",
|
||||
type: "POST",
|
||||
cache: false,
|
||||
data: {query: query, type: current_cate, page: page},
|
||||
data: { query: query, type: current_cate, page: page },
|
||||
// dataType: "json",
|
||||
contentType: "application/x-www-form-urlencoded; charset=UTF-8",
|
||||
success: function (ret) {
|
||||
if (ret.ret) {
|
||||
console.log('ret:::', ret)
|
||||
make_search_result_list(ret.data, 1);
|
||||
console.log("ret:::", ret)
|
||||
make_search_result_list(ret.data, 1)
|
||||
next_page = page + 1
|
||||
} else {
|
||||
$.notify("<strong>분석 실패</strong><br>" + ret.log, {
|
||||
type: "warning",
|
||||
});
|
||||
})
|
||||
}
|
||||
},
|
||||
});
|
||||
});
|
||||
})
|
||||
})
|
||||
|
||||
$('#anime_category #ing').on("click", function () {
|
||||
$("#anime_category #ing").on("click", function () {
|
||||
// {#console.log(this.id)#}
|
||||
let spinner = document.getElementById('spinner');
|
||||
spinner.style.visibility = 'visible';
|
||||
let spinner = document.getElementById("spinner")
|
||||
spinner.style.visibility = "visible"
|
||||
get_anime_list("ing", 1)
|
||||
})
|
||||
|
||||
$('#anime_category #complete_anilist').on("click", function () {
|
||||
$("#anime_category #complete_anilist").on("click", function () {
|
||||
// {#console.log(this.id)#}
|
||||
let spinner = document.getElementById('spinner');
|
||||
spinner.style.visibility = 'visible';
|
||||
let spinner = document.getElementById("spinner")
|
||||
spinner.style.visibility = "visible"
|
||||
get_anime_list("fin", 1)
|
||||
})
|
||||
|
||||
$('#anime_category #theater').on("click", function () {
|
||||
$("#anime_category #theater").on("click", function () {
|
||||
// {#console.log(this.id)#}
|
||||
let spinner = document.getElementById('spinner');
|
||||
spinner.style.visibility = 'visible';
|
||||
let spinner = document.getElementById("spinner")
|
||||
spinner.style.visibility = "visible"
|
||||
get_anime_list("theater", 1)
|
||||
})
|
||||
|
||||
$('#anime_category #top20').on("click", function () {
|
||||
$("#anime_category #top20").on("click", function () {
|
||||
// {#console.log(this.id)#}
|
||||
let spinner = document.getElementById('spinner');
|
||||
spinner.style.visibility = 'visible';
|
||||
let spinner = document.getElementById("spinner")
|
||||
spinner.style.visibility = "visible"
|
||||
get_anime_list("top20", 1)
|
||||
})
|
||||
|
||||
// 분석 버튼 클릭시 호출
|
||||
$("body").on('click', '#analysis_btn', function (e) {
|
||||
e.preventDefault();
|
||||
$("body").on("click", "#analysis_btn", function (e) {
|
||||
e.preventDefault()
|
||||
const code = document.getElementById("code").value
|
||||
console.log(code)
|
||||
$.ajax({
|
||||
url: '/' + package_name + '/ajax/' + sub + '/analysis',
|
||||
url: "/" + package_name + "/ajax/" + sub + "/analysis",
|
||||
type: "POST",
|
||||
cache: false,
|
||||
data: {code: code},
|
||||
data: { code: code },
|
||||
dataType: "json",
|
||||
success: function (ret) {
|
||||
if (ret.ret === 'success' && ret.data != null) {
|
||||
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'});
|
||||
$.notify("<strong>분석 실패</strong><br>" + ret.log, { type: "warning" })
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
},
|
||||
})
|
||||
})
|
||||
|
||||
$("body").on("click", "#go_anilife_btn", function (e) {
|
||||
e.preventDefault()
|
||||
window.open("{{arg['anilife_url']}}", "_blank")
|
||||
})
|
||||
|
||||
$("body").on('click', '#go_anilife_btn', function (e) {
|
||||
e.preventDefault();
|
||||
window.open("{{arg['anilife_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();
|
||||
data = current_data.episode[$(this).data('idx')];
|
||||
console.log('data:::>', data)
|
||||
$("body").on("click", "#add_whitelist", function (e) {
|
||||
e.preventDefault()
|
||||
let data_code = $(this).attr("data-code")
|
||||
console.log(data_code)
|
||||
$.ajax({
|
||||
url: '/' + package_name + '/ajax/' + sub + '/add_queue',
|
||||
url: "/" + package_name + "/ajax/" + sub + "/add_whitelist",
|
||||
type: "POST",
|
||||
cache: false,
|
||||
data: {data: JSON.stringify(data)},
|
||||
data: JSON.stringify({ data_code: data_code }),
|
||||
contentType: "application/json;charset=UTF-8",
|
||||
dataType: "json",
|
||||
success: function (ret) {
|
||||
if (ret.ret) {
|
||||
$.notify("<strong>추가하였습니다.</strong><br>", {
|
||||
type: "success",
|
||||
})
|
||||
// make_program(ret);
|
||||
} else {
|
||||
$.notify("<strong>추가 실패</strong><br>" + ret.log, {
|
||||
type: "warning",
|
||||
})
|
||||
}
|
||||
},
|
||||
})
|
||||
})
|
||||
|
||||
$("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()
|
||||
data = current_data.episode[$(this).data("idx")]
|
||||
console.log("data:::>", data)
|
||||
$.ajax({
|
||||
url: "/" + package_name + "/ajax/" + sub + "/add_queue",
|
||||
type: "POST",
|
||||
cache: false,
|
||||
data: { data: JSON.stringify(data) },
|
||||
dataType: "json",
|
||||
success: function (data) {
|
||||
if (data.ret == 'enqueue_db_append' || data.ret == 'enqueue_db_exist') {
|
||||
$.notify('<strong>다운로드 작업을 추가 하였습니다.</strong>', {type: 'success'});
|
||||
} else if (data.ret == 'queue_exist') {
|
||||
$.notify('<strong>이미 큐에 있습니다. 삭제 후 추가하세요.</strong>', {type: 'warning'});
|
||||
} else if (data.ret == 'db_completed') {
|
||||
$.notify('<strong>DB에 완료 기록이 있습니다.</strong>', {type: 'warning'});
|
||||
if (data.ret == "enqueue_db_append" || data.ret == "enqueue_db_exist") {
|
||||
$.notify("<strong>다운로드 작업을 추가 하였습니다.</strong>", { type: "success" })
|
||||
} else if (data.ret == "queue_exist") {
|
||||
$.notify("<strong>이미 큐에 있습니다. 삭제 후 추가하세요.</strong>", { type: "warning" })
|
||||
} else if (data.ret == "db_completed") {
|
||||
$.notify("<strong>DB에 완료 기록이 있습니다.</strong>", { type: "warning" })
|
||||
} else {
|
||||
$.notify('<strong>추가 실패</strong><br>' + ret.log, {type: 'warning'});
|
||||
$.notify("<strong>추가 실패</strong><br>" + ret.log, { type: "warning" })
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
},
|
||||
})
|
||||
})
|
||||
// const observer = lozad();
|
||||
// const el = document.querySelector('img');
|
||||
// const observer = lozad(el); // passing a `NodeList` (e.g. `document.querySelectorAll()`) is also valid
|
||||
// observer.observe();
|
||||
const loadNextAnimes = (cate, page) => {
|
||||
spinner.style.display = "block";
|
||||
let data = {type: cate, page: String(page)};
|
||||
let url = ''
|
||||
spinner.style.display = "block"
|
||||
let data = { type: cate, page: String(page) }
|
||||
let url = ""
|
||||
switch (cate) {
|
||||
case 'ing':
|
||||
url = '/' + package_name + '/ajax/' + sub + '/anime_list'
|
||||
current_cate = 'ing'
|
||||
break;
|
||||
case 'movie':
|
||||
url = '/' + package_name + '/ajax/' + sub + '/screen_movie_list'
|
||||
current_cate = 'movie'
|
||||
break;
|
||||
case 'theater':
|
||||
url = '/' + package_name + '/ajax/' + sub + '/anime_list'
|
||||
current_cate = 'theater'
|
||||
break;
|
||||
case 'fin':
|
||||
url = '/' + package_name + '/ajax/' + sub + '/complete_list'
|
||||
current_cate = 'fin'
|
||||
case "ing":
|
||||
url = "/" + package_name + "/ajax/" + sub + "/anime_list"
|
||||
current_cate = "ing"
|
||||
break
|
||||
case 'search':
|
||||
case "movie":
|
||||
url = "/" + package_name + "/ajax/" + sub + "/screen_movie_list"
|
||||
current_cate = "movie"
|
||||
break
|
||||
case "theater":
|
||||
url = "/" + package_name + "/ajax/" + sub + "/anime_list"
|
||||
current_cate = "theater"
|
||||
break
|
||||
case "fin":
|
||||
url = "/" + package_name + "/ajax/" + sub + "/complete_list"
|
||||
current_cate = "fin"
|
||||
break
|
||||
case "search":
|
||||
url = "/" + package_name + "/ajax/" + sub + "/search"
|
||||
current_cate = 'search'
|
||||
current_cate = "search"
|
||||
data.query = current_query
|
||||
break;
|
||||
break
|
||||
default:
|
||||
break;
|
||||
break
|
||||
}
|
||||
|
||||
fetch(url, {
|
||||
@@ -504,42 +543,40 @@
|
||||
.then((response) => {
|
||||
// console.log("Success:", JSON.stringify(response));
|
||||
// {#imagesContainer.appendChild()#}
|
||||
console.log("return page:::> ", String(response.page));
|
||||
console.log("return page:::> ", String(response.page))
|
||||
// {#page = response.page#}
|
||||
if (current_cate === 'search') {
|
||||
make_search_result_list(response.data, response.page);
|
||||
|
||||
if (current_cate === "search") {
|
||||
make_search_result_list(response.data, response.page)
|
||||
} else {
|
||||
make_screen_movie_list(response.data, response.page);
|
||||
make_screen_movie_list(response.data, response.page)
|
||||
}
|
||||
page++;
|
||||
next_page++;
|
||||
page++
|
||||
next_page++
|
||||
})
|
||||
.catch((error) => console.error("Error:", error));
|
||||
};
|
||||
|
||||
.catch((error) => console.error("Error:", error))
|
||||
}
|
||||
|
||||
const onScroll = (e) => {
|
||||
console.dir(e.target.scrollingElement.scrollHeight);
|
||||
const {scrollTop, scrollHeight, clientHeight} = e.target.scrollingElement;
|
||||
console.dir(e.target.scrollingElement.scrollHeight)
|
||||
const { scrollTop, scrollHeight, clientHeight } = e.target.scrollingElement
|
||||
if (Math.round(scrollHeight - scrollTop) <= clientHeight) {
|
||||
document.getElementById("spinner").style.display = "block";
|
||||
console.log("loading");
|
||||
console.log("now page::> ", page);
|
||||
console.log("next_page::> ", String(next_page));
|
||||
loadNextAnimes(current_cate, next_page);
|
||||
document.getElementById("spinner").style.display = "block"
|
||||
console.log("loading")
|
||||
console.log("now page::> ", page)
|
||||
console.log("next_page::> ", String(next_page))
|
||||
loadNextAnimes(current_cate, next_page)
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
const debounce = (func, delay) => {
|
||||
let timeoutId = null;
|
||||
let timeoutId = null
|
||||
return (...args) => {
|
||||
clearTimeout(timeoutId);
|
||||
timeoutId = setTimeout(func.bind(null, ...args), delay);
|
||||
};
|
||||
};
|
||||
clearTimeout(timeoutId)
|
||||
timeoutId = setTimeout(func.bind(null, ...args), delay)
|
||||
}
|
||||
}
|
||||
|
||||
document.addEventListener("scroll", debounce(onScroll, 300));
|
||||
document.addEventListener("scroll", debounce(onScroll, 300))
|
||||
</script>
|
||||
<style>
|
||||
button.code-button {
|
||||
@@ -677,7 +714,9 @@
|
||||
}
|
||||
|
||||
body {
|
||||
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;
|
||||
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 {
|
||||
@@ -772,7 +811,6 @@
|
||||
transform: translate(-50%, -50%);
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
|
||||
}
|
||||
|
||||
.loader-inner {
|
||||
@@ -805,4 +843,8 @@
|
||||
opacity: 0.5;
|
||||
}
|
||||
</style>
|
||||
<link
|
||||
rel="stylesheet"
|
||||
href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.7.1/font/bootstrap-icons.css"
|
||||
/>
|
||||
{% endblock %}
|
||||
|
||||
@@ -16,7 +16,8 @@
|
||||
</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">
|
||||
<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>
|
||||
@@ -35,34 +36,34 @@
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
var package_name = "{{arg['package_name']}}";
|
||||
var sub = "{{arg['sub']}}";
|
||||
var current_data = null;
|
||||
var package_name = "{{arg['package_name']}}";
|
||||
var sub = "{{arg['sub']}}";
|
||||
var current_data = null;
|
||||
|
||||
$(document).ready(function(){
|
||||
$(document).ready(function () {
|
||||
global_sub_request_search('1');
|
||||
});
|
||||
});
|
||||
|
||||
$("#search").click(function(e) {
|
||||
$("#search").click(function (e) {
|
||||
e.preventDefault();
|
||||
global_sub_request_search('1');
|
||||
});
|
||||
});
|
||||
|
||||
$("body").on('click', '#page', function(e){
|
||||
$("body").on('click', '#page', function (e) {
|
||||
e.preventDefault();
|
||||
global_sub_request_search($(this).data('page'));
|
||||
});
|
||||
});
|
||||
|
||||
$("#reset_btn").click(function(e) {
|
||||
$("#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){
|
||||
$("body").on('click', '#json_btn', function (e) {
|
||||
e.preventDefault();
|
||||
var id = $(this).data('id');
|
||||
for (i in current_data.list) {
|
||||
@@ -70,23 +71,23 @@ $("body").on('click', '#json_btn', function(e){
|
||||
m_modal(current_data.list[i])
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$("body").on('click', '#self_search_btn', function(e){
|
||||
$("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')
|
||||
});
|
||||
});
|
||||
|
||||
$("body").on('click', '#remove_btn', function(e) {
|
||||
$("body").on('click', '#remove_btn', function (e) {
|
||||
e.preventDefault();
|
||||
id = $(this).data('id');
|
||||
$.ajax({
|
||||
url: '/'+package_name+'/ajax/'+sub+ '/db_remove',
|
||||
url: '/' + package_name + '/ajax/' + sub + '/db_remove',
|
||||
type: "POST",
|
||||
cache: false,
|
||||
data: {id:id},
|
||||
data: {id: id},
|
||||
dataType: "json",
|
||||
success: function (data) {
|
||||
if (data) {
|
||||
@@ -101,17 +102,16 @@ $("body").on('click', '#remove_btn', function(e) {
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
$("body").on('click', '#request_btn', function(e){
|
||||
$("body").on('click', '#request_btn', function (e) {
|
||||
e.preventDefault();
|
||||
var content_code = $(this).data('content_code');
|
||||
$(location).attr('href', '/' + package_name + '/' + sub + '/request?content_code=' + content_code)
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
|
||||
function make_list(data) {
|
||||
function make_list(data) {
|
||||
//console.log(data)
|
||||
str = '';
|
||||
for (i in data) {
|
||||
@@ -125,24 +125,22 @@ function make_list(data) {
|
||||
tmp += data[i].completed_time + '(완료)';
|
||||
str += m_col(3, tmp)
|
||||
tmp = data[i].savepath + '<br>' + data[i].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].content_code}]);
|
||||
tmp2 += m_button('self_search_btn', '목록 검색', [{'key':'title', 'value':data[i].title}]);
|
||||
tmp2 += m_button('remove_btn', '삭제', [{'key':'id', 'value':data[i].id}]);
|
||||
tmp2 = m_button('json_btn', 'JSON', [{'key': 'id', 'value': data[i].id}]);
|
||||
tmp2 += m_button('request_btn', '작품 검색', [{'key': 'content_code', 'value': data[i].content_code}]);
|
||||
tmp2 += m_button('self_search_btn', '목록 검색', [{'key': 'title', 'value': data[i].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();
|
||||
if (i != data.length - 1) str += m_hr();
|
||||
}
|
||||
document.getElementById("list_div").innerHTML = str;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
<style>
|
||||
body {
|
||||
body {
|
||||
width: 100%;
|
||||
/*height: 100vh;*/
|
||||
/*display: flex;*/
|
||||
@@ -151,22 +149,57 @@ body {
|
||||
background-size: 300% 300%;
|
||||
background-image: linear-gradient(
|
||||
-45deg,
|
||||
rgba(59,173,227,1) 0%,
|
||||
rgba(87,111,230,1) 25%,
|
||||
rgba(152,68,183,1) 51%,
|
||||
rgba(255,53,127,1) 100%
|
||||
rgba(59, 173, 227, 1) 0%,
|
||||
rgba(87, 111, 230, 1) 25%,
|
||||
rgba(152, 68, 183, 1) 51%,
|
||||
rgba(255, 53, 127, 1) 100%
|
||||
);
|
||||
animation: AnimateBG 20s ease infinite;
|
||||
}
|
||||
#main_container {
|
||||
background-color: white;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes AnimateBG {
|
||||
0%{background-position:0% 50%}
|
||||
50%{background-position:100% 50%}
|
||||
100%{background-position:0% 50%}
|
||||
}
|
||||
#main_container {
|
||||
background-color: white;
|
||||
}
|
||||
|
||||
@keyframes AnimateBG {
|
||||
0% {
|
||||
background-position: 0% 50%
|
||||
}
|
||||
50% {
|
||||
background-position: 100% 50%
|
||||
}
|
||||
100% {
|
||||
background-position: 0% 50%
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 576px) {
|
||||
.container {
|
||||
max-width: 540px;
|
||||
min-height: 1080px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 768px) {
|
||||
.container {
|
||||
max-width: 720px;
|
||||
min-height: 1080px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 992px) {
|
||||
.container {
|
||||
max-width: 960px;
|
||||
min-height: 1080px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 1200px) {
|
||||
.container {
|
||||
max-width: 1140px;
|
||||
min-height: 1080px;
|
||||
}
|
||||
}
|
||||
|
||||
</style>
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user