Add BaseURL config parameter
This commit is contained in:
@ -6,10 +6,10 @@
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>{{block "title" . -}}{{- end}}</title>
|
||||
{{- block "head_style" . -}}
|
||||
<link rel="stylesheet" href="/css/main.css" />
|
||||
<link rel="stylesheet" href="{{ .BaseURL }}/css/main.css" />
|
||||
{{end}}
|
||||
{{- block "head_script" . -}}
|
||||
<script type="text/javascript" src="/main.js"></script>
|
||||
<script type="text/javascript" src="{{ .BaseURL }}/main.js"></script>
|
||||
{{end}}
|
||||
</head>
|
||||
<body>
|
||||
|
@ -2,7 +2,7 @@
|
||||
<div class="columns is-mobile">
|
||||
<div class="column is-narrow">
|
||||
<h1 class="is-size-3 title">
|
||||
<a href="/" rel="Inbox" class="has-text-grey-dark">
|
||||
<a href="{{ .BaseURL }}/" rel="Inbox" class="has-text-grey-dark">
|
||||
{{if or .Emails .Email}}
|
||||
📬
|
||||
{{else}}
|
||||
|
@ -2,9 +2,9 @@
|
||||
{{define "header_buttons"}}
|
||||
<button class="button is-danger"
|
||||
data-controller="restful"
|
||||
data-restful-endpoint="./{{ .Email.ID }}"
|
||||
data-restful-endpoint="{{ .BaseURL }}/emails/{{ .Email.ID }}"
|
||||
data-restful-method="DELETE"
|
||||
data-restful-redirect="../">
|
||||
data-restful-redirect="{{ .BaseURL }}/">
|
||||
🗑️ Delete
|
||||
</button>
|
||||
{{end}}
|
||||
@ -24,8 +24,9 @@
|
||||
<h4 class="title is-size-4">Attachments ({{len .Email.Attachments}})</h4>
|
||||
<ul>
|
||||
{{ $email := .Email }}
|
||||
{{ $baseURL := .BaseURL }}
|
||||
{{range $i, $a := .Email.Attachments}}
|
||||
<li><a href="{{ $email.ID }}/attachments/{{ $i }}" download="{{ $a.Name }}">{{ $a.Name }}</a></li>
|
||||
<li><a href="{{ $baseURL }}/emails/{{ $email.ID }}/attachments/{{ $i }}" download="{{ $a.Name }}">{{ $a.Name }}</a></li>
|
||||
{{end}}
|
||||
</ul>
|
||||
</div>
|
||||
@ -44,7 +45,7 @@
|
||||
data-controller="iframe"
|
||||
data-action="load->iframe#onLoad"
|
||||
style="width:100%;{{if not .Email.HTML}}display:none;{{end}}"
|
||||
src="{{ .Email.ID }}/html">
|
||||
src="{{ .BaseURL }}/emails/{{ .Email.ID }}/html">
|
||||
</iframe>
|
||||
<div data-target="tabs.tabContent" data-tabs-for="text" style="{{if .Email.HTML}}display:none;{{end}}width:100%;overflow:hidden;">
|
||||
<pre style="white-space:pre-line;">{{ .Email.Text }}</pre>
|
||||
|
@ -24,10 +24,11 @@
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{ $baseURL := .BaseURL }}
|
||||
{{range .Emails}}
|
||||
<tr data-controller="inbox-entry"
|
||||
data-action="click->inbox-entry#onClick"
|
||||
data-inbox-entry-link="./emails/{{ .ID }}">
|
||||
data-inbox-entry-link="{{ $baseURL }}/emails/{{ .ID }}">
|
||||
<td class="email-subject"><div>{{ .Subject }}</div></td>
|
||||
<td class="email-from">
|
||||
{{range .From}}
|
||||
@ -44,7 +45,7 @@
|
||||
</td>
|
||||
<td class="email-actions">
|
||||
<div class="buttons is-right">
|
||||
<a href="./emails/{{ .ID }}" class="button is-small is-link">👁️ See</a>
|
||||
<a href="{{ $baseURL }}/emails/{{ .ID }}" class="button is-small is-link">👁️ See</a>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
Reference in New Issue
Block a user