瀏覽代碼

:beetle: Fix indentation in produced HTML

- Fix shifts due to spaces before templating fields
- Use the `$^$` instruction to preserve indents
DricomDragon 2 年之前
父節點
當前提交
685f851f35
共有 1 個文件被更改,包括 40 次插入40 次删除
  1. 40 40
      web/templates/main.html

+ 40 - 40
web/templates/main.html

@@ -5,16 +5,16 @@
         <meta name="generator" content="pandoc" />
         <!-- Smartphone responsive design -->
         <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
-        $for(author-meta)$
+$for(author-meta)$
         <meta name="author" content="$author-meta$" />
         <meta name="description" content="$description$">
-        $endfor$
-        $if(date-meta)$
+$endfor$
+$if(date-meta)$
         <meta name="dcterms.date" content="$date-meta$" />
-        $endif$
-        $if(keywords)$
+$endif$
+$if(keywords)$
         <meta name="keywords" content="$for(keywords)$$keywords$$sep$, $endfor$" />
-        $endif$
+$endif$
         <link rel="shortcut icon" href="/favicon.ico"/>
 
         <!-- Google / Search Engine Tags -->
@@ -47,59 +47,59 @@
             span.smallcaps{font-variant: small-caps;}
             span.underline{text-decoration: underline;}
             div.column{display: inline-block; vertical-align: top; width: 50%;}
-            $if(quotes)$
+$if(quotes)$
             q { quotes: "“" "”" "‘" "’"; }
-            $endif$
+$endif$
         </style>
-        $if(highlighting-css)$
+$if(highlighting-css)$
         <style type="text/css">
-        $highlighting-css$
+        $^$$highlighting-css$
         </style>
-        $endif$
+$endif$
 
-        $for(css)$
+$for(css)$
         <link rel="stylesheet" href="$css$" />
-        $endfor$
+$endfor$
 
-        $if(math)$
-        $math$
-        $endif$
+$if(math)$
+        $^$$math$
+$endif$
 
-        $for(header-includes)$
-        $header-includes$
-        $endfor$
+$for(header-includes)$
+        $^$$header-includes$
+$endfor$
     </head>
     <body>
-        $for(include-before)$
-        $include-before$
-        $endfor$
+$for(include-before)$
+        $^$$include-before$
+$endfor$
         <main role="main" class="container">
-            $if(title)$
+$if(title)$
             <header id="title-block-header" class="focus-center">
                 <h1 class="title">$title$</h1>
-                $if(subtitle)$
+$if(subtitle)$
                 <p class="subtitle">$subtitle$</p>
-                $endif$
-                $for(author)$
+$endif$
+$for(author)$
                 <p class="author">$author$</p>
-                $endfor$
-                $if(date)$
+$endfor$
+$if(date)$
                 <p class="date">$date$</p>
-                $endif$
-                $if(leadImgSrc)$
+$endif$
+$if(leadImgSrc)$
                 <img src="$leadImgSrc$"$if(leadImgAlt)$ alt="$leadImgAlt$"$endif$>
-                $endif$
-                </header>
-            $endif$
-            $if(toc)$
+$endif$
+            </header>
+$endif$
+$if(toc)$
             <nav id="$idprefix$TOC">
-            $table-of-contents$
+            $^$$table-of-contents$
             </nav>
-            $endif$
-            $body$
+$endif$
+            $^$$body$
         </main>
-        $for(include-after)$
-        $include-after$
-        $endfor$
+$for(include-after)$
+        $^$$include-after$
+$endfor$
     </body>
 </html>