Page 253 - Nodejs 교과서 개정2판
P. 253
{% endblock %}
</body>
</html>
body.html
{% extends 'layout.html' %}
{% block content %}
<main>
<p>내용입니다.</p>
</main>
{% endblock %}
{% block script %}
<script src="/main.js"></script>
{% endblock %}
ۨইਓ ؼ ੌীח ҕాػ ݃সਸ ֍غ ಕ݃ ׳ۄח ࠗ࠙ਸ blockਵ۽ ࠺ਕنפ block ৈ
۞ ѐ ٜ݅যب ؾפ blockਸ ࢶೞח ߑߨ {% block [블록명] %}ੑפ {% endblock %}۽ ࠶۾ਸ ઙܐ
פ
block غח ੌীࢲח {% extends 경로 %} ఃਕ٘۽ ۨইਓ ੌਸ ೞҊ block ࠗ࠙ਸ ֍णפ ա
ী झۨझীࢲ res.render('body')ܳ ࢎਊ೧ ೞա )5.-۽ റ ۪؊݂ೡ ࣻ णפ э ܴ
block ࠗ࠙ ࢲ۽ פ
ઁ քझ ޙߨ ࠙ ߓਛणפ WJFXT ಫ؊ী MBZPVU IUNM JOEFY IUNM FSSPS IUNM ੌਸ ٜ݅য
ࠇद
layout.html
<!DOCTYPE html>
<html>
<head>
<title>{{title}}</title>
<link rel="stylesheet" href="/style.css" />
</head>
<body>
{% block content %}