Merge pull request #145 from writeas/fix-single-user
Fix single-user instance issues
This commit is contained in:
commit
de1a51d70d
|
@ -141,7 +141,7 @@ function pinPost(e, postID, slug, title) {
|
||||||
var $header = document.getElementsByTagName('header')[0];
|
var $header = document.getElementsByTagName('header')[0];
|
||||||
var $pinnedNavs = $header.getElementsByTagName('nav');
|
var $pinnedNavs = $header.getElementsByTagName('nav');
|
||||||
// Add link to nav
|
// Add link to nav
|
||||||
var link = '<a class="pinned" href="/{{.Alias}}/'+slug+'">'+title+'</a>';
|
var link = '<a class="pinned" href="{{if not .SingleUser}}/{{.Alias}}/{{end}}'+slug+'">'+title+'</a>';
|
||||||
if ($pinnedNavs.length == 0) {
|
if ($pinnedNavs.length == 0) {
|
||||||
$header.insertAdjacentHTML("beforeend", '<nav>'+link+'</nav>');
|
$header.insertAdjacentHTML("beforeend", '<nav>'+link+'</nav>');
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -176,7 +176,7 @@ function pinPost(e, postID, slug, title) {
|
||||||
var $header = document.getElementsByTagName('header')[0];
|
var $header = document.getElementsByTagName('header')[0];
|
||||||
var $pinnedNavs = $header.getElementsByTagName('nav');
|
var $pinnedNavs = $header.getElementsByTagName('nav');
|
||||||
// Add link to nav
|
// Add link to nav
|
||||||
var link = '<a class="pinned" href="/{{.Alias}}/'+slug+'">'+title+'</a>';
|
var link = '<a class="pinned" href="{{if not .SingleUser}}/{{.Alias}}/{{end}}'+slug+'">'+title+'</a>';
|
||||||
if ($pinnedNavs.length == 0) {
|
if ($pinnedNavs.length == 0) {
|
||||||
$header.insertAdjacentHTML("beforeend", '<nav>'+link+'</nav>');
|
$header.insertAdjacentHTML("beforeend", '<nav>'+link+'</nav>');
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -34,8 +34,8 @@
|
||||||
{{if .Summary}}<p>{{.Summary}}</p>{{end}}
|
{{if .Summary}}<p>{{.Summary}}</p>{{end}}
|
||||||
</div>{{end}}
|
</div>{{end}}
|
||||||
</div>{{ else }}<div id="no-posts-published"><p>You haven't saved any drafts yet.</p>
|
</div>{{ else }}<div id="no-posts-published"><p>You haven't saved any drafts yet.</p>
|
||||||
<p>They'll show up here once you do. Find your blog posts from the <a href="/me/c/">Blogs</a> page.</p>
|
<p>They'll show up here once you do. {{if not .SingleUser}}Find your blog posts from the <a href="/me/c/">Blogs</a> page.{{end}}</p>
|
||||||
<p class="text-cta"><a href="/">Start writing</a></p></div>{{ end }}
|
<p class="text-cta"><a href="{{if .SingleUser}}/me/new{{else}}/{{end}}">Start writing</a></p></div>{{ end }}
|
||||||
|
|
||||||
<div id="moving"></div>
|
<div id="moving"></div>
|
||||||
|
|
||||||
|
|
|
@ -58,6 +58,7 @@
|
||||||
</label>
|
</label>
|
||||||
<p>A password is required to read this blog.</p>
|
<p>A password is required to read this blog.</p>
|
||||||
</li>
|
</li>
|
||||||
|
{{if not .SingleUser}}
|
||||||
<li>
|
<li>
|
||||||
<label class="option-text{{if not .LocalTimeline}} disabled{{end}}"><input type="radio" name="visibility" id="visibility-public" value="1" {{if .IsPublic}}checked="checked"{{end}} {{if not .LocalTimeline}}disabled="disabled"{{end}} />
|
<label class="option-text{{if not .LocalTimeline}} disabled{{end}}"><input type="radio" name="visibility" id="visibility-public" value="1" {{if .IsPublic}}checked="checked"{{end}} {{if not .LocalTimeline}}disabled="disabled"{{end}} />
|
||||||
Public
|
Public
|
||||||
|
@ -65,6 +66,7 @@
|
||||||
{{if .LocalTimeline}}<p>This blog is displayed on the public <a href="/read">reader</a>, and is visible to {{if .Private}}any registered user on this instance{{else}}anyone with its link{{end}}.</p>
|
{{if .LocalTimeline}}<p>This blog is displayed on the public <a href="/read">reader</a>, and is visible to {{if .Private}}any registered user on this instance{{else}}anyone with its link{{end}}.</p>
|
||||||
{{else}}<p>The public reader is currently turned off for this community.</p>{{end}}
|
{{else}}<p>The public reader is currently turned off for this community.</p>{{end}}
|
||||||
</li>
|
</li>
|
||||||
|
{{end}}
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -8,10 +8,10 @@
|
||||||
<hr />
|
<hr />
|
||||||
<nav>
|
<nav>
|
||||||
<a class="home" href="/">{{.SiteName}}</a>
|
<a class="home" href="/">{{.SiteName}}</a>
|
||||||
<a href="/about">about</a>
|
{{if not .SingleUser}}<a href="/about">about</a>{{end}}
|
||||||
{{if and (not .SingleUser) .LocalTimeline}}<a href="/read">reader</a>{{end}}
|
{{if and (not .SingleUser) .LocalTimeline}}<a href="/read">reader</a>{{end}}
|
||||||
<a href="https://writefreely.org/guide/{{.OfficialVersion}}" target="guide">writer's guide</a>
|
<a href="https://writefreely.org/guide/{{.OfficialVersion}}" target="guide">writer's guide</a>
|
||||||
<a href="/privacy">privacy</a>
|
{{if not .SingleUser}}<a href="/privacy">privacy</a>{{end}}
|
||||||
<a href="https://writefreely.org">writefreely {{.Version}}</a>
|
<a href="https://writefreely.org">writefreely {{.Version}}</a>
|
||||||
</nav>
|
</nav>
|
||||||
</footer>
|
</footer>
|
||||||
|
|
Loading…
Reference in New Issue