integrate coverflow folder structure using initial prototype code
@@ -48,6 +48,7 @@ from stars import ReactiveStar
|
||||
from coverart_rb3compat import Menu
|
||||
from coverart_rb3compat import ActionGroup
|
||||
from coverart_covericonview import CoverIconView
|
||||
from coverart_coverflowview import CoverFlowView
|
||||
|
||||
import coverart_rb3compat as rb3compat
|
||||
|
||||
@@ -1023,10 +1024,13 @@ class ViewManager(GObject.Object):
|
||||
ui.add_from_file(rb.find_plugin_file(plugin,
|
||||
'ui/coverart_iconview.ui'))
|
||||
self._views[CoverIconView.name] = ui.get_object('covers_view')
|
||||
self._views[CoverFlowView.name] = CoverFlowView()
|
||||
|
||||
|
||||
self._lastview = CoverIconView.name # this will eventually be hooked up to view radio buttons
|
||||
#self._lastview = CoverFlowView.name # this will eventually be hooked up to view radio buttons
|
||||
window.add(self.current_view.view) # this will need to be hooked up to view-button manager
|
||||
|
||||
window.show_all()
|
||||
# connect signal and properties
|
||||
self._connect_signals()
|
||||
self._connect_properties()
|
||||
|
||||
@@ -0,0 +1,283 @@
|
||||
# -*- Mode: python; coding: utf-8; tab-width: 4; indent-tabs-mode: nil; -*-
|
||||
#
|
||||
# Copyright (C) 2012 - fossfreedom
|
||||
# Copyright (C) 2012 - Agustin Carrasco
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2, or (at your option)
|
||||
# any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
from coverart_external_plugins import CreateExternalPluginMenu
|
||||
from gi.repository import WebKit
|
||||
from gi.repository import Gdk
|
||||
from gi.repository import Gtk
|
||||
from gi.repository import GLib
|
||||
from gi.repository import GObject
|
||||
from gi.repository import Gio
|
||||
from coverart_browser_prefs import GSetting
|
||||
from coverart_album import AlbumsModel
|
||||
from coverart_widgets import AbstractView
|
||||
import rb
|
||||
import json
|
||||
import os
|
||||
from os.path import expanduser
|
||||
|
||||
from collections import namedtuple
|
||||
|
||||
|
||||
class FlowShowingPolicy(GObject.Object):
|
||||
'''
|
||||
Policy that mostly takes care of how and when things should be showed on
|
||||
the view that makes use of the `AlbumsModel`.
|
||||
'''
|
||||
|
||||
def __init__(self, flow_view):
|
||||
super(FlowShowingPolicy, self).__init__()
|
||||
|
||||
self._flow_view = flow_view
|
||||
|
||||
def initialise(self, album_manager):
|
||||
self._album_manager = album_manager
|
||||
self._model = album_manager.model
|
||||
self._connect_signals()
|
||||
|
||||
def _connect_signals(self):
|
||||
self._model.connect('album-updated', self._album_updated)
|
||||
self._model.connect('visual-updated', self._album_updated)
|
||||
|
||||
def _album_updated(self, model, album_path, album_iter):
|
||||
pass
|
||||
|
||||
class CoverFlowView(AbstractView):
|
||||
__gtype_name__ = "CoverFlowView"
|
||||
|
||||
name = 'coverflowview'
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
super(CoverFlowView, self).__init__(*args, **kwargs)
|
||||
|
||||
self.ext_menu_pos = 0
|
||||
self._external_plugins = None
|
||||
self.gs = GSetting()
|
||||
self.show_policy = FlowShowingPolicy(self)
|
||||
self.view = WebKit.WebView()
|
||||
|
||||
def initialise(self, source):
|
||||
if self.has_initialised:
|
||||
return
|
||||
|
||||
self.has_initialised = True
|
||||
|
||||
self.source = source
|
||||
self.plugin = source.plugin
|
||||
self.album_manager = source.album_manager
|
||||
self.ext_menu_pos = 10
|
||||
|
||||
flow = FlowControl()
|
||||
self.view.connect("notify::title", flow.receive_message_signal)
|
||||
|
||||
path = rb.find_plugin_file(self.plugin, 'coverflow/index.html')
|
||||
f = open(path)
|
||||
string = f.read()
|
||||
f.close()
|
||||
|
||||
string = flow.initialise(string)
|
||||
base = os.path.dirname(path) + "/"
|
||||
self.view.load_string(string, "text/html", "UTF-8", "file://" + base)
|
||||
|
||||
# set the model to the view
|
||||
#self.set_model(self.album_manager.model.store)
|
||||
|
||||
#self.connect("item-clicked", self.item_clicked_callback)
|
||||
#self.connect("selection-changed", self.selectionchanged_callback)
|
||||
#self.connect("item-activated", self.item_activated_callback)
|
||||
|
||||
def resize_icon(self, cover_size):
|
||||
'''
|
||||
Callback called when to resize the icon
|
||||
[common to all views]
|
||||
'''
|
||||
pass
|
||||
|
||||
def selectionchanged_callback(self, _):
|
||||
#self.source.update_with_selection()
|
||||
pass
|
||||
|
||||
def scroll_to_object(self, path):
|
||||
pass
|
||||
|
||||
def pre_display_popup(self):
|
||||
if not self._external_plugins:
|
||||
# initialise external plugin menu support
|
||||
self._external_plugins = \
|
||||
CreateExternalPluginMenu("ca_covers_view",
|
||||
self.ext_menu_pos, self.popup)
|
||||
self._external_plugins.create_menu('popup_menu', True)
|
||||
|
||||
def item_clicked_callback(self, iconview, event, path):
|
||||
'''
|
||||
Callback called when the user clicks somewhere on the cover_view.
|
||||
Along with source "show_hide_pane", takes care of showing/hiding the bottom
|
||||
pane after a second click on a selected album.
|
||||
'''
|
||||
# to expand the entry view
|
||||
ctrl = event.state & Gdk.ModifierType.CONTROL_MASK
|
||||
shift = event.state & Gdk.ModifierType.SHIFT_MASK
|
||||
|
||||
self.source.click_count += 1 if not ctrl and not shift else 0
|
||||
|
||||
if self.source.click_count == 1:
|
||||
album = self.album_manager.model.get_from_path(path)\
|
||||
if path else None
|
||||
Gdk.threads_add_timeout(GLib.PRIORITY_DEFAULT_IDLE, 250,
|
||||
self.source.show_hide_pane, album)
|
||||
|
||||
def item_activated_callback(self, iconview, path):
|
||||
'''
|
||||
Callback called when the cover view is double clicked or space-bar
|
||||
is pressed. It plays the selected album
|
||||
'''
|
||||
self.source.play_selected_album()
|
||||
|
||||
return True
|
||||
|
||||
class FlowBatch(object):
|
||||
def __init__(self):
|
||||
self.filename = []
|
||||
self.title = []
|
||||
self.caption = []
|
||||
self.identifier = []
|
||||
self.fetched = False
|
||||
|
||||
def append(self, fullfilename, title, caption):
|
||||
self.filename.append(fullfilename)
|
||||
self.title.append(title)
|
||||
self.caption.append(caption)
|
||||
self.identifier.append('')
|
||||
|
||||
def html_elements(self):
|
||||
|
||||
str = ""
|
||||
for loop in range(len(self.filename)):
|
||||
str = str + '<div class="item"><img class="content" src="' +\
|
||||
self.filename[loop] + '" title="tooltip ' +\
|
||||
self.title[loop] + '"/> <div class="caption">album name ' +\
|
||||
self.caption[loop] + '</div> </div>'
|
||||
|
||||
self.fetched = True
|
||||
return str
|
||||
|
||||
class FlowControl(object):
|
||||
def __init__(self):
|
||||
self.next_batch = 0
|
||||
self.batches = []
|
||||
|
||||
def get_flow_batch(self, args):
|
||||
#print "get_flow_batch"
|
||||
#print args
|
||||
messagevalue = args[0]
|
||||
index = int(args[1])
|
||||
|
||||
obj = {}
|
||||
position = 'stop'
|
||||
|
||||
if messagevalue == 'next':
|
||||
calc_batch = int(index / 50) + 1
|
||||
|
||||
#print index
|
||||
#print calc_batch
|
||||
#print self.next_batch
|
||||
#print len(self.batches)
|
||||
|
||||
if ((calc_batch >= self.next_batch) and
|
||||
(len(self.batches) > calc_batch) and
|
||||
(not self.batches[calc_batch].fetched)):
|
||||
|
||||
position = 'last'
|
||||
chosen = self.batches[calc_batch]
|
||||
size = len(chosen.filename)
|
||||
params = []
|
||||
|
||||
for index in range(0, size):
|
||||
batch = {}
|
||||
batch['filename'] = chosen.filename[index]
|
||||
batch['title'] = "tooltip " + chosen.title[index]
|
||||
batch['caption'] = "album name " + chosen.caption[index]
|
||||
batch['identifier'] = chosen.identifier[index]
|
||||
params.append(batch)
|
||||
obj['flowbatch'] = params
|
||||
self.batches[calc_batch].fetched = True
|
||||
self.next_batch = calc_batch + 1
|
||||
else:
|
||||
print "unknown message %", messagevalue
|
||||
|
||||
obj['batchtype'] = position
|
||||
ret = json.dumps(obj)
|
||||
return ret
|
||||
|
||||
def receive_message_signal(self, webview, param):
|
||||
# this will be key to passing stuff back and forth - need
|
||||
# to develop some-sort of message protocol to distinguish "events"
|
||||
|
||||
title = webview.get_title()
|
||||
if (not title) or (title == '"clear"'):
|
||||
return
|
||||
|
||||
args = json.loads(title)
|
||||
try:
|
||||
signal = args["signal"]
|
||||
except:
|
||||
print "unhandled: %s " % title
|
||||
return
|
||||
|
||||
print signal
|
||||
if signal == 'getflowbatch':
|
||||
#webview.execute_script("new_flow_batch(%s)" % self.get_flow_batch(args['param']))
|
||||
s = self.get_flow_batch(args['param'])
|
||||
webview.execute_script("new_flow_batch('%s')" % s)
|
||||
|
||||
|
||||
def initialise(self, string):
|
||||
element = 0
|
||||
batch = None
|
||||
|
||||
home = expanduser("~")
|
||||
|
||||
albumdir = home + '/.cache/rhythmbox/album-art'
|
||||
|
||||
|
||||
pos = 0
|
||||
for fn in os.listdir(albumdir):
|
||||
if fn != 'store.tdb':
|
||||
if not (element < 50):
|
||||
batch = None
|
||||
element = 0
|
||||
|
||||
if not batch:
|
||||
batch = FlowBatch()
|
||||
self.batches.append(batch)
|
||||
|
||||
batch.append(fullfilename = albumdir + "/" + fn, caption=str(pos), title=str(pos))
|
||||
pos = pos + 1
|
||||
element = element + 1
|
||||
|
||||
items = self.batches[0].html_elements() +\
|
||||
self.batches[1].html_elements() #+\
|
||||
#self.batches[2].html_elements()
|
||||
self.next_batch = 2
|
||||
|
||||
string = string.replace('#ITEMS', items)
|
||||
string = string.replace('#BACKGROUND_COLOUR', 'white')
|
||||
string = string.replace('#HEIGHT', '200')
|
||||
|
||||
return string
|
||||
@@ -0,0 +1,20 @@
|
||||
/* ContentFlowAddOn_gallery2, version 1.0
|
||||
* (c) 2008 - 2010 Sebastian Kutsch
|
||||
* <http://www.jacksasylum.eu/ContentFlow/>
|
||||
*
|
||||
* This file is distributed under the terms of the MIT license.
|
||||
* (see http://www.jacksasylum.eu/ContentFlow/LICENSE)
|
||||
*
|
||||
*--------------------------------------------------------------------------*/
|
||||
|
||||
|
||||
.ContentFlowAddOn_gallery2 {
|
||||
}
|
||||
|
||||
.ContentFlowAddOn_gallery2 .flow .item:hover {
|
||||
opacity: 1 !important;
|
||||
filter: alpha(opacity = 100) !important;
|
||||
}
|
||||
|
||||
/* ================================= */
|
||||
|
||||
@@ -0,0 +1,141 @@
|
||||
/* ContentFlowAddOn_gallery2, version 1.0
|
||||
* (c) 2008 - 2010 Sebastian Kutsch
|
||||
* <http://www.jacksasylum.eu/ContentFlow/>
|
||||
*
|
||||
* This file is distributed under the terms of the MIT license.
|
||||
* (see http://www.jacksasylum.eu/ContentFlow/LICENSE)
|
||||
*/
|
||||
|
||||
new ContentFlowAddOn ('gallery2', {
|
||||
|
||||
conf: {
|
||||
bigPicId: 'picframe',
|
||||
duration: 1000
|
||||
},
|
||||
|
||||
init: function() {
|
||||
this.addStylesheet();
|
||||
},
|
||||
|
||||
//onloadInit: function (flow) {
|
||||
afterContentFlowInit: function (flow) {
|
||||
var ac = flow.getAddOnConf("gallery2");
|
||||
var p = document.getElementById(ac.bigPicId);
|
||||
if (!p) {
|
||||
p = document.createElement('div')
|
||||
p.id = ac.bigPicId;
|
||||
flow.Container.parentNode.insertBefore(p, flow.Container);
|
||||
}
|
||||
p.style.textAlign = "center";
|
||||
$CF(window).addEvent('resize', function () {
|
||||
p.style.height = flow.maxHeight*1+"px";
|
||||
p.style.margin = flow.maxHeight/6 +"px auto";
|
||||
});
|
||||
|
||||
var i = document.createElement('img');
|
||||
i.style.height = "100%";
|
||||
i.style.opacity = 0;
|
||||
i.style.filter = "alpha(opacity = 0 )";
|
||||
p.appendChild(i);
|
||||
|
||||
flow.conf.onclickActiveItem(flow._activeItem);
|
||||
|
||||
},
|
||||
|
||||
|
||||
ContentFlowConf: {
|
||||
scaleFactorLandscape: "max", // scale factor of landscape images ('max' := height= maxItemHeight)
|
||||
scaleFactorPortrait: "max",
|
||||
fixItemSize: true,
|
||||
relativeItemPosition: "bottom center", // align top/above, bottom/below, left, right, center of position coordinate
|
||||
endOpacity: 0.3, // opacity of last visible item on both sides
|
||||
|
||||
|
||||
reflectionGap: 0.1,
|
||||
|
||||
|
||||
onclickInactiveItem : function (item) {
|
||||
this.conf.onclickActiveItem(item);
|
||||
},
|
||||
|
||||
onclickActiveItem: function (item) {
|
||||
var ac = this.getAddOnConf("gallery2");
|
||||
var url, target;
|
||||
|
||||
var d = ac.duration;
|
||||
opacity_delta = 0.02;
|
||||
timeout = opacity_delta * d;
|
||||
|
||||
if (url = item.content.getAttribute('href')) { }
|
||||
else if (url = item.element.getAttribute('href')) { }
|
||||
else if (url = item.content.getAttribute('src')) { }
|
||||
|
||||
var hideImage = function (img, src) {
|
||||
var o = img.style.opacity;
|
||||
o = parseFloat(o);
|
||||
if (o > 0 && img.src != "undefined" ) {
|
||||
img.hide = true;
|
||||
o = o - opacity_delta;
|
||||
img.style.opacity = o;
|
||||
img.style.filter = "alpha(opacity = "+o*100+")";
|
||||
window.setTimeout( function () { hideImage(img, src) } , timeout);
|
||||
}
|
||||
else {
|
||||
img.style.opacity = "0";
|
||||
img.src = src;
|
||||
img.hide = false;
|
||||
showImage(img, src);
|
||||
}
|
||||
}
|
||||
|
||||
var showImage = function (img, src) {
|
||||
var o = img.style.opacity;
|
||||
o = parseFloat(o);
|
||||
if (img.src.search(new RegExp(src)) < 0) {
|
||||
hideImage(img, src);
|
||||
}
|
||||
else if (o < 1 && !img.hide ) {
|
||||
o = o + opacity_delta;
|
||||
img.style.opacity = o;
|
||||
img.style.filter = "alpha(opacity = "+o*100+")";
|
||||
window.setTimeout( function () { showImage(img, src)} , timeout);
|
||||
}
|
||||
}
|
||||
|
||||
if (url) {
|
||||
var pf = document.getElementById(ac.bigPicId).lastChild;
|
||||
showImage(pf, url);
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
onReachTarget: function(item) {
|
||||
this.conf.onclickActiveItem(item);
|
||||
},
|
||||
|
||||
/* ==================== calculations ==================== */
|
||||
|
||||
|
||||
|
||||
calcSize: function (item) {
|
||||
var vI = this.conf.visibleItems;
|
||||
var x = 2/vI;
|
||||
return {width: x, height: x};
|
||||
},
|
||||
|
||||
calcCoordinates: function (item) {
|
||||
var rP = item.relativePosition;
|
||||
var x = rP*item.size.width/2*1.1*this.conf.scaleFactor;
|
||||
var y = -1;
|
||||
|
||||
return {x: x, y: y};
|
||||
},
|
||||
|
||||
|
||||
calcOpacity: function (item) {
|
||||
return Math.abs(item.relativePosition) <= 0.5 ? (1 - item.relativePosition) : this.conf.endOpacity;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
@@ -0,0 +1,80 @@
|
||||
/* ContentFlowAddOn_white, version 2.0
|
||||
* (c) 2008 - 2010 Sebastian Kutsch
|
||||
* <http://www.jacksasylum.eu/ContentFlow/>
|
||||
*
|
||||
* This file is distributed under the terms of the MIT license.
|
||||
* (see http://www.jacksasylum.eu/ContentFlow/LICENSE)
|
||||
*
|
||||
*--------------------------------------------------------------------------*/
|
||||
|
||||
/* ========== ContentFlow ========== */
|
||||
/*
|
||||
* Within this file you can ajust the styling of ContentFlow
|
||||
* to your personal needs. The default styling is the same as found on the
|
||||
* projectpage.
|
||||
*
|
||||
*/
|
||||
|
||||
.ContentFlowAddOn_white {
|
||||
background: white;
|
||||
}
|
||||
|
||||
/* ----- styling of items ----- */
|
||||
.ContentFlowAddOn_white .flow .item .caption {
|
||||
background: url(img/1x1_0.5_white.png);
|
||||
}
|
||||
* html .ContentFlowAddOn_white .flow .item .caption {
|
||||
background-image: none;
|
||||
filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true, sizingMethod=scale, src='img/1x1_0.5_white.png');
|
||||
}
|
||||
.ContentFlowAddOn_white .flow .item .caption a,
|
||||
.ContentFlowAddOn_white .flow .item .caption a:link,
|
||||
.ContentFlowAddOn_white .flow .item .caption a:visited,
|
||||
.ContentFlowAddOn_white .flow .item .caption a:active,
|
||||
.ContentFlowAddOn_white .flow .item .caption a:hover {
|
||||
color: black;
|
||||
}
|
||||
/* ----- scrollbar ----- */
|
||||
.ContentFlowAddOn_white .scrollbar {
|
||||
background: url(img/scrollbar_black.png) left center repeat-x;
|
||||
}
|
||||
|
||||
.ContentFlowAddOn_white .scrollbar .slider {
|
||||
background: url(img/slider_black.png) center center no-repeat;
|
||||
}
|
||||
|
||||
/* only for IE <= 6 and a alphatransparent slider image */
|
||||
* html .ContentFlowAddOn_white .scrollbar .slider { background-image: none; }
|
||||
* html .ContentFlowAddOn_white .scrollbar .slider .virtualSlider {
|
||||
filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true, sizingMethod=crop, src='img/slider_black.png');
|
||||
}
|
||||
.ContentFlowAddOn_white .scrollbar .slider .position {
|
||||
color:gray;
|
||||
}
|
||||
|
||||
|
||||
/* ----- global caption ----- */
|
||||
.ContentFlowAddOn_white .globalCaption {
|
||||
color: black;
|
||||
}
|
||||
.ContentFlowAddOn_white .globalCaption .caption a,
|
||||
.ContentFlowAddOn_white .globalCaption .caption a:link,
|
||||
.ContentFlowAddOn_white .globalCaption .caption a:visited,
|
||||
.ContentFlowAddOn_white .globalCaption .caption a:active,
|
||||
.ContentFlowAddOn_white .globalCaption .caption a:hover {
|
||||
color: black;
|
||||
}
|
||||
|
||||
/* ----- load indicator ----- */
|
||||
.ContentFlowAddOn_white .loadIndicator {
|
||||
background: url(img/1x1_0.5_white.png);
|
||||
}
|
||||
* html .ContentFlowAddOn_white .loadIndicator {
|
||||
background-image: none;
|
||||
filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true, sizingMethod=scale, src='img/1x1_0.5_white.png');
|
||||
}
|
||||
.ContentFlowAddOn_white .loadIndicator .indicator {
|
||||
background: url(img/loader_white.gif) center center no-repeat;
|
||||
}
|
||||
|
||||
/* ================================= */
|
||||
@@ -0,0 +1,19 @@
|
||||
/* ContentFlowAddOn_white, version 2.0
|
||||
* (c) 2008 - 2010 Sebastian Kutsch
|
||||
* <http://www.jacksasylum.eu/ContentFlow/>
|
||||
*
|
||||
* This file is distributed under the terms of the MIT license.
|
||||
* (see http://www.jacksasylum.eu/ContentFlow/LICENSE)
|
||||
*/
|
||||
|
||||
new ContentFlowAddOn ('white', {
|
||||
|
||||
init: function () {
|
||||
this.addStylesheet();
|
||||
},
|
||||
|
||||
ContentFlowConf: {
|
||||
reflectionColor: "#ffffff" // none, transparent, overlay or hex RGB CSS style #RRGGBB
|
||||
}
|
||||
|
||||
});
|
||||
@@ -0,0 +1,19 @@
|
||||
Copyright (c) 2007 - 2010 Sebastian Kutsch
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
@@ -0,0 +1,250 @@
|
||||
|
||||
/* ========== ContentFlow ========== */
|
||||
/*
|
||||
* default style to look nice
|
||||
*/
|
||||
|
||||
.ContentFlow {
|
||||
}
|
||||
.ContentFlow .flow {
|
||||
/*border: 1px solid green;*/
|
||||
}
|
||||
.ContentFlow .flow * {
|
||||
}
|
||||
|
||||
.ContentFlow .flow .item {
|
||||
/*border: 1px solid red;*/
|
||||
}
|
||||
.ContentFlow .flow .item canvas.content {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
/*border: 1px solid yellow;*/
|
||||
}
|
||||
.ContentFlow .flow .item img.content {
|
||||
/*border: 1px solid yellow;*/
|
||||
width: 100%;
|
||||
}
|
||||
.ContentFlow .flow .item img.reflection,
|
||||
.ContentFlow .flow .item canvas.reflection {
|
||||
width: 100%;
|
||||
}
|
||||
/* ----- styling of items ----- */
|
||||
.ContentFlow .flow .item.active {
|
||||
cursor: pointer;
|
||||
}
|
||||
.ContentFlow .flow .item .caption {
|
||||
font-size: 100%;
|
||||
font-weight: bold;
|
||||
text-align: center;
|
||||
color: white;
|
||||
max-height: 30%;
|
||||
bottom: 10%;
|
||||
background: url(img/1x1_0.5_black.png);
|
||||
width: 100%;
|
||||
}
|
||||
* html .ContentFlow .flow .item .caption {
|
||||
background-image: none;
|
||||
filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true, sizingMethod=scale, src='img/1x1_0.5_black.png');
|
||||
}
|
||||
.ContentFlow .flow .item .caption a,
|
||||
.ContentFlow .flow .item .caption a:link,
|
||||
.ContentFlow .flow .item .caption a:visited,
|
||||
.ContentFlow .flow .item .caption a:active,
|
||||
.ContentFlow .flow .item .caption a:hover {
|
||||
text-decoration: none;
|
||||
color: white;
|
||||
font-style: italic;
|
||||
font-size: 0.8em;
|
||||
}
|
||||
.ContentFlow .flow .item .caption a:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
.ContentFlow .flow .item.active .caption {
|
||||
/*display: block;*/ /* uncomment to show caption inside item */
|
||||
}
|
||||
|
||||
/* ----- scrollbar ----- */
|
||||
.ContentFlow .scrollbar {
|
||||
width: 50%;
|
||||
margin: 0px auto;
|
||||
margin-top: 10px;
|
||||
height: 16px;
|
||||
background: url(img/scrollbar_white.png) left center repeat-x;
|
||||
position: relative;
|
||||
overflow: visible;
|
||||
}
|
||||
|
||||
.ContentFlow .scrollbar .slider {
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
background: url(img/slider_white.png) center center no-repeat;
|
||||
cursor: move;
|
||||
}
|
||||
|
||||
/* only for IE <= 6 and a alphatransparent slider image */
|
||||
* html .ContentFlow .scrollbar .slider { background-image: none; }
|
||||
* html .ContentFlow .scrollbar .slider .virtualSlider {
|
||||
filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true, sizingMethod=crop, src='img/slider_white.png');
|
||||
}
|
||||
.ContentFlow .scrollbar .slider .position {
|
||||
top: 120%;
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
color: silver
|
||||
}
|
||||
|
||||
/* ----- global caption ----- */
|
||||
.ContentFlow .globalCaption {
|
||||
text-align: center;
|
||||
font-weight: bold;
|
||||
color: white;
|
||||
font-size: 14px;
|
||||
height: 20px;
|
||||
margin: 2em auto;
|
||||
}
|
||||
.ContentFlow .globalCaption .caption {
|
||||
}
|
||||
.ContentFlow .globalCaption .caption a,
|
||||
.ContentFlow .globalCaption .caption a:link,
|
||||
.ContentFlow .globalCaption .caption a:visited,
|
||||
.ContentFlow .globalCaption .caption a:active,
|
||||
.ContentFlow .globalCaption .caption a:hover {
|
||||
text-decoration: none;
|
||||
color: white;
|
||||
font-style: italic;
|
||||
font-size: 0.8em;
|
||||
}
|
||||
|
||||
.ContentFlow .globalCaption .caption a:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
/* ----- load indicator ----- */
|
||||
.ContentFlow .loadIndicator {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
top: 0px;
|
||||
left: 0px;
|
||||
background: black;
|
||||
}
|
||||
.ContentFlow .loadIndicator .indicator {
|
||||
background: url(img/loader.gif) center center no-repeat;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
* html .ContentFlow .loadIndicator .indicator {
|
||||
height: 100px;
|
||||
}
|
||||
|
||||
/* ================================= */
|
||||
|
||||
|
||||
|
||||
|
||||
/* ========== ContentFlow ========== */
|
||||
/*
|
||||
* This is the basic CSS file needed for the correct functioning of ContentFlow.
|
||||
* DON'T CHANGE IT.
|
||||
*
|
||||
*/
|
||||
.ContentFlow {
|
||||
position: relative; /* needed so overlay dimensions are constrained to the ContentFlow */
|
||||
overflow: hidden;
|
||||
}
|
||||
.ContentFlow * {
|
||||
margin: 0px;
|
||||
padding: 0px;
|
||||
/*border: none;*/
|
||||
}
|
||||
.ContentFlow img {
|
||||
-ms-interpolation-mode: bicubic;
|
||||
}
|
||||
|
||||
.ContentFlow .mouseoverCheckElement {
|
||||
position: absolute;
|
||||
width: 0px;
|
||||
height: 0px;
|
||||
left: 0px;
|
||||
/*display: none;*/
|
||||
visibility: hidden;
|
||||
}
|
||||
.ContentFlow:hover .mouseoverCheckElement {
|
||||
left: 1px;
|
||||
/*width: 1px;*/
|
||||
/*left: -1px;*/
|
||||
/*background-color: red;*/
|
||||
}
|
||||
.ContentFlow .flow {
|
||||
position: relative; /* needed so that items can be positioned relative to flow*/
|
||||
z-index: 0; /* need so every item has a z-index relative to the flow-box */
|
||||
visibility: hidden; /* needed so that content is hidden while loading */
|
||||
width: 100%; /* needed for IE6 */
|
||||
margin: 0 auto;
|
||||
}
|
||||
.ContentFlow .flow.hidden {
|
||||
visibility: hidden;
|
||||
}
|
||||
|
||||
.ContentFlow .flow .item {
|
||||
position: absolute; /* needed */
|
||||
visibility: hidden;
|
||||
top: 0px;
|
||||
left: 0px;
|
||||
}
|
||||
.ContentFlow .flow .item.active {
|
||||
}
|
||||
.ContentFlow .flow .item .content {
|
||||
display: block;
|
||||
}
|
||||
.ContentFlow .flow .item div.content {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
.ContentFlow .flow .item .label {
|
||||
display: none;
|
||||
}
|
||||
.ContentFlow .flow .item .reflection {
|
||||
display: block;
|
||||
}
|
||||
.ContentFlow .flow .item canvas.reflection {
|
||||
margin-top: -1px; /* for FF */
|
||||
}
|
||||
.ContentFlow .flow .item .caption {
|
||||
position: absolute; /* needed */
|
||||
display: none; /* needed to hide it on inactive items */
|
||||
}
|
||||
.ContentFlow .flow .item.active .caption {
|
||||
/*display: block;*/ /* uncomment to show caption inside item */
|
||||
}
|
||||
|
||||
/* ----- scrollbar ----- */
|
||||
|
||||
.ContentFlow .scrollbar {
|
||||
position: relative; /* needed for z-index */
|
||||
z-index: 1; /* set above flow */
|
||||
visibility: hidden;
|
||||
}
|
||||
|
||||
.ContentFlow .scrollbar .slider {
|
||||
position: absolute; /* needed */
|
||||
}
|
||||
* html .ContentFlow .scrollbar .slider .virtualSlider {
|
||||
height: 100%;
|
||||
}
|
||||
.ContentFlow .scrollbar .slider .position {
|
||||
position: absolute; /* needed */
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
/* ----- global caption ----- */
|
||||
.ContentFlow .globalCaption {
|
||||
position: relative; /* needed for z-index */
|
||||
z-index: 1; /* set above flow */
|
||||
}
|
||||
/* ----- load indicator ----- */
|
||||
.ContentFlow .loadIndicator {
|
||||
position: absolute; /* needed */
|
||||
z-index: 65000; /* set above everything */
|
||||
}
|
||||
|
||||
|
||||
|
Depois Largura: | Altura: | Tamanho: 82 B |
|
Depois Largura: | Altura: | Tamanho: 82 B |
|
Depois Largura: | Altura: | Tamanho: 43 B |
|
Depois Largura: | Altura: | Tamanho: 8.0 KiB |
|
Depois Largura: | Altura: | Tamanho: 8.0 KiB |
|
Depois Largura: | Altura: | Tamanho: 82 B |
|
Depois Largura: | Altura: | Tamanho: 82 B |
|
Depois Largura: | Altura: | Tamanho: 175 B |
|
Depois Largura: | Altura: | Tamanho: 178 B |
@@ -0,0 +1,53 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
|
||||
<head>
|
||||
<link rel="stylesheet" title="Standard" href="styles.css" type="text/css" media="screen" />
|
||||
|
||||
<!-- styles.css contains white for background colour - we'll need an equivalent css statement for a black background -->
|
||||
<script language="JavaScript" type="text/javascript" src="contentflow.js" load="#BACKGROUND_COLOUR"></script>
|
||||
<script tyle="text/javascript">
|
||||
var cf = new ContentFlow('contentFlow',
|
||||
{reflectionColor: "#000000",
|
||||
endOpacity : 0.3,
|
||||
maxItemHeight: "#HEIGHT",
|
||||
circularFlow: false,
|
||||
startItem: "start",
|
||||
visibleItems: 7
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<div class="maincontent">
|
||||
<div style="width: 600px; margin: 0px auto;">
|
||||
|
||||
<!-- ===== FLOW ===== -->
|
||||
<div id="contentFlow" class="ContentFlow">
|
||||
<!-- should be place before flow so that contained images will be loaded first -->
|
||||
<div class="loadIndicator"><div class="indicator"></div></div>
|
||||
|
||||
<div class="flow">
|
||||
|
||||
#ITEMS
|
||||
|
||||
</div>
|
||||
<div class="globalCaption"></div>
|
||||
<!--
|
||||
<div class="scrollbar">
|
||||
<div class="preButton"></div>
|
||||
<div class="nextButton"></div>
|
||||
<div class="slider"><div class="position"></div></div>
|
||||
</div> -->
|
||||
|
||||
</div>
|
||||
|
||||
<table id="mytable">
|
||||
<tbody>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,220 @@
|
||||
body {
|
||||
background: white;
|
||||
color: white;
|
||||
font-size: 10pt;
|
||||
font-family: sans-serif;
|
||||
margin: 0;
|
||||
padding: 0 7%;
|
||||
}
|
||||
|
||||
a,
|
||||
a:link,
|
||||
a:visited,
|
||||
a:active,
|
||||
a:hover {
|
||||
text-decoration: none;
|
||||
color: white;
|
||||
font-weight: bold;
|
||||
}
|
||||
a:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.clear { clear: both; }
|
||||
|
||||
img { border: none; }
|
||||
|
||||
h1 {
|
||||
text-align: center;
|
||||
text-decoration: underline;
|
||||
font-family: serif;
|
||||
color: white;
|
||||
font-size: 1.8em;
|
||||
}
|
||||
h2 {
|
||||
margin-top: 2.5em;
|
||||
font-size: 1.7em;
|
||||
text-decoration: underline;
|
||||
}
|
||||
h3 {
|
||||
margin-top: 2em;
|
||||
font-size: 1.3em;
|
||||
text-decoration: underline;
|
||||
}
|
||||
p {
|
||||
line-height: 150%;
|
||||
text-align: justify;
|
||||
}
|
||||
pre {
|
||||
font-family: sans-serif;
|
||||
background: #222;
|
||||
}
|
||||
.simpleBlack {
|
||||
background: black;
|
||||
width: 80ex;
|
||||
margin: 0 auto;
|
||||
font-family: sans-serif;
|
||||
}
|
||||
|
||||
code {
|
||||
font-family: monospace;
|
||||
font-size: 0.9em;
|
||||
line-height: 150%;
|
||||
}
|
||||
|
||||
dl {
|
||||
margin-left: 4ex;
|
||||
}
|
||||
|
||||
dl dt {
|
||||
font-size: 0.9em;
|
||||
font-weight: bold;
|
||||
color: #eee;
|
||||
font-family: monospace;
|
||||
}
|
||||
dl dd {
|
||||
margin-bottom: 1.5em;
|
||||
color: #ccc;
|
||||
font-size: 0.85em;
|
||||
line-height: 1.5em;
|
||||
}
|
||||
|
||||
|
||||
ol {
|
||||
}
|
||||
ol li {
|
||||
margin-bottom: 1em;
|
||||
line-height: 150%;
|
||||
}
|
||||
|
||||
ul {
|
||||
}
|
||||
ul li {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
/* ------------------------------------------------------------------------- */
|
||||
|
||||
#title {
|
||||
margin: 0px auto;
|
||||
}
|
||||
|
||||
#sponsor {
|
||||
position: absolute;
|
||||
right: 7%;
|
||||
font-size: 10px;
|
||||
height: 66px;
|
||||
line-height: 66px;
|
||||
padding: 0 20px;
|
||||
}
|
||||
|
||||
div.maincontent {
|
||||
margin: 0px auto 20pt auto;
|
||||
}
|
||||
|
||||
#menu {
|
||||
display: block;
|
||||
text-align: center;
|
||||
background: #222;
|
||||
padding: 1em;
|
||||
margin: 2em auto 4em auto;
|
||||
}
|
||||
|
||||
#menu li {
|
||||
display: inline;
|
||||
padding: 0px 20px;
|
||||
}
|
||||
|
||||
.totop {
|
||||
text-align: center;
|
||||
margin: 4em 10%;
|
||||
padding: 0.25em;
|
||||
background: #161616;
|
||||
}
|
||||
.totop a {
|
||||
margin-right: 7%;
|
||||
color: silver;
|
||||
}
|
||||
|
||||
|
||||
.block {
|
||||
display: none;
|
||||
}
|
||||
|
||||
|
||||
#browserComp {
|
||||
border-collapse: collapse;
|
||||
margin: 40px auto;
|
||||
}
|
||||
#browserComp caption {
|
||||
text-align: center;
|
||||
margin: 20px auto;
|
||||
font-size: 1.1em;
|
||||
font-weight: bold;
|
||||
}
|
||||
#browserComp th {
|
||||
font-size: 10px;
|
||||
padding: 5px 10px;
|
||||
border-bottom: 1px solid silver;
|
||||
}
|
||||
#browserComp th img {
|
||||
width: 22px;
|
||||
}
|
||||
#browserComp td {
|
||||
text-align: center;
|
||||
}
|
||||
#browserComp th.feature,
|
||||
#browserComp td.feature {
|
||||
text-align: right;
|
||||
padding: 5px;
|
||||
padding-right: 10px;
|
||||
border-right: 1px solid silver;
|
||||
}
|
||||
|
||||
.addon {
|
||||
border: 1px solid #222;
|
||||
padding: 20px;
|
||||
margin-bottom: 20px;
|
||||
background: #222;
|
||||
}
|
||||
.addon .flowBox {
|
||||
width: 500px;
|
||||
margin-right: 40px;
|
||||
float: left;
|
||||
}
|
||||
.addon .discription {
|
||||
margin-left: 540px;
|
||||
}
|
||||
.addon .title {
|
||||
line-height: 1.3em;
|
||||
}
|
||||
.addon .title h3 {
|
||||
margin: 0;
|
||||
display: inline;
|
||||
}
|
||||
.addon .title .by {
|
||||
margin-left: 2em;
|
||||
font-size: 0.8em;
|
||||
text-decoration: none;
|
||||
}
|
||||
.addon p {
|
||||
font-size: 0.9em;
|
||||
}
|
||||
.addon .comment {
|
||||
margin-top: 2em;
|
||||
font-style: italic;
|
||||
}
|
||||
.addon .download {
|
||||
font-size: 0.8em;
|
||||
float: right;
|
||||
margin: 0 0 2em 4em;
|
||||
line-height: 1.5em;
|
||||
}
|
||||
.addon .download a {
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
#info { /* for example.php */
|
||||
color: white;
|
||||
/*display: none;*/
|
||||
}
|
||||
|
||||