Browse Source

Impelemnted openmoji-awesome and change icons in topbar nav + fixed some typo and other stuff

master
sorenpeter 8 months ago
parent
commit
fd75dd4c29
  1. 0
      build+run.sh
  2. 36
      internal/static/css/90-top-bar.css
  3. 11
      internal/static/css/99-yarn.css
  4. BIN
      internal/static/img/yarn-logo.png
  5. 4
      internal/templates/_partials.html
  6. 290
      internal/templates/_partials.html_copy
  7. 9
      internal/templates/base.html
  8. 170
      internal/templates/base.html_copy
  9. 2
      internal/templates/timeline.html

0
buld+run.sh → build+run.sh

36
internal/static/css/90-top-bar.css

@ -1,36 +0,0 @@
/* top-bar.css v2.0.0 - ISC License - https://github.com/css-pkg/top-bar.css */
.top-bar{
padding:0 1rem;
margin:0 0 2rem;
overflow:auto;
/*font-family:"Helvetica Neue",Helvetica,"Segoe UI",Arial,freesans,sans-serif*/
background-color: gray;
}
.top-bar-link,.top-bar-title{
color:#aaa;
cursor:pointer;
float:left;
font-size:1rem;
text-decoration:none;
padding:1rem 0
}
.top-bar-link:hover,.top-bar-title:hover{
text-decoration:none
}
.top-bar-link.current-page,.top-bar-link.current-page:hover,.top-bar-title.current-page,.top-bar-title.current-page:hover{
cursor:default
}
.top-bar-link{
font-weight:200;
margin-left:1rem
}
.top-bar-link.current-page,.top-bar-link.current-page:hover,.top-bar-link:hover{
color:#555
}
.top-bar-title{
color:#555;
font-weight:600
}
.top-bar-right{
float:right
}

11
internal/static/css/99-yarn.css

