Fixed image view dimensions.

This commit is contained in:
2023-08-23 21:57:43 -04:00
parent bac5437e7e
commit 72513f2f6d
3 changed files with 29 additions and 23 deletions

View File

@@ -11,6 +11,14 @@ body {
margin: 0px; margin: 0px;
} }
#id_username {
width: 100%;
}
#id_password {
width: 100%;
}
/**************************************************************************** /****************************************************************************
* Containers. * * Containers. *
****************************************************************************/ ****************************************************************************/
@@ -26,10 +34,8 @@ body {
} }
.image-container { .image-container {
position: relative; max-width: 900px;
height: 100%; max-height: 600px;
width: 100%;
overflow: hidden;
} }
.fc { .fc {
@@ -44,29 +50,28 @@ body {
width: 100%; width: 100%;
} }
.pd { .fixed-width {
padding: 10%; width: 300px;
} }
/**************************************************************************** /****************************************************************************
* Content. * * Content. *
****************************************************************************/ ****************************************************************************/
.image-container img { .image {
position: absolute; max-width: 100%;
top: 0; max-height: 600px;
left: 0;
bottom: 0;
right: 0;
height: 100%;
width: auto; width: auto;
margin: auto;
} }
.mauto { .mauto {
margin: auto; margin: auto;
} }
.mauto-top {
margin: 200px auto;
}
.navigation-icon { .navigation-icon {
width: 100px; width: 100px;
} }

View File

@@ -42,7 +42,7 @@
</td> </td>
<!-- Current image. --> <!-- Current image. -->
<td class="full-width"> <td>
<a href="{{image_path}}" target="_blank"> <a href="{{image_path}}" target="_blank">
<div class="image-container"> <div class="image-container">
<img src="{{image_path}}" class="image"> <img src="{{image_path}}" class="image">

View File

@@ -8,12 +8,11 @@
</title> </title>
<link href="{% static 'css/styles.css' %}" rel="stylesheet"> <link href="{% static 'css/styles.css' %}" rel="stylesheet">
</head> </head>
<body class="background"> <body class="background">
<div class="fc mauto pd"> <div class="fixed-width mauto-top">
<form method="post" action="{% url 'login' %}" class="fc"> <form method="post" action="{% url 'login' %}" class="full-width">
{% csrf_token %} {% csrf_token %}
<table> <table class="full-width">
<tr> <tr>
<td> <td>
{{ form.username.label_tag }} {{ form.username.label_tag }}
@@ -22,7 +21,6 @@
{{ form.username }} {{ form.username }}
</td> </td>
</tr> </tr>
<tr> <tr>
<td> <td>
{{ form.password.label_tag }} {{ form.password.label_tag }}
@@ -31,10 +29,13 @@
{{ form.password }} {{ form.password }}
</td> </td>
</tr> </tr>
</table> <tr>
<td colspan="2">
<input type="submit" value="login" class="float-right"> <input type="submit" value="login" class="float-right">
<input type="hidden" name="next" value="{{ next }}"> <input type="hidden" name="next" value="{{ next }}">
</td>
</tr>
</table>
</form> </form>
</div> </div>
</body> </body>