more semantic html

This commit is contained in:
Ted Unangst 2019-04-28 19:16:24 -04:00
parent 0b114ead3e
commit e904398905
4 changed files with 15 additions and 15 deletions

View File

@ -10,7 +10,7 @@
<meta name="viewport" content="width=device-width"> <meta name="viewport" content="width=device-width">
</head> </head>
<body> <body>
<div class="header"> <header>
<span><a href="/">honk</a></span> <span><a href="/">honk</a></span>
{{ if .UserInfo }} {{ if .UserInfo }}
<span><a href="/atme">@me</a></span> <span><a href="/atme">@me</a></span>
@ -24,4 +24,4 @@
{{ if .ShowRSS }} {{ if .ShowRSS }}
<span><a href="/rss">rss</a></span> <span><a href="/rss">rss</a></span>
{{ end }} {{ end }}
</div> </header>

View File

@ -1,6 +1,6 @@
<div class="honk {{ .Honk.What }} {{ .Honk.Privacy }}"> <article class="honk {{ .Honk.What }} {{ .Honk.Privacy }}">
{{ with .Honk }} {{ with .Honk }}
<div class="title"> <header>
<img alt="avatar" src="/a?a={{ .Honker}}"> <img alt="avatar" src="/a?a={{ .Honker}}">
<p><a href="{{ .Honker }}" rel=noreferrer>{{ .Username }}</a> <span class="clip">{{ .What }} {{ .Date.Format "02 Jan 2006 15:04" }} <a href="{{ .URL }}" rel=noreferrer>{{ .URL }}</a></span> <p><a href="{{ .Honker }}" rel=noreferrer>{{ .Username }}</a> <span class="clip">{{ .What }} {{ .Date.Format "02 Jan 2006 15:04" }} <a href="{{ .URL }}" rel=noreferrer>{{ .URL }}</a></span>
{{ if .RID }} {{ if .RID }}
@ -13,7 +13,7 @@ in reply to: <a href="{{ .RID }}" rel=noreferrer>{{ .RID }}</a>
<span style="margin-left: 3em;" class="clip"> <span style="margin-left: 3em;" class="clip">
convoy: <a href="/t?c={{ .Convoy }}">{{ .Convoy }}</a> convoy: <a href="/t?c={{ .Convoy }}">{{ .Convoy }}</a>
</span> </span>
</div> </header>
<div class="noise"> <div class="noise">
<p>{{ .HTML }} <p>{{ .HTML }}
{{ range .Donks }} {{ range .Donks }}
@ -45,4 +45,4 @@ convoy: <a href="/t?c={{ .Convoy }}">{{ .Convoy }}</a>
</div> </div>
<p> <p>
{{ end }} {{ end }}
</div> </article>

View File

@ -1,5 +1,5 @@
{{ template "header.html" . }} {{ template "header.html" . }}
<div class="center"> <main>
<div class="info" id="infobox"> <div class="info" id="infobox">
{{ if .Name }} {{ if .Name }}
<p>{{ .Name }} <span style="margin-left:1em;"><a href="/u/{{ .Name }}/rss">rss</a></span> <p>{{ .Name }} <span style="margin-left:1em;"><a href="/u/{{ .Name }}/rss">rss</a></span>
@ -26,7 +26,7 @@
{{ range .Honks }} {{ range .Honks }}
{{ template "honk.html" map "Honk" . "BonkCSRF" $BonkCSRF }} {{ template "honk.html" map "Honk" . "BonkCSRF" $BonkCSRF }}
{{ end }} {{ end }}
</div> </main>
{{ if $BonkCSRF }} {{ if $BonkCSRF }}
<script> <script>
function encode(hash) { function encode(hash) {

View File

@ -22,16 +22,16 @@ input {
line-height: 1.2em; line-height: 1.2em;
padding: 0.5em; padding: 0.5em;
} }
.header { body > header {
max-width: 1200px; max-width: 1200px;
margin: 1em auto; margin: 1em auto;
font-size: 1.5em; font-size: 1.5em;
text-align: right; text-align: right;
} }
.header span { body > header span {
margin-right: 2em; margin-right: 2em;
} }
.center { main {
max-width: 1200px; max-width: 1200px;
margin: auto; margin: auto;
font-size: 1.5em; font-size: 1.5em;
@ -108,10 +108,10 @@ button a {
.honk a { .honk a {
color: #dde; color: #dde;
} }
.honk .title .clip a { .honk header .clip a {
color: #88a; color: #88a;
} }
.honk .title { .honk header {
white-space: nowrap; white-space: nowrap;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
@ -119,13 +119,13 @@ button a {
margin-top: 1em; margin-top: 1em;
height: 64px; height: 64px;
} }
.honk .title img { .honk header img {
float: left; float: left;
margin-right: 1em; margin-right: 1em;
width: 64px; width: 64px;
height: 64px; height: 64px;
} }
.honk .title p { .honk header p {
margin-top: 0px; margin-top: 0px;
} }
.honk button { .honk button {