Skip to content
Open
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
4 changes: 2 additions & 2 deletions articles/config-epub-jp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -173,8 +173,8 @@ imagedir: images_jp
# font_ext: ["ttf", "woff", "otf"]

# ソースコードハイライトを利用する (rouge,pygmentsには外部gemが必要)
# highlight:
# html: "rouge"
highlight:
html: "rouge"
Comment on lines +176 to +177
Comment on lines +176 to +177
# latex: "listings"

# カタログファイル名を指定する
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
107 changes: 107 additions & 0 deletions articles/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,113 @@ div.footnote {
}
}

// Rouge syntax highlighting
table.highlight,
.rouge-table {
border: 0;
width: 100%;
margin-bottom: $paragraph-margin-bottom;
background: #191a1c;
border-radius: 6px;
overflow: hidden;
}
Comment on lines +113 to +121

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;
overflow-x: auto;
}
Comment on lines +139 to +144

.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