Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ajoute la modification "in place" du titre et du sous-titre d'un contenu
- Loading branch information
Showing
13 changed files
with
587 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
/* ===== Zeste de Savoir ==================================================== */ | ||
/* Show and hide in-place forms */ | ||
/* ========================================================================== */ | ||
|
||
(function($) { | ||
'use strict' | ||
|
||
/* Edit title */ | ||
function toggleDisplayTitle(e) { | ||
$('#title-show').toggleClass('hidden') | ||
$('#title-edit').toggleClass('hidden') | ||
e.preventDefault() | ||
} | ||
|
||
$('#show-title-edit').on('click', toggleDisplayTitle) | ||
$('#hide-title-edit').on('click', toggleDisplayTitle) | ||
|
||
/* Edit subtitle */ | ||
function toggleDisplaySubtitle(e) { | ||
$('#subtitle-show').toggleClass('hidden') | ||
$('#subtitle-edit').toggleClass('hidden') | ||
e.preventDefault() | ||
} | ||
|
||
$('#show-subtitle-edit').on('click', toggleDisplaySubtitle) | ||
$('#hide-subtitle-edit').on('click', toggleDisplaySubtitle) | ||
})(jQuery) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
#show-title-edit, #show-subtitle-edit { | ||
font-size: 1.5rem; | ||
cursor: pointer; | ||
} | ||
|
||
#title-edit, #subtitle-edit { | ||
height: 100%; | ||
|
||
form { | ||
box-sizing: border-box; | ||
height: 100%; | ||
} | ||
|
||
.control-label { | ||
display: none; | ||
} | ||
|
||
.control-group, .controls { | ||
display: inline; | ||
box-sizing: border-box; | ||
width: 50%; | ||
} | ||
|
||
input { | ||
box-sizing: border-box; | ||
display: inline-block; | ||
vertical-align: middle; | ||
width: 50%; | ||
margin: 0; | ||
padding: 0; | ||
font-weight: normal; | ||
} | ||
|
||
button.btn, button.btn-submit, button.link, button { | ||
box-sizing: border-box; | ||
display: inline-block; | ||
vertical-align: middle; | ||
height: 100%; | ||
float: none; | ||
cursor: pointer; | ||
margin: 0 5px 0 0; | ||
} | ||
|
||
button.link { | ||
box-sizing: border-box; | ||
color: lighten($color-primary, 20%); | ||
transition: color $transition-duration ease, text-decoration $transition-duration ease; | ||
text-decoration: underline; | ||
|
||
&:hover { | ||
color: darken($color-secondary, 15%); | ||
text-decoration: none; | ||
} | ||
} | ||
} | ||
|
||
|
||
#title-edit { | ||
input { | ||
height: 3.8rem; | ||
color: $color-primary; | ||
} | ||
|
||
button.btn, button.btn-submit, button.link, button { | ||
font-size: 1.5rem; | ||
line-height: 3.8rem; | ||
} | ||
} | ||
|
||
#subtitle-edit { | ||
input { | ||
height: 2.3rem; | ||
color: #999; | ||
} | ||
|
||
button.btn, button.btn-submit, button.link, button { | ||
font-size: 1.5rem; | ||
line-height: 2.3rem; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.