Make many improvements and fixes to the markdown experience

This commit is contained in:
Ben Visness 2021-09-01 01:15:13 -05:00
parent 1ac867fded
commit 1f39b166cb
21 changed files with 508 additions and 573 deletions

Binary file not shown.

View File

@ -853,7 +853,7 @@ img, video {
-l = large
*/
.ba {
.ba, .post-content th, .post-content td {
border-style: solid;
border-width: 1px; }
@ -869,7 +869,7 @@ img, video {
border-bottom-style: solid;
border-bottom-width: 1px; }
.bl {
.bl, blockquote {
border-left-style: solid;
border-left-width: 1px; }
@ -1173,7 +1173,7 @@ img, video {
.br1 {
border-radius: 0.125rem; }
.br2, .hmn-code {
.br2, .post-content code, .post-content pre > code, .post-content pre.hmn-code {
border-radius: 0.25rem; }
.br3 {
@ -4605,7 +4605,7 @@ code, .code {
.pl1 {
padding-left: 0.25rem; }
.pl2 {
.pl2, blockquote {
padding-left: 0.5rem; }
.pl3 {
@ -4703,7 +4703,7 @@ code, .code {
.optionbar .options button,
.optionbar .options .button,
.optionbar .options input[type=button],
.optionbar .options input[type=submit] {
.optionbar .options input[type=submit], .post-content th, .post-content td {
padding-top: 0.25rem;
padding-bottom: 0.25rem; }
@ -4747,7 +4747,7 @@ input[type=submit], .notice {
.optionbar .options button,
.optionbar .options .button,
.optionbar .options input[type=button],
.optionbar .options input[type=submit], .pagination .button {
.optionbar .options input[type=submit], .pagination .button, .post-content th, .post-content td {
padding-left: 0.5rem;
padding-right: 0.5rem; }
@ -4805,7 +4805,7 @@ input[type=submit], .notice {
.ml1 {
margin-left: 0.25rem; }
.ml2 {
.ml2, blockquote {
margin-left: 0.5rem; }
.ml3 {
@ -4823,7 +4823,7 @@ input[type=submit], .notice {
.ml7 {
margin-left: 16rem; }
.mr0 {
.mr0, blockquote {
margin-right: 0; }
.mr1 {
@ -4903,7 +4903,7 @@ input[type=submit], .notice {
margin-top: 0.25rem;
margin-bottom: 0.25rem; }
.mv2 {
.mv2, .post-content table {
margin-top: 0.5rem;
margin-bottom: 0.5rem; }
@ -4939,7 +4939,7 @@ input[type=submit], .notice {
margin-left: 0.5rem;
margin-right: 0.5rem; }
.mh3 {
.mh3, .post-content hr {
margin-left: 1rem;
margin-right: 1rem; }
@ -6973,7 +6973,7 @@ For convenience in common cases, if only a single argument
is provided and it does not match an existing variable, this
will throw an error.
*/
.hmn-code, .codeblock {
pre, code, .codeblock {
/* Comment */
/* Error */
/* Keyword */
@ -7034,149 +7034,149 @@ will throw an error.
/* Name.Variable.Global */
/* Name.Variable.Instance */
/* Literal.Number.Integer.Long */ }
.hmn-code .hll, .codeblock .hll {
pre .hll, code .hll, .codeblock .hll {
background-color: #ffffcc; }
.hmn-code .c, .codeblock .c {
pre .c, code .c, .codeblock .c {
color: #60a0b0;
font-style: italic; }
.hmn-code .err, .codeblock .err {
pre .err, code .err, .codeblock .err {
color: #FF0000; }
.hmn-code .k, .codeblock .k {
pre .k, code .k, .codeblock .k {
color: #007020;
font-weight: bold; }
.hmn-code .o, .codeblock .o {
pre .o, code .o, .codeblock .o {
color: #666666; }
.hmn-code .cm, .codeblock .cm {
pre .cm, code .cm, .codeblock .cm {
color: #60a0b0;
font-style: italic; }
.hmn-code .cp, .codeblock .cp {
pre .cp, code .cp, .codeblock .cp {
color: #007020; }
.hmn-code .c1, .codeblock .c1 {
pre .c1, code .c1, .codeblock .c1 {
color: #60a0b0;
font-style: italic; }
.hmn-code .cs, .codeblock .cs {
pre .cs, code .cs, .codeblock .cs {
color: #60a0b0;
background-color: #fff0f0; }
.hmn-code .gd, .codeblock .gd {
pre .gd, code .gd, .codeblock .gd {
color: #A00000; }
.hmn-code .ge, .codeblock .ge {
pre .ge, code .ge, .codeblock .ge {
font-style: italic; }
.hmn-code .gr, .codeblock .gr {
pre .gr, code .gr, .codeblock .gr {
color: #FF0000; }
.hmn-code .gh, .codeblock .gh {
pre .gh, code .gh, .codeblock .gh {
color: #000080;
font-weight: bold; }
.hmn-code .gi, .codeblock .gi {
pre .gi, code .gi, .codeblock .gi {
color: #00A000; }
.hmn-code .go, .codeblock .go {
pre .go, code .go, .codeblock .go {
color: #808080; }
.hmn-code .gp, .codeblock .gp {
pre .gp, code .gp, .codeblock .gp {
color: #c65d09;
font-weight: bold; }
.hmn-code .gs, .codeblock .gs {
pre .gs, code .gs, .codeblock .gs {
font-weight: bold; }
.hmn-code .gu, .codeblock .gu {
pre .gu, code .gu, .codeblock .gu {
color: #800080;
font-weight: bold; }
.hmn-code .gt, .codeblock .gt {
pre .gt, code .gt, .codeblock .gt {
color: #0040D0; }
.hmn-code .kc, .codeblock .kc {
pre .kc, code .kc, .codeblock .kc {
color: #007020;
font-weight: bold; }
.hmn-code .kd, .codeblock .kd {
pre .kd, code .kd, .codeblock .kd {
color: #007020;
font-weight: bold; }
.hmn-code .kn, .codeblock .kn {
pre .kn, code .kn, .codeblock .kn {
color: #007020;
font-weight: bold; }
.hmn-code .kp, .codeblock .kp {
pre .kp, code .kp, .codeblock .kp {
color: #007020; }
.hmn-code .kr, .codeblock .kr {
pre .kr, code .kr, .codeblock .kr {
color: #007020;
font-weight: bold; }
.hmn-code .kt, .codeblock .kt {
pre .kt, code .kt, .codeblock .kt {
color: #902000; }
.hmn-code .m, .codeblock .m {
pre .m, code .m, .codeblock .m {
color: #40a070; }
.hmn-code .s, .codeblock .s {
pre .s, code .s, .codeblock .s {
color: #4070a0; }
.hmn-code .na, .codeblock .na {
pre .na, code .na, .codeblock .na {
color: #4070a0; }
.hmn-code .nb, .codeblock .nb {
pre .nb, code .nb, .codeblock .nb {
color: #007020; }
.hmn-code .nc, .codeblock .nc {
pre .nc, code .nc, .codeblock .nc {
color: #0e84b5;
font-weight: bold; }
.hmn-code .no, .codeblock .no {
pre .no, code .no, .codeblock .no {
color: #60add5; }
.hmn-code .nd, .codeblock .nd {
pre .nd, code .nd, .codeblock .nd {
color: #555555;
font-weight: bold; }
.hmn-code .ni, .codeblock .ni {
pre .ni, code .ni, .codeblock .ni {
color: #d55537;
font-weight: bold; }
.hmn-code .ne, .codeblock .ne {
pre .ne, code .ne, .codeblock .ne {
color: #007020; }
.hmn-code .nf, .codeblock .nf {
pre .nf, code .nf, .codeblock .nf {
color: #06287e; }
.hmn-code .nl, .codeblock .nl {
pre .nl, code .nl, .codeblock .nl {
color: #002070;
font-weight: bold; }
.hmn-code .nn, .codeblock .nn {
pre .nn, code .nn, .codeblock .nn {
color: #0e84b5;
font-weight: bold; }
.hmn-code .nt, .codeblock .nt {
pre .nt, code .nt, .codeblock .nt {
color: #062873;
font-weight: bold; }
.hmn-code .nv, .codeblock .nv {
pre .nv, code .nv, .codeblock .nv {
color: #bb60d5; }
.hmn-code .ow, .codeblock .ow {
pre .ow, code .ow, .codeblock .ow {
color: #007020;
font-weight: bold; }
.hmn-code .w, .codeblock .w {
pre .w, code .w, .codeblock .w {
color: #bbbbbb; }
.hmn-code .mf, .codeblock .mf {
pre .mf, code .mf, .codeblock .mf {
color: #40a070; }
.hmn-code .mh, .codeblock .mh {
pre .mh, code .mh, .codeblock .mh {
color: #40a070; }
.hmn-code .mi, .codeblock .mi {
pre .mi, code .mi, .codeblock .mi {
color: #40a070; }
.hmn-code .mo, .codeblock .mo {
pre .mo, code .mo, .codeblock .mo {
color: #40a070; }
.hmn-code .sb, .codeblock .sb {
pre .sb, code .sb, .codeblock .sb {
color: #4070a0; }
.hmn-code .sc, .codeblock .sc {
pre .sc, code .sc, .codeblock .sc {
color: #4070a0; }
.hmn-code .sd, .codeblock .sd {
pre .sd, code .sd, .codeblock .sd {
color: #4070a0;
font-style: italic; }
.hmn-code .s2, .codeblock .s2 {
pre .s2, code .s2, .codeblock .s2 {
color: #4070a0; }
.hmn-code .se, .codeblock .se {
pre .se, code .se, .codeblock .se {
color: #4070a0;
font-weight: bold; }
.hmn-code .sh, .codeblock .sh {
pre .sh, code .sh, .codeblock .sh {
color: #4070a0; }
.hmn-code .si, .codeblock .si {
pre .si, code .si, .codeblock .si {
color: #70a0d0;
font-style: italic; }
.hmn-code .sx, .codeblock .sx {
pre .sx, code .sx, .codeblock .sx {
color: #c65d09; }
.hmn-code .sr, .codeblock .sr {
pre .sr, code .sr, .codeblock .sr {
color: #235388; }
.hmn-code .s1, .codeblock .s1 {
pre .s1, code .s1, .codeblock .s1 {
color: #4070a0; }
.hmn-code .ss, .codeblock .ss {
pre .ss, code .ss, .codeblock .ss {
color: #517918; }
.hmn-code .bp, .codeblock .bp {
pre .bp, code .bp, .codeblock .bp {
color: #007020; }
.hmn-code .vc, .codeblock .vc {
pre .vc, code .vc, .codeblock .vc {
color: #bb60d5; }
.hmn-code .vg, .codeblock .vg {
pre .vg, code .vg, .codeblock .vg {
color: #bb60d5; }
.hmn-code .vi, .codeblock .vi {
pre .vi, code .vi, .codeblock .vi {
color: #bb60d5; }
.hmn-code .il, .codeblock .il {
pre .il, code .il, .codeblock .il {
color: #40a070; }
.dark {
@ -7235,24 +7235,22 @@ ol {
ul {
list-style-type: circle;
padding: 0px;
margin: 0px; }
padding: 0;
margin: 0; }
.list-none {
list-style-type: none; }
li {
padding: 0px;
margin: 0px;
padding: 0;
margin: 0;
padding-left: 5px;
margin-left: 15px; }
h1, h2 {
font-weight: 500; }
h1, h2, h3, h4 {
margin: 0px;
margin-bottom: 5px;
h1, h2, h3, h4, h5 {
font-weight: 500;
margin: 0;
margin-bottom: 0.5rem;
font-size: 1.5rem;
line-height: 1.25em; }
@ -7264,8 +7262,8 @@ em {
p {
box-sizing: border-box;
margin: 0px;
padding: 0px; }
margin: 0;
padding: 0; }
.p-spaced p:not(:first-child) {
margin-top: 0.6em; }
@ -7284,19 +7282,11 @@ th, td {
td {
vertical-align: baseline; }
tr.line-above th, tr.line-above td {
border-top-color: #444;
border-top-color: var(--table-border-color);
border-top-width: 1px;
border-top-style: solid;
padding-top: 20px; }
hr {
border-top-color: #444;
border-top-color: var(--hr-color);
border-width: 1px 0 0;
border-top-style: solid;
max-width: 300px; }
border-top-style: solid; }
.mono {
font-family: "Fira Mono", monospace; }
@ -7375,7 +7365,7 @@ article code {
color: #bbb;
color: var(--theme-color-dimmer); }
.b--dimmer, .contents div.code {
.b--dimmer, .post-content div.code {
border-color: #999;
border-color: var(--dimmer-color); }
@ -7391,7 +7381,7 @@ article code {
color: #ccc;
color: var(--theme-color-dimmest); }
.b--dimmest, header #login-popup, .optionbar, .post .contents blockquote {
.b--dimmest, header #login-popup, .optionbar, blockquote, .post-content th, .post-content td {
border-color: #bbb;
border-color: var(--dimmest-color); }
@ -7399,7 +7389,7 @@ article code {
border-color: #ccc;
border-color: var(--theme-color-dimmest); }
.bg--dim {
.bg--dim, .post-content code, .post-content pre > code, .post-content pre.hmn-code {
background-color: #f0f0f0;
background-color: var(--dim-background); }
@ -7422,6 +7412,9 @@ article code {
.mh-5 {
max-height: 16rem; }
.mh-6 {
max-height: 32rem; }
.mh-100 {
max-height: 100%; }
@ -7595,22 +7588,11 @@ article code {
margin-right: auto;
margin-left: auto; }
header .underscore {
width: 100%;
height: 100%;
animation: logo-blink 1s infinite alternate;
-webkit-animation: logo-blink 1s infinite alternate ease-in-out; }
header .logo, header .underscore {
background-size: 8.75rem;
background-repeat: no-repeat;
background-position: center center; }
header .hmn-logo {
height: 3.75rem;
width: 100%;
text-transform: uppercase;
font-family: 'MohaveHMN';
font-family: 'MohaveHMN', sans-serif;
font-size: 2rem;
display: flex;
align-items: center;
@ -7918,6 +7900,9 @@ header #login-popup {
.userlist .user .bio {
padding: 5px; }
strong {
font-weight: 500; }
.text {
background-color: #f9f9f9;
background-color: var(--text-background); }
@ -7960,13 +7945,69 @@ header #login-popup {
color: white;
background-color: black; }
blockquote .quotewho {
line-height: 2em; }
blockquote .quotewho::after {
content: " said:"; }
pre {
font-family: "Fira Mono", monospace; }
.hmn-code {
background-color: #f0f0f0;
background-color: var(--dim-background);
padding: 0.7em; }
.post-content *:first-child {
margin-top: 0; }
.post-content *:last-child {
margin-bottom: 0; }
.post-content h1 {
font-size: 2rem; }
.post-content h2 {
font-size: 1.5rem; }
.post-content h3 {
font-size: 1.25rem; }
.post-content h4 {
font-size: 1rem; }
.post-content h5 {
font-size: 0.8rem; }
.post-content h1, .post-content h2, .post-content h3, .post-content h4, .post-content h5 {
margin-top: 0.5em;
margin-bottom: 0.5em; }
.post-content img {
max-width: 100%; }
.post-content div.code {
max-width: 100%;
max-height: 20em;
max-height: 80vh;
overflow: auto;
-moz-tab-size: 4;
tab-size: 4;
border-width: 1px;
border-style: solid; }
.post-content div + br,
.post-content blockquote + br,
.post-content ul + br,
.post-content ol + br {
display: none; }
.post-content code {
padding: .2em 0;
white-space: nowrap; }
.post-content code::before, .post-content code::after {
content: "\00a0";
letter-spacing: -0.2em;
display: inline-block; }
.post-content pre > code, .post-content pre.hmn-code {
padding: 0.7em;
overflow-x: auto; }
.toolbar {
background-color: #fff;
@ -8002,6 +8043,12 @@ pre {
border: 0px solid transparent;
/* Not themed */ }
#preview:empty::after {
content: 'A preview of your post will appear here.';
color: #999;
color: var(--dimmer-color);
font-style: italic; }
@media screen and (min-width: 30em) {
#preview-container {
max-height: calc(100vh - 20rem);
@ -8530,24 +8577,8 @@ input[type=submit] {
content: 'Staff'; }
.postid a {
margin-top: -5rem;
padding-top: 5rem; }
.contents div.code {
max-width: 100%;
max-height: 20em;
max-height: 80vh;
overflow: auto;
-moz-tab-size: 4;
tab-size: 4;
border-width: 1px;
border-style: solid; }
.contents div + br,
.contents blockquote + br,
.contents ul + br,
.contents ol + br {
display: none; }
margin-top: -4rem;
padding-top: 4rem; }
.codeblocktable {
font-family: "Fira Mono", monospace;
@ -8568,46 +8599,6 @@ input[type=submit] {
padding-left: 10px;
max-width: 80em; }
.post .contents h1, .post .contents h2 {
margin: 20px 0px; }
.post .contents h2 {
font-size: 20px; }
.post .contents h5, .post .contents h6 {
margin: 10px 0px; }
.post .contents strong {
font-weight: 500; }
.post .contents blockquote {
display: block;
margin-top: 0;
margin-bottom: 0;
padding: 10px 18px;
padding-top: 0;
padding-bottom: 0;
margin-left: 20px;
margin-right: 20px;
border-left-width: 1px;
border-left-style: solid; }
.post .contents blockquote .quotewho {
line-height: 2em; }
.post .contents blockquote .quotewho::after {
content: " said:"; }
.post .contents img {
max-width: 100%; }
.post.bbcode .contents h1, .post.bbcode .contents h2, .post.bbcode .contents h3 {
display: inline; }
.project .post .contents h3,
.post .contents h4 {
display: block;
font-size: 18px;
margin: 10px 0px; }
.post .action.button {
padding: 0px 10px;
margin-top: 0px;
@ -8621,27 +8612,6 @@ input[type=submit] {
.post .action.button:hover {
border-bottom-width: 4px; }
.post hr {
max-width: 90%; }
.post .signature hr {
width: 80%; }
.post .body .size1, .post-preview .size1 {
font-size: 12px; }
.post .body .size2, .post-preview .size2 {
font-size: 13px; }
.post .body .size3, .post-preview .size3 {
font-size: 14px; }
.post .body .size4, .post-preview .size4 {
font-size: 15px; }
.post .body .size5, .post-preview .size5 {
font-size: 16px; }
.blog .post .meta {
position: relative; }
@ -8653,15 +8623,6 @@ input[type=submit] {
font-size: 0.7em;
text-align: center; }
.blog .post.op .body {
padding-top: 6px; }
.blog .post.op .body .contents {
text-align: left; }
.blog .post.op .body p {
margin-top: 8px;
margin-bottom: 8px;
text-align: left; }
.blog .sidebar .post > .author {
padding: 15px;
text-align: center; }
@ -8683,10 +8644,6 @@ input[type=submit] {
left: -60px;
bottom: -5px; }
.blog .body blockquote {
padding-top: 1px;
padding-bottom: 1px; }
.content-block.blog p.title {
font-weight: bold; }
.content-block.blog p.title a {

View File

@ -18,7 +18,7 @@ For convenience in common cases, if only a single argument
is provided and it does not match an existing variable, this
will throw an error.
*/
.hmn-code, .codeblock {
pre, code, .codeblock {
/* Comment */
/* Error */
/* Keyword */
@ -81,129 +81,129 @@ will throw an error.
/* Generic.Subheading & Diff Unified/Comment? */
/* Generic.Deleted & Diff Deleted */
/* Generic.Inserted & Diff Inserted */ }
.hmn-code .hll, .codeblock .hll {
pre .hll, code .hll, .codeblock .hll {
background-color: #49483e; }
.hmn-code .c, .codeblock .c {
pre .c, code .c, .codeblock .c {
color: #75715e; }
.hmn-code .err, .codeblock .err {
pre .err, code .err, .codeblock .err {
color: #ff0000; }
.hmn-code .k, .codeblock .k {
pre .k, code .k, .codeblock .k {
color: #66d9ef; }
.hmn-code .l, .codeblock .l {
pre .l, code .l, .codeblock .l {
color: #ae81ff; }
.hmn-code .n, .codeblock .n {
pre .n, code .n, .codeblock .n {
color: #f8f8f2; }
.hmn-code .o, .codeblock .o {
pre .o, code .o, .codeblock .o {
color: #f92672; }
.hmn-code .p, .codeblock .p {
pre .p, code .p, .codeblock .p {
color: #f8f8f2; }
.hmn-code .cm, .codeblock .cm {
pre .cm, code .cm, .codeblock .cm {
color: #75715e; }
.hmn-code .cp, .codeblock .cp {
pre .cp, code .cp, .codeblock .cp {
color: #75715e; }
.hmn-code .c1, .codeblock .c1 {
pre .c1, code .c1, .codeblock .c1 {
color: #75715e; }
.hmn-code .cs, .codeblock .cs {
pre .cs, code .cs, .codeblock .cs {
color: #75715e; }
.hmn-code .ge, .codeblock .ge {
pre .ge, code .ge, .codeblock .ge {
font-style: italic; }
.hmn-code .gs, .codeblock .gs {
pre .gs, code .gs, .codeblock .gs {
font-weight: bold; }
.hmn-code .kc, .codeblock .kc {
pre .kc, code .kc, .codeblock .kc {
color: #66d9ef; }
.hmn-code .kd, .codeblock .kd {
pre .kd, code .kd, .codeblock .kd {
color: #66d9ef; }
.hmn-code .kn, .codeblock .kn {
pre .kn, code .kn, .codeblock .kn {
color: #f92672; }
.hmn-code .kp, .codeblock .kp {
pre .kp, code .kp, .codeblock .kp {
color: #66d9ef; }
.hmn-code .kr, .codeblock .kr {
pre .kr, code .kr, .codeblock .kr {
color: #66d9ef; }
.hmn-code .kt, .codeblock .kt {
pre .kt, code .kt, .codeblock .kt {
color: #66d9ef; }
.hmn-code .ld, .codeblock .ld {
pre .ld, code .ld, .codeblock .ld {
color: #e6db74; }
.hmn-code .m, .codeblock .m {
pre .m, code .m, .codeblock .m {
color: #ae81ff; }
.hmn-code .s, .codeblock .s {
pre .s, code .s, .codeblock .s {
color: #e6db74; }
.hmn-code .na, .codeblock .na {
pre .na, code .na, .codeblock .na {
color: #a6e22e; }
.hmn-code .nb, .codeblock .nb {
pre .nb, code .nb, .codeblock .nb {
color: #f8f8f2; }
.hmn-code .nc, .codeblock .nc {
pre .nc, code .nc, .codeblock .nc {
color: #a6e22e; }
.hmn-code .no, .codeblock .no {
pre .no, code .no, .codeblock .no {
color: #66d9ef; }
.hmn-code .nd, .codeblock .nd {
pre .nd, code .nd, .codeblock .nd {
color: #a6e22e; }
.hmn-code .ni, .codeblock .ni {
pre .ni, code .ni, .codeblock .ni {
color: #f8f8f2; }
.hmn-code .ne, .codeblock .ne {
pre .ne, code .ne, .codeblock .ne {
color: #a6e22e; }
.hmn-code .nf, .codeblock .nf {
pre .nf, code .nf, .codeblock .nf {
color: #a6e22e; }
.hmn-code .nl, .codeblock .nl {
pre .nl, code .nl, .codeblock .nl {
color: #f8f8f2; }
.hmn-code .nn, .codeblock .nn {
pre .nn, code .nn, .codeblock .nn {
color: #f8f8f2; }
.hmn-code .nx, .codeblock .nx {
pre .nx, code .nx, .codeblock .nx {
color: #a6e22e; }
.hmn-code .py, .codeblock .py {
pre .py, code .py, .codeblock .py {
color: #f8f8f2; }
.hmn-code .nt, .codeblock .nt {
pre .nt, code .nt, .codeblock .nt {
color: #f92672; }
.hmn-code .nv, .codeblock .nv {
pre .nv, code .nv, .codeblock .nv {
color: #f8f8f2; }
.hmn-code .ow, .codeblock .ow {
pre .ow, code .ow, .codeblock .ow {
color: #f92672; }
.hmn-code .w, .codeblock .w {
pre .w, code .w, .codeblock .w {
color: #f8f8f2; }
.hmn-code .mf, .codeblock .mf {
pre .mf, code .mf, .codeblock .mf {
color: #ae81ff; }
.hmn-code .mh, .codeblock .mh {
pre .mh, code .mh, .codeblock .mh {
color: #ae81ff; }
.hmn-code .mi, .codeblock .mi {
pre .mi, code .mi, .codeblock .mi {
color: #ae81ff; }
.hmn-code .mo, .codeblock .mo {
pre .mo, code .mo, .codeblock .mo {
color: #ae81ff; }
.hmn-code .sb, .codeblock .sb {
pre .sb, code .sb, .codeblock .sb {
color: #e6db74; }
.hmn-code .sc, .codeblock .sc {
pre .sc, code .sc, .codeblock .sc {
color: #e6db74; }
.hmn-code .sd, .codeblock .sd {
pre .sd, code .sd, .codeblock .sd {
color: #e6db74; }
.hmn-code .s2, .codeblock .s2 {
pre .s2, code .s2, .codeblock .s2 {
color: #e6db74; }
.hmn-code .se, .codeblock .se {
pre .se, code .se, .codeblock .se {
color: #ae81ff; }
.hmn-code .sh, .codeblock .sh {
pre .sh, code .sh, .codeblock .sh {
color: #e6db74; }
.hmn-code .si, .codeblock .si {
pre .si, code .si, .codeblock .si {
color: #e6db74; }
.hmn-code .sx, .codeblock .sx {
pre .sx, code .sx, .codeblock .sx {
color: #e6db74; }
.hmn-code .sr, .codeblock .sr {
pre .sr, code .sr, .codeblock .sr {
color: #e6db74; }
.hmn-code .s1, .codeblock .s1 {
pre .s1, code .s1, .codeblock .s1 {
color: #e6db74; }
.hmn-code .ss, .codeblock .ss {
pre .ss, code .ss, .codeblock .ss {
color: #e6db74; }
.hmn-code .bp, .codeblock .bp {
pre .bp, code .bp, .codeblock .bp {
color: #f8f8f2; }
.hmn-code .vc, .codeblock .vc {
pre .vc, code .vc, .codeblock .vc {
color: #f8f8f2; }
.hmn-code .vg, .codeblock .vg {
pre .vg, code .vg, .codeblock .vg {
color: #f8f8f2; }
.hmn-code .vi, .codeblock .vi {
pre .vi, code .vi, .codeblock .vi {
color: #f8f8f2; }
.hmn-code .il, .codeblock .il {
pre .il, code .il, .codeblock .il {
color: #ae81ff; }
.hmn-code .gu, .codeblock .gu {
pre .gu, code .gu, .codeblock .gu {
color: #75715e; }
.hmn-code .gd, .codeblock .gd {
pre .gd, code .gd, .codeblock .gd {
color: #f92672; }
.hmn-code .gi, .codeblock .gi {
pre .gi, code .gi, .codeblock .gi {
color: #a6e22e; }
.light {
@ -218,7 +218,6 @@ will throw an error.
--theme-color-dimmest: #333;
--link-color: #aaa;
--link-border-color: #aaa;
--table-border-color: #aaa;
--hr-color: #aaa;
--main-background-color: #202020;
--main-color: #eee;

View File

@ -18,7 +18,7 @@ For convenience in common cases, if only a single argument
is provided and it does not match an existing variable, this
will throw an error.
*/
.hmn-code, .codeblock {
pre, code, .codeblock {
/* Comment */
/* Error */
/* Keyword */
@ -79,149 +79,149 @@ will throw an error.
/* Name.Variable.Global */
/* Name.Variable.Instance */
/* Literal.Number.Integer.Long */ }
.hmn-code .hll, .codeblock .hll {
pre .hll, code .hll, .codeblock .hll {
background-color: #ffffcc; }
.hmn-code .c, .codeblock .c {
pre .c, code .c, .codeblock .c {
color: #60a0b0;
font-style: italic; }
.hmn-code .err, .codeblock .err {
pre .err, code .err, .codeblock .err {
color: #FF0000; }
.hmn-code .k, .codeblock .k {
pre .k, code .k, .codeblock .k {
color: #007020;
font-weight: bold; }
.hmn-code .o, .codeblock .o {
pre .o, code .o, .codeblock .o {
color: #666666; }
.hmn-code .cm, .codeblock .cm {
pre .cm, code .cm, .codeblock .cm {
color: #60a0b0;
font-style: italic; }
.hmn-code .cp, .codeblock .cp {
pre .cp, code .cp, .codeblock .cp {
color: #007020; }
.hmn-code .c1, .codeblock .c1 {
pre .c1, code .c1, .codeblock .c1 {
color: #60a0b0;
font-style: italic; }
.hmn-code .cs, .codeblock .cs {
pre .cs, code .cs, .codeblock .cs {
color: #60a0b0;
background-color: #fff0f0; }
.hmn-code .gd, .codeblock .gd {
pre .gd, code .gd, .codeblock .gd {
color: #A00000; }
.hmn-code .ge, .codeblock .ge {
pre .ge, code .ge, .codeblock .ge {
font-style: italic; }
.hmn-code .gr, .codeblock .gr {
pre .gr, code .gr, .codeblock .gr {
color: #FF0000; }
.hmn-code .gh, .codeblock .gh {
pre .gh, code .gh, .codeblock .gh {
color: #000080;
font-weight: bold; }
.hmn-code .gi, .codeblock .gi {
pre .gi, code .gi, .codeblock .gi {
color: #00A000; }
.hmn-code .go, .codeblock .go {
pre .go, code .go, .codeblock .go {
color: #808080; }
.hmn-code .gp, .codeblock .gp {
pre .gp, code .gp, .codeblock .gp {
color: #c65d09;
font-weight: bold; }
.hmn-code .gs, .codeblock .gs {
pre .gs, code .gs, .codeblock .gs {
font-weight: bold; }
.hmn-code .gu, .codeblock .gu {
pre .gu, code .gu, .codeblock .gu {
color: #800080;
font-weight: bold; }
.hmn-code .gt, .codeblock .gt {
pre .gt, code .gt, .codeblock .gt {
color: #0040D0; }
.hmn-code .kc, .codeblock .kc {
pre .kc, code .kc, .codeblock .kc {
color: #007020;
font-weight: bold; }
.hmn-code .kd, .codeblock .kd {
pre .kd, code .kd, .codeblock .kd {
color: #007020;
font-weight: bold; }
.hmn-code .kn, .codeblock .kn {
pre .kn, code .kn, .codeblock .kn {
color: #007020;
font-weight: bold; }
.hmn-code .kp, .codeblock .kp {
pre .kp, code .kp, .codeblock .kp {
color: #007020; }
.hmn-code .kr, .codeblock .kr {
pre .kr, code .kr, .codeblock .kr {
color: #007020;
font-weight: bold; }
.hmn-code .kt, .codeblock .kt {
pre .kt, code .kt, .codeblock .kt {
color: #902000; }
.hmn-code .m, .codeblock .m {
pre .m, code .m, .codeblock .m {
color: #40a070; }
.hmn-code .s, .codeblock .s {
pre .s, code .s, .codeblock .s {
color: #4070a0; }
.hmn-code .na, .codeblock .na {
pre .na, code .na, .codeblock .na {
color: #4070a0; }
.hmn-code .nb, .codeblock .nb {
pre .nb, code .nb, .codeblock .nb {
color: #007020; }
.hmn-code .nc, .codeblock .nc {
pre .nc, code .nc, .codeblock .nc {
color: #0e84b5;
font-weight: bold; }
.hmn-code .no, .codeblock .no {
pre .no, code .no, .codeblock .no {
color: #60add5; }
.hmn-code .nd, .codeblock .nd {
pre .nd, code .nd, .codeblock .nd {
color: #555555;
font-weight: bold; }
.hmn-code .ni, .codeblock .ni {
pre .ni, code .ni, .codeblock .ni {
color: #d55537;
font-weight: bold; }
.hmn-code .ne, .codeblock .ne {
pre .ne, code .ne, .codeblock .ne {
color: #007020; }
.hmn-code .nf, .codeblock .nf {
pre .nf, code .nf, .codeblock .nf {
color: #06287e; }
.hmn-code .nl, .codeblock .nl {
pre .nl, code .nl, .codeblock .nl {
color: #002070;
font-weight: bold; }
.hmn-code .nn, .codeblock .nn {
pre .nn, code .nn, .codeblock .nn {
color: #0e84b5;
font-weight: bold; }
.hmn-code .nt, .codeblock .nt {
pre .nt, code .nt, .codeblock .nt {
color: #062873;
font-weight: bold; }
.hmn-code .nv, .codeblock .nv {
pre .nv, code .nv, .codeblock .nv {
color: #bb60d5; }
.hmn-code .ow, .codeblock .ow {
pre .ow, code .ow, .codeblock .ow {
color: #007020;
font-weight: bold; }
.hmn-code .w, .codeblock .w {
pre .w, code .w, .codeblock .w {
color: #bbbbbb; }
.hmn-code .mf, .codeblock .mf {
pre .mf, code .mf, .codeblock .mf {
color: #40a070; }
.hmn-code .mh, .codeblock .mh {
pre .mh, code .mh, .codeblock .mh {
color: #40a070; }
.hmn-code .mi, .codeblock .mi {
pre .mi, code .mi, .codeblock .mi {
color: #40a070; }
.hmn-code .mo, .codeblock .mo {
pre .mo, code .mo, .codeblock .mo {
color: #40a070; }
.hmn-code .sb, .codeblock .sb {
pre .sb, code .sb, .codeblock .sb {
color: #4070a0; }
.hmn-code .sc, .codeblock .sc {
pre .sc, code .sc, .codeblock .sc {
color: #4070a0; }
.hmn-code .sd, .codeblock .sd {
pre .sd, code .sd, .codeblock .sd {
color: #4070a0;
font-style: italic; }
.hmn-code .s2, .codeblock .s2 {
pre .s2, code .s2, .codeblock .s2 {
color: #4070a0; }
.hmn-code .se, .codeblock .se {
pre .se, code .se, .codeblock .se {
color: #4070a0;
font-weight: bold; }
.hmn-code .sh, .codeblock .sh {
pre .sh, code .sh, .codeblock .sh {
color: #4070a0; }
.hmn-code .si, .codeblock .si {
pre .si, code .si, .codeblock .si {
color: #70a0d0;
font-style: italic; }
.hmn-code .sx, .codeblock .sx {
pre .sx, code .sx, .codeblock .sx {
color: #c65d09; }
.hmn-code .sr, .codeblock .sr {
pre .sr, code .sr, .codeblock .sr {
color: #235388; }
.hmn-code .s1, .codeblock .s1 {
pre .s1, code .s1, .codeblock .s1 {
color: #4070a0; }
.hmn-code .ss, .codeblock .ss {
pre .ss, code .ss, .codeblock .ss {
color: #517918; }
.hmn-code .bp, .codeblock .bp {
pre .bp, code .bp, .codeblock .bp {
color: #007020; }
.hmn-code .vc, .codeblock .vc {
pre .vc, code .vc, .codeblock .vc {
color: #bb60d5; }
.hmn-code .vg, .codeblock .vg {
pre .vg, code .vg, .codeblock .vg {
color: #bb60d5; }
.hmn-code .vi, .codeblock .vi {
pre .vi, code .vi, .codeblock .vi {
color: #bb60d5; }
.hmn-code .il, .codeblock .il {
pre .il, code .il, .codeblock .il {
color: #40a070; }
.dark {
@ -236,7 +236,6 @@ will throw an error.
--theme-color-dimmest: #ccc;
--link-color: #666;
--link-border-color: #666;
--table-border-color: #444;
--hr-color: #444;
--main-background-color: #fff;
--main-color: black;

View File

@ -9,8 +9,8 @@ set -eou pipefail
# TODO(opensource): We should adapt Asaf's seedfile command and then delete this.
THIS_PATH=$(pwd)
BETA_PATH='/mnt/c/Users/bvisn/Developer/handmade/handmade-beta'
# BETA_PATH='/Users/benvisness/Developer/handmade/handmade-beta'
#BETA_PATH='/mnt/c/Users/bvisn/Developer/handmade/handmade-beta'
BETA_PATH='/Users/benvisness/Developer/handmade/handmade-beta'
cd $BETA_PATH
docker-compose down -v
@ -22,5 +22,5 @@ cd $THIS_PATH
go run src/main.go migrate 2021-03-10T05:16:21Z
cd $BETA_PATH
./scripts/db_import -d -n hmn_two -a ./dbdumps/hmn_pg_dump_2021-04-26
# ./scripts/db_import -d -n hmn_two -a ./dbdumps/hmn_pg_dump_2021-04-25
#./scripts/db_import -d -n hmn_two -a ./dbdumps/hmn_pg_dump_2021-04-26
./scripts/db_import -d -n hmn_two -a ./dbdumps/hmn_pg_dump_2021-04-25

View File

@ -3,6 +3,8 @@ package parsing
import (
"bytes"
"github.com/yuin/goldmark/parser"
"github.com/yuin/goldmark"
highlighting "github.com/yuin/goldmark-highlighting"
"github.com/yuin/goldmark/extension"
@ -10,7 +12,7 @@ import (
)
// Used for rendering real-time previews of post content.
var ForumPreviewMarkdown = goldmark.New(
var ForumPreviewMarkdown = makeGoldmark(
goldmark.WithExtensions(makeGoldmarkExtensions(MarkdownOptions{
Previews: true,
Embeds: true,
@ -18,7 +20,7 @@ var ForumPreviewMarkdown = goldmark.New(
)
// Used for generating the final HTML for a post.
var ForumRealMarkdown = goldmark.New(
var ForumRealMarkdown = makeGoldmark(
goldmark.WithExtensions(makeGoldmarkExtensions(MarkdownOptions{
Previews: false,
Embeds: true,
@ -26,7 +28,7 @@ var ForumRealMarkdown = goldmark.New(
)
// Used for generating plain-text previews of posts.
var PlaintextMarkdown = goldmark.New(
var PlaintextMarkdown = makeGoldmark(
goldmark.WithExtensions(makeGoldmarkExtensions(MarkdownOptions{
Previews: false,
Embeds: true,
@ -35,7 +37,7 @@ var PlaintextMarkdown = goldmark.New(
)
// Used for processing Discord messages
var DiscordMarkdown = goldmark.New(
var DiscordMarkdown = makeGoldmark(
goldmark.WithExtensions(makeGoldmarkExtensions(MarkdownOptions{
Previews: false,
Embeds: false,
@ -56,6 +58,41 @@ type MarkdownOptions struct {
Embeds bool
}
func makeGoldmark(opts ...goldmark.Option) goldmark.Markdown {
// We need to re-create Goldmark's default parsers to disable HTML parsing.
// See parser.DefaultBlockParsers
blockParsers := []util.PrioritizedValue{
util.Prioritized(parser.NewSetextHeadingParser(), 100),
util.Prioritized(parser.NewThematicBreakParser(), 200),
util.Prioritized(parser.NewListParser(), 300),
util.Prioritized(parser.NewListItemParser(), 400),
util.Prioritized(parser.NewCodeBlockParser(), 500),
util.Prioritized(parser.NewATXHeadingParser(), 600),
util.Prioritized(parser.NewFencedCodeBlockParser(), 700),
util.Prioritized(parser.NewBlockquoteParser(), 800),
//util.Prioritized(parser.NewHTMLBlockParser(), 900),
util.Prioritized(parser.NewParagraphParser(), 1000),
}
// See parser.DefaultInlineParsers
inlineParsers := []util.PrioritizedValue{
util.Prioritized(parser.NewCodeSpanParser(), 100),
util.Prioritized(parser.NewLinkParser(), 200),
util.Prioritized(parser.NewAutoLinkParser(), 300),
//util.Prioritized(parser.NewRawHTMLParser(), 400),
util.Prioritized(parser.NewEmphasisParser(), 500),
}
opts = append(opts, goldmark.WithParser(parser.NewParser(
parser.WithBlockParsers(blockParsers...),
parser.WithInlineParsers(inlineParsers...),
parser.WithParagraphTransformers(parser.DefaultParagraphTransformers()...),
)))
return goldmark.New(opts...)
}
func makeGoldmarkExtensions(opts MarkdownOptions) []goldmark.Extender {
var extenders []goldmark.Extender
extenders = append(extenders,

View File

@ -10,7 +10,7 @@ import (
func main() {
js.Global().Set("parseMarkdown", js.FuncOf(func(this js.Value, args []js.Value) interface{} {
return parsing.ParseMarkdown(args[0].String(), parsing.PreviewMarkdown)
return parsing.ParseMarkdown(args[0].String(), parsing.ForumPreviewMarkdown)
}))
var done chan bool

View File

@ -1,3 +1,7 @@
strong {
font-weight: 500;
}
.text {
@include usevar(background-color, text-background);
}
@ -51,13 +55,117 @@
}
}
blockquote {
@extend .b--dimmest;
@extend .ml2, .pl2, .mr0;
@extend .bl;
.quotewho {
line-height: 2em;
&::after {
content: " said:";
}
}
}
pre {
font-family: $monospace-fonts;
}
.hmn-code {
@include usevar(background-color, dim-background);
.post-content {
* {
&:first-child {
margin-top: 0;
}
&:last-child {
margin-bottom: 0;
}
}
h1 {
font-size: 2rem;
}
h2 {
font-size: 1.5rem;
}
h3 {
font-size: 1.25rem;
}
h4 {
font-size: 1rem;
}
h5 {
font-size: 0.8rem;
}
h1, h2, h3, h4, h5 {
margin-top: 0.5em;
margin-bottom: 0.5em;
}
img {
max-width: 100%;
}
hr {
@extend .mh3;
}
div.code {
@extend .b--dimmer;
max-width: 100%;
max-height: 20em;
max-height: 80vh;
overflow: auto;
-moz-tab-size: 4;
tab-size: 4;
border-width: 1px;
border-style: solid;
}
div + br,
blockquote + br,
ul + br,
ol + br,
{
display: none;
}
table {
@extend .mv2;
}
th, td {
@extend .ph2, .pv1;
@extend .ba, .b--dimmest;
}
code {
@extend .bg--dim;
@extend .br2;
padding: .2em 0;
white-space: nowrap;
&::before, &::after {
content: "\00a0";
letter-spacing: -0.2em;
display: inline-block;
}
}
pre > code, pre.hmn-code {
@extend .bg--dim;
@extend .br2;
padding: 0.7em;
overflow-x: auto;
}
}

View File

@ -55,8 +55,8 @@ ol {
ul {
list-style-type: circle;
padding: 0px;
margin: 0px;
padding: 0;
margin: 0;
}
.list-none {
@ -64,20 +64,17 @@ ul {
}
li {
padding: 0px;
margin: 0px;
padding: 0;
margin: 0;
padding-left: 5px;
margin-left: 15px;
}
h1, h2 {
h1, h2, h3, h4, h5 {
font-weight: 500;
}
h1, h2, h3, h4 {
margin: 0px;
margin-bottom: 5px;
font-size: px2rem(24px);
margin: 0;
margin-bottom: 0.5rem;
font-size: 1.5rem;
line-height: 1.25em;
}
@ -91,8 +88,8 @@ em {
p {
box-sizing: border-box;
margin:0px;
padding:0px;
margin: 0;
padding: 0;
}
.p-spaced p {
@ -120,23 +117,12 @@ td {
vertical-align:baseline;
}
tr.line-above {
th, td {
@include usevar(border-top-color, table-border-color);
border-top-width: 1px;
border-top-style: solid;
padding-top:20px;
}
}
hr {
@include usevar(border-top-color, hr-color);
@extend .mv3;
border-width: 1px 0 0;
border-top-style: solid;
max-width: 300px;
}
$monospace-fonts: "Fira Mono", monospace;
@ -283,6 +269,10 @@ article code {
max-height: $height-5;
}
.mh-6 {
max-height: $height-6;
}
.mh-100 {
max-height: 100%;
}
@ -427,7 +417,6 @@ article code {
}
}
// Tachyons' `center` is unfortunately overloaded by a .center
// class we have in our own CSS.
.center-layout {
@ -436,28 +425,11 @@ article code {
}
header {
.logo {
}
.underscore {
width: 100%;
height: 100%;
animation: logo-blink 1s infinite alternate;
-webkit-animation: logo-blink 1s infinite alternate ease-in-out;
}
.logo, .underscore {
background-size: px2rem(140px);
background-repeat: no-repeat;
background-position: center center;
}
.hmn-logo {
height: px2rem(60px);
width: 100%;
text-transform: uppercase;
font-family: 'MohaveHMN';
font-family: 'MohaveHMN', sans-serif;
font-size: 2rem;
display: flex;

View File

@ -36,6 +36,12 @@
}
}
#preview:empty::after {
content: 'A preview of your post will appear here.';
@include usevar(color, dimmer-color);
font-style: italic;
}
@media #{$breakpoint-not-small} {
#preview-container {
max-height: calc(100vh - 20rem);

View File

@ -117,31 +117,8 @@
}
.postid a {
margin-top: -5rem;
padding-top: 5rem;
}
.contents {
div.code {
@extend .b--dimmer;
max-width: 100%;
max-height: 20em;
max-height: 80vh;
overflow: auto;
-moz-tab-size: 4;
tab-size: 4;
border-width: 1px;
border-style: solid;
}
div + br,
blockquote + br,
ul + br,
ol + br,
{
display: none;
}
margin-top: -4rem;
padding-top: 4rem;
}
.codeblocktable {
@ -171,64 +148,6 @@
}
.post {
.contents {
h1, h2 {
margin: 20px 0px;
}
h2 {
font-size: 20px;
}
h5, h6 {
margin: 10px 0px;
}
strong {
font-weight: 500;
}
blockquote {
@extend .b--dimmest;
display: block;
margin-top: 0;
margin-bottom: 0;
padding: 10px 18px;
padding-top: 0;
padding-bottom: 0;
margin-left: 20px;
margin-right: 20px;
border-left-width: 1px;
border-left-style: solid;
.quotewho {
line-height: 2em;
&::after {
content: " said:";
}
}
}
img {
max-width: 100%;
}
}
&.bbcode .contents {
h1, h2, h3 {
display: inline;
}
}
.project & .contents h3,
.contents h4 {
display:block;
font-size:18px;
margin: 10px 0px;
}
.action.button {
padding:0px 10px;
margin-top:0px;
@ -244,38 +163,6 @@
border-bottom-width:4px;
}
}
hr {
max-width:90%;
}
.signature {
hr {
width: 80%;
}
}
}
.post .body, .post-preview {
.size1 {
font-size:12px;
}
.size2 {
font-size:13px;
}
.size3 {
font-size:14px;
}
.size4 {
font-size:15px;
}
.size5 {
font-size:16px;
}
}
.blog {
@ -293,20 +180,6 @@
font-size: 0.7em;
text-align: center;
}
&.op .body {
padding-top: 6px;
.contents {
text-align:left;
}
p {
margin-top:8px;
margin-bottom:8px;
text-align:left;
}
}
}
.sidebar {
@ -344,11 +217,6 @@
bottom:-5px;
}
.blog .body blockquote {
padding-top:1px;
padding-bottom:1px;
}
.content-block.blog {
p.title {
font-weight:bold;

View File

@ -12,7 +12,6 @@ $vars: (
link-color: #aaa,
link-border-color: #aaa,
table-border-color: #aaa,
hr-color: #aaa,
main-background-color: #202020,
@ -122,7 +121,7 @@ $vars: (
// see: https://github.com/richleland/pygments-css/blob/master/monokai.css
// .hmn-code is Go codebase, .codeblock is old Python
.hmn-code, .codeblock {
pre, code, .codeblock {
.hll { background-color: #49483e }
.c { color: #75715e } /* Comment */
.err { color: #ff0000; } /* Error */

View File

@ -12,7 +12,6 @@ $vars: (
link-color: #666,
link-border-color: #666,
table-border-color: #444,
hr-color: #444,
main-background-color: #fff,
@ -122,7 +121,7 @@ $vars: (
// see: https://github.com/richleland/pygments-css/blob/master/monokai.css
// .hmn-code is Go codebase, .codeblock is old Python
.hmn-code, .codeblock {
pre, code, .codeblock {
.hll { background-color: #ffffcc }
.c { color: #60a0b0; font-style: italic } /* Comment */
.err { color: #FF0000 } /* Error */

View File

@ -40,7 +40,7 @@
<!-- Main post -->
<div class="mb3">
<div class="contents overflow-x-auto">
<div class="post-content overflow-x-auto">
{{ .MainPost.Content }}
</div>
</div>
@ -101,7 +101,7 @@
</div>
</div>
<div class="w-100 pt3">
<div class="contents overflow-x-auto">
<div class="post-content overflow-x-auto">
{{ .Content }}
</div>
</div>

View File

@ -23,7 +23,7 @@
<h2>{{ .Title }}</h2>
{{ end }}
<div class="flex flex-column flex-row-ns">
<form id="form" action="{{ .SubmitUrl }}" method="post" class="flex-fair-ns">
<form id="form" action="{{ .SubmitUrl }}" method="post" class="flex-fair-ns overflow-hidden">
{{ csrftoken .Session }}
{{ if .CanEditTitle }}
@ -75,7 +75,9 @@
{{ with .PostReplyingTo }}
<h4 class="mt3">The post you're replying to:</h4>
<div class="mh-6 overflow-y-auto">
{{ template "forum_post_standalone.html" . }}
</div>
{{ end }}
{{/*
@ -99,8 +101,8 @@
{% endif %}
*/}}
</form>
<div id="preview-container" class="post post-preview mv3 mathjax flex-fair-ns mv0-ns ml3-ns overflow-auto">
<div id="preview" class="body contents"></div>
<div id="preview-container" class="post post-preview mathjax flex-fair-ns overflow-auto mv3 mv0-ns ml3-ns pa3 br3 bg--dim">
<div id="preview" class="post-content"></div>
</div>
</div>
</div>

View File

@ -103,7 +103,7 @@
Replying to {{ if .Author }}{{ .Author.Username }}{{ else }}deleted user{{ end }} (<a href="{{ .ReplyPost.Url }}">#{{ .ReplyPost.ID }}</a>)
</div>
{{ end }}
<div class="contents overflow-x-auto">
<div class="post-content overflow-x-auto">
{{ .Content }}
</div>
{{/* {% if post.author.signature|length %}

View File

@ -33,7 +33,7 @@
</div>
</div>
<div class="w-100 pt3">
<div class="contents overflow-x-auto">
<div class="post-content overflow-x-auto">
{{ .Content }}
</div>
</div>

View File

@ -62,7 +62,6 @@
<meta name="msapplication-TileImage" content="{{ static "ms-icon-144x144.png" }}">
<meta name="theme-color" content="#ffffff">
{{ if .MathjaxEnabled }}
<script>
MathJax = {
tex: {
@ -75,7 +74,6 @@
};
</script>
<script async src="{{ static "mathjax.js" }}"></script>
{{ end }}
{{ block "extrahead" . }}{{ end }}
</head>

View File

@ -27,7 +27,6 @@ type BaseData struct {
IsProjectPage bool
Header Header
Footer Footer
MathjaxEnabled bool
}
func (bd *BaseData) AddImmediateNotice(class, content string) {

View File

@ -211,7 +211,6 @@ func BlogPostRedirectToThread(c *RequestContext) ResponseData {
func BlogNewThread(c *RequestContext) ResponseData {
baseData := getBaseData(c)
baseData.Title = fmt.Sprintf("Create New Post | %s", c.CurrentProject.Name)
baseData.MathjaxEnabled = true
// TODO(ben): Set breadcrumbs
editData := getEditorDataForNew(baseData, nil)
@ -291,7 +290,6 @@ func BlogPostEdit(c *RequestContext) ResponseData {
} else {
baseData.Title = fmt.Sprintf("Editing Post | %s", c.CurrentProject.Name)
}
baseData.MathjaxEnabled = true
// TODO(ben): Set breadcrumbs
editData := getEditorDataForEdit(baseData, postData)
@ -356,7 +354,6 @@ func BlogPostReply(c *RequestContext) ResponseData {
baseData := getBaseData(c)
baseData.Title = fmt.Sprintf("Replying to comment in \"%s\" | %s", postData.Thread.Title, c.CurrentProject.Name)
baseData.MathjaxEnabled = true
// TODO(ben): Set breadcrumbs
replyPost := templates.PostToTemplate(&postData.Post, postData.Author, c.Theme)
@ -421,7 +418,6 @@ func BlogPostDelete(c *RequestContext) ResponseData {
} else {
baseData.Title = fmt.Sprintf("Deleting comment in \"%s\" | %s", postData.Thread.Title, c.CurrentProject.Name)
}
baseData.MathjaxEnabled = true
// TODO(ben): Set breadcrumbs
templatePost := templates.PostToTemplate(&postData.Post, postData.Author, c.Theme)

View File

@ -598,7 +598,6 @@ func ForumPostRedirect(c *RequestContext) ResponseData {
func ForumNewThread(c *RequestContext) ResponseData {
baseData := getBaseData(c)
baseData.Title = "Create New Thread"
baseData.MathjaxEnabled = true
// TODO(ben): Set breadcrumbs
cd, ok := getCommonForumData(c)
@ -686,7 +685,6 @@ func ForumPostReply(c *RequestContext) ResponseData {
baseData := getBaseData(c)
baseData.Title = fmt.Sprintf("Replying to post | %s", cd.SubforumTree[cd.SubforumID].Name)
baseData.MathjaxEnabled = true
// TODO(ben): Set breadcrumbs
replyPost := templates.PostToTemplate(&postData.Post, postData.Author, c.Theme)
@ -751,7 +749,6 @@ func ForumPostEdit(c *RequestContext) ResponseData {
} else {
baseData.Title = fmt.Sprintf("Editing Post | %s", cd.SubforumTree[cd.SubforumID].Name)
}
baseData.MathjaxEnabled = true
// TODO(ben): Set breadcrumbs
editData := getEditorDataForEdit(baseData, postData)
@ -811,7 +808,6 @@ func ForumPostDelete(c *RequestContext) ResponseData {
baseData := getBaseData(c)
baseData.Title = fmt.Sprintf("Deleting post in \"%s\" | %s", postData.Thread.Title, cd.SubforumTree[cd.SubforumID].Name)
baseData.MathjaxEnabled = true
// TODO(ben): Set breadcrumbs
templatePost := templates.PostToTemplate(&postData.Post, postData.Author, c.Theme)