2021. 2. 24. 15:27γπ²πΎππππππ
1. μ½λλΈλμ 컀μ€ν°λ§μ΄μ§νλ HTML μ½λ
μνλ μ½λλΈλ ν λ§ highlightjs.org/μμ κ°μ Έμ€κ³ , μλ μ½λλ₯Ό HTMLμ <head></head> μ¬μ΄μ λΆμ¬λ£λλ€.
(ν°νΈ 컀μ€ν°λ§μ΄μ§, μ€ν¬λ‘€ μμ±, λΌμΈλλ² κΈ°λ₯ ν¬ν¨)
<!-- μμ λ±μ cssνμΌ -->
<link
rel="stylesheet"
href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/10.0.2/styles/atom-one-light.min.css"
/>
<!-- νμ΄λΌμ΄νΈ μ μ© -->
<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/10.0.2/highlight.min.js"></script>
<script>
hljs.initHighlightingOnLoad();
</script>
<!-- μ½λλΈλ ν°νΈ μ’
λ₯&ν¬κΈ° λ³κ²½ -->
<link
href="https://fonts.googleapis.com/css?family=Source Code Pro"
rel="stylesheet"
/>
<style>
code {
padding: 0.25rem;
border-radius: 5px;
font-family: 'Source Code Pro' !important;
font-size: 13.5px !important;
}
pre > code {
margin: 1rem auto;
white-space: pre;
max-width: 1000px;
/* μ½λλΈλ μ€ν¬λ‘€ μμ± */
overflow: auto !important;
}
</style>
<!-- λΌμΈ λλ² μ€μ -->
<script src="//cdnjs.cloudflare.com/ajax/libs/highlightjs-line-numbers.js/2.7.0/highlightjs-line-numbers.min.js"></script>
<script>
hljs.initLineNumbersOnLoad();
</script>
ν λ§ λ³κ²½μμλ μλ νμλ λΆλΆμ ν΄λΉ ν λ§λͺ μ λΆμ¬λ£μΌλ©΄λλ€
μ΄λ, λλ¬Έμλ μλ¬Έμλ‘, λμ΄μ°κΈ°λ '-'λ₯Ό λ°λμ λ£μ΄μ€μΌνλ€
2. μ½λλΈλμ 컀μ€ν°λ§μ΄μ§νλ CSSμ½λ
κΈ°μ‘΄μλ λͺ¨λ ν μ΄λΈμ μν₯μ λ°μμ UIμμμ νννλ‘ λνλκ² λλ€.
λ°λΌμ μλ μ½λμ²λΌ μμμΈ ν μ΄λΈμ΄λΌ μ§μ νκ³ , κ·Έ κ²½μ°μλ§ μμ±μ μ¬μ©νλλ‘ λ°κΏμ€λ€.
.entry-content > table {
width:100%;
margin-bottom: 22px;
border: 1px solid #e6e6e6;
border-collapse: collapse;
text-align: center;
font-size: 0.9375em;
line-height: 1.5714;
color: #666;
}
.entry-content > table thead th {
padding:7px 0 11px;
border-left: 1px solid #e6e6e6;
}
.entry-content > table tbody td {
padding:7px 0 11px;
border-left: 1px solid #e6e6e6;
border-top: 1px solid #e6e6e6;
}
λ€μμ λΌμΈλλ² κΎΈλ―ΈκΈ°
λΌμΈλλ²μ μμμ μ§μ ν΄μ£Όμ§ μμΌλ©΄ μλ§ κ²μ μμΌλ‘ 보μΌν λ°,
μ½λμ ν·κ°λ¦΄ μ μκΈ°λλ¬Έμ κ·Έλ μ΄ μμμΌλ‘ λ°κΏμ£Όμλ€.
κ·Έλ¦¬κ³ λ€μ¬μ°κΈ° νμ!!! text-indent: 1rem; μ΄λΆλΆμ΄ λ€μ¬μ°κΈ° μμ±μ λ§νλ€.
/* for block of numbers */
.hljs-ln-numbers {
text-align: center;
color: #ccc;
vertical-align: top;
padding-right: 5px;
}
/* for block of code */
.hljs-ln-code {
padding-left: 10px;
text-indent: 1rem;
}
2. λ³Έλ¬Έ κΈκΌ΄ λ³κ²½
λΈλ‘κ·Έ μ λͺ©, λ³Έλ¬Έ λ΄μ© κΈκΌ΄μ 'λλ'(noonnu.cc/)λΌλ μ¬μ΄νΈμμ κ°μ Έμλ€
μλ μ½λλ₯Ό CSSμ λΆμ¬λ£λλ€.
@font-face {
font-family: 'ON-IGothic';
src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/noonfonts_eleven@1.0/ON-IGothic.woff') format('woff');
font-weight: normal;
font-style: normal;
}
κ·Έλ€μ, font-familyλ₯Ό κ²μν΄μ μμ νκ³ μΆμ ν°νΈλ‘ λͺ¨λ λ³κ²½νλ©΄ λͺ¨λ κΈκΌ΄μ΄ λ°λλ€
'π²πΎππππππ' μΉ΄ν κ³ λ¦¬μ λ€λ₯Έ κΈ
VS Code νλ‘μ νΈ ν΄λμ npm μ€μΉ μλ¬ (0) | 2021.05.07 |
---|