Skip to content

Commit

Permalink
Merge pull request #58 from tuurep/style-fixes
Browse files Browse the repository at this point in the history
Table style, horizontal rule style, linkification
  • Loading branch information
jannis-baum authored Jan 5, 2024
2 parents 9276f74 + 6ea6945 commit fbe9dea
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/parser/parser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import config from './config';
const mdit = new MarkdownIt({
html: true,
highlight: highlight,
linkify: true,
});

mdit.use(anchor, {
Expand Down
39 changes: 39 additions & 0 deletions static/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,24 @@ blockquote {
margin-left: 0
}

/* --------------------------------------------------------------------------
* TABLES ------------------------------------------------------------------- */
table {
border-spacing: 0;
border-collapse: collapse;
margin-top: 0;
margin-bottom: 16px;
}

th, td {
padding: 6px 13px;
border: 1px solid #444;
}

tr:nth-child(even) {
background-color: #161616;
}

/* --------------------------------------------------------------------------
* LISTS -------------------------------------------------------------------- */
li.task-list-item { list-style: none; }
Expand All @@ -96,6 +114,15 @@ li.dir-list-file:before { content: '📄' }
* IMAGES ------------------------------------------------------------------- */
img, svg { max-width: 100%; }

/* --------------------------------------------------------------------------
* HORIZONTAL RULE ---------------------------------------------------------- */
hr {
height: .25em;
margin: 24px 0;
background-color: #353535;
border: 0;
}

/* --------------------------------------------------------------------------
* LIGHT MODE --------------------------------------------------------------- */
@media (prefers-color-scheme: light) {
Expand Down Expand Up @@ -128,4 +155,16 @@ img, svg { max-width: 100%; }
color: #656d76;
border-left: .25em solid #d0d7de;
}

th, td {
border: 1px solid #d8dee4;
}

tr:nth-child(even) {
background-color: #f6f8fa;
}

hr {
background-color: #d0d7de;
}
}

0 comments on commit fbe9dea

Please sign in to comment.