Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed missing language in highlight links #102

Merged
merged 1 commit into from
Sep 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions internal/webserver/embedded/views/document.html
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,14 @@ <h3 class="card-text text-center mx-1 mt-3">
</a>

{{if and (.Session) (ne .Session.Name "")}}
<a href="/highlights/{{.Document.Slug}}" class="btn btn-outline-secondary highlight {{if .Document.Highlighted}}visually-hidden{{end}}" data-dehighlight="{{.OnDehighlight}}" data-method="POST">
<a href="/{{.Lang}}/highlights/{{.Document.Slug}}" class="btn btn-outline-secondary highlight {{if .Document.Highlighted}}visually-hidden{{end}}" data-dehighlight="{{.OnDehighlight}}" data-method="POST">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-star" viewBox="0 0 16 16">
<path d="M2.866 14.85c-.078.444.36.791.746.593l4.39-2.256 4.389 2.256c.386.198.824-.149.746-.592l-.83-4.73 3.522-3.356c.33-.314.16-.888-.282-.95l-4.898-.696L8.465.792a.513.513 0 0 0-.927 0L5.354 5.12l-4.898.696c-.441.062-.612.636-.283.95l3.523 3.356-.83 4.73zm4.905-2.767-3.686 1.894.694-3.957a.565.565 0 0 0-.163-.505L1.71 6.745l4.052-.576a.525.525 0 0 0 .393-.288L8 2.223l1.847 3.658a.525.525 0 0 0 .393.288l4.052.575-2.906 2.77a.565.565 0 0 0-.163.506l.694 3.957-3.686-1.894a.503.503 0 0 0-.461 0z"/>
</svg>
&nbsp;&nbsp;{{t .Lang "Highlight"}}
</a>

<a href="/highlights/{{.Document.Slug}}" class="btn btn-outline-secondary dehighlight {{if not .Document.Highlighted}}visually-hidden{{end}}" data-dehighlight="{{.OnDehighlight}}" data-method="DELETE">
<a href="/{{.Lang}}/highlights/{{.Document.Slug}}" class="btn btn-outline-secondary dehighlight {{if not .Document.Highlighted}}visually-hidden{{end}}" data-dehighlight="{{.OnDehighlight}}" data-method="DELETE">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-star-fill" viewBox="0 0 16 16">
<path d="M3.612 15.443c-.386.198-.824-.149-.746-.592l.83-4.73L.173 6.765c-.329-.314-.158-.888.283-.95l4.898-.696L7.538.792c.197-.39.73-.39.927 0l2.184 4.327 4.898.696c.441.062.612.636.282.95l-3.522 3.356.83 4.73c.078.443-.36.79-.746.592L8 13.187l-4.389 2.256z"/>
</svg>
Expand Down
4 changes: 2 additions & 2 deletions internal/webserver/embedded/views/partials/actions.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
</li>
{{if and (.Session) (ne .Session.Name "")}}
<li class="highlight {{if .Document.Highlighted}}visually-hidden{{end}}">
<a href="/highlights/{{.Document.Slug}}" class="dropdown-item highlight" data-dehighlight="{{.OnDehighlight}}" data-method="POST">
<a href="/{{.Lang}}/highlights/{{.Document.Slug}}" class="dropdown-item highlight" data-dehighlight="{{.OnDehighlight}}" data-method="POST">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-star" viewBox="0 0 16 16">
<path d="M2.866 14.85c-.078.444.36.791.746.593l4.39-2.256 4.389 2.256c.386.198.824-.149.746-.592l-.83-4.73 3.522-3.356c.33-.314.16-.888-.282-.95l-4.898-.696L8.465.792a.513.513 0 0 0-.927 0L5.354 5.12l-4.898.696c-.441.062-.612.636-.283.95l3.523 3.356-.83 4.73zm4.905-2.767-3.686 1.894.694-3.957a.565.565 0 0 0-.163-.505L1.71 6.745l4.052-.576a.525.525 0 0 0 .393-.288L8 2.223l1.847 3.658a.525.525 0 0 0 .393.288l4.052.575-2.906 2.77a.565.565 0 0 0-.163.506l.694 3.957-3.686-1.894a.503.503 0 0 0-.461 0z"/>
</svg>
Expand All @@ -36,7 +36,7 @@
</li>

<li class="dehighlight {{if not .Document.Highlighted}}visually-hidden{{end}}">
<a href="/highlights/{{.Document.Slug}}" class="dropdown-item dehighlight" data-dehighlight="{{.OnDehighlight}}" data-method="DELETE">
<a href="/{{.Lang}}/highlights/{{.Document.Slug}}" class="dropdown-item dehighlight" data-dehighlight="{{.OnDehighlight}}" data-method="DELETE">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-star-fill" viewBox="0 0 16 16">
<path d="M3.612 15.443c-.386.198-.824-.149-.746-.592l.83-4.73L.173 6.765c-.329-.314-.158-.888.283-.95l4.898-.696L7.538.792c.197-.39.73-.39.927 0l2.184 4.327 4.898.696c.441.062.612.636.282.95l-3.522 3.356.83 4.73c.078.443-.36.79-.746.592L8 13.187l-4.389 2.256z"/>
</svg>
Expand Down