// ### index_newsvideo.js ###
// ¸ÞÀÎÆäÀÌÁöÀÇ (News & Video) °Ô½Ã±ÛÀ» ±¸ÇöÇÕ´Ï´Ù.
//
//
// news_maker() : »õ·Î¿î ¼Ò½Ä °Ô½Ã±ÛÀ» °ü¸®ÇÕ´Ï´Ù.
// video_maker() : µ¿¿µ»ó ¼Ò½Ä °Ô½Ã±ÛÀ» °ü¸®ÇÕ´Ï´Ù.
//
// °Ô½Ã±ÛÀ» Ãß°¡/Á¦°ÅÇϽ÷Á¸é, variables¿¡ Ç׸ñÀ» Ãß°¡/Á¦°ÅÇØÁÖ¼¼¿ä.
//
//
// init_variables
// ########################################################
// ### 2°³¸¦ ÃÊ°úÇÏ¸é µðÀÚÀÎÀÌ ±úÁú ¼ö ÀÖ½À´Ï´Ù. ###
// ### (°æ·Î img/vid/) ###
// ########################################################
//
//
// news_variables
// ########################################################
// ### ori_img_src - (¿øº») »çÁøÀÔ´Ï´Ù. ###
// ### (°æ·Î img/index/newsvideo/) ###
// ### (»çÁøÅ©±â 800 * 1422) ###
// ### mobile_img_src - (¸ð¹ÙÀÏ) »çÁøÀÔ´Ï´Ù. ###
// ### (°æ·Î img/index/newsvideo/) ###
// ### (»çÁøÅ©±â 1200 * 1200) ###
// ### title - °Ô½Ã±Û Á¦¸ñÀÔ´Ï´Ù. ###
// ### content - °Ô½Ã±Û ³»¿ëÀÔ´Ï´Ù. ###
// ### tags - Å°¿öµå ¸ñ·ÏÀÔ´Ï´Ù. ###
// ########################################################
//
//
// video_variables
// ####################################################
// ### classes - °íÁ¤°ªÀÔ´Ï´Ù. ###
// ### [bread-img1, bread-img2] ###
// ### thumbnail - ¿µ»ó ½æ³×ÀÏÀÔ´Ï´Ù. ###
// ### (°æ·Î img/index/newsvideo/) ###
// ### categories - °Ô½Ã±Û Ä«Å×°í¸®ÀÔ´Ï´Ù. ###
// ### title - °Ô½Ã±Û Á¦¸ñÀÔ´Ï´Ù. ###
// ### content - °Ô½Ã±Û ³»¿ëÀÔ´Ï´Ù. ###
// ### date - °Ô½Ã ³¯Â¥ÀÔ´Ï´Ù. ###
// ####################################################
//
//
//
function video_init()
{
var init_variables =
[
"video_bday.mp4",
"video_buffet.mp4",
]
var htmlContent1 =
`
`
var htmlContent2 =
`
`
$("#init").prepend(htmlContent2);
$("#init").prepend(htmlContent1);
return true;
}
function news_maker()
{
var news_variables =
[
{
ori_img_src: "cater_black.jpg",
mobile_img_src: "cater_small.jpg",
title: "Catering Service Open",
content: "ÃâÀåºßÆä ¡¤ ÄÉÀÌÅ͸µ ¼ºñ½º¸¦ ¿ÀÇÂÀ» ÇÏ¿© ¾ß¿Ü¿¡¼µµ Áñ±æ ¼ö ÀÖµµ·Ï ´Ù¾çÇÑ Áغñ¸¦ Çß½À´Ï´Ù.",
tags: "ÃâÀåºßÆä / ÃâÀåµµ½Ã¶ô / ¿öÅ©¼¥ / ȨÆÄƼ / ±â¾÷Çà»ç / ±â¾÷°ü°ø¼",
},
];
news_variables.forEach(function(box)
{
var htmlContent =
`
${box.title}
${box.content}
${box.tags}
READ MORE
`;
$("#news").prepend(htmlContent);
});
}
function video_maker()
{
var video_variables =
[
{
classes: "bread-img1",
thumbnail: "news-vid3.jpg",
categories: "BIRTHDAY",
title: "¼ÒÁßÇÑ ¿ì¸®¾Æ±âÀÇ ÇູÇÑ »ýÀÏÀÜÄ¡",
content: "¸¶À̾ µ¹ÀÜÄ¡&ÆÄƼ´Â °í°´ÀÇ ÃëÇâ°ú ±Ô¸ð¿¡ ¸Â´Â Ç°°ÝÀÖ´Â ÆÄƼ¸¦ ¿¬ÃâÇÕ´Ï´Ù.",
date: "2023-07-10",
},
{
classes: "bread-img2",
thumbnail: "news-vid4.jpg",
categories: "BRAND",
title: "ÇÁ¸®¹Ì¾ö Æйи® ·¹½ºÅä¶û",
content: "¸ÀÀÖ´Â Áñ°Å¿òÀÌ °¡µæÇÏ°í ¼ÒÁßÇÑ »ç¶÷µé°ú ÇÔ²²Çϸé ÇູÀÌ ³ÑÄ¡´Â °÷!",
date: "2023-07-31",
},
];
video_variables.forEach(function(box)
{
var htmlContent =
`
`;
$("#video").append(htmlContent);
});
}
// -------- (News Video) »õ ¼Ò½Ä ¼Ó µ¿¿µ»ó --------
// µ¿¿µ»óÀÌ Å¬¸¯µÇ¾úÀ» ¶§ÀÇ µ¿ÀÛÀ» °ü¸®ÇÕ´Ï´Ù.
function youtube_video()
{
const video1 = document.querySelector("#video1");
const video2 = document.querySelector("#video2");
$(".bread-img1").click(function()
{
$(".utube1").css({display:"block"});
$(".utube1 .x-btn").css({display:"block"});
$(".cook-filter").css({display:"block"});
})
$(".bread-img2").click(function()
{
$(".utube2").css({display:"block"});
$(".utube2 .x-btn").css({display:"block"});
$(".cook-filter").css({display:"block"});
})
$(".utube1 .x-btn").click(function()
{
video1.pause();
video1.currentTime = 0;
$(".utube1").css({display:"none"});
$(".utube1 .x-btn").css({display:"none"});
$(".cook-filter").css({display:"none"});
})
$(".utube2 .x-btn").click(function()
{
video2.pause();
video2.currentTime = 0;
$(".utube2").css({display:"none"});
$(".utube2 .x-btn").css({display:"none"});
$(".cook-filter").css({display:"none"});
})
}
// -------- (News Video) »õ ¼Ò½Ä ¼Ó µ¿¿µ»ó --------