This note is used to show the compoents I created to use in this site. It's for me only. I use it as a reference when I wanna create some components for the notes.
👉 Note: For me only (This is another technical note used for this site only).
Inline components
- Highlight inline texts.
- Keyboards like Ctrl + V or ⌘ + V.
- Reference[ref].
- Inline text color.
- Some emoji symbols with codes: 👉, 🔅, ❓, ❗, 🇻🇳 (check more here)
Headings
Inside heading
Heading H1
Heading H2 (adjacent to H1)
Heading H3 (adjacent to H2)
Heading H4 (adjacent to H3)
Heading with other components behind
A paragraph
Another inside heading
Nothing inside.
Blockquotes
This is a blockquote.
Another line?
List
Ordered list,
- This is an item
- This is an item
- This is a nested item.
- This is a nested item.
- This is an item
- This is a nested item.
- This is a nested item.
- This is a nested item.
- This is an item which has a very long length. I use this to test the wrap of text inside an item of the list.
- This is an item
Unordered list,
- This is an item
- This is an item
- This is an item
- This is an item
- This is an item
- This is an item
- This is a nested item.
- This is a nested item.
- This is an item
- This is an item
- This is an item
- This is an item
- This is an item
- This is an item
- This is an item
- This is an item
- This is an item
Two columns list
- Item 1
- Item 2
- Item 3
- Item 4
- Item 5
Alert boxes
Warning: The content with a link inside!
Content
Success: The content with a link inside!
Content
Info: The content with a link inside!
Info: This one uses directly html markups and doesn't have any icon like the others.
Content
Tip: The content with a link inside!
Danger: The content with a link inside!
Content
Inside other components
Inside a list,
Item
Content
Item
Content
Item
Item
Inside hide/show box,
Content of the hide/show box.
Content of the warning box.
Item
Content
Item
Math
Calculate the Standard Deviation () of the current node (let's say , parent node) by using MSE or MAE,
where the target values (Hours Played in the above example), is the mean value and is the number of examples in this node.
Calculate the Standard Deviation Reduction (SDR) after splitting node on each attribute (for example, consider attribute ). The attribute w.r.t. the biggest SDR will be chosen!
where number of different properties in and is the propability of property in . Note that, means the SD of node which is also a child of node .
After splitting, we have new child nodes. Each of them becomes a new parent node in the next step. Go back to step 1
Two columns
# Test
# Test
# Test
# Test
# Test
# Test
# Test
# Test
# Test
# Test
# Test
# Test
# Test
# Test
# Test
# Test
# Test
# Test
# Test
# Test
# Test
# Test
# Test
# Test
# Test
# Test
# Test
# Test
# Test
# Test
# Test
# Test
# Test
# Test
# Test
# Test
# Test
# Test
# Test
# Test
Insert codes
Inline codes without background
Inline codes without background: code
, without border code
or both code
.
Raw codes
We can insert liquid tag here: {% icon "danger" %}
.
Normal inserting
a = (1, 2, 3) # tuple
x = list(a)
a = (1, 2, 3) # tuple
x = list(a)
Codes side by side
Equal sizes
a = (1, 2, 3) # tuple
x = list(a)
<div class="columns-2" markdown="1">
<div>
Flexible sizes
a = (1, 2, 3) # tuple
x = list(a)
<div class="columns-2" markdown="1">
<div>
Codes with highlights
a = (1, 2, 3) # tuple
x = list(a)
print(a)
print(x)
a = (1, 2, 3) # tuple
x = list(a)
print(a)
print(x)
a = (1, 2, 3) # tuple
x = list(a)
print(a)
print(x)
a = (1, 2, 3) # tuple
x = list(a)
print(a)
print(x)
Codes with differences
+function myFunction() {
// …
- return true;
}
Codes with results
a = (1, 2, 3) # very long code box will have wider length
x = list(a)
print(a)
print(x)
(1, 2, 3)
[1, 2, 3]
a = (1, 2, 3) # very long code box doesn't have wider length
x = list(a)
print(a)
print(x)
(1, 2, 3)
[1, 2, 3]
Codes with figures
Equal heights,
a = (1, 2, 3) # tuple
x = list(a)
print(a)
print(x)
Center align,
a = (1, 2, 3) # tuple
x = list(a)
print(a)
print(x)
Top align,
a = (1, 2, 3) # tuple
x = list(a)
print(a)
print(x)
Bottom align,
a = (1, 2, 3) # tuple
x = list(a)
print(a)
print(x)
Codes inside a list
The first item
# Codes
1+1# Codes
Other contents.
# Other codes
# Code 1
# Code 2
# Code 3
# Code 4
Sub item 1
# Codes
# Codes
Sub item 2
# Code 1
# Code 2
# Code 3
# Code 4
Another item.
# code
Hide / Show boxes
The content
Content of the warning
Other content of the boxes.
This box uses default title.
""
and use markdownContent
""
)Note that, above we use ''
instead of ""
because inside the title, there is another ""
!
Yes! There is a blank line above! And we cannot use markdown inside the title when using HTML tag.
const func = () => {
// content
}
Content
Item 1
Item 2
More detail// codes
- Sub item.
Item
Inside other components
Alert box,
Success:The content with a link inside!
Content
Box > List > Box,
Item
TitleContent of hsbox.
Item
Inside a list,
We don't have to use directly
<div>
, we can use:::
!Hide / Show boxContent
Item
Hide / Show boxContent
Item
Item
Insert figures
Insert inline icons
Available icons: , , , , , , .
Check line eleventyConfig.addShortcode("icon"
in .eleventy.js
for more icon names.
Different sizes
This one has a description.
This is the smallest one!
Tables
Tables side by side
Col_1 | Col_2 | |
---|---|---|
0 | A | 1 |
1 | E | 3 |
2 | C | NaN |
3 | D | NaN |
4 | B | 2 |
Col_1 | Col_2 | |
---|---|---|
0 | A | 1 |
1 | B | 2 |
2 | C | -3 |
3 | F | -4 |
4 | E | NaN |
Table and figure
Col_1 | Col_2 | |
---|---|---|
0 | A | 1 |
1 | E | 3 |
2 | C | NaN |
3 | D | NaN |
4 | B | 2 |