...
This commit is contained in:
@@ -198,5 +198,14 @@
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<div class="container" style="text-align:center;">
|
||||
<ins class="adsbygoogle"
|
||||
style="display:block"
|
||||
data-ad-client="ca-pub-9504446465764716" data-ad-slot="1234567890" data-ad-format="auto"
|
||||
data-full-width-responsive="true"></ins>
|
||||
<script>
|
||||
(adsbygoogle = window.adsbygoogle || []).push({});
|
||||
</script>
|
||||
</div>
|
||||
</th:block>
|
||||
</html>
|
||||
@@ -13,23 +13,32 @@
|
||||
</header>
|
||||
</section>
|
||||
|
||||
<section class="wrapper style2">
|
||||
<div class="container">
|
||||
<header class="major">
|
||||
<h2>A gigantic heading you can use for whatever</h2>
|
||||
<p>With a much smaller subtitle hanging out just below it</p>
|
||||
</header>
|
||||
</div>
|
||||
</section>
|
||||
<section id="cta2" class="wrapper style3">
|
||||
<div class="container">
|
||||
<header>
|
||||
<h2>Are you ready to continue your quest?</h2>
|
||||
</header>
|
||||
</div>
|
||||
</section>
|
||||
<!-- <section class="wrapper style2">-->
|
||||
<!-- <div class="container">-->
|
||||
<!-- <header class="major">-->
|
||||
<!-- <h2>A gigantic heading you can use for whatever</h2>-->
|
||||
<!-- <p>With a much smaller subtitle hanging out just below it</p>-->
|
||||
<!-- </header>-->
|
||||
<!-- </div>-->
|
||||
<!-- </section>-->
|
||||
<!-- <section id="cta2" class="wrapper style3">-->
|
||||
<!-- <div class="container">-->
|
||||
<!-- <header>-->
|
||||
<!-- <h2>Are you ready to continue your quest?</h2>-->
|
||||
<!-- </header>-->
|
||||
<!-- </div>-->
|
||||
<!-- </section>-->
|
||||
|
||||
<section class="wrapper style1">
|
||||
<div class="container" style="text-align:center;">
|
||||
<ins class="adsbygoogle"
|
||||
style="display:block"
|
||||
data-ad-client="ca-pub-9504446465764716" data-ad-slot="1234567890" data-ad-format="auto"
|
||||
data-full-width-responsive="true"></ins>
|
||||
<script>
|
||||
(adsbygoogle = window.adsbygoogle || []).push({});
|
||||
</script>
|
||||
</div>
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
|
||||
@@ -16,36 +16,52 @@
|
||||
<div class="col-12">
|
||||
<div id="content_inner">
|
||||
<article>
|
||||
<section th:each="post : ${postsPage.content}">
|
||||
<div class="box post" th:id="${post.id}">
|
||||
<a href="javascript:void(0);" th:onclick="'goToViewer(this.parentNode)'" class="image left">
|
||||
<img th:src="${post.thumb != null and not #strings.isEmpty(post.thumb)} ? ${apiBaseUrl + post.thumb} : @{/images/pic01.jpg}" alt="Post Thumbnail" />
|
||||
</a>
|
||||
<div class="inner">
|
||||
<h3 style="display: flex; justify-content: space-between; align-items: center;">
|
||||
<span>
|
||||
<span th:if="${!post.posting}" style="background-color: #888; color: white; font-size: 0.7em; padding: 2px 6px; border-radius: 4px; margin-right: 8px; vertical-align: middle;">
|
||||
비공개
|
||||
<th:block th:each="post, iterStat : ${postsPage.content}">
|
||||
<section>
|
||||
<div class="box post" th:id="${post.id}">
|
||||
<a href="javascript:void(0);" th:onclick="'goToViewer(this.parentNode)'" class="image left">
|
||||
<img th:src="${post.thumb != null and not #strings.isEmpty(post.thumb)} ? ${apiBaseUrl + post.thumb} : @{/images/pic01.jpg}" alt="Post Thumbnail" />
|
||||
</a>
|
||||
<div class="inner">
|
||||
<h3 style="display: flex; justify-content: space-between; align-items: center;">
|
||||
<span>
|
||||
<span th:if="${!post.posting}" style="background-color: #888; color: white; font-size: 0.7em; padding: 2px 6px; border-radius: 4px; margin-right: 8px; vertical-align: middle;">
|
||||
비공개
|
||||
</span>
|
||||
<span th:text="${post.title != null and not #strings.isEmpty(post.title)} ? ${post.title} : 'untitled[' + ${#temporals.format(T(java.time.Instant).ofEpochMilli(post.writeTime).atZone(T(java.time.ZoneId).systemDefault()).toLocalDateTime(), 'yyyy-MM-dd HH:mm')} + ']'"></span>
|
||||
</span>
|
||||
<span th:text="${post.title != null and not #strings.isEmpty(post.title)} ? ${post.title} : 'untitled[' + ${#temporals.format(T(java.time.Instant).ofEpochMilli(post.writeTime).atZone(T(java.time.ZoneId).systemDefault()).toLocalDateTime(), 'yyyy-MM-dd HH:mm')} + ']'"></span>
|
||||
</span>
|
||||
<span style="font-size: 0.75em; color: #888; font-weight: normal; white-space: nowrap; margin-left: 1em;">
|
||||
(읽음: <span th:text="${post.readCount}">0</span>)
|
||||
</span>
|
||||
</h3>
|
||||
<p style="font-size: 0.9em; color: #555; margin-bottom: 0.5em;" th:text="${'by ' + post.writer}"></p>
|
||||
|
||||
<p th:text="${#strings.abbreviate(post.html, 80)}" class="ellipsis"></p>
|
||||
|
||||
<span style="font-size: 0.75em; color: #888; font-weight: normal; white-space: nowrap; margin-left: 1em;">
|
||||
(읽음: <span th:text="${post.readCount}">0</span>)
|
||||
</span>
|
||||
</h3>
|
||||
<p style="font-size: 0.9em; color: #555; margin-bottom: 0.5em;" th:text="${'by ' + post.writer}"></p>
|
||||
<p th:text="${#strings.abbreviate(post.html, 80)}" class="ellipsis"></p>
|
||||
</div>
|
||||
<footer sec:authorize="isAuthenticated()"
|
||||
th:if="${#authentication.name == post.writer or #authorization.expression('hasRole(''ADMIN'')')}"
|
||||
style="text-align: right; margin-top: 1em;">
|
||||
<a th:href="@{/blog/edit/{postId}(postId=${post.id})}" class="button small alt">수정</a>
|
||||
</footer>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<footer sec:authorize="isAuthenticated()"
|
||||
th:if="${#authentication.name == post.writer or #authorization.expression('hasRole(''ADMIN'')')}"
|
||||
style="text-align: right; margin-top: 1em;">
|
||||
<a th:href="@{/blog/edit/{postId}(postId=${post.id})}" class="button small alt">수정</a>
|
||||
</footer>
|
||||
</div>
|
||||
</section>
|
||||
<th:block th:if="${iterStat.count % 3 == 0}">
|
||||
<section>
|
||||
<div class="box" style="padding: 2em; text-align: center;">
|
||||
<p style="margin-bottom: 1em; color: #888;">- Advertisement -</p>
|
||||
<ins class="adsbygoogle"
|
||||
style="display:block"
|
||||
data-ad-client="ca-pub-xxxxxxxxxxxxxxxx"
|
||||
data-ad-slot="yyyyyyyyyy"
|
||||
data-ad-format="auto"
|
||||
data-full-width-responsive="true"></ins>
|
||||
<script>
|
||||
(adsbygoogle = window.adsbygoogle || []).push({});
|
||||
</script>
|
||||
</div>
|
||||
</section>
|
||||
</th:block>
|
||||
</th:block>
|
||||
</article>
|
||||
|
||||
<nav aria-label="Page navigation" th:if="${postsPage.totalPages > 1}" style="text-align: center; margin-top: 2.5em; font-size: 0.9em;">
|
||||
@@ -72,7 +88,8 @@
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
</div> </div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
@@ -143,7 +143,7 @@
|
||||
<body>
|
||||
<th:block layout:fragment="content">
|
||||
|
||||
<div class="game-body-wrapper"> <h1>2048</h1>
|
||||
<div class="game-body-wrapper">
|
||||
<p>화살표를 터치하거나 키보드 방향키를 이용해 타일을 합쳐보세요!</p>
|
||||
<div class="game-container">
|
||||
<div class="score-container">
|
||||
@@ -161,6 +161,15 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container" style="text-align:center;">
|
||||
<ins class="adsbygoogle"
|
||||
style="display:block"
|
||||
data-ad-client="ca-pub-9504446465764716" data-ad-slot="1234567890" data-ad-format="auto"
|
||||
data-full-width-responsive="true"></ins>
|
||||
<script>
|
||||
(adsbygoogle = window.adsbygoogle || []).push({});
|
||||
</script>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
window.pageContext = { pageType: 'game', gameType: 'GAME_2048', contextId: null };
|
||||
|
||||
|
||||
@@ -294,8 +294,6 @@
|
||||
</th:block >
|
||||
|
||||
<th:block layout:fragment="content">
|
||||
<h1>Solve the Puzzle! 🧩</h1>
|
||||
|
||||
<div id="game-controls">
|
||||
<div id="mode-selector">
|
||||
<label>
|
||||
@@ -327,6 +325,15 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container" style="text-align:center;">
|
||||
<ins class="adsbygoogle"
|
||||
style="display:block"
|
||||
data-ad-client="ca-pub-9504446465764716" data-ad-slot="1234567890" data-ad-format="auto"
|
||||
data-full-width-responsive="true"></ins>
|
||||
<script>
|
||||
(adsbygoogle = window.adsbygoogle || []).push({});
|
||||
</script>
|
||||
</div>
|
||||
|
||||
<script th:inline="javascript">
|
||||
/*<![CDATA[*/
|
||||
|
||||
@@ -824,5 +824,14 @@
|
||||
<canvas id="gameCanvas"></canvas>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container" style="text-align:center;">
|
||||
<ins class="adsbygoogle"
|
||||
style="display:block"
|
||||
data-ad-client="ca-pub-9504446465764716" data-ad-slot="1234567890" data-ad-format="auto"
|
||||
data-full-width-responsive="true"></ins>
|
||||
<script>
|
||||
(adsbygoogle = window.adsbygoogle || []).push({});
|
||||
</script>
|
||||
</div>
|
||||
</th:block>
|
||||
</html>
|
||||
@@ -241,8 +241,6 @@
|
||||
<th:block layout:fragment="content">
|
||||
<div id="sudoku-game-app">
|
||||
<div class="container">
|
||||
<h1>스도쿠를 즐겨보세요!</h1>
|
||||
|
||||
<div id="board-area">
|
||||
<div id="setup-container">
|
||||
<select id="difficulty-select">
|
||||
@@ -299,7 +297,15 @@
|
||||
<button id="retry-btn">새 게임 시작</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="container" style="text-align:center;">
|
||||
<ins class="adsbygoogle"
|
||||
style="display:block"
|
||||
data-ad-client="ca-pub-9504446465764716" data-ad-slot="1234567890" data-ad-format="auto"
|
||||
data-full-width-responsive="true"></ins>
|
||||
<script>
|
||||
(adsbygoogle = window.adsbygoogle || []).push({});
|
||||
</script>
|
||||
</div>
|
||||
<script>
|
||||
window.pageContext = { pageType: 'game', gameType: 'SUDOKU', contextId: undefined };
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
<html xmlns:th="http://www.thymeleaf.org"
|
||||
xmlns:sec="http://www.thymeleaf.org/extras/spring-security">>
|
||||
<th:block th:fragment="footer">
|
||||
|
||||
<script th:inline="javascript">
|
||||
/*<![CDATA[*/
|
||||
function callSendTlg() {
|
||||
@@ -63,6 +64,13 @@
|
||||
<li><a href="#" class="icon brands fa-google-plus-g"><span class="label">Google+</span></a></li>
|
||||
</ul>
|
||||
|
||||
<div class="visitor-stats-inline">
|
||||
Today: <span id="visitor-today">...</span> |
|
||||
Week: <span id="visitor-week">...</span> |
|
||||
Month: <span id="visitor-month">...</span> |
|
||||
Year: <span id="visitor-year">...</span> |
|
||||
Total: <span id="visitor-total">...</span>
|
||||
</div>
|
||||
<!-- Copyright -->
|
||||
<div class="copyright">
|
||||
<ul class="menu">
|
||||
@@ -112,6 +120,28 @@
|
||||
}
|
||||
}
|
||||
|
||||
async function fetchVisitorStats() {
|
||||
try {
|
||||
const response = await fetch('/api/stats/visitors');
|
||||
if (!response.ok) {
|
||||
throw new Error('방문자 통계 조회 실패');
|
||||
}
|
||||
const stats = await response.json();
|
||||
|
||||
// 숫자를 콤마 포맷으로 변경하여 화면에 표시
|
||||
document.getElementById('visitor-today').textContent = stats.today.toLocaleString();
|
||||
document.getElementById('visitor-week').textContent = stats.week.toLocaleString();
|
||||
document.getElementById('visitor-month').textContent = stats.month.toLocaleString();
|
||||
document.getElementById('visitor-year').textContent = stats.year.toLocaleString();
|
||||
document.getElementById('visitor-total').textContent = stats.total.toLocaleString();
|
||||
|
||||
} catch (error) {
|
||||
console.error('방문자 통계 업데이트 중 오류:', error);
|
||||
// 오류 발생 시 모든 통계 필드에 '오류' 표시
|
||||
document.querySelectorAll('.visitor-stats span').forEach(el => el.textContent = '오류');
|
||||
}
|
||||
}
|
||||
|
||||
// --- 푸터 메인 로직 ---
|
||||
document.addEventListener('DOMContentLoaded', () => {
|
||||
// 현재 페이지가 스스로를 게임 페이지로 정의했는지 확인
|
||||
@@ -127,9 +157,26 @@
|
||||
const rankingList = document.querySelector('.rank_of_view');
|
||||
if(rankingList) rankingList.innerHTML = '<li>블로그 순위가 여기에 표시됩니다.</li>';
|
||||
fetchRankOfViews();
|
||||
fetchVisitorStats();
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
</script>
|
||||
<style>
|
||||
.visitor-stats-inline {
|
||||
text-align: center;
|
||||
padding-top: 2em;
|
||||
margin-top: 2em;
|
||||
font-size: 0.8em;
|
||||
color: #999;
|
||||
border-top: solid 1px rgba(255, 255, 255, 0.05);
|
||||
}
|
||||
.visitor-stats-inline span {
|
||||
font-weight: 600;
|
||||
color: #999;
|
||||
margin-right: 0.5em;
|
||||
}
|
||||
</style>
|
||||
</th:block>
|
||||
</html>
|
||||
Reference in New Issue
Block a user