Compare commits

..
Author SHA1 Message Date
ShareVB 894f2596bc chore(github workflows): ci and e2e tests: try updating to node 20 2024-04-07 23:42:22 +02:00
sharevb 5bcc503c56 feat(new tool): Markdown Cheatsheet
Markdown Cheatsheet
Fix #424 and part of #538
2024-04-07 23:40:53 +02:00
8 changed files with 249 additions and 114 deletions

No files matched your search

-1
View File
@@ -80,7 +80,6 @@
"pinia": "^2.0.34",
"plausible-tracker": "^0.3.8",
"qrcode": "^1.5.1",
"slashes": "^3.0.12",
"sql-formatter": "^13.0.0",
"ua-parser-js": "^1.0.35",
"ulid": "^2.3.0",
+6 -13
View File
@@ -140,9 +140,6 @@ dependencies:
qrcode:
specifier: ^1.5.1
version: 1.5.1
slashes:
specifier: ^3.0.12
version: 3.0.12
sql-formatter:
specifier: ^13.0.0
version: 13.0.0
@@ -3354,7 +3351,7 @@ packages:
dependencies:
'@unhead/dom': 0.5.1
'@unhead/schema': 0.5.1
'@vueuse/shared': 10.9.0(vue@3.3.4)
'@vueuse/shared': 10.7.2(vue@3.3.4)
unhead: 0.5.1
vue: 3.3.4
transitivePeerDependencies:
@@ -3996,10 +3993,10 @@ packages:
- vue
dev: false
/@vueuse/shared@10.9.0(vue@3.3.4):
resolution: {integrity: sha512-Uud2IWncmAfJvRaFYzv5OHDli+FbOzxiVEQdLCKQKLyhz94PIyFC3CHcH7EDMwIn8NPtD06+PNbC/PiO0LGLtw==}
/@vueuse/shared@10.7.2(vue@3.3.4):
resolution: {integrity: sha512-qFbXoxS44pi2FkgFjPvF4h7c9oMDutpyBdcJdMYIMg9XyXli2meFMuaKn+UMgsClo//Th6+beeCgqweT/79BVA==}
dependencies:
vue-demi: 0.14.7(vue@3.3.4)
vue-demi: 0.14.6(vue@3.3.4)
transitivePeerDependencies:
- '@vue/composition-api'
- vue
@@ -8111,10 +8108,6 @@ packages:
engines: {node: '>=12'}
dev: true
/slashes@3.0.12:
resolution: {integrity: sha512-Q9VME8WyGkc7pJf6QEkj3wE+2CnvZMI+XJhwdTPR8Z/kWQRXi7boAWLDibRPyHRTUTPx5FaU7MsyrjI3yLB4HA==}
dev: false
/snake-case@2.1.0:
resolution: {integrity: sha512-FMR5YoPFwOLuh4rRz92dywJjyKYZNLpMn1R5ujVpIYkbA9p01fq8RMg0FkO4M+Yobt4MjHeLTJVm5xFFBHSV2Q==}
dependencies:
@@ -9158,8 +9151,8 @@ packages:
vue: 3.3.4
dev: false
/vue-demi@0.14.7(vue@3.3.4):
resolution: {integrity: sha512-EOG8KXDQNwkJILkx/gPcoL/7vH+hORoBaKgGe+6W7VFMvCYJfmF2dGbvgDroVnI8LU7/kTu8mbjRZGBU1z9NTA==}
/vue-demi@0.14.6(vue@3.3.4):
resolution: {integrity: sha512-8QA7wrYSHKaYgUxDA5ZC24w+eHm3sYCbp0EzcDwKqN3p6HqtTCGR/GVsPyZW92unff4UlcSh++lmqDWN3ZIq4w==}
engines: {node: '>=12'}
hasBin: true
requiresBuild: true
+43 -10
View File
@@ -1,12 +1,10 @@
import { tool as base64FileConverter } from './base64-file-converter';
import { tool as base64StringConverter } from './base64-string-converter';
import { tool as basicAuthGenerator } from './basic-auth-generator';
import { tool as asciiTextDrawer } from './ascii-text-drawer';
import { tool as textToUnicode } from './text-to-unicode';
import { tool as safelinkDecoder } from './safelink-decoder';
import { tool as jsonEscaper } from './json-escaper';
import { tool as markdownCheatsheet } from './markdown-cheatsheet';
import { tool as pdfSignatureChecker } from './pdf-signature-checker';
import { tool as numeronymGenerator } from './numeronym-generator';
import { tool as macAddressGenerator } from './mac-address-generator';
@@ -86,7 +84,19 @@ import { tool as yamlViewer } from './yaml-viewer';
export const toolsByCategory: ToolCategory[] = [
{
name: 'Crypto',
components: [tokenGenerator, hashText, bcrypt, uuidGenerator, ulidGenerator, cypher, bip39, hmacGenerator, rsaKeyPairGenerator, passwordStrengthAnalyser, pdfSignatureChecker],
components: [
tokenGenerator,
hashText,
bcrypt,
uuidGenerator,
ulidGenerator,
cypher,
bip39,
hmacGenerator,
rsaKeyPairGenerator,
passwordStrengthAnalyser,
pdfSignatureChecker,
],
},
{
name: 'Converter',
@@ -129,17 +139,23 @@ export const toolsByCategory: ToolCategory[] = [
httpStatusCodes,
jsonDiff,
safelinkDecoder,
jsonEscaper,
asciiTextDrawer,
],
},
{
name: 'Images and videos',
components: [qrCodeGenerator, wifiQrCodeGenerator, svgPlaceholderGenerator, cameraRecorder],
components: [
qrCodeGenerator,
wifiQrCodeGenerator,
svgPlaceholderGenerator,
cameraRecorder,
],
},
{
name: 'Development',
components: [
gitMemo,
markdownCheatsheet,
randomPortGenerator,
crontabGenerator,
jsonViewer,
@@ -154,15 +170,29 @@ export const toolsByCategory: ToolCategory[] = [
},
{
name: 'Network',
components: [ipv4SubnetCalculator, ipv4AddressConverter, ipv4RangeExpander, macAddressLookup, macAddressGenerator, ipv6UlaGenerator],
components: [
ipv4SubnetCalculator,
ipv4AddressConverter,
ipv4RangeExpander,
macAddressLookup,
macAddressGenerator,
ipv6UlaGenerator,
],
},
{
name: 'Math',
components: [mathEvaluator, etaCalculator, percentageCalculator],
components: [
mathEvaluator,
etaCalculator,
percentageCalculator],
},
{
name: 'Measurement',
components: [chronometer, temperatureConverter, benchmarkBuilder],
components: [
chronometer,
temperatureConverter,
benchmarkBuilder,
],
},
{
name: 'Text',
@@ -178,7 +208,10 @@ export const toolsByCategory: ToolCategory[] = [
},
{
name: 'Data',
components: [phoneParserAndFormatter, ibanValidatorAndParser],
components: [
phoneParserAndFormatter,
ibanValidatorAndParser,
],
},
];
-12
View File
@@ -1,12 +0,0 @@
import { Braces } from '@vicons/tabler';
import { defineTool } from '../tool';
export const tool = defineTool({
name: 'Json Escaper/Unescaper',
path: '/json-escaper',
description: 'Escape and unescape JSON string',
keywords: ['json', 'string', 'escape', 'unescape'],
component: () => import('./json-escaper.vue'),
icon: Braces,
createdAt: new Date('2024-03-09'),
});
-78
View File
@@ -1,78 +0,0 @@
<script setup lang="ts">
import { addSlashes, removeSlashes } from 'slashes';
import TextareaCopyable from '@/components/TextareaCopyable.vue';
const unescapedInput = ref('');
const escapedOutput = computed(
() => {
try {
return addSlashes(unescapedInput.value);
}
catch (e: any) {
return e.toString();
}
},
);
const escapedInput = ref('');
const unescapedOutput = computed(
() => {
try {
return removeSlashes(escapedInput.value);
}
catch (e: any) {
return e.toString();
}
},
);
</script>
<template>
<div max-w-600>
<c-card title="Escape JSON string">
<c-input-text
v-model:value="unescapedInput"
placeholder="Put your string to escape..."
label="String to escape"
raw-text
multiline
rows="5"
mb-5
/>
<n-divider />
<TextareaCopyable
label="Escaped string"
:value="escapedOutput"
multiline
readonly
rows="5"
mb-5
/>
</c-card>
<c-card title="Unescape JSON string" mt-5>
<c-input-text
v-model:value="escapedInput"
placeholder="Put your string to unescape..."
label="String to unescape"
raw-text
multiline
rows="5"
mb-5
/>
<n-divider />
<TextareaCopyable
label="Unescaped string"
:value="unescapedOutput"
multiline
readonly
rows="5"
mb-5
/>
</c-card>
</div>
</template>
+12
View File
@@ -0,0 +1,12 @@
import { Markdown } from '@vicons/tabler';
import { defineTool } from '../tool';
export const tool = defineTool({
name: 'Markdown Cheat Sheet',
path: '/markdown-cheatsheet',
description: 'Markdown Cheat Sheet',
keywords: ['markdown', 'cheatsheet', 'memo'],
component: () => import('./markdown-cheatsheet.vue'),
icon: Markdown,
createdAt: new Date('2024-03-09'),
});
@@ -0,0 +1,22 @@
<script setup lang="ts">
import { useThemeVars } from 'naive-ui';
import Memo from './md-memo.content.md';
const themeVars = useThemeVars();
</script>
<template>
<div>
<Memo />
</div>
</template>
<style lang="less" scoped>
::v-deep(pre) {
margin: 0;
padding: 15px 22px;
background-color: v-bind('themeVars.cardColor');
border-radius: 4px;
overflow: auto;
}
</style>
@@ -0,0 +1,166 @@
---
layout: default
title: Markdown Cheat Sheet
description: A quick reference to the Markdown syntax.
last_modified_at: 2021-12-05
---
## Overview
This Markdown cheat sheet provides a quick overview of all the Markdown syntax elements. It can't cover every edge case, so if you need more information about any of these elements, refer to the reference guides for <n-a target="_blank" href="https://www.markdownguide.org/basic-syntax/">basic-syntax</n-a> and <n-a target="_blank" href="https://www.markdownguide.org/extended-syntax/">extended-syntax</n-a>.
## Basic Syntax
These are the elements outlined in John Gruber's original design document. All Markdown applications support these elements.
<n-table :single-line="false">
<thead>
<tr>
<th>Element</th>
<th>Markdown Syntax</th>
</tr>
</thead>
<tbody>
<tr>
<td><n-a target="_blank" href="https://www.markdownguide.org/basic-syntax/#headings">Heading</n-a></td>
<td><code># H1<br>
## H2<br>
### H3</code></td>
</tr>
<tr>
<td><n-a target="_blank" href="https://www.markdownguide.org/basic-syntax/#bold">Bold</n-a></td>
<td><code>**bold text**</code></td>
</tr>
<tr>
<td><n-a target="_blank" href="https://www.markdownguide.org/basic-syntax/#italic">Italic</n-a></td>
<td><code>*italicized text*</code></td>
</tr>
<tr>
<td><n-a target="_blank" href="https://www.markdownguide.org/basic-syntax/#blockquotes-1">Blockquote</n-a></td>
<td><code>> blockquote</code></td>
</tr>
<tr>
<td><n-a target="_blank" href="https://www.markdownguide.org/basic-syntax/#ordered-lists">Ordered List</n-a></td>
<td><code>
1. First item<br>
2. Second item<br>
3. Third item<br>
</code></td>
</tr>
<tr>
<td><n-a target="_blank" href="https://www.markdownguide.org/basic-syntax/#unordered-lists">Unordered List</n-a></td>
<td>
<code>
- First item<br>
- Second item<br>
- Third item<br>
</code>
</td>
</tr>
<tr>
<td><n-a target="_blank" href="https://www.markdownguide.org/basic-syntax/#code">Code</n-a></td>
<td><code>`code`</code></td>
</tr>
<tr>
<td><n-a target="_blank" href="https://www.markdownguide.org/basic-syntax/#horizontal-rules">Horizontal Rule</n-a></td>
<td><code>---</code></td>
</tr>
<tr>
<td><n-a target="_blank" href="https://www.markdownguide.org/basic-syntax/#links">Link</n-a></td>
<td><code>[title](https://www.example.com)</code></td>
</tr>
<tr>
<td><n-a target="_blank" href="https://www.markdownguide.org/basic-syntax/#images-1">Image</n-a></td>
<td><code>![alt text](image.jpg)</code></td>
</tr>
</tbody>
</n-table>
## Extended Syntax
These elements extend the basic syntax by adding additional features. Not all Markdown applications support these elements.
<n-table :single-line="false">
<thead>
<tr>
<th>Element</th>
<th>Markdown Syntax</th>
</tr>
</thead>
<tbody>
<tr>
<td><n-a target="_blank" href="https://www.markdownguide.org/extended-syntax/#tables">Table</n-a></td>
<td><code>
| Syntax | Description |<br>
| ----------- | ----------- |<br>
| Header | Title |<br>
| Paragraph | Text |
</code></td>
</tr>
<tr>
<td><n-a target="_blank" href="https://www.markdownguide.org/extended-syntax/#fenced-code-blocks">Fenced Code Block</n-a></td>
<td><code>```<br>
{<br>
&nbsp;&nbsp;"firstName": "John",<br>
&nbsp;&nbsp;"lastName": "Smith",<br>
&nbsp;&nbsp;"age": 25<br>
}<br>
```
</code></td>
</tr>
<tr>
<td><n-a target="_blank" href="https://www.markdownguide.org/extended-syntax/#footnotes">Footnote</n-a></td>
<td><code>
Here's a sentence with a footnote. [^1]<br><br>
[^1]: This is the footnote.
</code></td>
</tr>
<tr>
<td><n-a target="_blank" href="https://www.markdownguide.org/extended-syntax/#heading-ids">Heading ID</n-a></td>
<td><code>### My Great Heading {#custom-id}</code></td>
</tr>
<tr>
<td><n-a target="_blank" href="https://www.markdownguide.org/extended-syntax/#definition-lists">Definition List</n-a></td>
<td><code>
term<br>
: definition
</code></td>
</tr>
<tr>
<td><n-a target="_blank" href="https://www.markdownguide.org/extended-syntax/#strikethrough">Strikethrough</n-a></td>
<td><code>~~The world is flat.~~</code></td>
</tr>
<tr>
<td><n-a target="_blank" href="https://www.markdownguide.org/extended-syntax/#task-lists">Task List</n-a></td>
<td><code>
- [x] Write the press release<br>
- [ ] Update the website<br>
- [ ] Contact the media
</code></td>
</tr>
<tr>
<td><n-a target="_blank" href="https://www.markdownguide.org/extended-syntax/#emoji">Emoji</n-a><br>(see also <n-a target="_blank" href="https://www.markdownguide.org/extended-syntax/#copying-and-pasting-emoji">Copying and Pasting Emoji</n-a>)</td>
<td><code>
That is so funny! :joy:
</code></td>
</tr>
<tr>
<td><n-a target="_blank" href="https://www.markdownguide.org/extended-syntax/#highlight">Highlight</n-a></td>
<td><code>
I need to highlight these ==very important words==.
</code></td>
</tr>
<tr>
<td><n-a target="_blank" href="https://www.markdownguide.org/extended-syntax/#subscript">Subscript</n-a></td>
<td><code>
H~2~O
</code></td>
</tr>
<tr>
<td><n-a target="_blank" href="https://www.markdownguide.org/extended-syntax/#superscript">Superscript</n-a></td>
<td><code>
X^2^
</code></td>
</tr>
</tbody>
</n-table>