Skip to content

Commit f35383a

Browse files
harshad1gsantner
andauthored
Improvements to newfile dialog, open links, other fixes (PR #2277)
* Added logic to open any 'src' in a tag * Preserve dialog callback on rotation * Now with a seaparate format edit * Moving from separate callbacks to a single refresh call * Update favourites properly * Fix to stop views flashing incorrectly when navigating fast --------- Co-authored-by: Gregor Santner <gsantner@users.noreply.github.com>
1 parent 98c7f17 commit f35383a

35 files changed

Lines changed: 1256 additions & 525 deletions
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Title
2+
## Description
3+
4+
![Text](picture.png)
5+
6+
### Ingredients
7+
8+
| Ingredient | Amount |
9+
|:--------------|:-------|
10+
| 1 | 1 |
11+
| 2 | 2 |
12+
| 3 | 3 |
13+
| 4 | 4 |
14+
15+
16+
### Preparation
17+
18+
1. Text
19+
2. Text
20+
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
tags: []
3+
created: '{{date}}'
4+
title: '{{title}}'
5+
---
6+
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
= My Title
2+
:page-subtitle: This is a subtitle
3+
:page-last-updated: 2029-01-01
4+
:page-tags: ['AsciiDoc', 'Markor', 'open source']
5+
:toc: auto
6+
:toclevels: 2
7+
// :page-description: the optional description
8+
// This should match the structure on the jekyll server:
9+
:imagesdir: ../assets/img/blog
10+
11+
ifndef::env-site[]
12+
13+
// on the jekyll server, the :page-subtitle: is displayed below the title.
14+
// but it is not shown, when rendered in html5, and the site is rendered in html5, when working locally
15+
// so we show it additionally only, when we work locally
16+
// https://docs.asciidoctor.org/asciidoc/latest/document/subtitle/
17+
18+
[discrete]
19+
=== {page-subtitle}
20+
21+
endif::env-site[]
22+
23+
// local testing:
24+
:imagesdir: ../app/src/main/assets/img
25+
26+
image::flowerfield.jpg[]
27+
28+
image::schindelpattern.jpg[Schindelpattern,200]
29+
30+
before inline picture image:schindelpattern.jpg[Schindelpattern,50] and after inline picture
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
layout: post
3+
tags: []
4+
categories: []
5+
#date: 2019-06-25 13:14:15
6+
#excerpt: ''
7+
#image: 'BASEURL/assets/blog/img/.png'
8+
#description:
9+
#permalink:
10+
title: 'title'
11+
---
12+
13+
Lines changed: 237 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,237 @@
1+
# Markdown Reference
2+
Automatically generate _table of contents_ by checking the option here: `Settings > Format > Markdown`.
3+
4+
## H2 Header
5+
### H3 header
6+
#### H4 Header
7+
##### H5 Header
8+
###### H6 Header
9+
10+
<!-- --------------- -->
11+
12+
## Format Text
13+
14+
*Italic emphasis* , _Alternative italic emphasis_
15+
16+
**Bold emphasis** , __Alternative bold emphasis__
17+
18+
~~Strikethrough~~
19+
20+
Break line (two spaces at end of line)
21+
22+
> Block quote
23+
24+
`Inline code`
25+
26+
```
27+
Code blocks
28+
are
29+
awesome
30+
```
31+
32+
<!-- --------------- -->
33+
34+
## Lists
35+
### Ordered & unordered
36+
37+
* Unordered list
38+
* ...with asterisk/star
39+
* Test
40+
41+
- Another unordered list
42+
- ...with hyphen/minus
43+
- Test
44+
45+
1. Ordered list
46+
2. Test
47+
3. Test
48+
4. Test
49+
50+
- Nested lists
51+
* Unordered nested list
52+
* Test
53+
* Test
54+
* Test
55+
- Ordered nested list
56+
1. Test
57+
2. Test
58+
3. Test
59+
4. Test
60+
- Double-nested unordered list
61+
- Test
62+
- Unordered
63+
- Test a
64+
- Test b
65+
- Ordered
66+
1. Test 1
67+
2. Test 2
68+
69+
### Checklist
70+
* [ ] Salad
71+
* [x] Potatoes
72+
73+
1. [x] Clean
74+
2. [ ] Cook
75+
76+
<!-- --------------- -->
77+
78+
## Links
79+
[Link](https://duckduckgo.com/)
80+
81+
[File in same folder as the document.](markor-markdown-reference.md) Use %20 for spaces!
82+
83+
<!-- --------------- -->
84+
85+
## Tables
86+
87+
| Left aligned | Middle aligned | Right aligned |
88+
| :--------------- | :------------------: | -----------------: |
89+
| Test | Test | Test |
90+
| Test | Test | Test |
91+
92+
÷÷÷÷
93+
94+
Shorter | Table | Syntax
95+
:---: | ---: | :---
96+
Test | Test | Test
97+
Test | Test | Test
98+
99+
<!-- Comment: Not visibile in view. Can also span across multiple lines. End with:-->
100+
101+
<!-- ------------- -->
102+
103+
## Math (KaTeX)
104+
See [reference](https://katex.org/docs/supported.html) & [examples](https://github.com/waylonflinn/markdown-it-katex/blob/master/README.md). Enable by checking Math at `Settings > Markdown`.
105+
106+
### Math inline
107+
108+
$ I = \frac V R $
109+
110+
### Math block
111+
112+
$$\begin{array}{c}
113+
abla \times \vec{\mathbf{B}} -\, \frac1c\, \frac{\partial\vec{\mathbf{E}}}{\partial t} & = \frac{4\pi}{c}\vec{\mathbf{j}}
114+
abla \cdot \vec{\mathbf{E}} & = 4 \pi \rho \\
115+
abla \times \vec{\mathbf{E}}\, +\, \frac1c\, \frac{\partial\vec{\mathbf{B}}}{\partial t} & = \vec{\mathbf{0}} \\
116+
abla \cdot \vec{\mathbf{B}} & = 0 \end{array}$$
117+
118+
119+
$$\frac{k_t}{k_e} = \sqrt{2}$$
120+
121+
<!-- ------------- -->
122+
123+
## Format Text (continued)
124+
125+
### Text color
126+
127+
<span style='background-color:#ffcb2e;'>Text with background color / highlight</span>
128+
129+
<span style='color:#3333ff;'>Text foreground color</span>
130+
131+
<span style='text-shadow: 0px 0px 2px #FF0000;'>Text with colored outline</span> / <span style='text-shadow: 0px 0px 2px #0000FF; color: white'>Text with colored outline</span>
132+
133+
134+
### Text sub & superscript
135+
136+
<u>Underline</u>
137+
138+
The <sub>Subway</sub> sandwich was <sup>super</sup>
139+
140+
Super special characters: ⁰ ¹ ² ³ ⁴ ⁵ ⁶ ⁷ ⁸ ⁹ ⁺ ⁻ ⁼ ⁽ ⁾ ⁿ ™ ® ℠
141+
142+
### Text positioning
143+
<div markdown='1' align='right'>
144+
145+
text on the **right**
146+
147+
</div>
148+
149+
<div markdown='1' align='center'>
150+
151+
text in the **center**
152+
(one empy line above and below
153+
required for Markdown support OR markdown='1')
154+
155+
</div>
156+
157+
### Block Text
158+
159+
<div markdown='1' style='text-align: justify; text-justify: inter-word;'>
160+
lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum.
161+
</div>
162+
163+
### Dropdown
164+
165+
<details markdown='1'><summary>Click to Expand/Collapse</summary>
166+
167+
Expanded content. Shows up and keeps visible when clicking expand. Hide again by clicking the dropdown button again.
168+
169+
</details>
170+
171+
172+
### Break page
173+
To break the page (/start a new page), put the div below into a own line.
174+
Relevant for creating printable pages from the document (Print / PDF).
175+
176+
<div style='page-break-after: always'></div>
177+
178+
179+
<!-- ------------- -->
180+
181+
## Multimedia
182+
183+
### Images
184+
![Image](file:///android_asset/img/schindelpattern.jpg)
185+
186+
### Videos
187+
**Youtube** [Welcome to Upper Austria](https://www.youtube.com/watch?v=RJREFH7Lmm8)
188+
<iframe width='360' height='200' src='https://www.youtube.com/embed/RJREFH7Lmm8'> </iframe>
189+
190+
**Peertube** [Road in the wood](https://open.tube/videos/watch/8116312a-dbbd-43a3-9260-9ea6367c72fc)
191+
<div><video controls><source src='https://peertube.mastodon.host/download/videos/8116312a-dbbd-43a3-9260-9ea6367c72fc-480.mp4' </source></video></div>
192+
193+
<!-- **Local video** <div><video controls><source src='voice-parrot.mp4' </source></video></div> -->
194+
195+
### Audio & Music
196+
**Web audio** [Guifrog - Xia Yu](https://www.freemusicarchive.org/music/Guifrog/Xia_Yu)
197+
<audio controls src='https://files.freemusicarchive.org/storage-freemusicarchive-org/music/ccCommunity/Guifrog/Xia_Yu/Guifrog_-_Xia_Yu.mp3'></audio>
198+
199+
**Local audio** Yellowcard - Lights up in the sky
200+
<audio controls src='../Music/mp3/Yellowcard/[2007]%20Paper%20Walls/Yellowcard%20-%2005%20-%20Light%20Up%20the%20Sky.mp3'></audio>
201+
202+
## Charts / Graphs / Diagrams (mermaidjs)
203+
Pie, flow, sequence, class, state, ER
204+
See also: mermaidjs [live editor](https://mermaid-js.github.io/mermaid-live-editor/).
205+
206+
```mermaid
207+
graph LR
208+
A[Square Rect] -- Link text --> B((Circle))
209+
A --> C(Round Rect)
210+
B --> D{Rhombus}
211+
C --> D
212+
```
213+
214+
215+
216+
## Admonition Extension
217+
Create block-styled side content.
218+
Use one of these qualifiers to select the icon and the block color: abstract, summary, tldr, bug, danger, error, example, snippet, failure, fail, missing, question, help, faq, info, todo, note, seealso, quote, cite, success, check, done, tip, hint, important, warning, caution, attention.
219+
220+
!!! warning 'Optional Title'
221+
Block-Styled Side Content with **Markdown support**
222+
223+
!!! info ''
224+
No-Heading Content
225+
226+
??? bug 'Collapsed by default'
227+
Collapsible Block-Styled Side Content
228+
229+
???+ example 'Open by default'
230+
Collapsible Block-Styled Side Content
231+
232+
------------------
233+
234+
This Markdown reference file was created for the [Markor](https://github.com/gsantner/markor) project by [Gregor Santner](https://github.com/gsanter) and is licensed [Creative Commons Zero 1.0](https://creativecommons.org/publicdomain/zero/1.0/legalcode) (public domain). File revision 3.
235+
236+
------------------
237+
Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
OrgMode Reference
2+
* Headline
3+
** Nested headline
4+
*** Deeper
5+
6+
* Basic markup
7+
This is the general building block for org-mode navigation.
8+
- _underscores let you underline things_
9+
- *stars add emphasis*
10+
- /slashes are italics/
11+
- +pluses are strikethrough+
12+
- =equal signs are verbatim text=
13+
- ~tildes can also be used~
14+
15+
* List
16+
** Unordered List
17+
- Item 1
18+
- Item 2
19+
- Subitem 2.1
20+
- Subitem 2.2
21+
** Ordered List
22+
1. First Item
23+
2. Second Item
24+
1. Subitem 2.1
25+
2. Subitem 2.2
26+
- [X] Completed Task
27+
- [ ] Uncompleted Task
28+
** Nested List
29+
- Item A
30+
- Subitem A.1
31+
- Subitem A.2
32+
- Item B
33+
34+
* Tables
35+
36+
| First Name | Last Name | Years using Emacs |
37+
|----------------------------+---------------------+-------------------|
38+
| Lee | Hinman | 5 |
39+
| Mike | Hunsinger | 2 |
40+
| Daniel | Glauser | 4 |
41+
| Really-long-first-name-guy | long-last-name-pers | 1 |
42+
43+
* Org-mode links
44+
45+
#+BEGIN_SRC fundamental
46+
[[http://google.com/][Google]]
47+
#+END_SRC
48+
49+
[[./images/pic1.png]]
50+
51+
52+
* TODO List
53+
** TODO This is a task that needs doing
54+
** TODO Another todo task
55+
- [ ] sub task one
56+
- [X] sub task two
57+
- [ ] sub task three
58+
** DONE I've already finished this one
59+
*** CANCELLED learn todos
60+
CLOSED: [2023-10-16 Mon 08:39]
61+
62+
* Code
63+
#+BEGIN_LaTeX
64+
$a + b$
65+
#+END_LaTeX
66+
67+
#+BEGIN_SRC emacs-lisp
68+
(defun my/function ()
69+
"docstring"
70+
(interactive)
71+
(progn
72+
(+ 1 1)
73+
(message "Hi")))
74+
#+END_SRC
75+

0 commit comments

Comments
 (0)