Initial commit after re-install
This commit is contained in:
132
templates/index.html
Normal file
132
templates/index.html
Normal file
@@ -0,0 +1,132 @@
|
||||
<!doctype html>
|
||||
<html lang="ko">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<title>News Link</title>
|
||||
<link
|
||||
href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css"
|
||||
rel="stylesheet"
|
||||
/>
|
||||
<link
|
||||
rel="icon"
|
||||
href="{{ url_for('static', filename='favicon.ico') }}"
|
||||
type="image/x-icon"
|
||||
/>
|
||||
<link href="{{ url_for('static', filename='styles.css') }}" rel="stylesheet" />
|
||||
</head>
|
||||
<body>
|
||||
<div class="container py-4">
|
||||
<div class="d-flex align-items-center justify-content-between mb-4">
|
||||
<div>
|
||||
<h1 class="h3 mb-1">뉴스 링크</h1>
|
||||
<p class="text-secondary mb-0">저장한 링크의 요약을 한눈에 확인하세요.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% if error_message %}
|
||||
<div class="alert alert-danger">{{ error_message }}</div>
|
||||
{% endif %}
|
||||
|
||||
<div
|
||||
id="emptyState"
|
||||
class="alert alert-light border d-none"
|
||||
>
|
||||
아직 저장된 링크가 없습니다.
|
||||
</div>
|
||||
|
||||
<div id="linkList" class="row g-4">
|
||||
{% for link in links %}
|
||||
{% set img_src = link.image if link.image and link.image != default_image else placeholder_data_uri %}
|
||||
<div class="col-12 col-md-6 col-lg-4">
|
||||
<div class="card h-100 shadow-sm">
|
||||
<img
|
||||
src="{{ img_src }}"
|
||||
class="card-img-top"
|
||||
alt="미리보기 이미지"
|
||||
{% if link.image and link.image != default_image %}
|
||||
onerror="if(!this.dataset.fallbackApplied){this.dataset.fallbackApplied='1';this.onerror=null;this.src='{{ placeholder_data_uri }}';}"
|
||||
{% endif %}
|
||||
/>
|
||||
<div class="card-body d-flex flex-column">
|
||||
<h5 class="card-title mb-2">{{ link.title or link.url }}</h5>
|
||||
<p class="card-text text-secondary flex-grow-1">
|
||||
{{ link.description or "설명 없음" }}
|
||||
</p>
|
||||
<a
|
||||
href="{{ link.url }}"
|
||||
target="_blank"
|
||||
rel="noopener"
|
||||
class="btn btn-outline-primary btn-sm"
|
||||
>
|
||||
원문 보기
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
||||
<div id="loading" class="text-center text-secondary py-4 d-none">
|
||||
불러오는 중...
|
||||
</div>
|
||||
<div id="scrollSentinel" style="height: 1px"></div>
|
||||
</div>
|
||||
|
||||
<button
|
||||
class="btn btn-primary rounded-circle shadow floating-btn"
|
||||
data-bs-toggle="modal"
|
||||
data-bs-target="#linkModal"
|
||||
aria-label="링크 추가"
|
||||
>
|
||||
+
|
||||
</button>
|
||||
|
||||
<div
|
||||
class="modal fade"
|
||||
id="linkModal"
|
||||
tabindex="-1"
|
||||
aria-hidden="true"
|
||||
>
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<form id="linkForm">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title">링크 추가</h5>
|
||||
<button
|
||||
type="button"
|
||||
class="btn-close"
|
||||
data-bs-dismiss="modal"
|
||||
aria-label="Close"
|
||||
></button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<label for="urlInput" class="form-label">URL</label>
|
||||
<input
|
||||
type="url"
|
||||
class="form-control"
|
||||
id="urlInput"
|
||||
placeholder="https://example.com"
|
||||
required
|
||||
/>
|
||||
<div id="formError" class="text-danger small mt-2"></div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button
|
||||
type="button"
|
||||
class="btn btn-outline-secondary"
|
||||
data-bs-dismiss="modal"
|
||||
>
|
||||
닫기
|
||||
</button>
|
||||
<button type="submit" class="btn btn-primary">저장</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js"></script>
|
||||
<script src="{{ url_for('static', filename='app.js') }}"></script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user