127 lines
3.3 KiB
Markdown
127 lines
3.3 KiB
Markdown
# 首页
|
|
|
|
## 二
|
|
|
|
### Three
|
|
|
|
#### 肆
|
|
|
|
> 记录生活,积累技术。
|
|
|
|
!!! note "Phasellus posuere in sem ut cursus"
|
|
|
|
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et euismod
|
|
nulla. Curabitur feugiat, tortor non consequat finibus, justo purus auctor
|
|
massa, nec semper lorem quam in massa.
|
|
|
|
Lorem ipsum dolor sit amet, (1) consectetur adipiscing elit.
|
|
{ .annotate }
|
|
|
|
1. :man_raising_hand: I'm an annotation! I can contain `code`, __formatted
|
|
text__, images, ... basically anything that can be expressed in Markdown.
|
|
|
|
!!! note annotate "Phasellus posuere in sem ut cursus (1)"
|
|
|
|
Lorem ipsum dolor sit amet, (2) consectetur adipiscing elit. Nulla et
|
|
euismod nulla. Curabitur feugiat, tortor non consequat finibus, justo
|
|
purus auctor massa, nec semper lorem quam in massa.
|
|
|
|
1. :man_raising_hand: I'm an annotation!
|
|
2. :woman_raising_hand: I'm an annotation as well!
|
|
|
|
[Subscribe to our newsletter](#){ .md-button .md-button--primary }
|
|
[Send :fontawesome-solid-paper-plane:](#){ .md-button }
|
|
|
|
``` py title="bubble_sort.py"
|
|
def bubble_sort(items):
|
|
for i in range(len(items)):
|
|
for j in range(len(items) - 1 - i):
|
|
if items[j] > items[j + 1]:
|
|
items[j], items[j + 1] = items[j + 1], items[j]
|
|
```
|
|
|
|
``` yaml
|
|
theme:
|
|
features:
|
|
- content.code.annotate # (1)
|
|
```
|
|
|
|
1. :man_raising_hand: I'm a code annotation! I can contain `code`, __formatted
|
|
text__, images, ... basically anything that can be written in Markdown.
|
|
|
|
``` py linenums="1"
|
|
def bubble_sort(items):
|
|
for i in range(len(items)):
|
|
for j in range(len(items) - 1 - i):
|
|
if items[j] > items[j + 1]:
|
|
items[j], items[j + 1] = items[j + 1], items[j]
|
|
```
|
|
|
|
``` py hl_lines="3-5"
|
|
def bubble_sort(items):
|
|
for i in range(len(items)):
|
|
for j in range(len(items) - 1 - i):
|
|
if items[j] > items[j + 1]:
|
|
items[j], items[j + 1] = items[j + 1], items[j]
|
|
```
|
|
When InlineHilite is enabled, syntax highlighting can be applied to inline code blocks by prefixing them with a shebang, i.e. `#!`, directly followed by the corresponding language shortcode.
|
|
|
|
The `#!python range()` function is used to generate a sequence of numbers.
|
|
|
|
=== "C"
|
|
|
|
``` c
|
|
#include <stdio.h>
|
|
|
|
int main(void) {
|
|
printf("Hello world!\n");
|
|
return 0;
|
|
}
|
|
```
|
|
|
|
=== "C++"
|
|
|
|
``` c++
|
|
#include <iostream>
|
|
|
|
int main(void) {
|
|
std::cout << "Hello world!" << std::endl;
|
|
return 0;
|
|
}
|
|
```
|
|
|
|
=== "Unordered list"
|
|
|
|
* Sed sagittis eleifend rutrum
|
|
* Donec vitae suscipit est
|
|
* Nulla tempor lobortis orci
|
|
|
|
=== "Ordered list"
|
|
|
|
1. Sed sagittis eleifend rutrum
|
|
2. Donec vitae suscipit est
|
|
3. Nulla tempor lobortis orci
|
|
|
|
!!! example
|
|
|
|
=== "Unordered List"
|
|
|
|
``` markdown
|
|
* Sed sagittis eleifend rutrum
|
|
* Donec vitae suscipit est
|
|
* Nulla tempor lobortis orci
|
|
```
|
|
|
|
=== "Ordered List"
|
|
|
|
``` markdown
|
|
1. Sed sagittis eleifend rutrum
|
|
2. Donec vitae suscipit est
|
|
3. Nulla tempor lobortis orci
|
|
```
|
|
|
|
| Method | Description |
|
|
| :---------: | :----------------------------------: |
|
|
| `GET` | :material-check: Fetch resource |
|
|
| `PUT` | :material-check-all: Update resource |
|
|
| `DELETE` | :material-close: Delete resource | |