message view: add print button & stylesheet
This commit is contained in:
parent
cbeacf9d06
commit
6a6ea3e63b
4 changed files with 28 additions and 1 deletions
10
themes/alps/assets/print.css
Normal file
10
themes/alps/assets/print.css
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
header,
|
||||||
|
aside,
|
||||||
|
.actions,
|
||||||
|
.tabs {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.message {
|
||||||
|
padding: 0;
|
||||||
|
}
|
6
themes/alps/assets/print.js
Normal file
6
themes/alps/assets/print.js
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
const print = document.getElementById("print");
|
||||||
|
print.style.display = "inherit";
|
||||||
|
print.addEventListener("click", e => {
|
||||||
|
e.preventDefault();
|
||||||
|
window.print();
|
||||||
|
});
|
|
@ -9,5 +9,6 @@
|
||||||
{{end -}}
|
{{end -}}
|
||||||
<title>{{.GlobalData.Title}}</title>
|
<title>{{.GlobalData.Title}}</title>
|
||||||
<link rel="stylesheet" href="/themes/alps/assets/style.css">
|
<link rel="stylesheet" href="/themes/alps/assets/style.css">
|
||||||
|
<link rel="stylesheet" href="/themes/alps/assets/print.css" media="print">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
|
@ -78,7 +78,7 @@
|
||||||
<button class="action-group" type="submit">Move</button>
|
<button class="action-group" type="submit">Move</button>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
<span class="followups">
|
<span class="followups action-group">
|
||||||
{{if .Message.HasFlag "\\Draft"}}
|
{{if .Message.HasFlag "\\Draft"}}
|
||||||
<a class="action-group button-link" href="{{.Message.URL}}/edit{{if .Message.TextPart}}?part={{.Message.TextPart.PathString}}{{end}}">Edit draft</a>
|
<a class="action-group button-link" href="{{.Message.URL}}/edit{{if .Message.TextPart}}?part={{.Message.TextPart.PathString}}{{end}}">Edit draft</a>
|
||||||
{{else}}
|
{{else}}
|
||||||
|
@ -86,6 +86,15 @@
|
||||||
<a class="action-group button-link" href="{{.Message.URL}}/forward{{if .Message.TextPart}}?part={{.Message.TextPart.PathString}}{{end}}">Forward</a>
|
<a class="action-group button-link" href="{{.Message.URL}}/forward{{if .Message.TextPart}}?part={{.Message.TextPart.PathString}}{{end}}">Forward</a>
|
||||||
{{end}}
|
{{end}}
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
|
<span class="action-group">
|
||||||
|
<a
|
||||||
|
class="action-group button-link"
|
||||||
|
id="print"
|
||||||
|
href="#"
|
||||||
|
style="display: none"
|
||||||
|
>Print</a>
|
||||||
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
@ -204,5 +213,6 @@
|
||||||
</main>
|
</main>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<script src="/themes/alps/assets/print.js"></script>
|
||||||
|
|
||||||
{{template "foot.html"}}
|
{{template "foot.html"}}
|
||||||
|
|
Loading…
Reference in a new issue