www.fgks.org   »   [go: up one dir, main page]

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

Change layout of saved image modal #5288

Merged
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
Add flex to saved image modal
-  Remove clearfix div from template
- Add width attribute to cover image
  • Loading branch information
jimchamp committed Jun 9, 2021
commit 7a45d6fa0f03bc39c6fb0ecee1bd50a19fe5895f
42 changes: 21 additions & 21 deletions openlibrary/templates/covers/saved.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,31 +2,31 @@

$putctx("cssfile", "form")

<div class="imagePost">
$if image:
<img src="$image.url(size='M')" class="cover" alt="New book cover"/>
</div>
<div class="saved-image-container">
<div class="imagePost">
$if image:
<img src="$image.url(size='M')" class="cover" width="200" alt="New book cover"/>
</div>

<div class="imageSaved" data-image-id="$(image and image.id)">
<div class="saved">$_("Saved!")</div>
<div class="meta">
$if showinfo:
<strong>$_("Notes:")</strong><br/>
$ d = image.info()
$if d:
$if d.author:
Uploaded by <a href="$d.author.key">$d.author.name</a> on $format_date(d.created)<br/>
$else:
Uploaded anonymously on $datestr(d.created)<br/>
$if d.source_url:
<a href="$d.source_url">$d.source_url</a><br/>
<br/>
<a href="$changequery()">$_("Add another image")</a>?
<div class="imageSaved" data-image-id="$(image and image.id)">
<div class="saved">$_("Saved!")</div>
<div class="meta">
$if showinfo:
<strong>$_("Notes:")</strong><br/>
$ d = image.info()
$if d:
$if d.author:
Uploaded by <a href="$d.author.key">$d.author.name</a> on $format_date(d.created)<br/>
$else:
Uploaded anonymously on $datestr(d.created)<br/>
$if d.source_url:
<a href="$d.source_url">$d.source_url</a><br/>
<br/>
<a href="$changequery()">$_("Add another image")</a>?
</div>
</div>
</div>

<div class="clearfix"></div>

<div class="formButtons">
<button type="button" name="finished" id="popClose" value="Finished" class="largest">$_("Finished")</button>
</div>
5 changes: 3 additions & 2 deletions static/css/page-form.less
Original file line number Diff line number Diff line change
Expand Up @@ -90,12 +90,10 @@ footer,
padding: .4em;
}
.imagePost {
float: left;
width: 300px;
text-align: center;
}
.imageSaved {
float: left;
width: 300px;
font-size: .75em;
color: @grey;
Expand All @@ -109,6 +107,9 @@ footer,
min-height: 30px;
margin: 25px 0 15px;
}
.saved-image-container {
display: flex;
}

@media all and ( min-width: @width-breakpoint-desktop ) {
body {
Expand Down