Merge branch 'answer-linking'

This commit is contained in:
httpjamesm 2023-02-14 20:12:56 -05:00
commit 9d28ee483c
No known key found for this signature in database
3 changed files with 18 additions and 1 deletions

3
public/icons/link.svg Normal file
View File

@ -0,0 +1,3 @@
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-6 h-6">
<path stroke-linecap="round" stroke-linejoin="round" d="M13.19 8.688a4.5 4.5 0 011.242 7.244l-4.5 4.5a4.5 4.5 0 01-6.364-6.364l1.757-1.757m13.35-.622l1.757-1.757a4.5 4.5 0 00-6.364-6.364l-4.5 4.5a4.5 4.5 0 001.242 7.244" />
</svg>

After

Width:  |  Height:  |  Size: 363 B

View File

@ -94,6 +94,13 @@ img {
margin-bottom: 1rem; margin-bottom: 1rem;
background-color: var(--meta-bg); background-color: var(--meta-bg);
color: var(--text-color); color: var(--text-color);
display: flex;
justify-content: space-between;
}
.answer-meta p {
margin: 0;
} }
.answer-meta.accepted { .answer-meta.accepted {

View File

@ -72,8 +72,15 @@
<div <div
class="answer-meta{{ if $answer.IsAccepted }} accepted{{end}}" class="answer-meta{{ if $answer.IsAccepted }} accepted{{end}}"
> >
<p>
{{ if $answer.IsAccepted }} Accepted - {{ end }} {{ if $answer.IsAccepted }} Accepted - {{ end }}
{{$answer.Upvotes}} Votes {{$answer.Upvotes}} Votes
</p>
<a href="#{{ $answer.ID }}" class="answer-link">
<div class="icon">
<img src="/static/icons/link.svg" alt="Paperclip icon" />
</div>
</a>
</div> </div>
{{ $answer.Body }} {{ $answer.Body }}
<div class="answer-author-parent"> <div class="answer-author-parent">