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

base_login.html 과 base_window.html 을 없애기 위해 base.html 을 3개의 파일로 나눕니다. #154

Closed
kagla opened this issue Jan 2, 2024 · 2 comments
Assignees
Labels
documentation Improvements or additions to documentation

Comments

@kagla
Copy link
Contributor

kagla commented Jan 2, 2024

기존

base.html

<html>
<head>
<title>제목</title>
<script></script>
</head>
<body>
{% block content %}
{% endblock content %}
</body>
</html>

변경

base.html

{% extends "base_body.html" %}

{% block content %}
{% endblock content %}

base_body.html

{% extends "base_head.html" %}

{% block base_body %}
<!-- layout -->
{% endblock base_body %}

base_head.html

<html>
<head>
<title>제목</title>
<script></script>
</head>
<body>
{% block base_body %}
    {% block content %}
    {% endblock content %}
{% endblock base_body %}
</body>
</html>

기존의 base_window.html 을 사용하는 파일

memo_list.html

{% extends "base_head.html" %}
{% import "/sideview/macros.html" as sideview %}

{% block title %}내 쪽지함{% endblock title %}

{% block content %}
<!-- 컨텐츠 -->
{% endblock content %}
@kagla kagla added the documentation Improvements or additions to documentation label Jan 2, 2024
@kagla
Copy link
Contributor Author

kagla commented Jan 2, 2024

위와 같이 수정하여 아래 코드를 한곳에서 관리할 수 있게 되었습니다.

<!doctype html>
<html lang="ko">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=Edge">
{% if request.state.config.cf_add_meta %}
    {{ request.state.config.cf_add_meta|safe }}
{% endif %}
<title>{% block title %}그누보드{% endblock title %}</title>
<link rel="icon" href="/static/favicon.ico" type="image/x-icon">
<link rel="stylesheet" href="{{ theme_asset('css/board.css') }}">
<link rel="stylesheet" href="{{ theme_asset('css/connect.css') }}">
<link rel="stylesheet" href="{{ theme_asset('css/poll.css') }}">
<link rel="stylesheet" href="{{ theme_asset('css/popular.css') }}">
<link rel="stylesheet" href="{{ theme_asset('css/member.css') }}">
<link rel="stylesheet" href="{{ theme_asset('css/latest_list.css') }}">
<link rel="stylesheet" href="{{ theme_asset('css/latest_block.css') }}">
<link rel="stylesheet" href="{{ theme_asset('css/latest.css') }}">
<link rel="stylesheet" href="{{ theme_asset('css/outlogin.css') }}">
<link rel="stylesheet" href="{{ theme_asset('css/latest_notice.css') }}">
<link rel="stylesheet" href="{{ theme_asset('css/visit.css') }}">
<link rel="stylesheet" href="{{ theme_asset('css/default.css') }}">

<!-- basic theme -->
<!-- 그누보드 core -->
<link rel="stylesheet" href="/static/js/owlcarousel/owl.carousel.min.css">
<link rel="stylesheet" href="/static/js/font-awesome/css/font-awesome.min.css">

<script src="/static/js/jquery-3.7.1.min.js"></script>
<script src="/static/js/jquery-migrate-3.4.0.min.js"></script>
<script src="/static/js/jquery.menu.js"></script>
<script src="/static/js/common.js"></script>
<script src="/static/js/wrest.js"></script>
<script src="/static/js/placeholders.min.js"></script>
<script src="/static/js/owlcarousel/owl.carousel.min.js"></script>
<script src="/static/js/jquery.bxslider.js"></script>    
<script>
// 자바스크립트에서 사용하는 전역변수 선언
var g5_url       = "{{ request.base_url }}";
var g5_bbs_url   = "{{ request.base_url }}bbs";
var g5_is_member = "1";
var g5_is_admin  = "super";
var g5_is_mobile = "";
var g5_bo_table  = "";
var g5_sca       = "";
var g5_editor    = "";
var g5_cookie_domain = "";
var g5_shop_url = "{{ request.base_url }}shop";
</script>
{% block head %}
{% endblock head %}
{% if request.state.config %}
    {{ request.state.config.cf_add_script|safe }}
{% endif %}
</head>
<body>

@kagla
Copy link
Contributor Author

kagla commented Jan 3, 2024

#157

@kagla kagla closed this as completed Jan 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

5 participants