Skip to content

Commit

Permalink
layout edit_challenge
Browse files Browse the repository at this point in the history
  • Loading branch information
GasStationManager committed Nov 24, 2024
1 parent 7c53f40 commit ca7193a
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 16 deletions.
20 changes: 4 additions & 16 deletions app/templates/edit_challenge.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,29 +8,17 @@ <h1>Edit Challenge</h1>
{% endif %}

<form method="post">
<div>
<label for="title">Title:</label>
<input type="text" id="title" name="title" value="{{ challenge.title }}" required>
</div>
<div>
<label for="description">Description:</label>
<textarea id="description" name="description" rows="4" required>{{ challenge.description }}</textarea>
</div>
<div>
<textarea id="description" name="description" rows="10" required>{{ challenge.description }}</textarea>
<label for="function_signature">Function Signature:</label>
<textarea id="function_signature" name="function_signature" rows="2" required>{{ challenge.function_signature }}</textarea>
</div>
<div>
<textarea id="function_signature" name="function_signature" rows="4" cols="50" required>{{ challenge.function_signature }}</textarea>
<label for="theorem_signature">Theorem Signature:</label>
<textarea id="theorem_signature" name="theorem_signature" rows="2" required>{{ challenge.theorem_signature }}</textarea>
</div>
<div>
<textarea id="theorem_signature" name="theorem_signature" rows="4" cols="50" required>{{ challenge.theorem_signature }}</textarea>
<label for="theorem2_signature">Additional Theorem Signature (Optional):</label>
<textarea id="theorem2_signature" name="theorem2_signature" rows="2">{{ challenge.theorem2_signature or '' }}</textarea>
</div>
<div class="button-group">
<textarea id="theorem2_signature" name="theorem2_signature" rows="4" cols="50">{{ challenge.theorem2_signature or '' }}</textarea>
<button type="submit">Save Changes</button>
<a href="/challenges/{{ challenge.id }}" class="button secondary">Cancel</a>
</div>
</form>
{% endblock %}
8 changes: 8 additions & 0 deletions static/css/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,14 @@ button[type="submit"]:hover {
margin: 1rem 0;
}

.button.secondary {
background-color: #6c757d;
}

.button:hover {
opacity: 0.9;
}

form textarea {
width: 100%;
font-family: monospace;
Expand Down

0 comments on commit ca7193a

Please sign in to comment.