mirror of
https://github.com/laurent22/joplin.git
synced 2025-01-14 18:27:44 +02:00
Server: Fixed styling of shared note
This commit is contained in:
parent
5ee4e2bf8e
commit
6c1a6b0a61
@ -14,6 +14,8 @@
|
||||
max-width: 840px;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
padding-left: 1.5em;
|
||||
padding-right: 1.5em;
|
||||
}
|
||||
|
||||
.page-note .last-updated {
|
||||
|
@ -51,4 +51,9 @@ table.table th .sort-button i {
|
||||
|
||||
.footer .content {
|
||||
opacity: 0.5;
|
||||
}
|
||||
}
|
||||
|
||||
ul li {
|
||||
list-style-type: disc;
|
||||
}
|
||||
|
||||
|
@ -16,6 +16,7 @@ export interface View {
|
||||
name: string;
|
||||
title: string;
|
||||
path: string;
|
||||
layout?: string;
|
||||
navbar?: boolean;
|
||||
content?: any;
|
||||
partials?: string[];
|
||||
@ -76,8 +77,9 @@ export default class MustacheService {
|
||||
this.prefersDarkEnabled_ = v;
|
||||
}
|
||||
|
||||
private get defaultLayoutPath(): string {
|
||||
return `${config().layoutDir}/default.mustache`;
|
||||
private layoutPath(name: string): string {
|
||||
if (!name) name = 'default';
|
||||
return `${config().layoutDir}/${name}.mustache`;
|
||||
}
|
||||
|
||||
private get defaultLayoutOptions(): GlobalParams {
|
||||
@ -142,7 +144,7 @@ export default class MustacheService {
|
||||
...view.content,
|
||||
};
|
||||
|
||||
return Mustache.render(await this.loadTemplateContent(this.defaultLayoutPath), layoutView, this.partials_);
|
||||
return Mustache.render(await this.loadTemplateContent(this.layoutPath(view.layout)), layoutView, this.partials_);
|
||||
}
|
||||
|
||||
}
|
||||
|
22
packages/server/src/views/layouts/basic.mustache
Normal file
22
packages/server/src/views/layouts/basic.mustache
Normal file
@ -0,0 +1,22 @@
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<title>{{pageTitle}}</title>
|
||||
<meta charset="utf-8">
|
||||
<link rel="stylesheet" href="{{{global.baseUrl}}}/css/main.css" crossorigin="anonymous">
|
||||
{{#cssFiles}}
|
||||
<link rel="stylesheet" href="{{{.}}}" crossorigin="anonymous">
|
||||
{{/cssFiles}}
|
||||
{{#jsFiles}}
|
||||
<script src="{{{.}}}"></script>
|
||||
{{/jsFiles}}
|
||||
</head>
|
||||
<body class="page-{{{pageName}}}">
|
||||
<main class="main">
|
||||
<div class="container">
|
||||
{{{contentHtml}}}
|
||||
</div>
|
||||
</main>
|
||||
{{> footer}}
|
||||
</body>
|
||||
</html>
|
Loading…
Reference in New Issue
Block a user