max-width: 40rem;
}
+ @media only screen and (max-width: 30rem) {
+ body {
+ margin: 0 2rem;
+ width: calc(100% - 4rem);
+ }
+ }
+
+ @media only screen and (max-width: 20rem) {
+ body {
+ margin: 0 1rem;
+ width: calc(100% - 2rem);
+ }
+ }
+
nav {
display: flex;
flex-direction: row;
align-items: center;
- width: 40rem;
+ width: 100%;
height: 5rem;
}
color: black;
}
+ nav a:hover {
+ text-decoration-thickness: 2px;
+ }
+
nav label {
margin-right: 0.2rem;
}
align-items: center;
}
- form.editor span {
+ nav + form.editor {
+ margin-top: 2.2rem;
+ }
+
+ form.editor div.edit-key-area {
+ width: 100%;
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ margin-bottom: 3.6rem;
+ }
+
+ form.editor span.field {
display: flex;
flex-direction: row;
align-items: center;
{% block body %}
-<nav>
- <a href='{% url "index" %}' title='Home'>Home</a>
- <a href='{{ text_file.get_view_url }}' title='View'>View</a>
-</nav>
-
<style>
.copy-area {
display: flex;
flex-direction: row;
align-items: center;
+ flex-wrap: wrap;
+ justify-content: center;
margin-top: 1.5rem;
}
}
</style>
-{% if edit_key %}
- <span class='copy-area'>
- <label for='edit-key-display'>Edit key:</label>
- <span id='edit-key-display'>{{ edit_key }}</span>
- </span>
- <small>Save this key in order to edit this file in the future.</small>
-{% endif %}
+<nav>
+ <a href='{% url "index" %}' title='Home'>Home</a>
+ <a href='{{ text_file.get_view_url }}' title='View'>View</a>
+</nav>
<form class='editor' action='{{ text_file.get_edit_url }}' method='post'>
{% csrf_token %}
- {% if edit_key %}
- <input id='edit_key' name='edit_key' type='hidden' value='{{ edit_key }}'></input>
- {% else %}
- <span>
- <label for='edit_key'>Edit key:</label>
- <input id='edit_key' name='edit_key' type='text'></input>
- </span>
-
- {% if incorrect_key %}
- <span class='error'>You must enter the correct edit key to save your changes.</span>
+ <div class='edit-key-area'>
+ {% if edit_key %}
+ <span class='copy-area'>
+ <label for='edit-key-display'>Edit key:</label>
+ <span id='edit-key-display'>{{ edit_key }}</span>
+ </span>
+ <small>Save this key in order to edit this file in the future.</small>
+ <input id='edit_key' name='edit_key' type='hidden' value='{{ edit_key }}'></input>
+ {% else %}
+ <span class='field'>
+ <label for='edit_key'>Edit key:</label>
+ <input id='edit_key' name='edit_key' type='text'></input>
+ </span>
+
+ {% if incorrect_key %}
+ <span class='error'>You must enter the correct edit key to save your changes.</span>
+ {% endif %}
{% endif %}
- {% endif %}
+ </div>
+
<textarea name='text'>{{ text }}</textarea>
<input type='submit'></input>
</form>