refac: 명장일람, 명예의 전당

This commit is contained in:
2022-04-15 02:36:42 +09:00
parent efb1664443
commit 47599f000a
9 changed files with 198 additions and 79 deletions
+18 -30
View File
@@ -24,32 +24,26 @@ $templates = new \League\Plates\Engine(__DIR__ . '/templates');
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=1136" />
<meta name="viewport" content="width=500" />
<title><?= UniqueConst::$serverName ?>: 명장일람</title>
<?= WebUtil::printCSS('../d_shared/common.css') ?>
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" />
<?= WebUtil::printCSS('css/hallOfFame.css') ?>
<?= WebUtil::printJS('../d_shared/common_path.js') ?>
<?= WebUtil::printDist('ts', 'common') ?>
<?= WebUtil::printDist('ts', ['common', 'bestGeneral']) ?>
</head>
<body>
<table align=center width=1100 class='tb_layout bg0'>
<tr>
<td>명 장 일 람<br><?= closeButton() ?></td>
</tr>
</table>
<table align=center width=1100 class='tb_layout bg0'>
<form name=form1 action=a_bestGeneral.php method=post>
<tr>
<td align=center>
<input type=submit name=btn value='유저 보기'>
<div id="container" class="bg0">
<div class="row gx-0">
<div class="col">명 장 일 람<br><?= closeButton() ?></div>
</div>
<div class="row gx-0">
<div class="col center">
<form name=form1 action=a_bestGeneral.php method=get><input type=submit name=btn value='유저 보기'>
<input type=submit name=btn value='NPC 보기'>
</td>
</tr>
</form>
</table>
<div style="margin:auto;width:1100px;">
</form>
</div>
</div>
<?php
$ownerNameList = [];
@@ -274,10 +268,6 @@ $templates = new \League\Plates\Engine(__DIR__ . '/templates');
'generals' => array_slice($typeGenerals, 0, min(10, $validCnt))
]);
}
?>
</div>
<div style="margin:auto;width:1100px;margin-top:5px;">
<?php
//유니크 아이템 소유자
$itemTypes = [
'horse' => '명 마',
@@ -369,15 +359,13 @@ $templates = new \League\Plates\Engine(__DIR__ . '/templates');
]);
}
?>
<div class="row gx-0">
<div class="col"><?= closeButton() ?></div>
</div>
<div class="row bg0 gx-0">
<div class="col bg0"><?= banner() ?></div>
</div>
</div>
<table align=center width=1100 class='tb_layout bg0'>
<tr>
<td><?= closeButton() ?></td>
</tr>
<tr>
<td><?= banner() ?> </td>
</tr>
</table>
</body>
</html>
+15 -20
View File
@@ -44,22 +44,21 @@ if ($scenarioIdx && key_exists($scenarioIdx, $scenarioList[$seasonIdx] ?? [])) {
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=1136" />
<meta name="viewport" content="width=500" />
<title><?= UniqueConst::$serverName ?>: 명예의 전당</title>
<?= WebUtil::printCSS('../d_shared/common.css') ?>
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" />
<?= WebUtil::printCSS('css/hallOfFame.css') ?>
<?= WebUtil::printJS('../d_shared/common_path.js') ?>
<?= WebUtil::printDist('ts', ['common', 'hallOfFame']) ?>
</head>
<body>
<table align=center width=1100 class='tb_layout bg0'>
<tr>
<td>명 예 의 전 당<br><?= closeButton() ?></td>
</tr>
<tr>
<td>
<div id="container" class="bg0">
<div class="row gx-0">
<div class="col">명 예 의 전 당<br><?= closeButton() ?></div>
</div>
<div class="row gx-0">
<div class="col center">
시나리오 검색 : <select id="by_scenario" name="by_scenario">
<?php foreach ($scenarioList as $iterSeasonIdx => $subScenarioList) : ?>
<option data-season="<?= $iterSeasonIdx ?>" value="" <?= ($iterSeasonIdx == $seasonIdx && $scenarioIdx === null) ? "selected='selected'" : '' ?>>* 시즌 : <?= $iterSeasonIdx ?> 종합 *</option>
@@ -69,10 +68,8 @@ if ($scenarioIdx && key_exists($scenarioIdx, $scenarioList[$seasonIdx] ?? [])) {
<?php endforeach; ?>
?>
</select>
</td>
</tr>
</table>
<div style="margin:auto;width:1100px;">
</div>
</div>
<?php
$types = [
'experience' => ['명 성', 'int'],
@@ -156,15 +153,13 @@ if ($scenarioIdx && key_exists($scenarioIdx, $scenarioList[$seasonIdx] ?? [])) {
]);
}
?>
<div class="row gx-0">
<div class="col"><?= closeButton() ?></div>
</div>
<div class="row bg0 gx-0">
<div class="col bg0"><?= banner() ?></div>
</div>
</div>
<table align=center width=1100 class='tb_layout bg0'>
<tr>
<td><?= closeButton() ?></td>
</tr>
<tr>
<td><?= banner() ?> </td>
</tr>
</table>
</body>
</html>
+1 -1
View File
@@ -122,7 +122,7 @@ $showGeneral = General::createGeneralObjFromDB($gen);
<?= WebUtil::printJS('../d_shared/common_path.js') ?>
<?= WebUtil::printCSS('../d_shared/common.css') ?>
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" />
<?= WebUtil::printDist('ts', ['battleCenter']) ?>
<?= WebUtil::printDist('ts', ['common', 'battleCenter']) ?>
</head>
<body>
-2
View File
@@ -11,8 +11,6 @@
border-right: solid 1px gray;
border-top: solid 1px gray;
}
}
}
@include media-500px{
+114
View File
@@ -0,0 +1,114 @@
@import "./common/bootstrap5.scss";
@import "./common_legacy.scss";
@include media-1000px{
#container {
width: 1000px;
margin: 0 auto;
font-size: 14px;
}
}
@include media-500px{
body {
overflow-x: hidden;
}
#container {
width: 500px;
margin: 0 auto;
margin-bottom: 100px;
font-size: 14px;
}
}
.rankView {
margin:auto;
position:relative;
}
.rankView h3{
text-align:center;
margin:0;
padding:2px;
border-bottom:1px solid gray;
}
.rankView ul{
list-style:none;
margin:0;
padding:0;
box-sizing: border-box;
margin-top:-1px;
margin-bottom:-1px;
}
.rankView li{
flex: 0 0 auto;
width: 100px;
vertical-align: top;
height:149px;
text-align:center;
border-right:1px solid gray;
border-top:1px solid gray;
margin:0;
box-sizing: border-box;
}
.rankView li.no_value{
height:128px;
}
.rankView li.has_server {
height:168px;
}
.rankView li.no_value.has_server {
height:146px;
}
.rankView .hall_server{
border-top:1px solid gray;
}
.rankView .tooltip .tooltiptext{
width:220px;
margin-left: -110px;
}
.rankView .no_value .hall_value{
display:none;
}
.rankView .hall_nation{
font-size:11px;
border-top:1px solid gray;
border-bottom:1px solid gray;
}
.rankView .hall_name{
display: flex;
justify-content: center;
flex-direction: column;
resize: vertical;
font-size:11px;
height:28px;
}
.rankView .hall_name p{
padding:0;
margin:0;
}
.rankView .hall_owner{
font-size:95%;
}
.rankView .hall_value{
line-height:13px;
box-sizing: border-box;
border-top:1px solid gray;
padding-top:3px;
padding-bottom:3px;
}
+30 -23
View File
@@ -1,26 +1,33 @@
<div class="rankView bg0" style="outline-style:solid;outline-width:1px;outline-color: gray;">
<h3 class="rankType bg1"><?=$typeName?></h3>
<ul>
<?php foreach($generals as $rank=>$general): ?><li class='<?=(key_exists("rankName", $general))?'no_value':''?> <?=(key_exists("serverName", $general))?'has_server':''?>'>
<div class="hall_rank bg2 with_border">
<?=$general['rankName']??(($rank+1).'위')?>
<div class="row gx-0">
<h3 class="rankType bg1 col-12"><?= $typeName ?></h3>
</div>
<div class="hall_img"><img width="64" height="64" class='generalIcon' src="<?=$general['pictureFullPath']?>"></div>
<?php if(key_exists("serverName",$general)): ?>
<div class="hall_server obj_tooltip" data-bs-toggle="tooltip" data-bs-placement="top"><?=$general['serverName']?><?=$general['serverIdx']?>
<span class="tooltiptext">
<?=$general['scenarioName']?><br>
<?=substr($general['startTime'], 0, 10)?> ~ <?=substr($general['unitedTime'], 0, 10)?>
</span>
</div>
<?php endif;?>
<div class="hall_nation" style="background-color:<?=$general['bgColor']?>;color:<?=$general['fgColor']?>;"><?=$general['nationName']??'-'?></div>
<div class="hall_name" style="background-color:<?=$general['bgColor']?>;color:<?=$general['fgColor']?>;"><p><?=$general['name']??'-'?>
<?php if($general["ownerName"]??null): ?>
<div class="hall_owner">(<?=$general['ownerName']?>)</div>
<?php endif;?>
</p></div>
<div class="hall_value"><?=$general['printValue']??$general['value']?></div>
</li><?php endforeach; ?>
</ul>
<ul class="row gx-0">
<?php foreach ($generals as $rank => $general) : ?>
<li class='<?= (key_exists("rankName", $general)) ? 'no_value' : '' ?> <?= (key_exists("serverName", $general)) ? 'has_server' : '' ?>'>
<div class="hall_rank bg2 with_border">
<?= $general['rankName'] ?? (($rank + 1) . '위') ?>
</div>
<div class="hall_img"><img width="64" height="64" class='generalIcon' src="<?= $general['pictureFullPath'] ?>"></div>
<?php if (key_exists("serverName", $general)) : ?>
<div class="hall_server obj_tooltip" data-bs-toggle="tooltip" data-bs-placement="top"><?= $general['serverName'] ?><?= $general['serverIdx'] ?>기
<span class="tooltiptext">
<?= $general['scenarioName'] ?><br>
<?= substr($general['startTime'], 0, 10) ?> ~ <?= substr($general['unitedTime'], 0, 10) ?>
</span>
</div>
<?php endif; ?>
<div class="hall_nation" style="background-color:<?= $general['bgColor'] ?>;color:<?= $general['fgColor'] ?>;"><?= $general['nationName'] ?? '-' ?></div>
<div class="hall_name" style="background-color:<?= $general['bgColor'] ?>;color:<?= $general['fgColor'] ?>;">
<p><?= $general['name'] ?? '-' ?>
<?php if ($general["ownerName"] ?? null) : ?>
<div class="hall_owner">(<?= $general['ownerName'] ?>)</div>
<?php endif; ?>
</p>
</div>
<div class="hall_value"><?= $general['printValue'] ?? $general['value'] ?></div>
</li>
<?php endforeach; ?>
</ul>
</div>
+10
View File
@@ -0,0 +1,10 @@
import "@scss/hallOfFame.scss";
import { auto500px } from "./util/auto500px";
import { insertCustomCSS } from "./util/customCSS";
import { htmlReady } from "./util/htmlReady";
auto500px();
htmlReady(() => {
insertCustomCSS();
});
+1
View File
@@ -6,6 +6,7 @@
"install": "install.ts",
"battle_simulator": "battle_simulator.ts",
"battleCenter": "battleCenter.ts",
"bestGeneral": "bestGeneral.ts",
"recent_map": "recent_map.ts",
"select_npc": "select_npc.ts",
"betting": "betting.ts",
+9 -3
View File
@@ -1,9 +1,15 @@
import "@scss/hallOfFame.scss";
import $ from 'jquery';
import { stringifyUrl } from 'query-string';
import { initTooltip } from "@/legacy/initTooltip";
import 'bootstrap';
import { auto500px } from './util/auto500px';
import { htmlReady } from './util/htmlReady';
import { insertCustomCSS } from './util/customCSS';
$(function ($) {
auto500px();
htmlReady(() => {
$('#by_scenario').on('change', function (e) {
e.preventDefault();
@@ -18,6 +24,6 @@ $(function ($) {
}
});
})
initTooltip();
insertCustomCSS();
});