The large&sticky button at the bottom was nice but typing at the end of
the page would get behind it.
margin-bottom: 0;
}
-label#quickedit {
+#quickedit {
position: absolute;
+ top: 0.15em;
right: 2px;
+ label {
+ display: inline-block;
+ margin-left: 6px;
+ }
input {
display: none;
}
+ button,
span {
+ display: inline-block;
+ font-weight: normal;
background: white;
border: 1px solid #386ede;
padding: 1ex;
border-radius: 3px;
color: #386ede;
}
+ button:hover {
+ &:hover {
+ color: white;
+ background: #386ede;
+ }
+ }
input:checked + span {
background: #386ede;
div[contenteditable=true] {
outline: 2px solid #386ede;
- outline-offset: 5px;
+ outline-offset: 12px;
}
.inline-style-popup,
}
}
-.wiki-section button.save {
- position: sticky;
- bottom: 10px;
- width: 100%;
- background: white;
- border: 2px solid #386ede;
- color: #386ede;
- vertical-align: baseline;
- border-radius: 3px;
- font-weight: bold;
- padding: 5px 15px;
- cursor: pointer;
- &:hover {
- color: white;
- background: #386ede;
- }
-}
-
div.wiki-section {
position: relative;
margin: 0 auto;
var $button = $('<button class="save">Enregistrer</button>');
$button[0].div_zone = elem;
elem.edit_url = $(elem).parents('[data-edit-url]').data('edit-url');
- $button.insertAfter(elem);
+ $button.insertBefore($('#quickedit label'));
});
Phylly.init(),
$('div[data-edit-url] > div').each(function(i, elem) {
{% block content %}
<div class="section wiki-section">
-<h3><span class="title">{{ page.title }}</span> {% if request.user.is_authenticated %}<label id="quickedit"><input type="checkbox"><span>Mode édition</span></label>{% endif %}</h3>
+<h3><span class="title">{{ page.title }}</span>
+{% if request.user.is_authenticated %}
+<div id="quickedit">
+ <label><input type="checkbox"><span>Mode édition</span></label>
+</div>
+{% endif %}
+</h3>
{% csrf_token %}
<div>