Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions articles/config-epub-jp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -469,6 +469,8 @@ pdfmaker:
# という構成にする必要がある(インデントさせる)
#
webmaker:
highlight:
html: "rouge"
stylesheet: ["style.css", "style-web.css"]

# TechBooster Re:VIEW-Template独自設定
Expand Down
94 changes: 94 additions & 0 deletions articles/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,100 @@ th {
background: #f8f9fa;
font-weight: 600; }

/* --- Rouge syntax highlighting --- */
table.highlight,
.rouge-table {
border: 0;
width: 100%;
margin-bottom: 16px;
background: #191a1c;
border-radius: 6px;
overflow: hidden;
font-size: 0.9em; }

table.highlight td,
.rouge-table td {
border: 0;
padding: 0;
vertical-align: top; }

.rouge-gutter {
width: 1%;
color: #808080;
background: #191a1c;
border-right: 1px solid #404040;
text-align: right;
user-select: none; }

.rouge-gutter pre,
.rouge-code pre {
margin: 0;
padding: 0.75em 1em;
border: 0;
border-radius: 0;
overflow-x: auto;
line-height: 1.6; }

.rouge-code {
width: 99%; }

.rouge-code pre {
background: #191a1c;
color: #bdbdbd; }

.highlight .k,
.highlight .kd,
.highlight .kn,
.highlight .kp,
.highlight .kr {
color: #6c95eb;
font-weight: 400; }

.highlight .kt {
color: #6c95eb;
font-weight: 400; }

.highlight .nc {
color: #c191ff; }

.highlight .nf {
color: #39cc9b; }

.highlight .n,
.highlight .p {
color: #bdbdbd; }

.highlight .s,
.highlight .s1,
.highlight .s2 {
color: #c9a26d; }

.highlight .m,
.highlight .mi,
.highlight .mf {
color: #ed94c0; }

.highlight .c,
.highlight .c1,
.highlight .cm {
color: #85c46c;
font-style: italic; }

.highlight .cp {
color: #6c95eb; }

.highlight .na,
.highlight .no,
.highlight .nv,
.highlight .vc,
.highlight .vi,
.highlight .vg {
color: #66c3cc; }

.highlight .o,
.highlight .ow {
color: #bdbdbd; }

/* --- Links --- */
a {
color: #2563eb;
Expand Down
111 changes: 111 additions & 0 deletions articles/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,117 @@ div.footnote {
}
}

// Rouge syntax highlighting
table.highlight,
.rouge-table {
border: 0;
width: 100%;
margin-bottom: $font-size;
background: #191a1c;
border-radius: 6px;
overflow: hidden;
font-size: 0.9em;
}
Comment thread
Copilot marked this conversation as resolved.

table.highlight td,
.rouge-table td {
border: 0;
padding: 0;
vertical-align: top;
}

.rouge-gutter {
width: 1%;
color: #808080;
background: #191a1c;
border-right: 1px solid #404040;
text-align: right;
user-select: none;
}

.rouge-gutter pre,
.rouge-code pre {
margin: 0;
padding: 0.75em 1em;
border: 0;
border-radius: 0;
overflow-x: auto;
line-height: 1.6;
}
Comment thread
Copilot marked this conversation as resolved.

.rouge-code {
width: 99%;
}

.rouge-code pre {
background: #191a1c;
color: #bdbdbd;
}

.highlight .k,
.highlight .kd,
.highlight .kn,
.highlight .kp,
.highlight .kr {
color: #6c95eb;
font-weight: 400;
}

.highlight .kt {
color: #6c95eb;
font-weight: 400;
}

.highlight .nc {
color: #c191ff;
}

.highlight .nf {
color: #39cc9b;
}

.highlight .n,
.highlight .p {
color: #bdbdbd;
}

.highlight .s,
.highlight .s1,
.highlight .s2 {
color: #c9a26d;
}

.highlight .m,
.highlight .mi,
.highlight .mf {
color: #ed94c0;
}

.highlight .c,
.highlight .c1,
.highlight .cm {
color: #85c46c;
font-style: italic;
}

.highlight .cp {
color: #6c95eb;
}

.highlight .na,
.highlight .no,
.highlight .nv,
.highlight .vc,
.highlight .vi,
.highlight .vg {
color: #66c3cc;
}

.highlight .o,
.highlight .ow {
color: #bdbdbd;
}

// ヘッダ
.tb-header {
background-image: url(images/html_header.jpg);
Expand Down
Loading