Skip to content

Commit

Permalink
[Design] idea_form
Browse files Browse the repository at this point in the history
  • Loading branch information
jimin-kiim committed Aug 2, 2021
1 parent d7824b9 commit d8dbac6
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 20 deletions.
2 changes: 1 addition & 1 deletion SWIDEA_SITE/config/templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
</head>
<body class=" bg-secondary">
<nav class="navbar shadow navbar-dark bg-dark">
<a class="col text-center text-light pt-2"><h4>SW idea site</h4></a>
<a href="{% url 'ideas:idea_list'%}" class="col text-center text-light pt-2"><h4>SW idea site</h4></a>
</nav>
{% block content %}
{% endblock %}
Expand Down
35 changes: 19 additions & 16 deletions SWIDEA_SITE/ideas/templates/idea/detail.html
Original file line number Diff line number Diff line change
@@ -1,19 +1,22 @@
{% extends "base.html" %}

{% load static %}
{% block content %}
<h1>{{ idea.title }}</h1>
{% if idea.image %}
<img src="{{ idea.image.url }}" style="max-width: 100%;"/>
{%endif%}
<br/>
1) 아이디어 관심도: {{ idea.interest }}
<br/>
2) μ˜ˆμƒ 개발 툴:<a href="{% url 'devtools:tool_detail' idea.devtool.pk%}">{{ idea.devtool }}</a>
<br/>
3) 아이디어 μ„€λͺ…:{{ idea.content }}

<button class="btn" onclick="location.href='{% url "ideas:idea_delete" idea.pk %}'"> μ‚­μ œ </button>
<button class="btn" onclick="location.href='{% url "ideas:idea_edit" idea.pk %}'"> μˆ˜μ • </button>
<button class="btn" onclick="location.href='{% url "ideas:idea_list" %}'"> λͺ©λ‘ </button>

<div class="d-flex justify-content-center m-5">
<div class=" col-6 bg-dark text-light p-3 d-flex flex-column align-items-center rounded-lg">
<h2 class="pb-2">{{ idea.title }}</h2>
<img class="p-2" src="{{ idea.image.url }}" style="width: 300px;"/>
<div class="py-3">
1) 아이디어 관심도: {{ idea.interest }}
<br/>
2) μ˜ˆμƒ 개발 툴:<a class="text-light" href="{% url 'devtools:tool_detail' idea.devtool.pk%}"> {{ idea.devtool }}</a>
<br/>
3) 아이디어 μ„€λͺ…: {{ idea.content }}
</div>
<div>
<button class="btn btn-sm bg-secondary text-light mx-2" onclick="location.href='{% url "ideas:idea_delete" idea.pk %}'"> μ‚­μ œ </button>
<button class="btn btn-sm bg-secondary text-light mx-2" onclick="location.href='{% url "ideas:idea_edit" idea.pk %}'"> μˆ˜μ • </button>
<button class="btn btn-sm bg-secondary text-light mx-2" onclick="location.href='{% url "ideas:idea_list" %}'"> λͺ©λ‘ </button>
</div>
</div>
</div>
{% endblock %}
5 changes: 2 additions & 3 deletions SWIDEA_SITE/ideas/templates/idea/list.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,9 @@
<div class="d-flex justify-content-center ">
{%for idea in idea %}
<div class="col-3 p-3 m-1 d-flex flex-column align-items-center justify-content-center bg-dark rounded">
<img src="{{ idea.image.url }}" style="max-width: 70%;"/>
<hr>
<img src="{{ idea.image.url }}" style="width: 300px;"/>
<div>
<h3 ><a class="text-light" href="{% url 'ideas:idea_detail' idea.pk%}">{{ idea.title }}</a></h3>
<h3 class="py-3"><a class="text-light" href="{% url 'ideas:idea_detail' idea.pk%}">{{ idea.title }}</a></h3>
<span class="font-weight-bold text-light">μ˜ˆμƒ 개발 툴:</span> <span class="text-light">{{ idea.devtool }}</span>
<br>
<span class="font-weight-bold text-light">아이디어 관심도:</span> <span class="text-light">{{ idea.interest }}</span>
Expand Down

0 comments on commit d8dbac6

Please sign in to comment.