mobile - update

This commit is contained in:
lbard33
2026-01-16 16:12:48 +09:00
parent 2635aff0ea
commit 39de8edde4
8 changed files with 305 additions and 112 deletions

View File

@@ -90,48 +90,59 @@
console.log(moment().format('ll'));
$(document).ready(function() {
const count__lists = $(".fake__lists li").length;
if (count__lists < 4) {
for (let i = 0; i < count__lists; i++) {
let n_1 = i % 3;
switch (n_1) {
case 1.:
$(".post__lists0").append($(".fake__lists li:first-child"));
break;
case 2:
$(".post__lists1").append($(".fake__lists li:first-child"));
break;
case 0:
$(".post__lists2").append($(".fake__lists li:first-child"));
break;
}
}
}else if(count__lists>3 && count__lists<7){
$(".post__lists2").append($(".fake__lists li:first-child"));
for (let i = 0; i < count__lists-1; i++) {
let n_1 = i % 2;
switch (n_1) {
case 0:
$(".post__lists0").append($(".fake__lists li:first-child"));
break;
case 1:
$(".post__lists1").append($(".fake__lists li:first-child"));
break;
}
}
}else{
for(let i=0;i<6;i++){
let n_1 = i % 2;
switch(n_1){
case 0:$(".post__lists0").append($(".fake__lists li:first-child"));
break;
case 1:$(".post__lists1").append($(".fake__lists li:first-child"));
break;
}
}
$(".post__lists2").append($(".fake__lists li:first-child"));
function Mobile() {
return $(window).width() <= 1023;
}
if(Mobile()){
// 모바일용 메뉴 동작
}else{
// PC용 메뉴 동작
const count__lists = $(".fake__lists li").length;
if (count__lists < 4) {
for (let i = 0; i < count__lists; i++) {
let n_1 = i % 3;
switch (n_1) {
case 1.:
$(".post__lists0").append($(".fake__lists li:first-child"));
break;
case 2:
$(".post__lists1").append($(".fake__lists li:first-child"));
break;
case 0:
$(".post__lists2").append($(".fake__lists li:first-child"));
break;
}
}
}else if(count__lists>3 && count__lists<7){
$(".post__lists2").append($(".fake__lists li:first-child"));
for (let i = 0; i < count__lists-1; i++) {
let n_1 = i % 2;
switch (n_1) {
case 0:
$(".post__lists0").append($(".fake__lists li:first-child"));
break;
case 1:
$(".post__lists1").append($(".fake__lists li:first-child"));
break;
}
}
}else{
for(let i=0;i<6;i++){
let n_1 = i % 2;
switch(n_1){
case 0:$(".post__lists0").append($(".fake__lists li:first-child"));
break;
case 1:$(".post__lists1").append($(".fake__lists li:first-child"));
break;
}
}
$(".post__lists2").append($(".fake__lists li:first-child"));
}
$(".fake__lists").html("");
}
$(".fake__lists").html("");
})
</script>
{% endblock %}