|
| 1 | +--- |
| 2 | +title: Formatting test for Markdown |
| 3 | +description: The purpose of this file is to test all the markdown support and syntaxs |
| 4 | +author: EmptyWork |
| 5 | +draft: false |
| 6 | +date: 2021-12-26T09:30:51.516Z |
| 7 | +tags: |
| 8 | + - post |
| 9 | + - html |
| 10 | + - javascript |
| 11 | + - markdown |
| 12 | +--- |
| 13 | + |
| 14 | +[[toc]] |
| 15 | + |
| 16 | +# Main header |
| 17 | + |
| 18 | +> Another example of the formatting, this is what supposed to be a blockqoute ==This is an example of the highlight=={.highlight} |
| 19 | +
|
| 20 | +## Code snippet |
| 21 | + |
| 22 | +> You can only do this if you have certain understanding regarding how to do the thing that are meant to be that thing. |
| 23 | +> |
| 24 | +> > `this is an inline-quote` does it works? click here to [jump to code-snippet-2](#code-snippet-2), or you can just scroll down, also you can hover on the code blocks. |
| 25 | +> > |
| 26 | +> > ```npm |
| 27 | +> > npm run install && npm run update |
| 28 | +> > ``` |
| 29 | +> > |
| 30 | +> > > This a blockqoute inside a blockqoute inside a blockquote, it is a `block-ception` |
| 31 | +> > > |
| 32 | +> > > ```js |
| 33 | +> > > const isDarkThemePreferred = |
| 34 | +> > > !localStorage.theme && |
| 35 | +> > > window.matchMedia('(prefers-color-scheme: dark)').matches |
| 36 | +> > > const dataset = document.documentElement.dataset // Getting all dataset |
| 37 | +> > > ``` |
| 38 | +
|
| 39 | +### Secondary header |
| 40 | +
|
| 41 | +The markdown is being handle by the markdown-it and eleventy, while some extra works is being done by vanila javascript. |
| 42 | +
|
| 43 | +```sql |
| 44 | +SELECT * FROM `ikan`; |
| 45 | +``` |
| 46 | +```sql |
| 47 | +DROP table `ikan`; |
| 48 | +``` |
| 49 | + |
| 50 | +#### Code snippet |
| 51 | + |
| 52 | +```python |
| 53 | +def greet(name): |
| 54 | + print(f"Hello, {name}! Welcome to the Markdown formatting test.") |
| 55 | + |
| 56 | +greet("Visitor") |
| 57 | +``` |
| 58 | + |
| 59 | +Here is a simple JavaScript function that adds two numbers and logs the result. |
| 60 | + |
| 61 | +### Code snippet 2 |
| 62 | + |
| 63 | +```javascript |
| 64 | +function add(a, b) { |
| 65 | + return a + b |
| 66 | +} |
| 67 | + |
| 68 | +console.log(add(2, 3)) // Output: 5 |
| 69 | +``` |
| 70 | + |
| 71 | +Here is a simple JavaScript function that adds two numbers and logs the result. |
| 72 | + |
| 73 | +```javascript |
| 74 | +const schedulerLoader = (schedules = {}) => { |
| 75 | + let time = new Date() |
| 76 | + let currentTime = time.getUTCHours() + 9 |
| 77 | + if (currentTime > 23) currentTime -= 23 |
| 78 | + |
| 79 | + if (replaceStatus) replaceStatus.textContent = 'Idle' |
| 80 | + |
| 81 | + setTimeout(() => { |
| 82 | + for (let i = 0; i < schedules.length; i++) { |
| 83 | + let { day, endHour, startHour } = schedules[i] |
| 84 | + if (!replaceStatus) return |
| 85 | + |
| 86 | + if (days[currentDay] === toCapitalizeWord(day)) { |
| 87 | + if (currentTime > startHour && currentTime < endHour) { |
| 88 | + replaceStatus.textContent = 'Studying' |
| 89 | + } |
| 90 | + break |
| 91 | + } |
| 92 | + replaceStatus.textContent = 'Idle' |
| 93 | + } |
| 94 | + }, 0) |
| 95 | +} |
| 96 | +``` |
| 97 | + |
| 98 | +And this is an example of markdown list: |
| 99 | + |
| 100 | +```md |
| 101 | +- line |
| 102 | +- line |
| 103 | +- line |
| 104 | + 1. stop it |
| 105 | + 2. what |
| 106 | + 3. don't worry |
| 107 | +``` |
| 108 | + |
| 109 | +- line |
| 110 | +- line |
| 111 | + - another list |
| 112 | + - what is this? |
| 113 | +- line |
| 114 | + 1. stop it |
| 115 | + 2. what |
| 116 | + 3. don't worry |
| 117 | + |
| 118 | + |
| 119 | +#### Code snippet 3 |
| 120 | + |
| 121 | +```js |
| 122 | +const Logger = (text, type = LoggerType.EMPTY) => { |
| 123 | + const typeFormatted = type === LoggerType.EMPTY ? `${type}` : `${type}:` |
| 124 | + if (isDevelopment) console.log(`${typeFormatted}`, text) |
| 125 | +} |
| 126 | +``` |
| 127 | + |
| 128 | +##### Last line header |
| 129 | + |
| 130 | +```css |
| 131 | +#body { |
| 132 | + color: red; |
| 133 | +} |
| 134 | +``` |
| 135 | + |
| 136 | +Another test with json <kbd>c + d</kbd> <kbd>control + d</kbd> or <kbd>meta + d</kbd>. |
| 137 | + |
| 138 | +```json |
| 139 | +{ |
| 140 | + "id": "s9RT21XS8399#!821838" |
| 141 | +} |
| 142 | +``` |
| 143 | + |
| 144 | +What about error? you can do a combo of <kbd>Shift + A</kbd>, with this as the sole purpose of testing any random stuff. |
| 145 | + |
| 146 | +### Secondary header |
| 147 | + |
| 148 | +[#code-snippet](#code-snippet-1) is type of reference that we needs<sup>[[1]](#code-snippet-5)</sup>. |
| 149 | + |
| 150 | +## Table? |
| 151 | + |
| 152 | +| Side | Face | Timeline | |
| 153 | +| --------------- | ---------------------------------------------- | --------------------- | |
| 154 | +| Side | Another one bites the dust | <sup>2025-02-01</sup> | |
| 155 | +| For The Emperor | Light up the sky with the flame of the emperor | | |
0 commit comments