@@ -988,6 +988,22 @@ async function getTopdownMenu(req) {
988988 </div>`
989989 : ""
990990 }
991+ <div style="padding: 0px; margin: 0px; margin-left: 0px; margin-top: 25px; margin-bottom: -10px; text-align: left; display: flex;">
992+ <button class="sl-button" style="height: 32px; margin: 0px;" onclick="openAsPresentation(true)">${ lucideIcon (
993+ "Printer"
994+ ) }
995+ ${ lucideIcon (
996+ "Presentation"
997+ ) }
998+ </button>
999+ <button class="sl-button" style="height: 32px; margin: 0px; margin-left: 6px" onclick="openAsDocument(true)">${ lucideIcon (
1000+ "Printer"
1001+ ) }
1002+ ${ lucideIcon (
1003+ "ReceiptText"
1004+ ) }
1005+ </button>
1006+ </div>
9911007 </div>
9921008 ` ;
9931009}
@@ -1021,9 +1037,6 @@ async function getTopBar(startPage, req) {
10211037 <button class="sl-button" style="height: 32px; margin: 6px;" onclick="openAsPresentation(false)">${ lucideIcon (
10221038 "Presentation"
10231039 ) } </button>
1024- <button class="sl-button" style="height: 32px; margin: 6px;" onclick="openAsPresentation(true)">${ lucideIcon (
1025- "Printer"
1026- ) } </button>
10271040 <button class="sl-button-accent topdown-menu-chevron" style="height: 32px; margin: 6px;" onclick="toggleTopdownMenu()">${ lucideIcon (
10281041 "Settings"
10291042 ) } </button>
@@ -1062,6 +1075,7 @@ export async function wrapInPage(html, startPage, req) {
10621075 </style>
10631076 <link rel="stylesheet" href="/css/main.css">
10641077 <link rel="shortcut icon" href="/assets/favicon.ico" type="image/x-icon" />
1078+ <title>${ req . file . name } </title>
10651079 </head>
10661080 <body style="display: none;">
10671081 <div id="topbar">${ await getTopBar ( startPage , req ) } </div>
@@ -1091,6 +1105,39 @@ export async function wrapInPage(html, startPage, req) {
10911105 return pre + html + post ;
10921106}
10931107
1108+ export async function wrapAsDocument ( html , req ) {
1109+ const pre = `
1110+ <!DOCTYPE html>
1111+ <html lang="en">
1112+ <head>
1113+ <meta charset="UTF-8">
1114+ <style>
1115+ ${ await getFontImports ( ) }
1116+ </style>
1117+ <link rel="stylesheet" href="/css/main.css">
1118+ <link rel="shortcut icon" href="/assets/favicon.ico" type="image/x-icon" />
1119+ <title>${ req . file . name } </title>
1120+ </head>
1121+ <body style="display: none;">
1122+ <div id="wrapper">
1123+ <div id="markdown-content">
1124+ ` ;
1125+ const post = `
1126+ </div>
1127+ </div>
1128+ <script src="/obsidian-page.js"></script>
1129+ <script lang="javascript">
1130+ initFonts('${ JSON . stringify ( mainFontsArray ) } ', '${ JSON . stringify (
1131+ navFontsArray
1132+ ) } ');
1133+ init();
1134+ </script>
1135+ </body>
1136+ </html>
1137+ ` ;
1138+ return pre + html + post ;
1139+ }
1140+
10941141export async function wrapInReveal ( reveal , req ) {
10951142 const pre = `
10961143 <!DOCTYPE html>
0 commit comments