You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is an example of several cheatsheets features.
3
+
## I'm a H2 title with 2 columns
4
+
{: .col-2}
4
5
5
-
## Blocks
6
+
### To configure columns use the H2 title
6
7
7
-
One.
8
+
| `full page` |_*default_|
9
+
| `.width-50` | "half page" |
10
+
| `.col-2` | "two-column"|
11
+
| `.col-3` | "three-column"|
12
+
| `-col-2-left` | "two-columns" (1/3 - 2/3) |
13
+
| `.table-col` | "tables will take only 50% of the page"|
8
14
9
-
### Nested
15
+
Set the number of columns under the H2 titles.
10
16
11
-
Two.
17
+
### I'm a H3 title
12
18
13
-
## More
19
+
Use H3 to start a new topic.
14
20
15
-
Three.
21
+
#### I'm a H4 title.
22
+
23
+
### Tables
24
+
25
+
| `.full-page` | "full page" _*default_|
26
+
| `.col-2` | "two-column"|
27
+
| `.col-3` | "three-column"|
28
+
| `-col-2-left` | "two-columns" (1/3 - 2/3) |
29
+
| `.col-4` | "four-columns for lists"|
30
+
| `.col-6` | "six-columns for lists"|
31
+
| `.wrap` | "wrap a content"|
32
+
| `.table-col` | "tables will take only 50% of the page"|
33
+
34
+
### Code and 3 columns
35
+
36
+
```elixir
37
+
# hello.exs
38
+
defmodule Greeter do
39
+
def greet(name) do
40
+
message = "Hello, " <> name <> "!"
41
+
IO.puts message
42
+
end
43
+
end
44
+
45
+
Greeter.greet("world")
46
+
```
47
+
48
+
### Paragraphs
49
+
50
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed at ante consectetur, pharetra magna a, malesuada lectus. Mauris porttitor ligula dui, at egestas augue hendrerit eget. Morbi lorem urna, scelerisque ut sem et, sollicitudin porta nulla.
51
+
52
+
### Lists
53
+
54
+
- Element 1
55
+
- Element 2
56
+
- `piece of code`
57
+
58
+
### Adding variants
59
+
60
+
```
61
+
## Section
62
+
{: .col-2}
63
+
64
+
"highlight the content in a paragraph"
65
+
{: .prime}
66
+
67
+
"wrap a very long text"
68
+
{: .wrap}
69
+
```
70
+
71
+
Ex_docs uses Kramdown, and supports adding classes via Kramdown's syntax.
72
+
73
+
Full page and H3 titles
74
+
-----------
75
+
{: .full-page}
76
+
77
+
### H3 tittles sections
78
+
79
+
Each section can have the following children:
80
+
81
+
#### H4 title
82
+
83
+
- `h4`
84
+
- `lists`
85
+
- `tables`
86
+
87
+
A paragraph with a cool text: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed at ante consectetur, pharetra magna a, malesuada lectus. Mauris porttitor ligula dui, at egestas augue hendrerit eget.
88
+
89
+
- `p`
90
+
91
+
```elixir
92
+
Enum.map(users, fn user ->
93
+
IO.puts "Hello " <> user
94
+
end)
95
+
```
96
+
- `code`
97
+
98
+
A highlight section!
99
+
This is a section with `{: .prime}`. Notice the fancy highlight! Great for "getting started" kind of snippets.
100
+
{: .prime}
101
+
102
+
### H3 title
103
+
104
+
Every box is an H3 title. The box will encompass everything inside the body of the H3.
105
+
106
+
This is a basic section with paragraphs in it.
107
+
108
+
Code
109
+
----
110
+
{: .col-3}
111
+
112
+
### Code with headings
113
+
114
+
#### index.ex
115
+
116
+
```
117
+
Path.join(["~", "foo"])
118
+
"~/foo"
119
+
```
120
+
121
+
#### other.ex
122
+
123
+
```
124
+
Path.join(["foo"])
125
+
"foo"
126
+
```
127
+
128
+
Code blocks can have headings.
129
+
130
+
### Long lines
131
+
132
+
```
133
+
defmodule MyTracer do
134
+
def trace({:remote_function, _meta, module, name, arity}, env) do
0 commit comments