Skip to content

Commit

Permalink
Deduplication
Browse files Browse the repository at this point in the history
  • Loading branch information
ankiwoong committed May 3, 2020
1 parent fad6ebe commit 5f99739
Show file tree
Hide file tree
Showing 4 changed files with 283 additions and 501 deletions.
124 changes: 124 additions & 0 deletions blog/templates/base_generic.html
@@ -0,0 +1,124 @@
<!DOCTYPE HTML>
<html lang="en-US">

<head>
<title>Suppablog - Minimal Blog Html Template</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="description" content="Template by Colorlib" />
<meta name="keywords" content="HTML, CSS, JavaScript, PHP" />
<meta name="author" content="Colorlib" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">

<!-- static 사용을 위한 명령어 -->
{% load static %}

<!-- 부트스트랩 사용 -->
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css"
integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" crossorigin="anonymous">

<link rel="shortcut icon" href="{% static 'images/favicon.png' %}" />
<link href='http://fonts.googleapis.com/css?family=Montserrat:400,700%7CLibre+Baskerville:400,400italic,700'
rel='stylesheet' type='text/css'>
<link rel="stylesheet" type="text/css" href='{% static "css/clear.css" %}' />
<link rel="stylesheet" type="text/css" href='{% static "css/common.css" %}' />
<link rel="stylesheet" type="text/css" href='{% static "css/font-awesome.min.css" %}' />
<link rel="stylesheet" type="text/css" href='{% static "css/carouFredSel.css" %}' />
<link rel="stylesheet" type="text/css" href='{% static "css/sm-clean.css" %}' />
<link rel="stylesheet" type="text/css" href='{% static "css/style.css" %}' />

<!--[if lt IE 9]>
<script src="{% static 'js/html5.js' %}"></script>
<![endif]-->

</head>


<body class="home blog">

<!-- Preloader Gif -->
<table class="doc-loader">
<tbody>
<tr>
<td>
<img src="{% static 'images/ajax-document-loader.gif' %}" alt="Loading...">
</td>
</tr>
</tbody>
</table>

<!-- Left Sidebar -->
<div id="sidebar" class="sidebar">
<div class="menu-left-part">
<div class="search-holder">
<label>
<input type="search" class="search-field" placeholder="Type here to search..." value="" name="s"
title="Search for:">
</label>
</div>
<div class="site-info-holder">
<h1 class="site-title">Suppablog</h1>
<p class="site-description">
Suppablog is simple and yet cool wordpress theme to lorem ipsum dolor sit.
</p>
</div>
<nav id="header-main-menu">
<ul class="main-menu sm sm-clean">
<li><a href="{% url 'index' %}" class="current">Home</a></li>
<!-- 로그인 한 상태에서는 글 작성하기 보이기 -->
{% if user.is_authenticated %}
<li><a href="{% url 'post_create' %}">글 작성하기</a></li>
<!-- 로그인 한 상태가 아니면 로그인 보이기 -->
{% else %}
<li><a href="/admin">로그인</a></li>
{% endif %}
</ul>
</nav>
<footer>
<div class="footer-info">
© 2018 SUPPABLOG HTML TEMPLATE. <br> CRAFTED WITH <i class="fa fa-heart"></i> BY <a
href="https://colorlib.com">COLORLIB</a>.
</div>
</footer>
</div>
<div class="menu-right-part">
<div class="logo-holder">
<a href="{% url 'index' %}">
<img src="{% static 'images/logo.png' %}" alt="Suppablog WP">
</a>
</div>
<div class="toggle-holder">
<div id="toggle">
<div class="menu-line"></div>
</div>
</div>
<div class="social-holder">
<div class="social-list">
<a href="#"><i class="fa fa-twitter"></i></a>
<a href="#"><i class="fa fa-youtube-play"></i></a>
<a href="#"><i class="fa fa-facebook"></i></a>
<a href="#"><i class="fa fa-vimeo"></i></a>
<a href="#"><i class="fa fa-behance"></i></a>
<a href="#"><i class="fa fa-rss"></i></a>
</div>
</div>
<div class="fixed scroll-top"><i class="fa fa-caret-square-o-up" aria-hidden="true"></i></div>
</div>
<div class="clear"></div>
</div>

