]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
mdhelp: more work, copied more markdown files from tvheadend-documentation
authorJaroslav Kysela <perex@perex.cz>
Tue, 5 Apr 2016 09:30:56 +0000 (11:30 +0200)
committerJaroslav Kysela <perex@perex.cz>
Tue, 5 Apr 2016 09:30:56 +0000 (11:30 +0200)
Makefile
src/webui/static/app/ext.css
support/doc/md_to_c.py

index e5e4a2048404af5bcc6522b7db8e16a622440f0a..576c41c181f09f91cbb1cd7915c4a84db2b09817 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -696,6 +696,8 @@ src/docs_inc.c: $(BUILDDIR)/docs-timestamp
 
 src/docs_inc.h: $(BUILDDIR)/docs-timestamp
 
+src/docs.c: src/docs_inc.c src/docs_inc.h
+
 $(BUILDDIR)/src/docs.o: $(BUILDDIR)/docs-timestamp $(I18N-DOCS) support/doc/md_to_c.py
 
 # Internationalization
index f9462b1edd9cd6afe4e070e0211f7631dc95cfb2..dc2082f11ff275fdc8deb8b0f8c17e94d15e7c61 100644 (file)
 }
 
 .hts-doc-text p {
+    margin-left: 1em;
     margin-top: 1em;
     margin-bottom: 1em;
-    margin-left: 1em
 }
 
 .hts-doc-text h2, h3, h4 {
+    margin-top: 1em;
+    margin-bottom: 1em;
     font-size: larger
 }
 
 .hts-doc-text h4 {
+    margin-top: 1em;
+    margin-bottom: 1em;
+    color: #2163A6;
+}
+
+.hts-doc-text h5 {
+    margin-top: .7em;
+    margin-bottom: .7em;
     color: #2163A6;
-    margin-top: 15px
 }
 
 .hts-doc-text strong {
     padding-bottom: 10px;
 }
 
+.hts-doc-text ol {
+    list-style-type: arabic;
+    padding-left:3em
+}
+
 .hts-doc-text li {
     padding-top: 5px;
     padding-bottom: 5px;
     padding-bottom: 0px
 }
 
+/* Additional image and caption styles for webUI help */
+
+.hts-doc-text img {
+    margin: 0px auto;
+    /* display: block; */
+    border: none;
+    padding: 10px;
+    max-width: 97%
+}
+
+.hts-doc-text p.caption {
+    font-weight: bold;
+    color: #2163A6;
+    font-style: italic;
+    text-align: center;
+    text-decoration: underline
+}
+
+/* Inline/block code styles for webUI help */
+
+.hts-doc-text code {
+    background-color: white;
+    border-color: #E1E4E5;
+    border-style: solid;
+    border-width: 1px;
+    color: darkred;
+    font-family:  'Courier New', Courier, monospace;
+    margin-left: 2em;
+    padding-bottom: 0px;
+    padding-left: 5px;
+    padding-right: 5px;
+    padding-top: 0px;
+    display: inline-block;
+}
+
+.hts-doc-text p code {
+    margin-left: 0;
+    display: initial;
+}
+
 /* Styles for help TOC */
 
 .hts-doc-toc {
     padding-bottom: 0px
 }
 
-/* Additional image and caption styles for webUI help */
-
-.hts-doc-text img {
-  margin: 0px auto;
-  /* display: block; */
-  border: none;
-  padding: 10px;
-  max-width: 97%
-}
-
-.hts-doc-text p.caption {
-  font-weight: bold;
-  color: #2163A6;
-  font-style: italic;
-  text-align: center;
-  text-decoration: underline
-}
-
-/* Inline/block code styles for webUI help */
-
-.hts-doc-text code {
-  background-color: white;
-  border-color: #E1E4E5;
-  border-style: solid;
-  border-width: 1px;
-  color: darkred;
-  font-family:  'Courier New', Courier, monospace;
-  padding-bottom: 0px;
-  padding-left: 5px;
-  padding-right: 5px;
-  padding-top: 0px;
-}
-
-/* Admonition styles for webUI help */
-
-.hts-doc-text .admonition {
-  margin: 20px;
-  border: 0px solid;
-  border-left-width: 5px;
-  padding-top: 0px;padding-bottom: 5px
-}
-
-.hts-doc-text .admonition-title {
-  font-size: larger;
-  font-weight: bolder;
-  padding-top: 5px;padding-bottom: 5px;
-  margin: 0px
-}
-
-.hts-doc-text .admonition.note {
-  background-color: #D6EBFF;
-  border-left-color: #4575A6
-}
-
-.hts-doc-text .admonition.note .admonition-title {
-  background-color: #4575A6;
-  color: white
-}
-
-.hts-doc-text .admonition.tip {
-  background-color: #CDF1E9;
-  border-left-color: #1ABC9C
-}
-
-.hts-doc-text .admonition.tip .admonition-title {
-  background-color: #1ABC9C;
-  color: white
-}
-
-.hts-doc-text .admonition.warning {
-  background-color: #FFD0B0; 
-  border-left-color: #FF9147
-}
-
-.hts-doc-text .admonition.warning .admonition-title {
-  background-color: #FF9147;
-  color: white
-}
-
-.hts-doc-text .admonition.danger {
-  background-color: #E8AFAF;
-  border-left-color: #FF3333
-}
-
-.hts-doc-text .admonition.danger .admonition-title {
-  background-color: #FF3333;
-  color: white
-}
-
 .tv-video-idle {
     background-image     : url(../../static/img/logobig.png);
     background-repeat    : no-repeat;
index f96779cfc6e676c6e1896d4850c59f6810f8741c..f35c465c9c3938aaa10c4923066b1858cc544d04 100755 (executable)
@@ -139,11 +139,13 @@ class TVH_C_Renderer(Renderer):
 
   def list(self, text, ordered=True):
     r = '\n'
+    idx = 1
     while text:
       text, type, t = self.get_block(text)
       if DEBUG: debug('list[' + type + ']: ' + repr(t))
       if type == 'l':
-        r += self.get_nolang(ordered and '# ' or '* ') + t
+        r += self.get_nolang(ordered and str(idx) + '. ' or '* ') + t
+        if ordered: idx += 1
     return r
 
   def list_item(self, text):
@@ -158,8 +160,11 @@ class TVH_C_Renderer(Renderer):
     return 'l' + str(len(text)) + ':' + text
 
   def block_code(self, code, lang=None):
-    return self.get_nolang('```no-highlight') + '\n' + \
-           code + '\n' + self.get_nolang('```') + '\n'
+    if DEBUG: debug('block code: ' + repr(code))
+    r = self.get_nolang('```no-highlight') + '\n'
+    for line in code.splitlines():
+      r += self.get_nolang(line) + '\n'
+    return r + self.get_nolang('```') + '\n'
 
   def block_quote(self, text):
     r = ''