Skip to content

Commit

Permalink
Fixed document detail layout to avoid div block buttons
Browse files Browse the repository at this point in the history
  • Loading branch information
svera authored Feb 13, 2024
1 parent 3b786e5 commit 052fb4a
Showing 1 changed file with 17 additions and 16 deletions.
33 changes: 17 additions & 16 deletions internal/webserver/embedded/views/document.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,23 @@

<div class="container">
<div class="row mt-5">
<div class="card col-md-4 col-sm-12 pe-3 border border-0">
<img src="/images/generic.jpg" data-src="/cover/{{.Document.Slug}}" loading="lazy"
class="border border-2 mb-3 cover img-fluid"
alt='{{t $lang "\"%s\" cover" .Document.Title}}'>

<div class="card-img-overlay">
<h2 class="card-title text-center mx-1 mt-5">{{.Document.Title}}</h2>
<h3 class="card-text text-center mx-1 mt-3">
{{if .Document.Authors}}
{{join .Document.Authors ", "}}
{{else}}
{{t $lang "Unknown author"}}
{{end}}
</h3>
<div class="col-md-4 col-sm-12 pe-3">
<div class="card border border-0">
<img src="/images/generic.jpg" data-src="/cover/{{.Document.Slug}}" loading="lazy"
class="border border-2 mb-3 cover img-fluid"
alt='{{t $lang "\"%s\" cover" .Document.Title}}'>

<div class="card-img-overlay">
<h2 class="card-title text-center mx-1 mt-5">{{.Document.Title}}</h2>
<h3 class="card-text text-center mx-1 mt-3">
{{if .Document.Authors}}
{{join .Document.Authors ", "}}
{{else}}
{{t $lang "Unknown author"}}
{{end}}
</h3>
</div>
</div>

<div class="d-grid gap-2 mb-5 actions">
<a href="/{{$lang}}/read/{{.Document.Slug}}" class="btn btn-primary">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-eye-fill" viewBox="0 0 16 16">
Expand Down Expand Up @@ -59,7 +60,7 @@ <h3 class="card-text text-center mx-1 mt-3">
<p class="text-start">{{t .Lang "Send to email unavailable, no email service configured"}}</p>
{{else}}
<div>
<form method="post" action="send" onsubmit="send(this)" class="send-email mt-3">
<form method="post" action="send" onsubmit="send(this, {{t .Lang "Document sent succesfully"}}, {{t .Lang "There was an error sending the document, please try again later"}})" class="send-email mt-3">
<label for="email" class="form-label text-start">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-envelope-fill" viewBox="0 0 16 16">
<path d="M.05 3.555A2 2 0 0 1 2 2h12a2 2 0 0 1 1.95 1.555L8 8.414.05 3.555ZM0 4.697v7.104l5.803-3.558L0 4.697ZM6.761 8.83l-6.57 4.027A2 2 0 0 0 2 14h12a2 2 0 0 0 1.808-1.144l-6.57-4.027L8 9.586l-1.239-.757Zm3.436-.586L16 11.801V4.697l-5.803 3.546Z"/>
Expand Down

0 comments on commit 052fb4a

Please sign in to comment.