@ -2,11 +2,11 @@
/*border: thin solid pink;*/
}
.dev-note {
/*.dev-note {
background-color: #ffa;
border: solid thin red;
}
*/
.left {
float: left;
text-align: left;
@ -21,8 +21,10 @@
}
.yarn-logo {
height: 1.8rem;
margin-bottom: -0.5rem;
height: 1.5rem;
/*margin-bottom: -0.5rem;*/
vertical-align: middle;
/* filter: invert(1) hue-rotate(180deg); TODO: add to darkmode */
}
nav.pod-menu {
@ -49,6 +51,7 @@ nav ul li {
}
nav.pagination-nav {
font-size: small;
/*text-align:center;*/
padding-top: 0.5rem;
/*border-top: thin solid var(--text-main);*/

BIN
internal/static/img/yarn-logo.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 53 KiB

4
internal/templates/_partials.html

@ -155,7 +155,7 @@
</ul>
<ul class="right">
<li class="in-reply-to twt-hash dev-note"> <!-- TODO -->
In replay to (<a href="https://twtxt.net/search?tag=ic65iza" rel="nofollow">#ic65iza</a>):
In reply to (<a href="https://twtxt.net/search?tag=ic65iza" rel="nofollow">#ic65iza</a>):
"Something something (...)"<!-- (2 hours ago) -->
<!-- by <a href="" class="u-in-reply-to">NICK <img src="https://twtxt.net/user/prologic/avatar" class="avatar"></a>
--> </li>
@ -290,7 +290,7 @@
{{ end }}
</li>
<li class="center">
<small>{{tr $.Ctx "PagerTwtsSummary" (dict "Page" $.Pager.Page "PageNums" $.Pager.PageNums "Nums" $.Pager.Nums)}}</small>
{{tr $.Ctx "PagerTwtsSummary" (dict "Page" $.Pager.Page "PageNums" $.Pager.PageNums "Nums" $.Pager.Nums)}}
</li>
<li class="right">
{{ if $.Pager.HasNext }}

290
internal/templates/_partials.html_copy

@ -1,290 +0,0 @@
{{ define "post" }}
{{ if $.Authenticated }}
<nav class="toolbar-nav">
<ul>
<li><a id="bBtn" href="#" data-tooltip="Bold"><i class="icss-text-bold"></i></a></li>
<li><a id="iBtn" href="#" data-tooltip="Italic"><i class="icss-text-italic"></i></a></li>
<li><a id="cBtn" href="#" data-tooltip="Code"><i class="icss-text-width"></i></a></li>
<li><a id="sBtn" href="#" data-tooltip="Strikethrough"><i class="icss-x"></i></a></li>
<li><a id="usrBtn" href="#" data-tooltip="Mention"><i class="icss-user-circle"></i></a></li>
<li><a id="lnkBtn" href="#" data-tooltip="Link"><i class="icss-link"></i></a></li>
<li><a id="imgBtn" href="#" data-tooltip="Image"><i class="icss-image"></i></a></li>
{{ with $.BlogPost }}
{{ else }}
<li><a id="writeBtn" href="#" data-tooltip="Toggle blog post editor"><i class="icss-quill-pen"></i></a></li>
{{ end }}
<li class="toolbar-form-button">
<form id="imageUploadForm" action="/upload" enctype="multipart/form-data" method="POST" data-tooltip="Upload image">
<input type="hidden" name="csrf_token" value="{{ $.CSRFToken }}">
<label for="uploadImage">
<i id="uploadImageButton" class="icss-camera"></i>
</label>
<input id="uploadImage" class="invisible width-none" type="file" accept="image/*" name="media_file" />
</form>
</li>
<li class="toolbar-form-button">
<form id="audioUploadForm" action="/upload" enctype="multipart/form-data" method="POST" data-tooltip="Upload audio">
<input type="hidden" name="csrf_token" value="{{ $.CSRFToken }}">
<label for="uploadAudio">
<i id="uploadAudioButton" class="icss-microphone"></i>
</label>
<input id="uploadAudio" class="invisible width-none" type="file" accept="audio/*" name="media_file" />
</form>
</li>
<li class="toolbar-form-button">
<form id="videoUploadForm" action="/upload" enctype="multipart/form-data" method="POST" data-tooltip="Upload video">
<input type="hidden" name="csrf_token" value="{{ $.CSRFToken }}">
<label for="uploadVideo">
<i id="uploadVideoButton" class="icss-video-camera"></i>
</label>
<input id="uploadVideo" class="invisible width-none" type="file" accept="video/*" name="media_file" />
</form>
</li>
</ul>
</nav>
<form id="form" action="{{ with $.BlogPost }}/blog{{ else }}/post{{ end }}" method="POST">
<input type="hidden" name="csrf_token" value="{{ $.CSRFToken }}">
{{ with $.BlogPost }}
<input type="hidden" id="replaceBlog" name="hash" value="{{ $.BlogPost.Hash }}" />
{{ else }}
<input type="hidden" id="replaceTwt" name="hash" value="" />
<input type="hidden" id="replyTo" name="reply" value="{{ $.Reply }}" />
<input type="hidden" id="title" name="title" placeholder="{{tr $.Ctx "TwtFormTitle"}}" value="" />
{{ end }}
<div class="textarea-container">
{{ with $.BlogPost }}
<textarea id="text" name="text" rows=24 autofocus required>{{ $.BlogPost.Content }}</textarea>
{{ else }}
<textarea id="text" name="text" placeholder="{{ $.TwtPrompt }}" rows=3 maxlength={{ $.MaxTwtLength }} {{ if $.AutoFocus }}autofocus{{ end }} required></textarea>
{{ end }}
<div id="mentioned-list" class="users-list">
<div id="mentioned-list-content" class="mentioned-list-content">
</div>
</div>
</div>
<div class="grid">
<div>
{{ with $.BlogPost }}
{{ else }}
<select id="postas" class="postas" name="postas">
<option value="{{ $.User.Username }}" selected>{{tr $.Ctx "TwtFormPostAs" (dict "Username" $.User.Username)}}</option>
{{ range $index, $feed := $.User.Feeds }}
<option value="{{ $feed }}">{{ $feed }}</option>
{{ end }}
</select>
{{ end }}
<button id="post" type="submit">
{{ with $.BlogPost }}
<i class="icss-print"></i>
{{tr $.Ctx "TwtFormSave"}}
{{ else }}
<i class="icss-paper-plane"></i>
{{tr $.Ctx "TwtFormPost"}}
{{ end }}
</button>
</div>
</div>
</form>
{{ end }}
{{ end }}
{{ define "twt" }}
<article id="{{ $.Twt.Hash }}" class="h-entry">
<div class="u-author h-card">
<div>
{{ if $.User.Is $.Twt.Twter.URL }}
<a href="{{ $.User.URL | trimSuffix "/twtxt.txt" }}" class="u-url">
<img class="avatar u-photo" src="/user/{{ $.User.Username }}/avatar" alt="" />
</a>
{{ else }}
{{ if isLocalURL $.Twt.Twter.URL }}
<a href="{{ $.Twt.Twter.URL | trimSuffix "/twtxt.txt" }}" class="u-url">
<img class="avatar u-photo" src="/user/{{ $.Twt.Twter.Nick }}/avatar" alt="" />
{{ else }}
<a href="/external?uri={{ $.Twt.Twter.URL }}&nick={{ $.Twt.Twter.Nick }}" class="u-url">
{{ if $.Twt.Twter.Avatar }}
<img class="avatar u-photo" src="{{ $.Twt.Twter.Avatar }}" alt="" />
{{ else }}
<i class="icss-rss" style="font-size:3em"></i>
{{ end }}
{{ end }}
</a>
{{ end }}
</div>
<div class="author">
{{ if $.User.Is $.Twt.Twter.URL }}
<a href="{{ $.User.URL | trimSuffix "/twtxt.txt" }}" class="p-name">{{tr $.Ctx "MeLinkTitle"}}</a>
{{ else }}
{{ if isLocalURL $.Twt.Twter.URL }}
<a href="{{ $.Twt.Twter.URL | trimSuffix "/twtxt.txt" }}" class="p-name">{{ $.Twt.Twter.Nick }}</a>
{{ else }}
<a href="/external?uri={{ $.Twt.Twter.URL }}&nick={{ $.Twt.Twter.Nick }}" class="p-name">
{{ $.Twt.Twter.Nick }}
<span class="p-org">@{{ $.Twt.Twter.URL | hostnameFromURL }}</span>
</a>
{{ end }}
{{ end }}
<div class="publish-time">
<a class="u-url" href="/twt/{{ $.Twt.Hash }}">
<time class="dt-published" datetime="{{ $.Twt.Created | date "2006-01-02T15:04:05Z07:00" }}">
{{ dateInZone ($.Twt.Created | formatForDateTime) $.Twt.Created $.User.DisplayDatesInTimezone }}
</time>
</a>
<span> &nbsp;({{ $.Twt.Created | time }})</span>
{{ if $.Authenticated }}
<span> &nbsp;
<a class="bookmark" href="/bookmark/{{ $.Twt.Hash }}" data-tooltip="{{ if $.User.Bookmarked $.Twt.Hash }}{{tr $.Ctx "BookmarkRemoveTwt"}}{{ else }}{{tr $.Ctx "BookmarkAddTwt"}}{{ end }}">
<i class="icss-{{ if $.User.Bookmarked $.Twt.Hash }}bookmark{{ else }}bookmark-o{{ end }}"></i>
</a>
</span>
{{ end }}
</div>
</div>
</div>
<div class="p-summary">
{{ $.Twt | formatTwt }}
</div>
<hr />
<em class="twt-hash"> #{{ $.Twt.Hash }} </em>
<nav>
<ul>
{{ if $.Authenticated }}
{{ if eq $.LastTwt.Hash $.Twt.Hash }}
<li><a class="edit" href="#" data-hash="{{ $.Twt.Hash }}" data-text="{{ $.Twt.Text | unparseTwt }}"><i class="icss-edit"></i>{{tr $.Ctx "TwtEditLinkTitle"}}</a></li>
<li>&nbsp;</li>
<li><a class="delete" href="#" data-hash="{{ $.Twt.Hash }}"><i class="icss-x"></i>{{tr $.Ctx "TwtDeleteLinkTitle"}}</a></li>
<li>&nbsp;</li>
{{ end }}
<li><a class="reply" href="#" data-reply="{{ $.User.Reply $.Twt }}"><i class="icss-arrow-left"></i>{{tr $.Ctx "TwtReplyLinkTitle"}}</a></li>
{{ if eq $.view "conv" }}
<li><a class="fork" href="#" data-fork="{{ $.User.Fork $.Twt }}"><i class="icss-arrows"></i>{{tr $.Ctx "TwtForkLinkTitle"}}</a></li>
{{ end }}
<li>&nbsp;</li>
{{ end }}
{{ with urlForBlog $.Twt }}
<li><a class="blog" href="{{ urlForBlog $.Twt }}"><i class="icss-quill-pen"></i>{{tr $.Ctx "BlogLinkTitle"}}</a></li>
<li>&nbsp;</li>
{{ end }}
{{ with urlForConv $.Twt }}
<li><a class="conv" href="{{ urlForConv $.Twt }}"><i class="icss-comment"></i>{{tr $.Ctx "TwtConversationLinkTitle"}}</a></li>
<li>&nbsp;</li>
{{ end }}
</ul>
</nav>
</article>
{{ end }}
{{ define "feed" }}
<div class="grid h-feed">
<div>
{{ template "pager" (dict "Pager" $.Pager "Ctx" $.Ctx)}}
{{ range $idx, $twt := $.Twts }}
{{ template "twt" (dict "Authenticated" $.Authenticated "User" $.User "Profile" $.Profile "LastTwt" $.LastTwt "Twt" $twt "Ctx" $.Ctx "view" $.view) }}
{{ else }}
<small><i>{{tr $.Ctx "NoTwts"}}</i></small>
{{ end }}
{{ template "pager" (dict "Pager" $.Pager "Ctx" $.Ctx)}}
</div>
</div>
{{ end }}
{{ define "blogposts" }}
<div class="grid h-feed">
<div>
{{$ctx:=.}}
{{ if $.BlogPosts }}
{{ template "pager" (dict "Pager" $.Pager "Ctx" $ctx) }}
<ul>
{{ range $idx, $blogPost := $.BlogPosts }}
<li>
<a class="u-url" href="{{ $blogPost.URL ($.BaseURL) }}">
{{ $blogPost.Title }}
<time class="dt-published" datetime="{{ $blogPost.Published | date "2006-01-02" }}">
{{ dateInZone "Mon, Jan 2 2006" $blogPost.Published $.User.DisplayDatesInTimezone }}
</time>
</a>
&nbsp;({{ $blogPost.Published | time }})
{{ if eq $.User.Username $blogPost.Author }}
{{ if $blogPost.Draft }}
&nbsp;
[<a href="{{ $blogPost.URL $.BaseURL }}/publish" onclick="return confirm('Are you sure you want to publish this blog post? This cannot be undone!');">{{tr $ctx "BlogPublishLinkTitle"}}</a>]
{{ end }}
&nbsp;
[<a href="{{ $blogPost.URL $.BaseURL }}/edit">{{tr $ctx "BlogEditLinkTitle"}}</a>]
&nbsp;
[<a href="{{ $blogPost.URL $.BaseURL }}/delete" onclick="return confirm('Are you sure you want to delete this blog post? This cannot be undone!');">{{tr $ctx "BlogDeleteLinkTitle"}}</a>]
{{ end }}
</li>
{{ end }}
</ul>
{{ template "pager" (dict "Pager" $.Pager "Ctx" $ctx) }}
{{ else }}
<small><i>{{tr $ctx "NoBlogs"}}</i></small>
{{ end }}
</div>
</div>
{{ end }}
{{ define "pager" }}
{{ if $.Pager.HasPages }}
<nav class="pagination-nav">
<ul>
<li>
{{ if $.Pager.HasPrev }}
{{ with $.Ctx.Twter.URL }}
{{ if isLocalURL $.Ctx.Twter.URL }}
<a href="?p={{ $.Pager.PrevPage }}">{{tr $.Ctx "PagerPrevLinkTitle"}}</a>
{{ else }}
<a href="/external?uri={{ $.Ctx.Twter.URL }}&nick={{ $.Ctx.Twter.Nick }}&p={{ $.Pager.PrevPage }}">{{tr $.Ctx "PagerPrevLinkTitle"}}</a>
{{ end }}
{{ else }}
<a href="?p={{ $.Pager.PrevPage }}">{{tr $.Ctx "PagerPrevLinkTitle"}}</a>
{{ end }}
{{ else }}
<a href="#" data-tooltip="{{tr $.Ctx "PagerNoPreviousTooltip"}}">{{tr $.Ctx "PagerPrevLinkTitle"}}</a>
{{ end }}
</li>
</ul>
<ul>
<li><small>{{tr $.Ctx "PagerTwtsSummary" (dict "Page" $.Pager.Page "PageNums" $.Pager.PageNums "Nums" $.Pager.Nums)}}</small></li>
</ul>
<ul>
<li>
{{ if $.Pager.HasNext }}
{{ with $.Ctx.Twter.URL }}
{{ if isLocalURL $.Ctx.Twter.URL }}
<a href="?p={{ $.Pager.NextPage }}">{{tr $.Ctx "PagerNextLinkTitle"}}</a>
{{ else }}
<a href="/external?uri={{ $.Ctx.Twter.URL }}&nick={{ $.Ctx.Twter.Nick }}&p={{ $.Pager.NextPage }}">{{tr $.Ctx "PagerNextLinkTitle"}}</a>
{{ end }}
{{ else }}
<a href="?p={{ $.Pager.NextPage }}">{{tr $.Ctx "PagerNextLinkTitle"}}</a>
{{ end }}
{{ else }}
<a href="#" data-tooltip="{{tr $.Ctx "PagerNoNextTooltip"}}">{{tr $.Ctx "PagerNextLinkTitle"}}</a>
{{ end }}
</li>
</ul>
</nav>
{{ end }}
{{ end }}
{{ define "profileLinks" }}
<ul>
{{ if $.ShowConfig }}
<li><a target="_blank" href="/user/{{ $.Profile.Username }}/config.yaml">{{tr $.Ctx "ProfileConfigLinkTitle"}}&nbsp;<i class="icss-gear"></i></a></li>
{{ end }}
<li><a href="{{ $.Profile.BlogsURL }}">{{tr $.Ctx "ProfileBlogsLinkTitle"}}&nbsp;<i class="icss-quill-pen"></i></a></li>
<li><a target="_blank" href="{{ $.Profile.URL }}">{{tr $.Ctx "ProfileTwtxtLinkTitle"}}&nbsp;<i class="icss-link"></i></a></li>
<li><a target="_blank" href="{{ $.Profile.URL | trimSuffix "/twtxt.txt" }}/atom.xml">{{tr $.Ctx "ProfileAtomLinkTitle"}}&nbsp;<i class="icss-rss"></i></a></li>
{{ if $.Profile.ShowFollowers }}
<li><a href="/user/{{ $.Profile.Username }}/followers">{{tr $.Ctx "ProfileFollowersLinkTitle"}} {{ $.Profile.Followers | len }}</a></li>
{{ end }}
{{ if $.Profile.ShowFollowing }}
<li><a href="/user/{{ $.Profile.Username }}/following">{{tr $.Ctx "ProfileFollowingLinkTitle"}} {{ $.Profile.Following | len }}</a></li>
{{ end }}
{{ if $.Profile.ShowBookmarks }}
<li><a href="/user/{{ $.Profile.Username }}/bookmarks">{{tr $.Ctx "ProfileBookmarksLinkTitle"}} {{ $.Profile.Bookmarks | len }}</a></li>
{{ end }}
</ul>
{{ end }}

9
internal/templates/base.html

@ -3,7 +3,7 @@
<html lang="en" {{ with .Theme }}data-theme="{{ . }}"{{ end }}>
<head>
{{ if $.Debug }}
<link href="/css/01-pico.css" rel="stylesheet" />
<!-- <link href="/css/01-pico.css" rel="stylesheet" /> -->
<link href="/css/02-icss.css" rel="stylesheet" />
<link href="/css/03-icons.css" rel="stylesheet" />
<!-- <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/water.css@2/out/water.css"> -->
@ -48,10 +48,15 @@
<!-- Navigation - Pod/Global -->
<nav class="pod-menu"> <!-- TODO -->
<!-- <img alt="yarn" class="yarn-logo" src="https://openmoji.org//data/color/svg/1F9F6.svg"> -->
<!-- <img alt="yarn" class="yarn-logo" src="/img/yarn-logo.png"> -->
<ul>
<!-- 🧶 Logo -->
<!-- <li><a href="/">{{ $.Logo }}</a></li> -->
<li><a href="/"><img alt="yarn" class="yarn-logo" src="https://openmoji.org//data/color/svg/1F9F6.svg"><strong> Twtxt.net</strong> <small>- a yarn.social pod</small></a></li>
<li><a href="/">
<img alt="yarn" class="yarn-logo" src="/img/yarn-logo.png">
<strong> Twtxt.net</strong>
<small>&ndash; a yarn.social pod</small></a></li>
</ul>
<ul class="right">
<li><a href="/discover"><i class="icss-users"></i> {{tr . "NavDiscover"}}</a></li>

170
internal/templates/base.html_copy

@ -1,170 +0,0 @@
{{define "base"}}
<!DOCTYPE html>
<html lang="en" {{ with .Theme }}data-theme="{{ . }}"{{ end }}>
<head>
{{ if $.Debug }}
<link href="/css/01-pico.css" rel="stylesheet" />
<link href="/css/02-icss.css" rel="stylesheet" />
<link href="/css/03-icons.css" rel="stylesheet" />
<link href="/css/99-twtxt.css" rel="stylesheet" />
<link rel="icon" type="image/png" href="/img/favicon.png" />
{{ else }}
<link href="/css/{{ .Commit }}/twtxt.min.css" rel="stylesheet" />
<link rel="icon" type="image/png" href="/img/{{ .Commit}}/favicon.png" />
{{ end }}
{{ range .Alternatives }}
<link rel="alternate" type="{{ .Type }}" title="{{ .Title }}" href="{{ .URL }}" />
{{ end }}
{{ range .Links }}
<link href="{{ .Href }}" rel="{{ .Rel }}" />
{{ end }}
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>{{ .InstanceName }} {{ .Title }}</title>
{{ with .Meta.Title }}<meta name="title" content="{{ . }}">{{ end }}
{{ with .Meta.Author }}<meta name="author" content="{{ . }}">{{ end }}
{{ with .Meta.Keywords }}<meta name="keywords" content="{{ . }}">{{ end }}
{{ with .Meta.Description }}<meta name="description" content="{{ . }}">{{ end }}
<!-- OpenGraph Meta Tags -->
{{ with .Meta.Title }}<meta property="og:title" content="{{ . }}">{{ end }}
{{ with .Meta.Description }}<meta property="og:description" content="{{ . }}">{{ end }}
{{ with .Meta.UpdatedAt }}<meta property="og:updated_time" content="{{ . }}" />{{ end }}
{{ with .Meta.Image }}<meta property="og:image" content="{{ . }}">{{ end }}
{{ with .Meta.URL }}<meta property="og:url" content="{{ . }}">{{ end }}
<meta property="og:site_name" content="{{ .InstanceName }}">
</head>
<body>
<nav id="mainNav" class="container-fluid">
<ul>
<li class="mobile-menu">
{{ if .Authenticated }}
<a id="messagesMenu" href="/messages">
<i class="icss-mail-box"></i>
{{ if gt $.NewMessages 0 }}
<span class="badge">{{ $.NewMessages }}</span>
{{ end }}
</a>
{{ end }}
<a id="burgerMenu" href="javascript:void(0);">
<i class="icss-bars"></i>
</a>
</li>
<li><a href="/">{{ $.Logo }}</a></li>
{{ if .Authenticated }}
<li>
<a href="/">
<i class="icss-chat"></i>
{{tr . "NavTimeline"}}
</a>
</li>
<li>
<a href="/discover">
<i class="icss-users"></i>
{{tr . "NavDiscover"}}
</a>
</li>
<li>
<a href="/mentions">
<i class="icss-smiley"></i>
{{tr . "NavMentions"}}
</a>
</li>
<li>
<a href="/feeds">
<i class="icss-rss"></i>
{{tr . "NavFeeds"}}
</a>
</li>
{{ end }}
</ul>
<ul>
{{ if .Authenticated }}
<li>
<a href="/messages">
{{ if gt $.NewMessages 0 }}
<i class="icss-mail-box-in"></i>
{{ else }}
<i class="icss-mail-box"></i>
{{ end }}
{{tr . "NavMessages"}}
</a>
</li>
<li>
<a href="/follow">
<i class="icss-plus"></i>
{{tr . "NavFollow"}}
</a>
</li>
<li>
<a class="secondary" href="/settings">
<i class="icss-gear"></i>
{{tr . "NavSettings"}}
</a>
</li>
<li>
<a class="secondary" href="/logout">
<i class="icss-exit"></i>
{{tr . "NavLogout"}}
</a>
</li>
{{ else }}
<li>
<a href="/login">
<i class="icss-key"></i>
{{tr . "NavLogin"}}
</a>
</li>
{{ if .RegisterDisabled }}
<li>
<a href="#" data-tooltip="{{ with .RegisterDisabledMessage }}{{ .RegisterDisabledMessage }}{{ else }}Registrations are disabled on this instance. Please contact the operator.{{ end }}">
<i class="icss-exclamation-circle" style="color:red;"></i>
{{tr . "NavRegister"}}
</a>
</li>
{{ else }}
<li>
<a href="/register">
<i class="icss-smiley"></i>
{{tr . "NavRegister"}}
</a>
</li>
{{ end }}
{{ end }}
</ul>
</nav>
<main class="container">
{{template "content" . }}
</main>
<footer class="container">
<div class="footer-copyright"><a href="https://git.mills.io/yarnsocial/yarn" target="_blank">yarnd {{ .SoftwareVersion }}</a>
·
{{(tr . "CopyrightCreator")|html}}
·
{{(tr . "Copyright")|html}}
</div>
<div class="footer-menu">
<a href="/about" target="_blank" class="menu-item">{{tr . "MenuAbout"}}</a>
<a href="/privacy" target="_blank" class="menu-item">{{tr . "MenuPrivacy"}}</a>
<a href="/abuse" target="_blank" class="menu-item">{{tr . "MenuAbuse"}}</a>
<a href="/help" target="_blank" class="menu-item">{{tr . "MenuHelp"}}</a>
<a href="/support" target="_blank" class="menu-item">{{tr . "MenuSupport"}}</a>
<a href="/atom.xml" target="_blank">{{tr . "MenuAtom"}}&nbsp;<i class="icss-rss"></i></a>
</div>
</footer>
{{ if $.Debug }}
<script type="application/javascript" src="/js/01-umbrella.js"></script>
<script type="application/javascript" src="/js/02-polyfill.js"></script>
<script type="application/javascript" src="/js/03-twix.js"></script>
<script type="application/javascript" src="/js/99-twtxt.js"></script>
<script type="application/javascript" src="/js/ie11CustomProperties.min.js"></script>
{{ else }}
<script type="application/javascript" src="/js/{{ .Commit }}/twtxt.min.js"></script>
{{ end }}
</body>
</html>
{{end}}

2
internal/templates/timeline.html

@ -1,5 +1,5 @@
<h1>Your Timeline</h1>
{{define "content"}}
{{ template "post" (dict "Authenticated" $.Authenticated "User" $.User "TwtPrompt" $.TwtPrompt "MaxTwtLength" $.MaxTwtLength "Reply" $.Reply "AutoFocus" true "CSRFToken" $.CSRFToken "Ctx" .)}}
<h2 class="dev-note center">Your Timeline // Your Mentions // Discover (Pod Timeline)</h2> <!-- TODO: make this heading adjust to filtering -->
{{ template "feed" (dict "Authenticated" $.Authenticated "User" $.User "Profile" $.Profile "LastTwt" $.LastTwt "Pager" $.Pager "Twts" $.Twts "Ctx" .) }}
{{end}}

Loading…
Cancel
Save