mirror of
https://github.com/flynx/PortableMag.git
synced 2025-10-30 03:30:09 +00:00
more work on templates ui...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
ae4be5defb
commit
e03430b5c9
@ -100,6 +100,7 @@ body {
|
|||||||
text-shadow: black 0.1em 0.1em 0.4em, black 0.1em 0.1em;
|
text-shadow: black 0.1em 0.1em 0.4em, black 0.1em 0.1em;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.container .preview-toggle,
|
||||||
.container .column-toggle,
|
.container .column-toggle,
|
||||||
.container .light.theme-toggle,
|
.container .light.theme-toggle,
|
||||||
.container .theme-toggle {
|
.container .theme-toggle {
|
||||||
@ -108,7 +109,7 @@ body {
|
|||||||
width: 20px;
|
width: 20px;
|
||||||
height: 20px;
|
height: 20px;
|
||||||
top: 5px;
|
top: 5px;
|
||||||
right: 5px;
|
right: 40px;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
border: solid white 2px;
|
border: solid white 2px;
|
||||||
|
|
||||||
@ -148,9 +149,18 @@ body {
|
|||||||
float: left;
|
float: left;
|
||||||
}
|
}
|
||||||
.container .column-toggle {
|
.container .column-toggle {
|
||||||
right: 40px;
|
right: 75px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.container .preview-toggle div {
|
||||||
|
height: 16px;
|
||||||
|
border: solid black 2px;
|
||||||
|
}
|
||||||
|
.container .preview-toggle {
|
||||||
|
right: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
@ -195,6 +205,33 @@ function addThemeToggleZones(){
|
|||||||
.click(toggleTheme)
|
.click(toggleTheme)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function addPreviewToggleZones(){
|
||||||
|
$('<div><div/></div>')
|
||||||
|
.addClass('preview-toggle')
|
||||||
|
.attr('title', 'Toggle preview')
|
||||||
|
.appendTo($('.page-box, .preview'))
|
||||||
|
.click(function(){
|
||||||
|
if($('.container .preview').css('display') == 'block'){
|
||||||
|
$('.container .preview')
|
||||||
|
.css('display', 'none')
|
||||||
|
.children('.page')
|
||||||
|
.remove()
|
||||||
|
}
|
||||||
|
$(this)
|
||||||
|
.parents('.page-box')
|
||||||
|
.children('.page')
|
||||||
|
.clone()
|
||||||
|
.appendTo($('.container .preview'))
|
||||||
|
.click(function(){
|
||||||
|
$('.container').trigger('templateSelected', this)
|
||||||
|
return false
|
||||||
|
})
|
||||||
|
$('.container .preview')
|
||||||
|
.css('display', 'block')
|
||||||
|
return false
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
function addColumnToggleZones(){
|
function addColumnToggleZones(){
|
||||||
$('<div><div/><div/></div>')
|
$('<div><div/><div/></div>')
|
||||||
.addClass('column-toggle')
|
.addClass('column-toggle')
|
||||||
@ -207,6 +244,7 @@ $(function(){
|
|||||||
|
|
||||||
addThemeToggleZones()
|
addThemeToggleZones()
|
||||||
addColumnToggleZones()
|
addColumnToggleZones()
|
||||||
|
addPreviewToggleZones()
|
||||||
|
|
||||||
$('.preview')
|
$('.preview')
|
||||||
.click(function(){
|
.click(function(){
|
||||||
@ -218,6 +256,12 @@ $(function(){
|
|||||||
|
|
||||||
$('.page-box')
|
$('.page-box')
|
||||||
.click(function(){
|
.click(function(){
|
||||||
|
var page = $(this)
|
||||||
|
if(!page.hasClass('page')){
|
||||||
|
page = page.children('.page')
|
||||||
|
}
|
||||||
|
$('.container').trigger('templateSelected', page[0])
|
||||||
|
/*
|
||||||
$(this)
|
$(this)
|
||||||
.children('.page')
|
.children('.page')
|
||||||
.clone()
|
.clone()
|
||||||
@ -228,6 +272,7 @@ $(function(){
|
|||||||
})
|
})
|
||||||
$('.container .preview')
|
$('.container .preview')
|
||||||
.css('display', 'block')
|
.css('display', 'block')
|
||||||
|
*/
|
||||||
})
|
})
|
||||||
|
|
||||||
$('.container')
|
$('.container')
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user