{% block content %}
{% endblock %}

<!--Load JavaScript-->
<script type="text/javascript" src="{% static 'js/jquery.js' %}"></script>
<script type='text/javascript' src='{% static "js/imagesloaded.pkgd.js" %}'></script>
<script type='text/javascript' src='{% static "js/jquery.nicescroll.min.js" %}'></script>
<script type='text/javascript' src='{% static "js/jquery.smartmenus.min.js" %}'></script>
<script type='text/javascript' src='{% static "js/jquery.carouFredSel-6.0.0-packed.js" %}'></script>
<script type='text/javascript' src='{% static "js/jquery.mousewheel.min.js" %}'></script>
<script type='text/javascript' src='{% static "js/jquery.touchSwipe.min.js" %}'></script>
<script type='text/javascript' src='{% static "js/jquery.easing.1.3.js" %}'></script>
<script type='text/javascript' src='{% static "js/main.js" %}'></script>
</body>

</html>
200 changes: 45 additions & 155 deletions blog/templates/blog/post_detail.html
@@ -1,162 +1,52 @@
<!DOCTYPE HTML>
<html lang="en-US">

<head>
<title>Suppablog - Minimal Blog Html Template</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="description" content="Template by Colorlib" />
<meta name="keywords" content="HTML, CSS, JavaScript, PHP" />
<meta name="author" content="Colorlib" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">

{% load static %}

<link rel="shortcut icon" href="{% static 'images/favicon.png' %}" />
<link href='http://fonts.googleapis.com/css?family=Montserrat:400,700%7CLibre+Baskerville:400,400italic,700'
rel='stylesheet' type='text/css'>
<link rel="stylesheet" type="text/css" href='{% static "css/clear.css" %}' />
<link rel="stylesheet" type="text/css" href='{% static "css/common.css" %}' />
<link rel="stylesheet" type="text/css" href='{% static "css/font-awesome.min.css" %}' />
<link rel="stylesheet" type="text/css" href='{% static "css/carouFredSel.css" %}' />
<link rel="stylesheet" type="text/css" href='{% static "css/sm-clean.css" %}' />
<link rel="stylesheet" type="text/css" href='{% static "css/style.css" %}' />

<!--[if lt IE 9]>
<script src="{% static 'js/html5.js' %}"></script>
<![endif]-->

</head>


<body class="single-post">

<!-- Preloader Gif -->
<table class="doc-loader">
<tbody>
<tr>
<td>
<img src="{% static 'images/ajax-document-loader.gif' %}" alt="Loading...">
</td>
</tr>
</tbody>
</table>

<!-- Left Sidebar -->
<div id="sidebar" class="sidebar">
<div class="menu-left-part">
<div class="search-holder">
<label>
<input type="search" class="search-field" placeholder="Type here to search..." value="" name="s"
title="Search for:">
</label>
</div>
<div class="site-info-holder">
<div class="site-title">Suppablog</div>
<p class="site-description">
Suppablog is simple and yet cool wordpress theme to lorem ipsum dolor sit.
</p>
</div>
<nav id="header-main-menu">
<ul class="main-menu sm sm-clean">
<li><a href="{% url 'index' %}" class="current">Home</a></li>
<li><a href="about.html">About</a></li>
<li><a href="scroll.html">Scroll</a></li>
<li><a href="contact.html">Contact</a></li>
</ul>
</nav>
<footer>
<div class="footer-info">
© 2018 SUPPABLOG HTML TEMPLATE. <br> CRAFTED WITH <i class="fa fa-heart"></i> BY <a
href="https://colorlib.com">COLORLIB</a>.
</div>
</footer>
</div>
<div class="menu-right-part">
<div class="logo-holder">
<a href="{% url 'index' %}">
<img src="{% static 'images/logo.png' %}" alt="Suppablog WP">
</a>
</div>
<div class="toggle-holder">
<div id="toggle">
<div class="menu-line"></div>
</div>
</div>
<div class="social-holder">
<div class="social-list">
<a href="#"><i class="fa fa-twitter"></i></a>
<a href="#"><i class="fa fa-youtube-play"></i></a>
<a href="#"><i class="fa fa-facebook"></i></a>
<a href="#"><i class="fa fa-vimeo"></i></a>
<a href="#"><i class="fa fa-behance"></i></a>
<a href="#"><i class="fa fa-rss"></i></a>
{% extends "base_generic.html" %}
{% block content %}
{% load static %}

