Skip to content

Commit

Permalink
templates: add scrollbar if codeblock overflows
Browse files Browse the repository at this point in the history
  • Loading branch information
RaphaelPour committed Jan 15, 2024
1 parent 40571c9 commit 419c0d4
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# For next release
* **Raphael Pour**
* static: add new centric style with new font Roboto Slab
* templates: add slider if code block overflows

*Not released yet*

Expand Down
2 changes: 1 addition & 1 deletion cmd/post.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

/* CODE STYLES */
/* Background */ .bg { background-color: #ffffff }
/* PreWrapper */ .chroma { background-color: #ffffff; }
/* PreWrapper */ .chroma { background-color: #ffffff; overflow-x: auto; }
/* Error */ .chroma .err { }
/* LineTableTD */ .chroma .lntd { vertical-align: top; padding: 0; margin: 0; border: 0; }
/* LineTable */ .chroma .lntable { border-spacing: 0; padding: 0; margin: 0; border: 0; }
Expand Down
5 changes: 4 additions & 1 deletion cmd/static.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
<head>
<meta charset="UTF-8">
<title>Blog</title>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Roboto+Slab:wght@100..900&display=swap" rel="stylesheet">
<style>
h1 { margin:0px;}
body { max-width:80ch; margin-right: auto; margin-left: auto; font-family: "Roboto Slab", serif}
Expand All @@ -14,7 +17,7 @@

/* CODE STYLES */
/* Background */ .bg { background-color: #ffffff }
/* PreWrapper */ .chroma { background-color: #ffffff; }
/* PreWrapper */ .chroma { background-color: #ffffff; overflow-x: auto; }
/* Error */ .chroma .err { }
/* LineTableTD */ .chroma .lntd { vertical-align: top; padding: 0; margin: 0; border: 0; }
/* LineTable */ .chroma .lntable { border-spacing: 0; padding: 0; margin: 0; border: 0; }
Expand Down

0 comments on commit 419c0d4

Please sign in to comment.