Add some css

This commit is contained in:
Florian Schroedl
2022-05-04 17:00:00 +02:00
parent b42a664128
commit b069a76aaf
6 changed files with 2393 additions and 13 deletions

View File

@@ -3,6 +3,8 @@
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width,initial-scale=1" />
<link rel="stylesheet" href="./style.css" type="text/css" media="screen" />
<link rel="stylesheet" href="./style-custom.css" type="text/css" media="screen" />
<title>Nim on JS</title>
</head>
<body onload="startApp()">

View File

@@ -39,7 +39,7 @@ proc toMarkUp(x: OrgInlineBlock): ReactNode =
of orgUnderlineText: u(Attrs{}, x.content)
of orgVerbatimText: pre(Attrs{}, x.content)
of orgCodeText: code(Attrs{}, x.content)
of orgStrikeThroughText: p(Attrs{}, x.content)
of orgStrikeThroughText: span(Attrs{className: "strike-through"}, x.content)
# # Links
# of orgLink: "Link"
@@ -68,7 +68,7 @@ proc makeTopLevel(): ReactNode {.exportc.} =
let text = myUseState[cstring]("""* TODO Level 1
Some stuff inbetween
** DONE Regular *bold* [[https://some.url]] /italic/ _underline_ =verbatim= ~code~ +strikethrough+ [[https://some.url][title]]""")
** DONE Regular *bold* [[https://placeholder.com]] /italic/ _underline_ =verbatim= ~code~ +strikethrough+ [[https://placeholder.com][title]]""")
let val = text.getter
let orgItems = makeItems($val)

View File

@@ -0,0 +1,12 @@
h1 pre, h2 pre, h3 pre, h4 pre, h5 pre, h6 pre {
display: inline;
}
h1 code, h2 code, h3 code, h4 code, h5 code, h6 code {
display: inline;
}
.strike-through {
text-decoration: line-through;
display: inline;
}

2376
src/js/example/style.css Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -6,21 +6,11 @@
<title>Untitled</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="apple-touch-icon" href="/apple-touch-icon.png">
<!-- Place favicon.ico in the root directory -->
</head>
<body>
<!--[if lt IE 8]>
<p class="browserupgrade">
You are using an <strong>outdated</strong> browser. Please
<a href="http://browsehappy.com/">upgrade your browser</a> to improve
your experience.
</p>
<![endif]-->
<script type="text/javascript" src="./org_block_heading.js"></script>
</body>
</html>

View File

@@ -56,7 +56,7 @@ proc tryBuildInline*(content: string): OrgInlineBuilderResult =
when isMainModule:
let test = tryBuildInline(
"Regular *bold* [[https://some.url]] /italic/ _underline_ =verbatim= ~code~ +strikethrough+ [[https://some.url][title]]"
"Regular *bold* [[placeholder.com]] /italic/ _underline_ =verbatim= ~code~ +strikethrough+ [[https://placeholder.com][title]]"
)
echo test