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	%}
   248   249   250   251   252   253   254   255   256   257   258