<!-- Single Content -->
<div id="content" class="site-content center-relative">
<div class="single-post-wrapper content-1070 center-relative">

<article class="center-relative">
<h1 class="entry-title">
<!-- 글제목 -->
{{ post.title }}
</h1>
<div class="post-info content-660 center-relative">
<div class="cat-links">
<ul>
<li><a href="#">
<!-- 카테고리 -->
{% for c in post.category.all %}
{{ c }}
<!-- 카테고리가 여러개인 경우 , 표시 -->
{% if not forloop.last %}
,
{% endif %}
{% endfor %}
</a></li>
</ul>
</div>
<!-- 글 작성일 -->
<div class="entry-date published">{{ post.createDate }}</div>
<div class="clear"></div>
</div>
<div class="fixed scroll-top"><i class="fa fa-caret-square-o-up" aria-hidden="true"></i></div>
</div>
<div class="clear"></div>
</div>

<!-- Single Content -->
<div id="content" class="site-content center-relative">
<div class="single-post-wrapper content-1070 center-relative">
<!-- 사진 -->
{% if post.title_image %}
<div class="post-full-width">
<img src="{{ post.title_image.url }}" alt="">
</div>
{% endif %}

<article class="center-relative">
<h1 class="entry-title">
<!-- 글제목 -->
{{ post.title }}
</h1>
<div class="post-info content-660 center-relative">
<div class="cat-links">
<ul>
<li><a href="#">
<!-- 카테고리 -->
{% for c in post.category.all %}
{{ c }}
<!-- 카테고리가 여러개인 경우 , 표시 -->
{% if not forloop.last %}
,
{% endif %}
{% endfor %}
</a></li>
</ul>
</div>
<!-- 글 작성일 -->
<div class="entry-date published">{{ post.createDate }}</div>
<div class=" entry-content">
<div class="content-wrap content-660 center-relative">
<!-- 글 내용 -->
{{ post.content }}
<div class="clear"></div>
</div>

<!-- 사진 -->
{% if post.title_image %}
<div class="post-full-width">
<img src="{{ post.title_image.url }}" alt="">
</div>
{% endif %}

<div class=" entry-content">
<div class="content-wrap content-660 center-relative">
<!-- 글 내용 -->
{{ post.content }}
<div class="clear"></div>
</div>
</div>
<div class="clear"></div>
</article>
</div>
</div>
<div class="clear"></div>
</article>
</div>



<!--Load JavaScript-->
<script type="text/javascript" src="{% static 'js/jquery.js' %}"></script>
<script type='text/javascript' src='{% static "js/imagesloaded.pkgd.js" %}'></script>
<script type='text/javascript' src='{% static "js/jquery.nicescroll.min.js" %}'></script>
<script type='text/javascript' src='{% static "js/jquery.smartmenus.min.js" %}'></script>
<script type='text/javascript' src='{% static "js/jquery.carouFredSel-6.0.0-packed.js" %}'></script>
<script type='text/javascript' src='{% static "js/jquery.mousewheel.min.js" %}'></script>
<script type='text/javascript' src='{% static "js/jquery.touchSwipe.min.js" %}'></script>
<script type='text/javascript' src='{% static "js/jquery.easing.1.3.js" %}'></script>
<script type='text/javascript' src='{% static "js/main.js" %}'></script>
</body>

</html>
</div>
{% endblock %}

0 comments on commit 5f99739

Please sign in to comment.