Compare commits

..

2 commits

Author SHA1 Message Date
j
cb4d10d5be load featured items(again) 2026-02-26 16:30:28 +01:00
j
c1ff4185a8 simple home page 2026-02-26 12:51:11 +01:00

View file

@ -27,40 +27,6 @@ pandora.ui.home = function() {
margin: '0 auto 0 auto' margin: '0 auto 0 auto'
}) })
.appendTo(that); .appendTo(that);
/*
$reflectionImage = $('<img>')
.attr({src: '/static/png/logo.png'})
.css({
position: 'absolute',
left: 0,
top: '80px',
right: 0,
bottom: 0,
width: '320px',
height: 'auto',
margin: '0 auto 0 auto',
MozTransform: 'scaleY(-1)',
MsTransform: 'scaleY(-1)',
OTransform: 'scaleY(-1)',
WebkitTransform: 'scaleY(-1)'
})
.appendTo($box),
$reflectionGradient = $('<div>')
.addClass('OxReflection')
.css({
position: 'absolute',
left: 0,
top: '80px',
right: 0,
width: '320px',
height: '160px',
margin: '0 auto 0 auto',
})
.appendTo($box),
*/
var $logo = Ox.Element({ var $logo = Ox.Element({
element: '<img>', element: '<img>',
tooltip: function() { tooltip: function() {
@ -87,98 +53,10 @@ pandora.ui.home = function() {
}) })
.appendTo($box), .appendTo($box),
$findInput = Ox.Input({
width: 252
})
.css({
position: 'absolute',
left: 0,
top: '104px',
right: '260px',
bottom: 0,
margin: '0 auto 0 auto',
opacity: 0
})
.on({
click: function(e) {
// fixme: why?
e.stopPropagation();
}
})
.bindEvent({
submit: function(data) {
if (data.value) {
$findButton.triggerEvent('click');
} else {
$browseButton.triggerEvent('click');
}
}
})
.appendTo($box),
$findButton = Ox.Button({
title: Ox._('Find'),
width: 122
})
.css({
position: 'absolute',
left: '130px',
top: '104px',
right: 0,
bottom: 0,
margin: '0 auto 0 auto',
opacity: 0
})
.bindEvent({
click: function() {
var folder = pandora.getListData().folder,
value = $findInput.value();
folder && pandora.$ui.folderList[folder].options({selected: []});
that.fadeOutScreen();
pandora.UI.set({
page: '',
find: {
conditions: value === ''
? []
: [{key: '*', value: value, operator: '='}],
operator: '&'
},
section: 'items'
});
pandora.$ui.findSelect && pandora.$ui.findSelect.value('*');
pandora.$ui.findInput && pandora.$ui.findInput.value(value);
}
})
.appendTo($box),
$browseButton = Ox.Button({
title: Ox._('Browse'),
width: 122
})
.css({
position: 'absolute',
left: '390px',
top: '104px',
right: 0,
bottom: 0,
margin: '0 auto 0 auto',
opacity: 0
})
.bindEvent({
click: function() {
pandora.UI.set({
page: pandora.user.ui.page == 'home' ? '' : pandora.user.ui.page,
section: 'items'
});
that.fadeOutScreen();
}
})
.appendTo($box),
$footer = Ox.Element().css({ $footer = Ox.Element().css({
clear: 'both', clear: 'both',
height: '64px', height: '64px',
paddingTop: '12px' textAlign: 'center'
}), }),
$signupButton = Ox.Button({ $signupButton = Ox.Button({
@ -210,7 +88,7 @@ pandora.ui.home = function() {
$preferencesButton = Ox.Button({ $preferencesButton = Ox.Button({
title: Ox._('Türkçe'), title: Ox._('Türkçe'),
width: 252 width: 128
}) })
.css({ .css({
}) })
@ -221,9 +99,7 @@ pandora.ui.home = function() {
locale: value, locale: value,
page: '', page: '',
find: { find: {
conditions: value === '' conditions: [],
? []
: [{key: '*', value: value, operator: '='}],
operator: '&' operator: '&'
}, },
section: 'items' section: 'items'
@ -237,7 +113,7 @@ pandora.ui.home = function() {
$aboutButton = Ox.Button({ $aboutButton = Ox.Button({
title: Ox._('English'), title: Ox._('English'),
width: 252 width: 128
}) })
.css({ .css({
marginLeft: '8px' marginLeft: '8px'
@ -249,9 +125,7 @@ pandora.ui.home = function() {
locale: value, locale: value,
page: '', page: '',
find: { find: {
conditions: value === '' conditions: [],
? []
: [{key: '*', value: value, operator: '='}],
operator: '&' operator: '&'
}, },
section: 'items' section: 'items'
@ -268,7 +142,7 @@ pandora.ui.home = function() {
.css({ .css({
position: 'absolute', position: 'absolute',
left: 0, left: 0,
top: '152px', top: '100px',
right: 0, right: 0,
bottom: 0, bottom: 0,
width: '512px', width: '512px',
@ -285,12 +159,7 @@ pandora.ui.home = function() {
$('<div>').html('“Bu websitesi Sivil Düşün AB Programı Aktivist Desteği kapsamında Avrupa Birliği desteği ile hazırlanmıştır.” “Bu websitesi içeriğinin sorumluluğu tamamıyla Koza Görsel Kültür ve Sanat Derneği\'ne aittir ve AB\'nin görüşlerini yansıtmamaktadır.”') $('<div>').html('“Bu websitesi Sivil Düşün AB Programı Aktivist Desteği kapsamında Avrupa Birliği desteği ile hazırlanmıştır.” “Bu websitesi içeriğinin sorumluluğu tamamıyla Koza Görsel Kültür ve Sanat Derneği\'ne aittir ve AB\'nin görüşlerini yansıtmamaktadır.”')
); );
if (pandora.user.level == 'guest') { $preferencesButton.appendTo($footer);
$signupButton.appendTo($footer);
$signinButton.appendTo($footer);
} else {
$preferencesButton.appendTo($footer);
}
$aboutButton.appendTo($footer); $aboutButton.appendTo($footer);
function getVideos(clips, resolution) { function getVideos(clips, resolution) {
@ -317,7 +186,6 @@ pandora.ui.home = function() {
operator: '+' operator: '+'
}] }]
}, result => { }, result => {
console.log('!!', result)
edit.clips.forEach(function(clip) { edit.clips.forEach(function(clip) {
clip.sort = result.data.clips.indexOf(clip.id); clip.sort = result.data.clips.indexOf(clip.id);
}); });
@ -382,15 +250,14 @@ pandora.ui.home = function() {
}); });
} }
$features.append($footer); $features.append($footer);
//$features.append($support);
$features.animate({opacity: 1}, 250); $features.animate({opacity: 1}, 250);
}); });
} }
that.fadeInScreen = function() { that.fadeInScreen = function() {
that.appendTo(Ox.$body).animate({opacity: 1}, 500, function() { that.appendTo(Ox.$body).animate({opacity: 1}, 500, function() {
that.find('*').animate({opacity: 1}, 250, function() { that.find('*').animate({opacity: 1}, 250, function() {
$findInput.focusInput(true);
showFeatures(); showFeatures();
}); });
}); });
@ -411,7 +278,6 @@ pandora.ui.home = function() {
var $elements = that.find('*'), count = 0; var $elements = that.find('*'), count = 0;
$box.css({top: window.innerHeight / 2 - 80 + 'px'}); $box.css({top: window.innerHeight / 2 - 80 + 'px'});
that.css({opacity: 1}).appendTo(Ox.$body); that.css({opacity: 1}).appendTo(Ox.$body);
$findInput.focusInput(true);
$box.animate({top: '80px'}, 500, function() { $box.animate({top: '80px'}, 500, function() {
$elements.animate({opacity: 1}, 250, function() { $elements.animate({opacity: 1}, 250, function() {
if (++count == $elements.length) { if (++count == $elements.length) {