From 5bcc503c56848f2fd104591d31c5898f29a755a5 Mon Sep 17 00:00:00 2001 From: sharevb Date: Wed, 3 Apr 2024 23:12:06 +0200 Subject: [PATCH 1/2] feat(new tool): Markdown Cheatsheet Markdown Cheatsheet Fix #424 and part of #538 --- src/tools/index.ts | 51 +++++- src/tools/markdown-cheatsheet/index.ts | 12 ++ .../markdown-cheatsheet.vue | 22 +++ .../markdown-cheatsheet/md-memo.content.md | 166 ++++++++++++++++++ 4 files changed, 243 insertions(+), 8 deletions(-) create mode 100644 src/tools/markdown-cheatsheet/index.ts create mode 100644 src/tools/markdown-cheatsheet/markdown-cheatsheet.vue create mode 100644 src/tools/markdown-cheatsheet/md-memo.content.md diff --git a/src/tools/index.ts b/src/tools/index.ts index aa861c93..54bb0990 100644 --- a/src/tools/index.ts +++ b/src/tools/index.ts @@ -1,11 +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 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'; @@ -85,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', @@ -128,16 +139,23 @@ export const toolsByCategory: ToolCategory[] = [ httpStatusCodes, jsonDiff, safelinkDecoder, + asciiTextDrawer, ], }, { name: 'Images and videos', - components: [qrCodeGenerator, wifiQrCodeGenerator, svgPlaceholderGenerator, cameraRecorder], + components: [ + qrCodeGenerator, + wifiQrCodeGenerator, + svgPlaceholderGenerator, + cameraRecorder, + ], }, { name: 'Development', components: [ gitMemo, + markdownCheatsheet, randomPortGenerator, crontabGenerator, jsonViewer, @@ -152,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', @@ -176,7 +208,10 @@ export const toolsByCategory: ToolCategory[] = [ }, { name: 'Data', - components: [phoneParserAndFormatter, ibanValidatorAndParser], + components: [ + phoneParserAndFormatter, + ibanValidatorAndParser, + ], }, ]; diff --git a/src/tools/markdown-cheatsheet/index.ts b/src/tools/markdown-cheatsheet/index.ts new file mode 100644 index 00000000..e08b3ee4 --- /dev/null +++ b/src/tools/markdown-cheatsheet/index.ts @@ -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'), +}); diff --git a/src/tools/markdown-cheatsheet/markdown-cheatsheet.vue b/src/tools/markdown-cheatsheet/markdown-cheatsheet.vue new file mode 100644 index 00000000..0889716b --- /dev/null +++ b/src/tools/markdown-cheatsheet/markdown-cheatsheet.vue @@ -0,0 +1,22 @@ + + + + + diff --git a/src/tools/markdown-cheatsheet/md-memo.content.md b/src/tools/markdown-cheatsheet/md-memo.content.md new file mode 100644 index 00000000..ed78a417 --- /dev/null +++ b/src/tools/markdown-cheatsheet/md-memo.content.md @@ -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 basic-syntax and extended-syntax. + +## Basic Syntax + +These are the elements outlined in John Gruber's original design document. All Markdown applications support these elements. + + + + + Element + Markdown Syntax + + + + + Heading + # H1
+ ## H2
+ ### H3
+ + + Bold + **bold text** + + + Italic + *italicized text* + + + Blockquote + > blockquote + + + Ordered List + + 1. First item
+ 2. Second item
+ 3. Third item
+
+ + + Unordered List + + + - First item
+ - Second item
+ - Third item
+
+ + + + Code + `code` + + + Horizontal Rule + --- + + + Link + [title](https://www.example.com) + + + Image + ![alt text](image.jpg) + + +
+ +## Extended Syntax + +These elements extend the basic syntax by adding additional features. Not all Markdown applications support these elements. + + + + + Element + Markdown Syntax + + + + + Table + + | Syntax | Description |
+ | ----------- | ----------- |
+ | Header | Title |
+ | Paragraph | Text | +
+ + + Fenced Code Block + ```
+ {
+   "firstName": "John",
+   "lastName": "Smith",
+   "age": 25
+ }
+ ``` +
+ + + Footnote + + Here's a sentence with a footnote. [^1]

+ [^1]: This is the footnote. +
+ + + Heading ID + ### My Great Heading {#custom-id} + + + Definition List + + term
+ : definition +
+ + + Strikethrough + ~~The world is flat.~~ + + + Task List + + - [x] Write the press release
+ - [ ] Update the website
+ - [ ] Contact the media +
+ + + Emoji
(see also Copying and Pasting Emoji) + + That is so funny! :joy: + + + + Highlight + + I need to highlight these ==very important words==. + + + + Subscript + + H~2~O + + + + Superscript + + X^2^ + + + +
\ No newline at end of file From 894f2596bc2d96d80c39556f3af63193ffb58d56 Mon Sep 17 00:00:00 2001 From: ShareVB Date: Sat, 6 Apr 2024 11:56:09 +0200 Subject: [PATCH 2/2] chore(github workflows): ci and e2e tests: try updating to node 20 --- .github/workflows/ci.yml | 2 +- .github/workflows/e2e-tests.yml | 2 +- playwright.config.ts | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d5c67208..4dd9ffb7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,7 +15,7 @@ jobs: - run: corepack enable - uses: actions/setup-node@v3 with: - node-version: 16 + node-version: 20 cache: 'pnpm' - name: Install dependencies diff --git a/.github/workflows/e2e-tests.yml b/.github/workflows/e2e-tests.yml index b5b04096..13b787ef 100644 --- a/.github/workflows/e2e-tests.yml +++ b/.github/workflows/e2e-tests.yml @@ -18,7 +18,7 @@ jobs: - uses: actions/setup-node@v3 with: - node-version: 16 + node-version: 20 cache: 'pnpm' - name: Get Playwright version diff --git a/playwright.config.ts b/playwright.config.ts index 3caa0612..5257c526 100644 --- a/playwright.config.ts +++ b/playwright.config.ts @@ -9,7 +9,7 @@ const useWebServer = process.env.NO_WEB_SERVER !== 'true'; */ export default defineConfig({ testDir: './src', - testMatch: /.*\.e2e\.(spec\.)?ts/, + testMatch: /\.e2e\.(spec\.)?ts$/, /* Run tests in files in parallel */ fullyParallel: true, /* Fail the build on CI if you accidentally left test.only in the source code. */ @@ -57,7 +57,7 @@ export default defineConfig({ && { webServer: { command: 'npm run preview', - url: 'http://127.0.0.1:5050', + url: 'http://localhost:5050', reuseExistingServer: !isCI, }, }