added single/ribbon view modes... turned out to be really trivial ;)

need to rethink my approach to CSS -- with the right frame of ming it can do wonders.

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2012-06-06 16:47:53 +04:00
parent c5d618c899
commit 59e4035291

View File

@ -60,6 +60,14 @@ $(document).ready(function() {
$('.current-image').click() $('.current-image').click()
}); });
// modes...
function showRibbon(){
$('.hidden').removeClass('hidden')
}
function showSingle(){
$('.field').not('.hidden').addClass('hidden')
}
// basic navigation... // basic navigation...
function prevImage(){ function prevImage(){
$('.current-image').prev('.image').click() $('.current-image').prev('.image').click()
@ -165,6 +173,22 @@ function nextImage(){
.current-ribbon .image { .current-ribbon .image {
} }
/* single image theme (start everything with .hidden) */
.hidden .image {
opacity: 0.0;
}
.hidden .image:hover {
opacity: 0.5;
}
.hidden .current-image:hover, .hidden .current-image {
opacity: 1.0;
}
</style> </style>
@ -211,4 +235,9 @@ function nextImage(){
<button onclick="prevImage()">prev</button> <button onclick="prevImage()">prev</button>
<button onclick="nextImage()">next</button> <button onclick="nextImage()">next</button>
<br><br>
<button onclick="showSingle()">single</button>
<button onclick="showRibbon()">ribbon</button>
<!-- vim:set ts=4 sw=4 nowrap : --> <!-- vim:set ts=4 sw=4 nowrap : -->