Episode.xsl: 두 판 사이의 차이
편집 요약 없음 |
편집 요약 없음 |
||
| (같은 사용자의 중간 판 2개는 보이지 않습니다) | |||
| 1번째 줄: | 1번째 줄: | ||
<?xml version="1.0" encoding="UTF-8"?> | <?xml version="1.0" encoding="UTF-8"?> | ||
<xsl:stylesheet version="1.0" | <xsl:stylesheet version="1.0" | ||
xmlns:xsl="http://www.w3.org/1999/XSL/Transform | xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> | ||
<xsl:output method="html" encoding="UTF-8" indent="yes | <xsl:output method="html" encoding="UTF-8" indent="yes"/> | ||
<!-- | <xsl:template match="/episode"> | ||
<!-- lang 속성이 Arabic인 경우 rtl(우->좌), 아닐 경우 ltr(좌->우) 설정 --> | |||
<html lang=" | <xsl:variable name="direction"> | ||
<xsl:choose> | |||
<xsl:when test="@lang = 'Arabic'">rtl</xsl:when> | |||
<xsl:otherwise>ltr</xsl:otherwise> | |||
</xsl:choose> | |||
</xsl:variable> | |||
<!-- HTML lang 속성 매핑 (Arabic -> ar, 기타 -> ko/en 등) --> | |||
<xsl:variable name="htmlLang"> | |||
<xsl:choose> | |||
<xsl:when test="@lang = 'Arabic'">ar</xsl:when> | |||
<xsl:otherwise>ko</xsl:otherwise> | |||
</xsl:choose> | |||
</xsl:variable> | |||
<html lang="{$htmlLang}" dir="{$direction}"> | |||
<head> | <head> | ||
<meta charset="UTF-8"/> | <meta charset="UTF-8"/> | ||
<title><xsl:value-of select="title"/></title> | |||
<title><xsl:value-of select=" | |||
<style> | <style> | ||
body { | body { | ||
font-family: -apple-system | font-family: -apple-system, "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; | ||
background-color: #f8fafc; | background-color: #f8fafc; | ||
color: #1e293b; | color: #1e293b; | ||
padding: 40px 20px; | padding: 40px 20px; | ||
display: flex; | display: flex; | ||
| 28번째 줄: | 39번째 줄: | ||
max-width: 720px; | max-width: 720px; | ||
width: 100%; | width: 100%; | ||
border-radius: | border-radius: 12px; | ||
border: 1px solid #e2e8f0; | border: 1px solid #e2e8f0; | ||
padding: | padding: 30px; | ||
box- | box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05); | ||
} | } | ||
h1 { | |||
font-size: 1.6rem; | |||
h1 | |||
font-size: 1. | |||
color: #0f172a; | color: #0f172a; | ||
border-bottom: 2px solid #f1f5f9; | border-bottom: 2px solid #f1f5f9; | ||
padding-bottom: | padding-bottom: 12px; | ||
margin-top: 0; | |||
} | } | ||
.narrative | p.narrative { | ||
font-size: 1.05rem; | font-size: 1.05rem; | ||
line-height: 1. | line-height: 1.9; | ||
color: #334155; | color: #334155; | ||
white-space: pre-line; /* | white-space: pre-line; /* 본문 줄바꿈 유지 */ | ||
} | |||
/* Arabic일 경우 추가 가독성 스타일 */ | |||
[dir="rtl"] { | |||
text-align: right; | |||
} | } | ||
</style> | </style> | ||
| 66번째 줄: | 65번째 줄: | ||
<body> | <body> | ||
<div class="card"> | <div class="card"> | ||
<h1><xsl:value-of select="title"/></h1> | |||
<h1 | <p class="narrative"><xsl:value-of select="narrative"/></p> | ||
< | |||
</div> | </div> | ||
</body> | </body> | ||
2026년 8월 21일 (금) 01:15 기준 최신판
<?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html" encoding="UTF-8" indent="yes"/>
<xsl:template match="/episode">
<xsl:variable name="direction">
<xsl:choose>
<xsl:when test="@lang = 'Arabic'">rtl</xsl:when>
<xsl:otherwise>ltr</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:variable name="htmlLang">
<xsl:choose>
<xsl:when test="@lang = 'Arabic'">ar</xsl:when>
<xsl:otherwise>ko</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:value-of select="title"/>
</xsl:template>
</xsl:stylesheet>