Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update detail.html #56

Merged
merged 1 commit into from
Nov 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions trades/static/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -149,15 +149,16 @@ li {

.Info {
width: 100%;
height: 30%;
height: 32%;
display: block;
background: rgb(254, 252, 252);
font-size: 1.1rem;
border-bottom: 4px solid;
}

.ChoiceBar {
width: 100%;
height: 70%;
height: 68%;
display: block;
float: left;
overflow-y: scroll;
Expand Down
90 changes: 73 additions & 17 deletions trades/templates/trades/detail.html
Original file line number Diff line number Diff line change
@@ -1,17 +1,73 @@
{% if region %}
<h1>{{region.dong_name}}의 집값 추이는?</h1>

<ul>
<li>
<p>trading volume : {{trading_volume}}</p>
<p>average price : {{average_price}}</p>
<p>lowest_price : {{lowest_price}}</p>
<p>highest_price : {{highest_price}}</p>
{% for t in trades%}
<p>{{t}}</p>
{% endfor %}
</li>
</ul>
{% else %}
<p>no real estaes</p>
{% endif %}
{% load static %}

<!DOCTYPE html>
<html lang="ko">
<head>
<meta charset="utf-8" />
<!--한글 에러 방지-->

<title>주택 매매 가격 동향</title>

<link
rel="stylesheet"
href="{% static 'css/style.css' %}"
type="text/css"
/>
</head>

{% if region %}
<body>
<header>
<button
class="Button"
type="button"
onclick="location.href='{% url 'trades:index' %}';"
>
Home
</button>

<!-- 제목 -->
<div id="Title" class="Title">
<p id="Logo" class="Logo">주택 매매 가격 동향</p>
<p id="SubLogo" class="SubLogo">
우리 동네에서 부동산 거래 변화가 가장 큰 곳은 어디일까?
</p>

<h3 class="Location">
<p><u>현재 선택 지역 : {{region}}</p></u>
</h3>
</div>
</header>

<main>
<aside id="Side" class="Side">

<!-- 거래정보 -->
<div id="Info" class="Info">
<h3 class="SectionName">거래 정보</h3>
<ul style="list-style-type: none">
<li>
<strong>매매 건수</strong> : {{trading_volume}} 건
</li>
<li>
<strong>평균 매매가</strong> : {{average_price}} 만원
</li>
<li>
<strong>최고 매매가</strong> : {{highest_price}} 만원
</li>
<li>
<strong>최저 매매가</strong> : {{lowest_price}} 만원
</li>
</ul>
</div>
</aside>
</main>

<footer>
<p><em>프로그래머스 데이터엔지니어링 데브코스 프로젝트</em></p>
</footer>
</body>
{% else %}
<p>이 지역에 대한 거래 정보가 없습니다.</p>
{% endif %}
</html>
17 changes: 7 additions & 10 deletions trades/templates/trades/main.html
Original file line number Diff line number Diff line change
Expand Up @@ -48,24 +48,21 @@ <h3 class="Location">

<main>
<aside id="Side" class="Side">
<!-- 등락 -->
<!-- 거래 정보 -->
<div id="Info" class="Info">
<h3 class="SectionName">거래 정보</h3>
<ul style="list-style-type: none">
<li>
<strong>매매 건수</strong> : {{ trading_volume }}
<strong>매매 건수</strong> : {{trading_volume}}
</li>
<li>
<strong>평균 매매가</strong> : {{ average_price }}
만원
<strong>평균 매매가</strong> : {{average_price}} 만원
</li>
<li>
<strong>가장 높은 매매가</strong> :
{{highest_price}} 만원
<strong>최고 매매가</strong> : {{highest_price}} 만원
</li>
<li>
<strong>가장 낮은 매매가</strong> : {{lowest_price}}
만원
<strong>최저 매매가</strong> : {{lowest_price}} 만원
</li>
</ul>
</div>
Expand All @@ -79,13 +76,13 @@ <h5>
<ul class="tabs">
{% for region in regions %}
<li class="tab" style="list-style-type: none">
{%if gugun%}
{% if gugun %}
<a
href="{% url 'trades:detail' %}?dong_nm={{sido}}-{{gugun}}-{{region}}"
>
{{region}}
</a>
{%elif sido%}
{% elif sido %}
<a
href="{% url 'trades:index' %}?sido_nm={{sido}}&gugun_nm={{region}}"
>
Expand Down