Skip to content

Commit

Permalink
GitHub style admonitions support (#135)
Browse files Browse the repository at this point in the history
github admonitions support with some style changes
  • Loading branch information
Lori3f6 authored Oct 10, 2024
2 parents f84e5f4 + 12cc8b9 commit 9c164b9
Show file tree
Hide file tree
Showing 5 changed files with 207 additions and 10 deletions.
18 changes: 18 additions & 0 deletions assets/css/common.css
Original file line number Diff line number Diff line change
Expand Up @@ -59,4 +59,22 @@ For details & discussion, visit https://web.archive.org/web/20200729155257/https

.nw-inf-t5p, .nw-inf-red, .nw-mark-red {
color: #f44336;
}

/*
and these will be some styles override the docsify default
by langua
*/

.markdown-section code,
.markdown-section pre {
border-radius: 2px;
}

.markdown-section p.warn {
background: rgba(51, 153, 0, 0.1);
}

.markdown-section p.tip {
background-color: rgba(255, 102, 102,0.1);
}
27 changes: 17 additions & 10 deletions assets/css/dark.css
Original file line number Diff line number Diff line change
Expand Up @@ -53,14 +53,14 @@ body {
background-color: #333;
}
.markdown-section p.tip {
background-color: #3e3e3e;
background-color: rgba(255, 102, 102,0.1);
color: #ddd;
}
.markdown-section p.tip em {
color: #cecece;
}
.markdown-section p.warn {
background: rgba(156,204,101,.15);
background: rgba(51, 153, 0,0.1);
}
.markdown-section h1,
.markdown-section h2,
Expand All @@ -76,14 +76,21 @@ body {
.markdown-section em {
color: #9e9e9e;
}
.markdown-section code,
.markdown-section code{
background-color: #3e3e3e;
color: var(--theme-color, #ddd);
font-family: Roboto Mono, Monaco, courier, monospace;
border-radius: 2px;
}

.markdown-section pre {
background-color: #3e3e3e;
background-color: #101010;
color: var(--theme-color, #ddd);
font-family: Roboto Mono, Monaco, courier, monospace
font-family: Roboto Mono, Monaco, courier, monospace;
border-radius: 2px;
}
.markdown-section pre>code {
background-color: #3e3e3e;
background-color: #101010;
color: #b0bec5;
}
.markdown-section figure,
Expand All @@ -94,7 +101,7 @@ body {

/* Added elements */
.markdown-section p.warn code {
background-color: rgba(156,204,101,.15);
background-color: rgba(156,204,101,.12);
}
.markdown-section p.tip code {
background-color: rgba(255,255,255,.12);
Expand Down Expand Up @@ -434,16 +441,16 @@ body.sticky .sidebar-toggle {
}
.markdown-section p.tip {
border-bottom-right-radius: 2px;
border-left: 4px solid #f66;
border-left: 4px solid #f66;
border-top-right-radius: 2px;
margin: 2em 0;
padding: 12px 24px 12px 30px;
position: relative;
}
.markdown-section p.tip:before {
background-color: #f66;
background-color: #f66;
border-radius: 100%;
color: #3f3f3f;
color: #0c0c0c;
content: '!';
font-family: 'Dosis', 'Source Sans Pro', 'Helvetica Neue', Arial, sans-serif;
font-size: 14px;
Expand Down
Loading

0 comments on commit 9c164b9

Please sign in to comment.