From 9c14f7e20ffdd6350cc61bbb80fc4599a83a4f2d Mon Sep 17 00:00:00 2001
From: Anton Kozachuk <54616703+AntonKozachuk@users.noreply.github.com>
Date: Tue, 26 Jan 2021 19:27:35 +0200
Subject: [PATCH 1/3] Add markdown examples
---
developer-portal/markdown-examples.md | 306 ++++++++++++++++++++++++++
1 file changed, 306 insertions(+)
create mode 100644 developer-portal/markdown-examples.md
diff --git a/developer-portal/markdown-examples.md b/developer-portal/markdown-examples.md
new file mode 100644
index 00000000..9b690ef6
--- /dev/null
+++ b/developer-portal/markdown-examples.md
@@ -0,0 +1,306 @@
+---
+title: Basics
+---
+
+# Basics
+
+## Heading level 2
+
+### Heading level 3
+
+#### Heading level 4
+
+##### Heading level 5
+
+###### Heading level 6
+
+### Basic formatting
+
+Paragraphs can be written like so. A paragraph is the basic block of Markdown. A paragraph is what text will turn into when there is no reason it should become anything else.
+
+Paragraphs must be separated by a blank line. Basic formatting of _italics_ and **bold** is supported. This _can be **nested** like_ so.
+
+### Quote
+
+> Here is a quote. What this is should be self explanatory. Quotes are automatically indented when they are used.
+
+Blockquotes can contain multiple paragraphs. Add a > on the blank lines between the paragraphs.
+
+> Dorothy followed her through many of the beautiful rooms in her castle.
+>
+> The Witch bade her clean the pots and kettles and sweep the floor and keep the fire fed with wood.
+
+### URLs
+
+URLs can be made in a handful of ways:
+
+- A named link to [MarkItDown][3]. The easiest way to do these is to select what you want to make a link and hit `Ctrl+L`.
+- Another named link to [MarkItDown](http://www.markitdown.net/)
+- Sometimes you just want a URL or email address like
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit. +
++ Lorem ipsum dolor sit amet, consectetur adipiscing elit. +
++1. Code snippets in a list. +1. ```javascript + javascript; + ``` + + ```python + python + ``` + + ```cpp + c++ + ``` ++ +#### Free-form code samples + +And here's some code! 👍 + +```javascript +var now = new Date(); + +var days = new Array('Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'); + +var months = new Array( + 'January', + 'February', + 'March', + 'April', + 'May', + 'June', + 'July', + 'August', + 'September', + 'October', + 'November', + 'December', +); + +var date = (now.getDate() < 10 ? '0' : '') + now.getDate(); + +function fourdigits(number) { + return number < 1000 ? number + 1900 : number; +} +today = + days[now.getDay()] + + ', ' + + months[now.getMonth()] + + ' ' + + date + + ', ' + + fourdigits(now.getYear()); + +document.write(today); +``` + +```php +function getDistanceBetweenPointsNew($latitude1, $longitude1, $latitude2, $longitude2) { + $theta = $longitude1 - $longitude2; + $miles = (sin(deg2rad($latitude1)) * sin(deg2rad($latitude2))) + (cos(deg2rad($latitude1)) * cos(deg2rad($latitude2)) * cos(deg2rad($theta))); + $miles = acos($miles); + $miles = rad2deg($miles); + $miles = $miles * 60 * 1.1515; + $feet = $miles * 5280; + $yards = $feet / 3; + $kilometers = $miles * 1.609344; + $meters = $kilometers * 1000; + return compact('miles','feet','yards','kilometers','meters'); +} +``` + +```python +from datetime import datetime + +now = datetime.now() + +mm = str(now.month) + +dd = str(now.day) + +yyyy = str(now.year) + +hour = str(now.hour) + +mi = str(now.minute) + +ss = str(now.second) + +print mm + "/" + dd + "/" + yyyy + " " + hour + ":" + mi + ":" + ss +``` + +```yaml +version: '3' +services: +web: + # replace username/repo:tag with your name and image details + image: username/repo:tag + deploy: + replicas: 5 + restart_policy: + condition: on-failure + resources: + limits: + cpus: '0.1' + memory: 50M + ports: + - '80:80' + networks: + - webnet +visualizer: + image: dockersamples/visualizer:stable + ports: + - '8080:8080' + volumes: + - '/var/run/docker.sock:/var/run/docker.sock' + deploy: + placement: + constraints: [node.role == manager] + networks: + - webnet +networks: webnet: +``` + +```json +{ + "firstName": "John", + "lastName": "Smith", + "age": 25 +} +``` + +```shell +eval $(docker-machine env myvm1) +``` + \ No newline at end of file From 8c7c0c0ca027e7a6d769c8997b98e5ae5fa5d1e6 Mon Sep 17 00:00:00 2001 From: Anton Kozachuk <54616703+AntonKozachuk@users.noreply.github.com> Date: Tue, 26 Jan 2021 19:29:20 +0200 Subject: [PATCH 2/3] Add file to sidebars --- sidebars.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sidebars.yaml b/sidebars.yaml index 384ad8e0..40df425a 100644 --- a/sidebars.yaml +++ b/sidebars.yaml @@ -7,6 +7,8 @@ training: page: developer-portal/setup.md - label: Markdown page: developer-portal/markdown.md + - label: Markdown Examples + page: developer-portal/markdown-examples.md - label: Folder structure page: developer-portal/awesome/folders.md - label: Mermaid diagrams From 4765111e702f1352f0c3b840e7cb363cc8a83f88 Mon Sep 17 00:00:00 2001 From: Anton Kozachuk <54616703+AntonKozachuk@users.noreply.github.com> Date: Tue, 26 Jan 2021 19:31:02 +0200 Subject: [PATCH 3/3] Fix a mistake --- developer-portal/markdown-examples.md | 1 - 1 file changed, 1 deletion(-) diff --git a/developer-portal/markdown-examples.md b/developer-portal/markdown-examples.md index 9b690ef6..ed676a97 100644 --- a/developer-portal/markdown-examples.md +++ b/developer-portal/markdown-examples.md @@ -34,7 +34,6 @@ Blockquotes can contain multiple paragraphs. Add a > on the blank lines between URLs can be made in a handful of ways: -- A named link to [MarkItDown][3]. The easiest way to do these is to select what you want to make a link and hit `Ctrl+L`. - Another named link to [MarkItDown](http://www.markitdown.net/) - Sometimes you just want a URL or email address like