[Web] Adjust styles

master
Araozu 2023-04-05 19:39:51 -05:00
parent 2f26e4aad1
commit e193f5dbcd
4 changed files with 131 additions and 6 deletions

View File

@ -197,6 +197,45 @@ name.charAt(4)!! //: "o"
</div>
### charCodeAt
```misti
fun charCodeAt(Num position) -> Num?
```
Returns an integer between `0` and `65535` representing the UTF-16
code unit at `position`.
<div class="padded">
#### Parameters
- `Num position`: A number between `0` and the string's `length - 1`
#### Return
- `Num?`: The code unit at `position` if it's valid, or `None` if it's invalid.
#### Description
Description
#### Examples
```misti
val letters = "ABC"
letters.charCodeAt(0) //: Some(65)
letters.charCodeAt(1) //: Some(66)
```
</div>
### codePointAt
### concat
```misti
@ -242,6 +281,9 @@ greeting.concat(3, 2, 2) //: "Hello 322"
</div>
### endsWith
### includes
@ -285,6 +327,91 @@ loremIpsum.includes("ipsum", -5) //: true
### indexOf
```misti
fun indexOf(Str searchValue, Num position = 0) -> Num
```
### lastIndexOf
fun lastIndexOf(Str searchValue, Num position = Infinity) -> Num
### match
```misti
fun match(RegExp pattern) -> RegExpResult
```
### matchAll
```misti
fun matchAll(RegExp pattern) -> Iterator[RegExpResult]
```
### normalize
```misti
fun normalize(Str form = "NFC") -> String
```
### padEnd
```misti
fun padEnd(Num targetLength, Str padValue = " ") -> String
```
### padStart
```misti
fun padStart(Num targetLength, Str padValue = " ") -> String
```
### repeat
```misti
fun repeat(Num count) -> String
```
### replace
```misti
fun replaceAll([RegExp | Str] pattern, Str replacement) -> String
```
### replaceAll
```misti
fun replaceAll([RegExp | Str] pattern, Str replacement) -> String
```
### search
```misti
fun search([RegExp | Str] pattern) -> Num
```
### slice
```misti
fun slice(Num start, Num? end) -> String
```
### split
```misti
fun split(Str separator, Num? limit) -> Array<Str>
```

View File

@ -1,5 +1,3 @@
use std::fmt::Display;
use markdown::mdast::{Heading, Node};
use crate::{generator::Printable, utils};
@ -56,7 +54,7 @@ impl Topic {
let html_fragment_link = utils::to_html_fragment(&self.text);
format!(
"<li class=\"my-2\"><a href=\"#{}\" class=\"inline-block w-full\">{}</a>{}</li>",
"<li class=\"m-2\"><a href=\"#{}\" class=\"inline-block w-full\">{}</a>{}</li>",
html_fragment_link, self.text, extra
)
}

View File

@ -56,7 +56,7 @@ pre[class*="language-"] {
word-wrap: normal;
color: var(--code-theme-color);
background: var(--code-theme-bg-color);
font-size: 1em;
font-size: 0.8em;
line-height: 1.5em;
border-radius: 0.3em;

View File

@ -18,10 +18,10 @@
<body>
<div class="mx-auto max-w-screen-lg grid" style="grid-template-columns: 15rem auto;">
<div class="text-sm h-screen pt-12 sticky top-0">
<div class="text-sm p-4 h-screen py-12 sticky top-0 overflow-y-scroll overflow-x-hidden border-r border-border-color">
{{sidebar}}
</div>
<div class="marked">
<div class="marked px-8">
{{markdown}}
</div>
</div>