{"id":359,"date":"2026-05-29T10:34:04","date_gmt":"2026-05-29T10:34:04","guid":{"rendered":"https:\/\/infognu.ansan.ac.kr\/PortFolio\/202151034\/?p=359"},"modified":"2026-10-13T04:24:44","modified_gmt":"2026-10-13T04:24:44","slug":"14%ec%a3%bc%ec%b0%a8-%eb%b3%b4%ea%b3%a0%ec%84%9c","status":"publish","type":"post","link":"https:\/\/infognu.ansan.ac.kr\/PortFolio\/202151034\/2026\/05\/29\/14%ec%a3%bc%ec%b0%a8-%eb%b3%b4%ea%b3%a0%ec%84%9c\/","title":{"rendered":"14\uc8fc\ucc28 \ubcf4\uace0\uc11c"},"content":{"rendered":"\n<figure class=\"wp-block-gallery has-nested-images columns-default is-cropped wp-block-gallery-1 is-layout-flex wp-block-gallery-is-layout-flex\">\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"856\" height=\"873\" data-id=\"362\" src=\"https:\/\/infognu.ansan.ac.kr\/PortFolio\/202151034\/wp-content\/uploads\/sites\/96\/2026\/05\/image-9.png\" alt=\"\" class=\"wp-image-362\" style=\"width:432px;height:auto\" srcset=\"https:\/\/infognu.ansan.ac.kr\/PortFolio\/202151034\/wp-content\/uploads\/sites\/96\/2026\/05\/image-9.png 856w, https:\/\/infognu.ansan.ac.kr\/PortFolio\/202151034\/wp-content\/uploads\/sites\/96\/2026\/05\/image-9-294x300.png 294w, https:\/\/infognu.ansan.ac.kr\/PortFolio\/202151034\/wp-content\/uploads\/sites\/96\/2026\/05\/image-9-768x783.png 768w\" sizes=\"auto, (max-width: 856px) 100vw, 856px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"534\" height=\"609\" data-id=\"363\" src=\"https:\/\/infognu.ansan.ac.kr\/PortFolio\/202151034\/wp-content\/uploads\/sites\/96\/2026\/05\/image-10.png\" alt=\"\" class=\"wp-image-363\" srcset=\"https:\/\/infognu.ansan.ac.kr\/PortFolio\/202151034\/wp-content\/uploads\/sites\/96\/2026\/05\/image-10.png 534w, https:\/\/infognu.ansan.ac.kr\/PortFolio\/202151034\/wp-content\/uploads\/sites\/96\/2026\/05\/image-10-263x300.png 263w\" sizes=\"auto, (max-width: 534px) 100vw, 534px\" \/><\/figure>\n<\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">1. 14\uc8fc\ucc28 \uc218\ud589 \uc791\uc5c5 \uac1c\uc694<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\uae30\uc874 \ubb38\uc81c\uc810<\/strong>: \ucd08\uae30 \ubc84\uc804\uc5d0\ub294 \ub2e8\uc21c \ub3d9\ubb3c \uc544\uc774\ucf58(\ubcd1\uc544\ub9ac, \ud1a0\ub07c \ub4f1) \uc704\uc8fc\ub85c \uad6c\uc131\ub418\uc5b4 \uc788\uc5b4 \uc218\uc9d1 \uc694\uc18c\uc758 \ub9e4\ub825\uacfc \ubab0\uc785\uac10\uc774 \ubd80\uc871\ud588\uc2b5\ub2c8\ub2e4.<\/li>\n\n\n\n<li><strong>14\uc8fc\ucc28 \ud575\uc2ec \ubaa9\ud45c<\/strong>:\n<ol class=\"wp-block-list\">\n<li>\uce5c\uc219\ud558\uace0 \ub300\uc911\uc801\uc778\u00a0<strong>&#8216;\uc9f1\uad6c\ub294 \ubabb\ub9d0\ub824&#8217; \uc138\uacc4\uad00\uc758 22\uac00\uc9c0 \uce90\ub9ad\ud130 \ub77c\uc778\uc5c5<\/strong>\u00a0\uad6c\ucd95<\/li>\n\n\n\n<li>\uc131\uc7a5 \ub2e8\uacc4\ubcc4(Lv.1 \uc544\uae30 ~ Lv.4 \uc131\uc778\/\ucd5c\uc885\ud615)\u00a0<strong>\ucd1d 88\uc7a5 \uc774\uc0c1\uc758 \uce90\ub9ad\ud130 \uc774\ubbf8\uc9c0 \ub370\uc774\ud130\uc14b<\/strong>\u00a0\ub9e4\ud551<\/li>\n\n\n\n<li>**\ub3c4\uac10 \ud398\uc774\uc9c0(<code>pet-collection.html<\/code>)**\uc5d0 22\uc885 \uc804\uccb4 \uce90\ub9ad\ud130 \uceec\ub809\uc158 \uce74\ub4dc \ubc0f \uc218\uc9d1 \ud1b5\uacc4 \uad6c\ud604<\/li>\n\n\n\n<li>**\ub9c8\uc774\ud398\uc774\uc9c0(<code>mypage.html<\/code>)**\uc5d0 \ub9cc\ub819(Lv.4) \ub2ec\uc131 \uc2dc \ub2e4\uc74c \uce90\ub9ad\ud130\ub97c \uace0\ub97c \uc218 \uc788\ub294\u00a0<strong>&#8216;\uc0c8 \uce90\ub9ad\ud130 \uc120\ud0dd \ubaa8\ub2ec&#8217;<\/strong>\u00a0\uad6c\ud604<\/li>\n<\/ol>\n<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">2. \uc774\ubbf8\uc9c0\ub294 \uc5b4\ub5bb\uac8c \uc800\uc7a5\ub418\uace0 \uc6f9\uc5d0 \ubcf4\uc5ec\uc9c8\uae4c? (\ub3d9\uc791 \uc6d0\ub9ac)<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\uc774\ubbf8\uc9c0\uac00 \ube0c\ub77c\uc6b0\uc800 \ud654\uba74\uc5d0 \ub80c\ub354\ub9c1\ub418\ub294 \uacfc\uc815\uc740&nbsp;<strong>[\uc815\uc801 \ud30c\uc77c \uc11c\ube59] \u2794 [\ub370\uc774\ud130 \ub9e4\ud551] \u2794 [\ub3d9\uc801 DOM \ub80c\ub354\ub9c1]<\/strong>&nbsp;3\ub2e8\uacc4\ub85c \uc774\ub8e8\uc5b4\uc9d1\ub2c8\ub2e4.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">[\ub85c\uceec \uc774\ubbf8\uc9c0 \ud30c\uc77c]<br>public\/\uc9f1\uad6c \ub4f1\uc7a5\uc778\ubb3c\/*.jpg<br>\u2502<br>\u25bc (Node.js Express\uac00 \/\ub85c \uc815\uc801 \uc11c\ube59)<br>[\uc6f9 \ube0c\ub77c\uc6b0\uc800 URL \uc811\uadfc]<br>\/\uc9f1\uad6c \ub4f1\uc7a5\uc778\ubb3c\/\uc9f1\uad6c \uac13\ub09c\uc544\uae30.jpg<br>\u2502<br>\u25bc (JavaScript \uac1d\uccb4\uc5d0 \ub2e8\uacc4\ubcc4 \ubc30\uc5f4 \ub9e4\ud551)<br>[PET_SVGS \/ ANIMAL_DEFS]<br>\u2502<br>\u25bc (DOM \uc870\uc791\uc73c\ub85c <img> \ud0dc\uadf8 \uc0dd\uc131 \ubc0f innerHTML \uc0bd\uc785)<br>[\ucd5c\uc885 \ud654\uba74 \ucd9c\ub825]<br>\ub3c4\uac10 \uce74\ub4dc \uadf8\ub9ac\ub4dc \ubc0f \ubaa8\ub2ec\ucc3d<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u2460 \ubc31\uc5d4\ub4dc: Express \uc815\uc801 \ud30c\uc77c \uc11c\ube59<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Node.js \ubc31\uc5d4\ub4dc(<code>app.js<\/code>)\uc5d0\uc11c&nbsp;<code>public<\/code>&nbsp;\ud3f4\ub354\ub97c \uc815\uc801 \ub8e8\ud2b8\ub85c \uc9c0\uc815\ud558\uc5ec, \ud3f4\ub354 \uc548\uc758 \uc774\ubbf8\uc9c0\ub4e4\uc744 \uc6f9 URL\ub85c \uc989\uc2dc \ud638\ucd9c\ud560 \uc218 \uc788\uac8c \ucc98\ub9ac\ud588\uc2b5\ub2c8\ub2e4.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\/\/ app.js<br>app.use(express.static(path.join(__dirname, &#8216;public&#8217;)));<br>\/\/ \u2794 \ube0c\ub77c\uc6b0\uc800\uc5d0\uc11c &#8216;\/\uc9f1\uad6c \ub4f1\uc7a5\uc778\ubb3c\/\ud30c\uc77c\uba85.jpg&#8217; \uc8fc\uc18c\ub85c \ubc14\ub85c \uc774\ubbf8\uc9c0 \ub85c\ub4dc \uac00\ub2a5<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">3. \ud575\uc2ec \uc791\uc131 \ucf54\ub4dc \ubd84\uc11d<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">(1) \uce90\ub9ad\ud130 \uc815\ubcf4 \ubc0f \uc131\uc7a5 \ub2e8\uacc4\ubcc4 \uc774\ubbf8\uc9c0 \ubc30\uc5f4 \uc815\uc758 (JavaScript)<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">22\uac1c \uce90\ub9ad\ud130\uc758 \uace0\uc720 Key(<code>chick<\/code>,&nbsp;<code>rabbit<\/code>,&nbsp;<code>maenggu<\/code>&nbsp;\ub4f1)\uc5d0 **\uc774\ub984, \ud14c\ub9c8, \uc2a4\ud1a0\ub9ac \uc815\ubcf4(<code>ANIMAL_DEFS<\/code>)**\uc640 **Lv.1\ubd80\ud130 Lv.4\uae4c\uc9c0\uc758 \uc774\ubbf8\uc9c0 \ud0dc\uadf8 \ubc30\uc5f4(<code>PET_SVGS<\/code>)**\uc744 \uad6c\uc870\ud654\ud588\uc2b5\ub2c8\ub2e4.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\/\/ 1. \uce90\ub9ad\ud130 \uba54\ud0c0\ub370\uc774\ud130 \uc815\uc758 (\uc774\ub984, \ud14c\ub9c8\uc0c9, \ubd84\ub958, \uc2a4\ud1a0\ub9ac)<br>const ANIMAL_DEFS = {<br>chick: {<br>name: &#8216;\uc9f1\uad6c&#8217;,<br>icon: &#8216;\ud83d\udc66&#8217;,<br>theme: &#8216;#ffebee&#8217;,<br>subType: &#8216;\ub5a1\uc78e\ub9c8\uc744 \ubc29\ubc94\ub300&#8217;,<br>story: &#8216;\ub5a1\uc78e\ub9c8\uc744\uc758 \ud2b8\ub7ec\ube14 \uba54\uc774\ucee4\uc774\uc790 \ucd08\ucf54\ube44 \ub9e4\ub2c8\uc544. \uadc0\uc5ec\uc6b4 \uc5c9\ub369\uc774 \ucda4\uc744 \uc88b\uc544\ud55c\ub2e4.&#8217;<br>},<br>rabbit: {<br>name: &#8216;\ud6c8\uc774&#8217;,<br>icon: &#8216;\ud83c\udf59&#8217;,<br>theme: &#8216;#e0f2f1&#8217;,<br>subType: &#8216;\ub5a1\uc78e\ub9c8\uc744 \ubc29\ubc94\ub300&#8217;,<br>story: &#8216;\uac81\uc774 \ub9ce\uace0 \ub208\ubb3c\uc774 \ub9ce\uc9c0\ub9cc \ub204\uad6c\ubcf4\ub2e4 \uc21c\uc218\ud558\uace0 \ucc29\ud55c \uc544\uc774.&#8217;<br>},<br>hamster: { name: &#8216;\ud770\ub465\uc774&#8217;, icon: &#8216;\ud83d\udc15&#8217;, subType: &#8216;\ubc18\ub824\ub3d9\ubb3c&#8217;, &#8230; },<br>cat: { name: &#8216;\uc720\ub9ac&#8217;, &#8230; },<br>dog: { name: &#8216;\uc9f1\uc544&#8217;, &#8230; },<br>maenggu: { name: &#8216;\uc2e0\ud615\ub9cc&#8217;, &#8230; },<br>miso: { name: &#8216;\uc606\uc9d1 \uc544\uc90c\ub9c8&#8217;, &#8230; },<br>suji: { name: &#8216;\uc218\uc9c0&#8217;, &#8230; },<br>cheolsu: { name: &#8216;\uc624\uc218&#8217;, &#8230; },<br>miseon: { name: &#8216;\uc911\uc131 \ub9c8\ub140&#8217;, &#8230; },<br>cheolsu2: { name: &#8216;\ucca0\uc218&#8217;, &#8230; },<br>maenggu2: { name: &#8216;\ub9f9\uad6c&#8217;, &#8230; },<br>miseon2: { name: &#8216;\ubd09\ubbf8\uc120&#8217;, &#8230; },<br>miso2: { name: &#8216;\ubd09\ubbf8\uc18c&#8217;, &#8230; },<br>namiri: { name: &#8216;\ub098\ubbf8\ub9ac \uc120\uc0dd\ub2d8&#8217;, &#8230; },<br>chaesonghwa: { name: &#8216;\ucc44\uc1a1\ud654 \uc120\uc0dd\ub2d8&#8217;, &#8230; },<br>dumok: { name: &#8216;\uc6d0\uc7a5 \uc120\uc0dd\ub2d8&#8217;, &#8230; },<br>rose: { name: &#8216;\ubd89\uc740\uc7a5\ubbf8\uc0bc\ucd1d\uc0ac&#8217;, &#8230; },<br>buriburi: { name: &#8216;\ubd80\ub9ac\ubd80\ub9ac\ubaac&#8217;, &#8230; },<br>couple: { name: &#8216;\ub2ed\uc0b4\ucee4\ud50c&#8217;, &#8230; },<br>heukgom: { name: &#8216;\ud751\uacf0&#8217;, &#8230; },<br>gaydriver: { name: &#8216;\uac8c\uc774 \ub4dc\ub77c\uc774\ubc84&#8217;, &#8230; }<br>};<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\/\/ 2. \uce90\ub9ad\ud130\ubcc4 4\ub2e8\uacc4 \uc131\uc7a5 \uc774\ubbf8\uc9c0 <img> \ud0dc\uadf8 \ub9e4\ud551 (Lv.1 ~ Lv.4)<br>const PET_SVGS = {<br>chick: [<br><code>&lt;img src=\"\/\uc9f1\uad6c \ub4f1\uc7a5\uc778\ubb3c\/\uc9f1\uad6c \uac13\ub09c\uc544\uae30.jpg\" \/&gt;<\/code>, \/\/ Lv.1<br><code>&lt;img src=\"\/\uc9f1\uad6c \ub4f1\uc7a5\uc778\ubb3c\/\u3131\uc9f1\uad6c.jpg\" \/&gt;<\/code>, \/\/ Lv.2<br><code>&lt;img src=\"\/\uc9f1\uad6c \ub4f1\uc7a5\uc778\ubb3c\/\uccad\uc18c\ub144\uae30 \uc9f1\uad6c.JPG\" \/&gt;<\/code>, \/\/ Lv.3<br><code>&lt;img src=\"\/\uc9f1\uad6c \ub4f1\uc7a5\uc778\ubb3c\/\uc9f1\uad6c \uc5b4\ub978\ubc84\uc804.jpg\" \/&gt;<\/code> \/\/ Lv.4 (\uc644\uc131\ud615)<br>],<br>rabbit: [<br><code>&lt;img src=\"\/\uc9f1\uad6c \ub4f1\uc7a5\uc778\ubb3c\/\ud6c8\uc774 \uac13\ub09c\uc544\uae30.JPG\" \/&gt;<\/code>,<br><code>&lt;img src=\"\/\uc9f1\uad6c \ub4f1\uc7a5\uc778\ubb3c\/\ud6c8\uc774.jpg\" \/&gt;<\/code>,<br><code>&lt;img src=\"\/\uc9f1\uad6c \ub4f1\uc7a5\uc778\ubb3c\/\ud6c8\uc774 \uccad\uc18c\ub144\uae30.jpg\" \/&gt;<\/code>,<br><code>&lt;img src=\"\/\uc9f1\uad6c \ub4f1\uc7a5\uc778\ubb3c\/\ud6c8\uc774 \uc131\uc778\ubc84\uc804.jpg\" \/&gt;<\/code><br>],<br>hamster: [<br><code>&lt;img src=\"\/\uc9f1\uad6c \ub4f1\uc7a5\uc778\ubb3c\/\ud770\ub465\uc774.jpg\" \/&gt;<\/code>,<br><code>&lt;img src=\"\/\uc9f1\uad6c \ub4f1\uc7a5\uc778\ubb3c\/\ud770\ub465\uc774 \ubc30\uae01\uc5b4.jpg\" \/&gt;<\/code>,<br><code>&lt;img src=\"\/\uc9f1\uad6c \ub4f1\uc7a5\uc778\ubb3c\/\ud770\ub465\uc774 \ud5e4\ubc8c\ub808.jpg\" \/&gt;<\/code>,<br><code>&lt;img src=\"\/\uc9f1\uad6c \ub4f1\uc7a5\uc778\ubb3c\/\ubab8\uc9f1\ud770\ub465\uc774.jpg\" \/&gt;<\/code><br>],<br>\/\/ &#8230; 22\uc885 \uc804\uccb4 \ub4f1\ub85d \uc644\ub8cc<br>};<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">(2) \ub3c4\uac10 \ud398\uc774\uc9c0(<code>pet-collection.html<\/code>) \ub3d9\uc801 \uce74\ub4dc \ub80c\ub354\ub9c1 \ucf54\ub4dc<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\uc0ac\uc6a9\uc790\uac00 \ub85c\uadf8\uc778\ud558\uba74 \ubc31\uc5d4\ub4dc DB\uc5d0\uc11c \uc720\uc800\uac00 \uc878\uc5c5\uc2dc\ud0a8 \uce90\ub9ad\ud130 \ubaa9\ub85d(<code>completedTypes<\/code>)\uc744 \uc870\ud68c\ud55c \ub4a4,&nbsp;<strong>\ud654\uba74\uc5d0 \uce74\ub4dc\ub97c \uc790\ubc14\uc2a4\ud06c\ub9bd\ud2b8\ub85c \ud55c \uc7a5\uc529 \ub3d9\uc801 \uc0dd\uc131<\/strong>\ud569\ub2c8\ub2e4.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">function renderPokedex(completedTypes) {<br>const grid = document.getElementById(&#8216;pokedexGrid&#8217;);<br>grid.innerHTML = &#8221;;<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">const types = Object.keys(ANIMAL_DEFS);\nconst totalAnimals = types.length; \/\/ \uc804\uccb4 \uce90\ub9ad\ud130 \uc218: 22\nconst uniqueCompleted = [...new Set(completedTypes)].filter(type =&gt; types.includes(type));\nconst collectedCount = uniqueCompleted.length; \/\/ \ubaa8\uc740 \uce90\ub9ad\ud130 \uc218: 22\nconst remainingCount = totalAnimals - collectedCount; \/\/ \ub0a8\uc740 \uce90\ub9ad\ud130 \uc218: 0\n\n\/\/ \uc0c1\ub2e8 \ud1b5\uacc4 \uce74\ub4dc \uc218\uce58 \uc5c5\ub370\uc774\ud2b8\ndocument.getElementById('totalCount').textContent = totalAnimals;\ndocument.getElementById('collectedCount').textContent = collectedCount;\ndocument.getElementById('remainingCount').textContent = remainingCount;\n\n\/\/ 22\uac1c \uce90\ub9ad\ud130 \uc21c\ud68c\ud558\uba70 \uce74\ub4dc DOM \uc0dd\uc131\ntypes.forEach((type, index) =&gt; {\n    const def = ANIMAL_DEFS[type];\n    const isCompleted = completedTypes.includes(type);\n    const number = (index + 1).toString().padStart(3, '0'); \/\/ \uc608: #001, #002\n\n    const card = document.createElement('div');\n    \/\/ \ubbf8\uc644\ub8cc \uce90\ub9ad\ud130\ub294 locked \ud074\ub798\uc2a4\ub85c \ud751\ubc31 \ucc98\ub9ac, \uc644\ub8cc\ub294 completed\n    card.className = `poke-card ${isCompleted ? 'completed' : 'locked'}`;\n\n    \/\/ Lv.4 \ucd5c\uc885 \uc644\uc131\ud615 \uc774\ubbf8\uc9c0 \ucd94\ucd9c (\uc778\ub371\uc2a4 3\ubc88)\n    const finalImgTag = PET_SVGS[type][3];\n\n    card.innerHTML = `\n        &lt;div class=\"poke-number\"&gt;#${number}&lt;\/div&gt;\n        &lt;div class=\"poke-icon\"&gt;${finalImgTag}&lt;\/div&gt;\n        &lt;div class=\"poke-name\"&gt;${def.name}&lt;\/div&gt;\n        &lt;div class=\"poke-status ${isCompleted ? 'status-done' : 'status-lock'}\"&gt;\n            ${isCompleted ? '\uc131\uc7a5 \uc644\ub8cc' : '\ubbf8\ubc1c\uacac'}\n        &lt;\/div&gt;\n    `;\n\n    \/\/ \uc644\ub8cc\ub41c \uce74\ub4dc \ud074\ub9ad \uc2dc \uc0c1\uc138 \ubaa8\ub2ec \uc624\ud508\n    card.onclick = () =&gt; {\n        if (isCompleted) openPetModal(type);\n        else alert(\"\uc544\uc9c1 \ubc1c\uacac\ud558\uc9c0 \ubabb\ud55c \uce90\ub9ad\ud130\uc785\ub2c8\ub2e4!\");\n    };\n\n    grid.appendChild(card);\n});\n<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">}<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">(3) \ub9c8\uc774\ud398\uc774\uc9c0(<code>mypage.html<\/code>)\uc758 &#8220;\uc0c8 \uce90\ub9ad\ud130 \uc120\ud0dd \ubaa8\ub2ec&#8221; \uad6c\ud604 \ucf54\ub4dc<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\ud604\uc7ac \ud0a4\uc6b0\ub358 \uce90\ub9ad\ud130\uac00 Lv.4 \ucd5c\uace0 \ub808\ubca8\uc5d0 \ub3c4\ub2ec\ud558\uba74 \uc5f4\ub9ac\ub294 **&#8217;\ub2e4\uc74c \uce90\ub9ad\ud130 \uc120\ud0dd \ubaa8\ub2ec&#8217;**\uc785\ub2c8\ub2e4.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">async function openAnimalSelect() {<br>const user = sessionStorage.getItem(&#8216;loginUser&#8217;);<br>const pet = _currentPetData;<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">\/\/ \ub9cc\ub819(Lv.4) \uccb4\ud06c\nif (!pet || parseInt(pet.level, 10) &lt; 4) {\n    alert('\uc544\uc9c1 \ucd5c\uace0 \ub808\ubca8(Lv.4)\uc5d0 \ub3c4\ub2ec\ud558\uc9c0 \ubabb\ud588\uc5b4\uc694!');\n    return;\n}\n\n\/\/ DB\uc5d0 \uae30\ub85d\ub41c \uc774\ubbf8 \uc644\ub8cc\ud55c \uce90\ub9ad\ud130\ub4e4 (\uc608: \"chick,rabbit,dog...\")\nconst completedArr = pet.completed_types ? pet.completed_types.split(',').filter(Boolean) : [];\nconst currentType  = pet.pet_type; \/\/ \ud604\uc7ac \ud0a4\uc6b0\uace0 \uc788\ub294 \uce90\ub9ad\ud130\n\nconst grid = document.getElementById('animalGrid');\ngrid.innerHTML = '';\n\n\/\/ \uc804\uccb4 \uce90\ub9ad\ud130\ub97c \ubaa8\ub2ec \uadf8\ub9ac\ub4dc\uc5d0 \ucd9c\ub825\nObject.entries(ANIMAL_DEFS).forEach(([key, def]) =&gt; {\n    const isCurrent   = (key === currentType);\n    const isCompleted = completedArr.includes(key);\n\n    const div = document.createElement('div');\n    div.className = 'animal-choice' \n                  + (isCurrent ? ' current' : '') \n                  + (isCompleted ? ' completed' : '');\n\n    \/\/ \ub300\ud45c \uc774\ubbf8\uc9c0\ub85c 2\ub2e8\uacc4(\uccad\uc18c\ub144\/\uae30\ubcf8 \ubaa8\uc2b5) &lt;img&gt; \ucd94\ucd9c\n    const representativeImg = (PET_SVGS[key] || PET_SVGS['chick'])[1];\n\n    div.innerHTML = `\n        &lt;span class=\"a-icon\"&gt;${representativeImg}&lt;\/span&gt;\n        &lt;span class=\"a-name\"&gt;${def.name}&lt;\/span&gt;\n        ${isCurrent ? '&lt;span class=\"a-tag\"&gt;\ud604\uc7ac&lt;\/span&gt;' : isCompleted ? '&lt;span class=\"a-tag\"&gt;\uc644\ub8cc\u2713&lt;\/span&gt;' : ''}\n    `;\n\n    \/\/ \ud604\uc7ac \uce90\ub9ad\ud130\uac00 \uc544\ub2d0 \ub54c\ub9cc \ud074\ub9ad\ud558\uc5ec \ub2e4\uc74c \uce90\ub9ad\ud130\ub85c \uc120\ud0dd \uac00\ub2a5\n    if (!isCurrent) {\n        div.addEventListener('click', () =&gt; {\n            document.querySelectorAll('.animal-choice').forEach(c =&gt; c.classList.remove('selected'));\n            div.classList.add('selected');\n            _selectedNewAnimal = key; \/\/ \uc120\ud0dd\ub41c \uce90\ub9ad\ud130 \ud0a4 \uc800\uc7a5\n            document.getElementById('animalConfirmBtn').disabled = false; \/\/ \uc2dc\uc791 \ubc84\ud2bc \ud65c\uc131\ud654\n        });\n    }\n    grid.appendChild(div);\n});\n\ndocument.getElementById('animalSelectModal').classList.add('show');\n<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">}<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">(4) \uc774\ubbf8\uc9c0 \uae68\uc9d0 \ubc29\uc9c0 \ubc0f \ubd80\ub4dc\ub7ec\uc6b4 \uce74\ub4dc \uc2a4\ud0c0\uc77c (CSS)<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\uc774\ubbf8\uc9c0\uac00 \ube44\uc728 \uc65c\uace1 \uc5c6\uc774 \ub124\ubaa8\ub09c \uce74\ub4dc \uc548\uc5d0 \uc608\uc058\uac8c \uaf49 \ucc28\ub3c4\ub85d&nbsp;<code>object-fit: cover<\/code>&nbsp;\uc18d\uc131\uacfc \ud638\ubc84(Hover) \uc560\ub2c8\uba54\uc774\uc158\uc744 \uc801\uc6a9\ud588\uc2b5\ub2c8\ub2e4.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\/* \ub3c4\uac10 \uc544\uc774\ucf58 \uc774\ubbf8\uc9c0 \uc2a4\ud0c0\uc77c <em>\/<br>.poke-icon img {<br>width: 100%;<br>height: 100%;<br>object-fit: cover; \/<\/em> \uc774\ubbf8\uc9c0 \ube44\uc728\uc744 \uc720\uc9c0\ud558\uba74\uc11c \uc601\uc5ed\uc5d0 \uaf49 \ucc44\uc6c0 <em>\/<br>border-radius: 12px; \/<\/em> \ubaa8\uc11c\ub9ac\ub97c \ub465\uae00\uac8c *\/<br>border: 2px solid #e2e8f0;<br>box-shadow: 0 4px 10px rgba(0,0,0,0.05);<br>transition: all 0.2s;<br>}<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\/* \uce74\ub4dc\uc5d0 \ub9c8\uc6b0\uc2a4 \uc62c\ub838\uc744 \ub54c \uc0b4\uc9dd \ucee4\uc9c0\ub294 \uc778\ud130\ub799\uc158 *\/<br>.poke-card:hover .poke-icon img {<br>border-color: #cbd5e1;<br>transform: scale(1.05);<br>}<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\/* \ubbf8\ubc1c\uacac(\uc7a0\uae34) \uce90\ub9ad\ud130\ub294 \ud751\ubc31\uc73c\ub85c \ucc98\ub9ac *\/<br>.poke-card.locked {<br>filter: grayscale(1) opacity(0.5);<br>}<\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"mh-excerpt\"><p>1. 14\uc8fc\ucc28 \uc218\ud589 \uc791\uc5c5 \uac1c\uc694 2. \uc774\ubbf8\uc9c0\ub294 \uc5b4\ub5bb\uac8c \uc800\uc7a5\ub418\uace0 \uc6f9\uc5d0 \ubcf4\uc5ec\uc9c8\uae4c? (\ub3d9\uc791 \uc6d0\ub9ac) \uc774\ubbf8\uc9c0\uac00 \ube0c\ub77c\uc6b0\uc800 \ud654\uba74\uc5d0 \ub80c\ub354\ub9c1\ub418\ub294 \uacfc\uc815\uc740&nbsp;[\uc815\uc801 \ud30c\uc77c \uc11c\ube59] \u2794 [\ub370\uc774\ud130 \ub9e4\ud551] \u2794 [\ub3d9\uc801 <a class=\"mh-excerpt-more\" href=\"https:\/\/infognu.ansan.ac.kr\/PortFolio\/202151034\/2026\/05\/29\/14%ec%a3%bc%ec%b0%a8-%eb%b3%b4%ea%b3%a0%ec%84%9c\/\" title=\"14\uc8fc\ucc28 \ubcf4\uace0\uc11c\">[&#8230;]<\/a><\/p>\n<\/div>","protected":false},"author":68,"featured_media":362,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"ngg_post_thumbnail":0,"footnotes":""},"categories":[3],"tags":[],"class_list":["post-359","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-3"],"jetpack_featured_media_url":"https:\/\/infognu.ansan.ac.kr\/PortFolio\/202151034\/wp-content\/uploads\/sites\/96\/2026\/05\/image-9.png","_links":{"self":[{"href":"https:\/\/infognu.ansan.ac.kr\/PortFolio\/202151034\/wp-json\/wp\/v2\/posts\/359","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/infognu.ansan.ac.kr\/PortFolio\/202151034\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/infognu.ansan.ac.kr\/PortFolio\/202151034\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/infognu.ansan.ac.kr\/PortFolio\/202151034\/wp-json\/wp\/v2\/users\/68"}],"replies":[{"embeddable":true,"href":"https:\/\/infognu.ansan.ac.kr\/PortFolio\/202151034\/wp-json\/wp\/v2\/comments?post=359"}],"version-history":[{"count":2,"href":"https:\/\/infognu.ansan.ac.kr\/PortFolio\/202151034\/wp-json\/wp\/v2\/posts\/359\/revisions"}],"predecessor-version":[{"id":384,"href":"https:\/\/infognu.ansan.ac.kr\/PortFolio\/202151034\/wp-json\/wp\/v2\/posts\/359\/revisions\/384"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/infognu.ansan.ac.kr\/PortFolio\/202151034\/wp-json\/wp\/v2\/media\/362"}],"wp:attachment":[{"href":"https:\/\/infognu.ansan.ac.kr\/PortFolio\/202151034\/wp-json\/wp\/v2\/media?parent=359"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/infognu.ansan.ac.kr\/PortFolio\/202151034\/wp-json\/wp\/v2\/categories?post=359"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/infognu.ansan.ac.kr\/PortFolio\/202151034\/wp-json\/wp\/v2\/tags?post=359"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}