Some changes:
- [X] Fix a few English typos in examples, - [X] Shorter list of examples for index.html, - Add a 'keepicon=y' option to ask strapdown.js to not replace the favicon while being loaded, - For the http://lbesson.bitbucket.org/md/example9.html page, add a favicon.ico file (in ..)
This commit is contained in:
BIN
example0.pdf
BIN
example0.pdf
Binary file not shown.
@@ -8,7 +8,7 @@ And, yes, it is **as simple** as **one** HTML line at the beginning and **one**
|
||||
|
||||
# This second example supports UTF-8 input
|
||||
Yes, that's cool.
|
||||
Did you know that [Næreen](http://gravatar.com/naereen) is originally an iranian name ?
|
||||
Did you know that [Næreen](http://gravatar.com/naereen) is originally an Iranian name ?
|
||||
|
||||
---
|
||||
|
||||
|
BIN
example1.pdf
BIN
example1.pdf
Binary file not shown.
BIN
example2.pdf
BIN
example2.pdf
Binary file not shown.
@@ -14,7 +14,7 @@ $x\_{1,2} = \frac{-b\pm\sqrt{\Delta}}{2a}$, or display equations as this one :
|
||||
</p>
|
||||
|
||||
## From a classic math book
|
||||
But a less classic exercise about [holderian functions](https://en.wikipedia.org/wiki/H%C3%B6lder_condition)
|
||||
But a less classic exercise about [Hölder functions](https://en.wikipedia.org/wiki/H%C3%B6lder_condition)
|
||||
(more precisely, *Exercice 7*, Chapter 4.5, page 267, of the [Gourdon, "*Les maths en tête : Analyse*", $2^\text{nd}$ edition](http://www.amazon.fr/gp/product/2729837590) book).
|
||||
|
||||
<p style="font-size:x-large;">
|
||||
@@ -41,7 +41,7 @@ from the bottom of a *StrapDown*-flavored page, for instance from the default *C
|
||||
You can consult [a second example](example4.html) to see some more advanced examples of LaTeX equations rendered with MathJax.
|
||||
|
||||
### A better solution?
|
||||
From version 0.5, you can import MathJax in an even *quicker* way: you just have to add ``&mathjax=yes`` to the URL used to import [strapdown.min.js](index.html).
|
||||
From version 0.5, you can import MathJax in an even *quicker* way: you just have to add ``&mathjax=yes`` to the URL used to import [``strapdown.min.js``](index.html).
|
||||
See [the first paragraph of this third example](example5.html) to see this.
|
||||
|
||||
***
|
||||
@@ -71,12 +71,12 @@ Feel free to refresh your mind about which symbols are used as elements of the M
|
||||
with [this page](http://daringfireball.net/projects/markdown/syntax#list),
|
||||
or [this one on Wikipedia](https://en.wikipedia.org/wiki/Markdown).
|
||||
|
||||
## Escape the antislash ('``\``')
|
||||
The antislash symbol, already escaped by an antislash ('``\``')
|
||||
## Escape the backslash ('``\``')
|
||||
The backslash symbol, already escaped by an backslash ('``\``')
|
||||
is used in LaTeX to force a new line. It is usually used in aligned equations,
|
||||
as shown in the Lorenz Equations [here](example4.html).
|
||||
|
||||
You should also escape the antislash, by typing ``\\`` where you would have
|
||||
You should also escape the backslash, by typing ``\\`` where you would have
|
||||
used a simple ``\`` in LaTeX.
|
||||
|
||||
***
|
||||
|
BIN
example3.pdf
BIN
example3.pdf
Binary file not shown.
@@ -5,7 +5,7 @@
|
||||
<li class="next"><a href="example5.html">Next example →</a></li>
|
||||
</ul>
|
||||
|
||||
# A second example with [MathJax](http://www.mathjax.org/) activacted (and the *paper* theme)
|
||||
# A second example with [MathJax](http://www.mathjax.org/) activated (and the *paper* theme)
|
||||
> To know how to include MathJax in a *StrapDown*-flavored HTML page, you can read this [example 3](example3.html).
|
||||
To discover an even nicer way to import MathJax, read [the last example](example5.html).
|
||||
|
||||
@@ -88,7 +88,7 @@ $$ \left\\\{\begin{aligned}
|
||||
$$
|
||||
```
|
||||
|
||||
As you can see, math environment (like ``aligned``) are supported by MathJax, even with the default configuration and no external plugins.
|
||||
As you can see, math environment (like ``aligned``) are supported by MathJax, even with the default configuration and no external plugin.
|
||||
|
||||
****
|
||||
|
||||
|
BIN
example4.pdf
BIN
example4.pdf
Binary file not shown.
@@ -5,17 +5,19 @@
|
||||
<li class="next"><a href="example6.html">Next example →</a></li>
|
||||
</ul>
|
||||
|
||||
# A third example with [MathJax](http://www.mathjax.org/) activacted
|
||||
# A third example with [MathJax](http://www.mathjax.org/) activated
|
||||
> This *StrapDown*-flavored HTML page comes with MathJax enabled, simply because **we asked the script to do so**.
|
||||
|
||||
The last line of this page source (you can read it with "Ctrl+u" in Firefox) imports the script ``strapdown.min.js`` with this URL : ``"strapdown.min.js?src=example5&mathjax=y&theme=united&beacon=y"``.
|
||||
|
||||
This way, some options are avaible:
|
||||
This way, some options are available:
|
||||
|
||||
1. ``mathjax=y`` if you want to load MathJax, with ``$`` being the default separator for inline maths and ``$$`` for display,
|
||||
2. ``theme=united`` or ``theme=united`` if you want to load a specific theme (without having to specify it as the theme attribute of the main ``xmp``),
|
||||
1. ``mathjax=y`` if you want to load MathJax, with ``$ ... $`` being the default syntax for inline maths and ``$$ ... $$`` for display,
|
||||
2. ``theme=united`` or ``theme=cyborg`` if you want to load a specific theme (without having to specify it as the ``theme`` attribute of the main ``xmp`` tag containing your Markdown code),
|
||||
3. ``beacon=y`` if you want to include an invisible [GA Beacon](http://perso.crans.org/besson/beacon.en.html) image in your page,
|
||||
4. ``nonavbarfixed=y`` if you prefer the [top navigation bar](https://bootswatch.com/united/#navbar) to not be fixed, but scroll as the rest of the page (*new!*).
|
||||
4. ``pedantic=y`` if you want to force the use of the ["pedantic" option](https://github.com/chjj/marked#pedantic) for [marked](https://github.com/chjj/marked), the Markdown parser used by StrapDown.js (note: you probably don't want that, [pedantic=false is usually better](https://github.com/chuckhoupt/strapdown/commit/1a090729fb717059be0689aa65025de6de67b3cd)). Default is pedantic=false.
|
||||
5. ``nonavbarfixed=y`` if you prefer the [top navigation bar](https://bootswatch.com/united/#navbar) to not be fixed, but scroll as the rest of the page (*new!*). See [example8](example8.html),
|
||||
6. ``keepicon=y`` if you prefer StrapDown.js to keep the favicon included in your HTML document (*new!*). See [example9](example9.html).
|
||||
|
||||
***
|
||||
|
||||
|
BIN
example5.pdf
BIN
example5.pdf
Binary file not shown.
@@ -109,11 +109,12 @@ Here is a last example, displaying some *super heroes* ^^:
|
||||
|
||||
---
|
||||
|
||||
## A personnal example
|
||||
## [A personal example](../cv/)
|
||||
And if you may, I will conclude these examples with a more personal one:
|
||||
|
||||
| *Scholar* Year | My age <br>(when started/when finishing) | Scholar level | City, *Country* |
|
||||
| :----------- | :----: | :-----------: | --: |
|
||||
| 2015 ~ 2016 | 22 → 23 | [Another 2nd Year M.Sc. (Maths and CS)](http://www.cmla.ens-cachan.fr/version-anglaise/academics/mva-master-degree-227777.kjsp) | Cachan (Paris), *France* |
|
||||
| 2014 ~ 2015 | 21 → 22 | [Assistant professor](http://web.archive.org/web/20141103063707/http://www.mahindraecolecentrale.edu.in/faculties.html), Maths and CS | Hyderabad, *India* |
|
||||
| 2013 ~ 2014 | 20 → 21 | 2nd Year M.Sc. (Maths, CS)<br> and <a href="http://web.archive.org/web/20140709144720/agreg.org/ResultatsMerite2014.html" title="Over ~1300 candidates!">ranked 23rd</a> at the <a title="French national competitive exam for prep' schools teachers" href="https://en.wikipedia.org/wiki/Agr%C3%A9gation">French Agrégation</a> | Cachan (Paris), *France* |
|
||||
| 2012 ~ 2013 | 19 → 20 | 1st Year M.Sc. (Maths, CS) | Cachan (Paris), *France* |
|
||||
@@ -123,7 +124,7 @@ And if you may, I will conclude these examples with a more personal one:
|
||||
| 2008 ~ 2009 | 15 → 16 | Scientific <abbr title="French highschool degree">*"Baccalauréat"*</abbr> | Briançon, *France* |
|
||||
|
||||
|
||||
> ... Yeah, I am kinda proud of my academic education and [my curriculum](http://lbesson.tk) ([also here](http://perso.crans.org/besson/cv.en.pdf) or [here](http://perso.crans.org/besson/cv.en.pdf)).
|
||||
> ... But that was just a short overview of my academic education and [my curriculum](http://perso.crans.org/besson/cv.en.pdf).
|
||||
|
||||
---
|
||||
|
||||
|
BIN
example6.pdf
BIN
example6.pdf
Binary file not shown.
@@ -26,7 +26,8 @@ That search feature is working **incredibly well**, on the box below, if you sta
|
||||
<h3>Search on that table?</h3>
|
||||
<p>Thanks to the <a href="http://deuxhuithuit.github.io/quicksearch/">QuickSearch</a> <a href="https://www.jQuery.com/"><strong>jQuery</strong></a> <em>plug-in</em>.</p>
|
||||
<form><input class="form-control input-lg" type="text" name="search" value="" id="id_search" placeholder="Search on that table" autofocus />
|
||||
</form></div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
# A partial list of the [Justice League of America](https://en.wikipedia.org/wiki/Justice_League)
|
||||
Here is an example of a table, displaying some *super heroes* ^^ <br>
|
||||
@@ -87,9 +88,9 @@ Finally, after loading the two scripts (step 2), one line of JavaScript in enoug
|
||||
```
|
||||
|
||||
> More explanations? This Javascript line has three parts:
|
||||
> 1. `$('input#id_search')` is using jQuery (the `$()` fonction) to select the DOM element of type `input` with `id=id_search` (id because of the `#`, it would be a class if `.`, like `div.navbar`),
|
||||
> 2. `.quicksearch(...)` is calling the `quicksearch` fonction (available because QuickSearch has been registered as a jQuery plug-in), using it for that DOM element (the input search bar),
|
||||
> 3. and finally we apply that fonction with the argument `'table tbody tr'`, which means that we initialize QuickSearch to look for all the `<table>` elements, only on their children `<tbody>` (content of the table), and only on the different lines (`<tr>`).
|
||||
> 1. `$('input#id_search')` is using jQuery (the `$()` function) to select the DOM element of type `input` with `id=id_search` (id because of the `#`, it would be a class if `.`, like `div.navbar`),
|
||||
> 2. `.quicksearch(...)` is calling the `quicksearch` function (available because QuickSearch has been registered as a jQuery plug-in), using it for that DOM element (the input search bar),
|
||||
> 3. and finally we apply that function with the argument `'table tbody tr'`, which means that we initialize QuickSearch to look for all the `<table>` elements, only on their children `<tbody>` (content of the table), and only on the different lines (`<tr>`).
|
||||
|
||||
---
|
||||
|
||||
|
BIN
example7.pdf
BIN
example7.pdf
Binary file not shown.
@@ -2,7 +2,7 @@
|
||||
<ul class="pager">
|
||||
<li class="previous"><a href="example7.html">← Previous example</a></li>
|
||||
<li><a href="index.html">Index</a></li>
|
||||
<li class="next disabled"><a href="#">(Last example)</a></li>
|
||||
<li class="next"><a href="example9.html">→ Next example</a></li>
|
||||
</ul>
|
||||
|
||||
# This is a Markdown document
|
||||
@@ -62,7 +62,7 @@ This was a brief overview, to show the basic use of [StrapDown.js](index.html).
|
||||
<ul class="pager">
|
||||
<li class="previous"><a href="example7.html">← Previous example</a></li>
|
||||
<li><a href="index.html">Index</a></li>
|
||||
<li class="next disabled"><a href="#">(Last example)</a></li>
|
||||
<li class="next"><a href="example9.html">→ Next example</a></li>
|
||||
</ul>
|
||||
|
||||
</xmp><script type="text/javascript" src="strapdown.min.js?nonavbarfixed=y"></script></body></html>
|
||||
|
BIN
example8.pdf
BIN
example8.pdf
Binary file not shown.
76
example9.html
Normal file
76
example9.html
Normal file
@@ -0,0 +1,76 @@
|
||||
<!DOCTYPE html><html>
|
||||
<head>
|
||||
<meta charset="utf-8"/>
|
||||
<title>Example with StrapDown.js with custom favicon</title>
|
||||
<link rel="shortcut icon" href="//favicon.ico" />
|
||||
</head>
|
||||
<body><xmp theme="united">
|
||||
<ul class="pager">
|
||||
<li class="previous"><a href="example8.html">← Previous example</a></li>
|
||||
<li><a href="index.html">Index</a></li>
|
||||
<li class="next disabled"><a href="#">(Last example)</a></li>
|
||||
</ul>
|
||||
|
||||
# This is a Markdown document
|
||||
|
||||
This page is the same example as [example #2](example2.html), but with a customized icon to be displayed on the web-browser ("favicon").
|
||||
|
||||
If you like, you can load the script ``strapdown.min.js`` with this option ``keepicon=y`` if you prefer StrapDown.js to keep the [favicon](https://en.wikipedia.org/wiki/Favicon) included in your HTML document (*new!*).
|
||||
|
||||
See [example #5](example5.html) for other options.
|
||||
|
||||
----
|
||||
|
||||
You can now write your web page in Markdown.
|
||||
You opened a `textarea` tag, but a `xmp` tag works as well.
|
||||
And, yes, it is **as simple** as **one** HTML line at the beginning and **one** HTML line at the end of this document.
|
||||
|
||||
## What to say more
|
||||
Feel free to use it, redistribute it etc, *under the condition of the GPLv3 License*.
|
||||
|
||||
## Only for textual, simple documents
|
||||
StrapDown.js is *awesome* to quickly build nice-looking web pages,
|
||||
but it might not be efficient for anything more complicated, as it is really not designed for it.
|
||||
|
||||
## Add a picture ?
|
||||
With Markdown syntax, it's easy : .
|
||||
|
||||
### An other one ?
|
||||
Alright, here comes the mighty Cthulhu 
|
||||
|
||||
### A last one, because it's dangerous to go alone :
|
||||
|
||||

|
||||
|
||||
## Add anything you want, it *might* work
|
||||
For instance, you can add Google Analytics to monitor the page's activity,
|
||||
by including a piece of Javascript code, before *or* after closing the *textarea* tag.
|
||||
|
||||
<script type="text/javascript">
|
||||
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
|
||||
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
|
||||
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
|
||||
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
|
||||
ga('create','UA-38514290-14','lbesson.bitbucket.org'); ga('send','pageview');
|
||||
</script>
|
||||
<noscript>
|
||||
The previous paragraph was supposed to include Google Analytics web monitoring tool,
|
||||
but hey, you are browsing without JavaScript enabled, what can I do for it ? <br/>
|
||||
Maybe you are using a text-only browser (w3m, links, elinks ? I love elinks !),
|
||||
or a 19th-century IE, or maybe you disabled JavaScript globally (which is kinda stupid) or site-by-site (with NoScript, as I do, which is brilliant, and safer).
|
||||
</noscript>
|
||||
|
||||
## That's it
|
||||
This was a brief overview, to show the basic use of [StrapDown.js](index.html).
|
||||
|
||||
---
|
||||
|
||||
<ul class="pager">
|
||||
<li class="previous"><a href="example8.html">← Previous example</a></li>
|
||||
<li><a href="index.html">Index</a></li>
|
||||
<li class="next disabled"><a href="#">(Last example)</a></li>
|
||||
</ul>
|
||||
|
||||
</xmp>
|
||||
<script type="text/javascript" src="strapdown.min.js?keepicon=y"></script>
|
||||
</body></html>
|
BIN
example9.pdf
Normal file
BIN
example9.pdf
Normal file
Binary file not shown.
@@ -123,7 +123,8 @@ It has a perfect support for Markdown markup.</p>
|
||||
<li><a href="http://perso.crans.org/besson/agreg/m/2/">This (French) homepage of a programming project</a> on <a href="https://en.wikipedia.org/wiki/Eulerian_path#Properties">Euler theorems on Eulerian path</a>. I did this as an assignment for <a href="http://perso.crans.org/besson/cv.en.pdf">my M.Sc. of Computer Science in 2014</a>, and it was also a good training for one oral exam of the <a href="https://en.wikipedia.org/wiki/Agr%C3%A9gation">French national competitive examination to become a prep' school professor</a> in Mathematics and Computer Science (for <a href="http://web.archive.org/web/20140709144720/agreg.org/ResultatsMerite2014.html">which I have been ranked 23rd among 795</a> in 2014!).</li>
|
||||
</ul>
|
||||
<blockquote>
|
||||
<p>You might also be interested by a way to make a StrapDown.js-powered document autonomous, ie. not using the script anymore. <a href="https://bitbucket.org/lbesson/bin/history-node/master/strapdown2html.py">I am working</a> on a Python program <a href="https://bitbucket.org/lbesson/bin/str/master/strapdown2html.py">designed to do this (called, no surprise, strapdown2html.py)</a>.</p>
|
||||
<p>You might also be interested by a way to make a StrapDown.js-powered document autonomous, ie. not using the script anymore.
|
||||
For this purpose, <a href="https://bitbucket.org/lbesson/bin/history-node/master/strapdown2html.py">I also wrote strapdown2html.py</a> a Python program <a href="https://bitbucket.org/lbesson/bin/str/master/strapdown2html.py">designed to do this (called, no surprise, strapdown2html.py)</a>.</p>
|
||||
</blockquote>
|
||||
<hr />
|
||||
<h1>Future features or ideas?</h1>
|
||||
@@ -146,7 +147,8 @@ It has a perfect support for Markdown markup.</p>
|
||||
<ul>
|
||||
<li><a href="https://github.com/arturadib/strapdown/issues/36">This question asked on Github on the 1st of May of 2014</a> by <a href="https://github.com/hardly">hardly</a> about the <a href="https://github.com/arturadib/strapdown">old strapdown repository</a>. To answer that question: the main difference is than I am still interested and eager to work on <a href="http://lbesson.bitbucket.org/md/">my StrapDown.js</a>, but it seems to not be the case of <a href="https://github.com/arturadib/">the previous developper</a>.</li>
|
||||
<li><a href="http://quantego.com/">These guys at Quantego</a> are using my StrapDown.js for <a href="https://slides.quantego.com/">that small and interesting page</a>.</li>
|
||||
<li>I got an email (<em>January 2015</em>) from one felow working for <a href="http://www.nexirius.com/">www.nexirius.com</a>, and so I created the demos on tables to answer him: <a href="example6.html">example #6</a> and <a href="example7.html">example #7</a>.</li>
|
||||
<li>I got an email (<em>January 2015</em>) from one fellow working for <a href="http://www.nexirius.com/">www.nexirius.com</a>, and so I created the demos on tables to answer him: <a href="example6.html">example #6</a> and <a href="example7.html">example #7</a>.</li>
|
||||
<li>In <em>March 2016</em>, someone asked my to add more options, like <code>nonavbarfixed=y</code> and <code>keepicon=y</code>, and add more themes, which I did, of course.</li>
|
||||
</ul>
|
||||
<blockquote>
|
||||
<p>If you are using (or have used) my StrapDown.js, you can send an email, or <a href="http://perso.crans.org/besson/callme.en.html">contact me if you want</a>, I would love to hear any feedback from you!</p>
|
||||
|
40
index.html
40
index.html
@@ -76,14 +76,15 @@ And, yes, it is **as simple** as **one** HTML line at the beginning and **one**
|
||||
<h2>List of examples:</h2>
|
||||
<ul class="pagination pagination-lg">
|
||||
<li class="disabled"><a href="#">All the examples:</a></li>
|
||||
<li><a href="example1.html" title="Example 1">Example 1</a></li>
|
||||
<li><a href="example2.html" title="Example 2">Example 2</a></li>
|
||||
<li><a href="example3.html" title="Example 3">Example 3</a></li>
|
||||
<li><a href="example4.html" title="Example 4">Example 4</a></li>
|
||||
<li><a href="example5.html" title="Example 5">Example 5</a></li>
|
||||
<li><a href="example6.html" title="Example 6">Example 6</a></li>
|
||||
<li><a href="example7.html" title="Example 7">Example 7</a></li>
|
||||
<li><a href="example8.html" title="Example 8">Example 8</a></li>
|
||||
<li><a href="example1.html" title="Example 1">#1</a></li>
|
||||
<li><a href="example2.html" title="Example 2">#2</a></li>
|
||||
<li><a href="example3.html" title="Example 3">#3</a></li>
|
||||
<li><a href="example4.html" title="Example 4">#4</a></li>
|
||||
<li><a href="example5.html" title="Example 5">#5</a></li>
|
||||
<li><a href="example6.html" title="Example 6">#6</a></li>
|
||||
<li><a href="example7.html" title="Example 7">#7</a></li>
|
||||
<li><a href="example8.html" title="Example 8">#8</a></li>
|
||||
<li><a href="example9.html" title="Example 9">#9</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -153,14 +154,15 @@ as shown in these three examples: [example n°3](example3.html) and [example n°
|
||||
<h2>List of examples:</h2>
|
||||
<ul class="pagination pagination-lg">
|
||||
<li class="disabled"><a href="#">All the examples:</a></li>
|
||||
<li><a href="example1.html" title="Example 1">Example 1</a></li>
|
||||
<li><a href="example2.html" title="Example 2">Example 2</a></li>
|
||||
<li><a href="example3.html" title="Example 3">Example 3</a></li>
|
||||
<li><a href="example4.html" title="Example 4">Example 4</a></li>
|
||||
<li><a href="example5.html" title="Example 5">Example 5</a></li>
|
||||
<li><a href="example6.html" title="Example 6">Example 6</a></li>
|
||||
<li><a href="example7.html" title="Example 7">Example 7</a></li>
|
||||
<li><a href="example8.html" title="Example 8">Example 8</a></li>
|
||||
<li><a href="example1.html" title="Example 1">#1</a></li>
|
||||
<li><a href="example2.html" title="Example 2">#2</a></li>
|
||||
<li><a href="example3.html" title="Example 3">#3</a></li>
|
||||
<li><a href="example4.html" title="Example 4">#4</a></li>
|
||||
<li><a href="example5.html" title="Example 5">#5</a></li>
|
||||
<li><a href="example6.html" title="Example 6">#6</a></li>
|
||||
<li><a href="example7.html" title="Example 7">#7</a></li>
|
||||
<li><a href="example8.html" title="Example 8">#8</a></li>
|
||||
<li><a href="example9.html" title="Example 9">#9</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -201,7 +203,8 @@ It has a perfect support for Markdown markup.
|
||||
- [This (French) homepage of a programming project](http://perso.crans.org/besson/agreg/m/2/) on [Euler theorems on Eulerian path](https://en.wikipedia.org/wiki/Eulerian_path#Properties). I did this as an assignment for [my M.Sc. of Computer Science in 2014](http://perso.crans.org/besson/cv.en.pdf), and it was also a good training for one oral exam of the [French national competitive examination to become a prep' school professor](https://en.wikipedia.org/wiki/Agr%C3%A9gation) in Mathematics and Computer Science (for [which I have been ranked 23rd among 795](http://web.archive.org/web/20140709144720/agreg.org/ResultatsMerite2014.html) in 2014!).
|
||||
|
||||
|
||||
> You might also be interested by a way to make a StrapDown.js-powered document autonomous, ie. not using the script anymore. [I am working](https://bitbucket.org/lbesson/bin/history-node/master/strapdown2html.py) on a Python program [designed to do this (called, no surprise, strapdown2html.py)](https://bitbucket.org/lbesson/bin/str/master/strapdown2html.py).
|
||||
> You might also be interested by a way to make a StrapDown.js-powered document autonomous, ie. not using the script anymore.
|
||||
> For this purpose, [I also wrote strapdown2html.py](https://bitbucket.org/lbesson/bin/history-node/master/strapdown2html.py) a Python program [designed to do this (called, no surprise, strapdown2html.py)](https://bitbucket.org/lbesson/bin/str/master/strapdown2html.py).
|
||||
|
||||
---
|
||||
|
||||
@@ -221,7 +224,8 @@ It has a perfect support for Markdown markup.
|
||||
### Some people are using it or talking about it!
|
||||
- [This question asked on Github on the 1st of May of 2014](https://github.com/arturadib/strapdown/issues/36) by [hardly](https://github.com/hardly) about the [old strapdown repository](https://github.com/arturadib/strapdown). To answer that question: the main difference is than I am still interested and eager to work on [my StrapDown.js](http://lbesson.bitbucket.org/md/), but it seems to not be the case of [the previous developper](https://github.com/arturadib/).
|
||||
- [These guys at Quantego](http://quantego.com/) are using my StrapDown.js for [that small and interesting page](https://slides.quantego.com/).
|
||||
- I got an email (*January 2015*) from one felow working for [www.nexirius.com](http://www.nexirius.com/), and so I created the demos on tables to answer him: [example #6](example6.html) and [example #7](example7.html).
|
||||
- I got an email (*January 2015*) from one fellow working for [www.nexirius.com](http://www.nexirius.com/), and so I created the demos on tables to answer him: [example #6](example6.html) and [example #7](example7.html).
|
||||
- In *March 2016*, someone asked my to add more options, like ``nonavbarfixed=y`` and ``keepicon=y``, and add more themes, which I did, of course.
|
||||
|
||||
> If you are using (or have used) my StrapDown.js, you can send an email, or [contact me if you want](http://perso.crans.org/besson/callme.en.html), I would love to hear any feedback from you!
|
||||
|
||||
|
16
strapdown.js
16
strapdown.js
@@ -426,10 +426,15 @@ var PR=win['PR']={'createSimpleLexer':createSimpleLexer,'registerLangHandler':re
|
||||
document.head.appendChild(linkEl);
|
||||
|
||||
// Favicon (730 bytes for 'favicon.png')
|
||||
var linkEl = document.createElement('link');
|
||||
linkEl.rel = 'shortcut icon';
|
||||
linkEl.href = originBase + '/favicon.png';
|
||||
document.head.appendChild(linkEl);
|
||||
if (queryOrigin['keepicon']) {
|
||||
// Do not add a favicon, if strapdown.js was loaded with a URL query containing "&keepicon=y" somewhere.
|
||||
console.log("[strapdown.js] [INFO] Keeping the default favicon (not replacing with originBase/favicon.png ...");
|
||||
} else {
|
||||
var linkEl = document.createElement('link');
|
||||
linkEl.rel = 'shortcut icon';
|
||||
linkEl.href = originBase + '/favicon.png';
|
||||
document.head.appendChild(linkEl);
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
@@ -446,8 +451,9 @@ var PR=win['PR']={'createSimpleLexer':createSimpleLexer,'registerLangHandler':re
|
||||
// Insert navbar if there's none // FIXED be sure this is good: OK
|
||||
var newNode = document.createElement('div');
|
||||
if (queryOrigin['nonavbarfixed']) {
|
||||
// Ask for a non-fixed top navbar, if strapdown.js was loaded with a URL query containing "&nonavbarfixed=y" somewhere.
|
||||
newNode.className = "navbar navbar-static-top";
|
||||
document.body.style = "padding-top: 0px;" /* XXX Experimental */
|
||||
document.body.style = "padding-top: 0px;" /* FIXED manual fix */
|
||||
}
|
||||
else {
|
||||
newNode.className = "navbar navbar-fixed-top";
|
||||
|
2
strapdown.min.js
vendored
2
strapdown.min.js
vendored
File diff suppressed because one or more lines are too long
@@ -2024,13 +2024,19 @@ var prettyPrint;
|
||||
/** @type {string} */
|
||||
node.href = path + "/themes/bootstrap-responsive.min.css";
|
||||
document.head.appendChild(node);
|
||||
/** @type {Element} */
|
||||
node = document.createElement("link");
|
||||
/** @type {string} */
|
||||
node.rel = "shortcut icon";
|
||||
/** @type {string} */
|
||||
node.href = path + "/favicon.png";
|
||||
document.head.appendChild(node);
|
||||
// Favicon (730 bytes for 'favicon.png')
|
||||
if (fmt['keepicon']) {
|
||||
// Do not add a favicon, if strapdown.js was loaded with a URL query containing "&keepicon=y" somewhere.
|
||||
console.log("[strapdown.js] [INFO] Keeping the default favicon (not replacing with originBase/favicon.png ...");
|
||||
} else {
|
||||
/** @type {Element} */
|
||||
node = document.createElement("link");
|
||||
/** @type {string} */
|
||||
node.rel = "shortcut icon";
|
||||
/** @type {string} */
|
||||
node.href = path + "/favicon.png";
|
||||
document.head.appendChild(node);
|
||||
}
|
||||
var markdown = markdownEl.textContent || markdownEl.innerText;
|
||||
/** @type {Element} */
|
||||
var newNode = document.createElement("div");
|
||||
|
Reference in New Issue
Block a user