landing페이지 수정, 카테고리 리스트 정리
All checks were successful
Build And Test / build-and-push (push) Successful in 5m13s
All checks were successful
Build And Test / build-and-push (push) Successful in 5m13s
This commit is contained in:
parent
bcfdfe776e
commit
d34d4f8def
13
butler/templates/butler/_unarchived_landing.html
Normal file
13
butler/templates/butler/_unarchived_landing.html
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
{% extends "components/base.html" %}
|
||||||
|
|
||||||
|
{% block title %}Landing Page{% endblock %}
|
||||||
|
|
||||||
|
{% block main_area %}
|
||||||
|
<article class="pt-3">
|
||||||
|
<h2 class="fw-bold pb-2">Welcome!</h2>
|
||||||
|
<h3>IT Infra 및 DevOps 자원관리 도구</h3>
|
||||||
|
* IP리스트 관리기능 제공 <br>
|
||||||
|
* Public NHN Cloud API 기능 일부 제공
|
||||||
|
<p>계속 기능 구현 중 입니다.</p>
|
||||||
|
</article>
|
||||||
|
{% endblock %}
|
@ -3,11 +3,46 @@
|
|||||||
{% block title %}Landing Page{% endblock %}
|
{% block title %}Landing Page{% endblock %}
|
||||||
|
|
||||||
{% block main_area %}
|
{% block main_area %}
|
||||||
<article class="pt-3">
|
<div class="container mt-5">
|
||||||
<h2 class="fw-bold pb-2">Welcome!</h2>
|
<div class="row">
|
||||||
<h3>IT Infra 및 DevOps 자원관리 도구</h3>
|
<!-- NoticeBoard Section -->
|
||||||
* IP리스트 관리기능 제공 <br>
|
<div class="col-md-6">
|
||||||
* Public NHN Cloud API 기능 일부 제공
|
<h2>Latest Notices</h2>
|
||||||
<p>계속 기능 구현 중 입니다.</p>
|
<div class="row">
|
||||||
</article>
|
{% for notice in notices %}
|
||||||
|
<div class="col-12 mb-3">
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-body">
|
||||||
|
<h5 class="card-title">{{ notice.title }}</h5>
|
||||||
|
<p class="card-text">{{ notice.content|truncatewords:20 }}</p>
|
||||||
|
<a href="{% url 'butler:notice_detail' notice.id %}" class="btn btn-primary">View Notice</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{% empty %}
|
||||||
|
<p>No notices available.</p>
|
||||||
|
{% endfor %}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- Blog Posts Section -->
|
||||||
|
<div class="col-md-6">
|
||||||
|
<h2>Latest Blog Posts</h2>
|
||||||
|
<div class="row">
|
||||||
|
{% for post in blog_posts %}
|
||||||
|
<div class="col-12 mb-3">
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-body">
|
||||||
|
<h5 class="card-title">{{ post.title }}</h5>
|
||||||
|
<p class="card-text">{{ post.summary|truncatewords:20 }}</p>
|
||||||
|
<a href="{% url 'blog:post_detail' post.id %}" class="btn btn-primary">Read More</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{% empty %}
|
||||||
|
<p>No blog posts available.</p>
|
||||||
|
{% endfor %}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
@ -4,7 +4,10 @@ from . import views
|
|||||||
app_name = 'butler'
|
app_name = 'butler'
|
||||||
|
|
||||||
urlpatterns = [
|
urlpatterns = [
|
||||||
path('', views.hello_view, name='landing'), # 루트 경로에서 hello_view 호출
|
# path('', views.hello_view, name='landing'), # 루트 경로에서 hello_view 호출
|
||||||
|
# Landing Page
|
||||||
|
path('', views.LandingPageView.as_view(), name='landing'), # 클래스 기반 뷰(CBV) 호출
|
||||||
|
|
||||||
path('notice', views.notice_list, name='notice_list'),
|
path('notice', views.notice_list, name='notice_list'),
|
||||||
path('create_notice/', views.create_notice, name='create_notice'), # 포스트 작성
|
path('create_notice/', views.create_notice, name='create_notice'), # 포스트 작성
|
||||||
path('notice/<int:pk>/', views.notice_detail_view, name='notice_detail'),
|
path('notice/<int:pk>/', views.notice_detail_view, name='notice_detail'),
|
||||||
|
@ -1,18 +1,23 @@
|
|||||||
from django.shortcuts import render, redirect, get_object_or_404
|
from django.shortcuts import render, redirect, get_object_or_404
|
||||||
from django.contrib.auth.decorators import login_required
|
from django.contrib.auth.decorators import login_required
|
||||||
|
from django.views.generic import TemplateView
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
import markdown
|
import markdown
|
||||||
import os
|
import os
|
||||||
from .models import NoticeBoard, IPManagementRecord
|
from .models import NoticeBoard, IPManagementRecord
|
||||||
|
from blog.models import Post
|
||||||
from .forms import PostForm
|
from .forms import PostForm
|
||||||
from django.db.models import Q
|
from django.db.models import Q
|
||||||
|
|
||||||
|
|
||||||
def hello_view(request):
|
class LandingPageView(TemplateView):
|
||||||
return render(
|
template_name = "butler/landing.html"
|
||||||
request,
|
|
||||||
"butler/landing.html",
|
def get_context_data(self, **kwargs):
|
||||||
)
|
context = super().get_context_data(**kwargs)
|
||||||
|
context['blog_posts'] = Post.objects.order_by('-created_at')[:3]
|
||||||
|
context['notices'] = NoticeBoard.objects.order_by('-created_at')[:3]
|
||||||
|
return context
|
||||||
|
|
||||||
# --- notice ---
|
# --- notice ---
|
||||||
@login_required
|
@login_required
|
||||||
|
@ -9,6 +9,7 @@
|
|||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
|
<hr>
|
||||||
<li class="my-2">
|
<li class="my-2">
|
||||||
<button class="btn d-inline-flex align-items-center collapsed" data-bs-toggle="collapse" aria-expanded="false" data-bs-target="#contents-collapse" aria-controls="contents-collapse">Contents</button>
|
<button class="btn d-inline-flex align-items-center collapsed" data-bs-toggle="collapse" aria-expanded="false" data-bs-target="#contents-collapse" aria-controls="contents-collapse">Contents</button>
|
||||||
<ul class="list-unstyled ps-3 collapse" id="contents-collapse">
|
<ul class="list-unstyled ps-3 collapse" id="contents-collapse">
|
||||||
@ -32,7 +33,6 @@
|
|||||||
<li class="my-2">
|
<li class="my-2">
|
||||||
<button class="btn d-inline-flex align-items-center collapsed" data-bs-toggle="collapse" aria-expanded="false" data-bs-target="#nhnc-collapse" aria-controls="nhnc-collapse">NHN Cloud API</button>
|
<button class="btn d-inline-flex align-items-center collapsed" data-bs-toggle="collapse" aria-expanded="false" data-bs-target="#nhnc-collapse" aria-controls="nhnc-collapse">NHN Cloud API</button>
|
||||||
<ul class="list-unstyled ps-3 collapse" id="nhnc-collapse">
|
<ul class="list-unstyled ps-3 collapse" id="nhnc-collapse">
|
||||||
<span>가이드</span>
|
|
||||||
{% if request.user.is_authenticated and request.user.is_staff %}
|
{% if request.user.is_authenticated and request.user.is_staff %}
|
||||||
<li>
|
<li>
|
||||||
<a class="d-inline-flex align-items-center rounded" href="/nhncloud/test">출력결과 검토</a>
|
<a class="d-inline-flex align-items-center rounded" href="/nhncloud/test">출력결과 검토</a>
|
||||||
@ -114,20 +114,15 @@
|
|||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
|
<hr>
|
||||||
<li class="my-2">
|
<li class="my-2">
|
||||||
<button class="btn d-inline-flex align-items-center collapsed" data-bs-toggle="collapse" aria-expanded="false" data-bs-target="#other-collapse" aria-controls="other-collapse">Other Tools</button>
|
<button class="btn d-inline-flex align-items-center collapsed" data-bs-toggle="collapse" aria-expanded="false" data-bs-target="#other-collapse" aria-controls="other-collapse">Other Tools</button>
|
||||||
<ul class="list-unstyled ps-3 collapse" id="other-collapse">
|
<ul class="list-unstyled ps-3 collapse" id="other-collapse">
|
||||||
<li>
|
<li>
|
||||||
<a class="d-inline-flex align-items-center rounded" href="https://mm.icurfer.com/" target="_blank">Messenger - Mattermost</a>
|
<a class="d-inline-flex align-items-center rounded" href="https://mm.icurfer.com/" target="_blank">Messenger - Mattermost</a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
|
||||||
</li>
|
|
||||||
<hr>
|
|
||||||
<li class="my-2">
|
|
||||||
<button class="btn d-inline-flex align-items-center collapsed" data-bs-toggle="collapse" aria-expanded="false" data-bs-target="#forms-collapse" aria-controls="forms-collapse">Documents</button>
|
|
||||||
<ul class="list-unstyled ps-3 collapse" id="forms-collapse">
|
|
||||||
<li>
|
<li>
|
||||||
<a class="d-inline-flex align-items-center rounded" href="#">사용가이드</a>
|
<a class="d-inline-flex align-items-center rounded" href="https://nexus.icurfer.com/" target="_blank">Nexus</a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
|
Loading…
Reference in New Issue
Block a user