new lightbox interface v2
This commit is contained in:
@@ -476,6 +476,7 @@ function getPost(asPost) {
|
|||||||
var $Post = $('<div>', {'class':'post '+asPost.type+(asPost.headerless?' headerless':'')});
|
var $Post = $('<div>', {'class':'post '+asPost.type+(asPost.headerless?' headerless':'')});
|
||||||
var sRelTime = (asPost.relative_time!='')?((self.vars(['project', 'mode'])==self.consts.modes.histo)?asPost.formatted_time.substr(0, 10):asPost.relative_time):'';
|
var sRelTime = (asPost.relative_time!='')?((self.vars(['project', 'mode'])==self.consts.modes.histo)?asPost.formatted_time.substr(0, 10):asPost.relative_time):'';
|
||||||
var sAbsTime = asPost.formatted_time;
|
var sAbsTime = asPost.formatted_time;
|
||||||
|
var sType = asPost.subtype || asPost.type;
|
||||||
var $Body = {};
|
var $Body = {};
|
||||||
|
|
||||||
switch(asPost.type) {
|
switch(asPost.type) {
|
||||||
@@ -538,7 +539,7 @@ function getPost(asPost) {
|
|||||||
|
|
||||||
$Post
|
$Post
|
||||||
.append($('<div>', {'class':'header'})
|
.append($('<div>', {'class':'header'})
|
||||||
.append($('<span>', {'class':'index'}).addIcon('fa-'+asPost.type))
|
.append($('<span>', {'class':'index'}).addIcon('fa-'+sType))
|
||||||
.append($('<span>', {'class':'time'}).hoverSwap(sRelTime, sAbsTime+self.tmp('site_tz_notice'))))
|
.append($('<span>', {'class':'time'}).hoverSwap(sRelTime, sAbsTime+self.tmp('site_tz_notice'))))
|
||||||
.append($('<div>', {'class':'body'}).append($Body));
|
.append($('<div>', {'class':'body'}).append($Body));
|
||||||
|
|
||||||
|
|||||||
@@ -153,7 +153,10 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
// Attach event handlers to the newly minted DOM elements
|
// Attach event handlers to the newly minted DOM elements
|
||||||
this.$overlay.hide().on('click', function() {
|
//ADDED-START
|
||||||
|
//this.$overlay.hide().on('click', function() {
|
||||||
|
this.$overlay.hide().add(this.$lightbox.find('.lb-dataContainer')).on('click', function() {
|
||||||
|
//ADDED-END
|
||||||
self.end();
|
self.end();
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
@@ -504,7 +507,7 @@
|
|||||||
function postResize() {
|
function postResize() {
|
||||||
//ADDED-START
|
//ADDED-START
|
||||||
//self.$lightbox.find('.lb-dataContainer').width(newWidth);
|
//self.$lightbox.find('.lb-dataContainer').width(newWidth);
|
||||||
self.$lightbox.height(newHeight);
|
self.$lightbox.find('.lb-dataContainer').height(newHeight);
|
||||||
//ADDED-END
|
//ADDED-END
|
||||||
self.$lightbox.find('.lb-prevLink').height(newHeight);
|
self.$lightbox.find('.lb-prevLink').height(newHeight);
|
||||||
self.$lightbox.find('.lb-nextLink').height(newHeight);
|
self.$lightbox.find('.lb-nextLink').height(newHeight);
|
||||||
|
|||||||
15
script/lightbox.min.js
vendored
15
script/lightbox.min.js
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -44,6 +44,8 @@ $fa-css-prefix: fa;
|
|||||||
/* Feed */
|
/* Feed */
|
||||||
.#{$fa-css-prefix}-post:before { content: fa-content($fa-var-comment); }
|
.#{$fa-css-prefix}-post:before { content: fa-content($fa-var-comment); }
|
||||||
.#{$fa-css-prefix}-media:before { content: fa-content($fa-var-photo-video); }
|
.#{$fa-css-prefix}-media:before { content: fa-content($fa-var-photo-video); }
|
||||||
|
.#{$fa-css-prefix}-video:before { content: fa-content($fa-var-film); }
|
||||||
|
.#{$fa-css-prefix}-image:before { content: fa-content($fa-var-image); }
|
||||||
.#{$fa-css-prefix}-message:before { content: fa-content($fa-var-map-marker); }
|
.#{$fa-css-prefix}-message:before { content: fa-content($fa-var-map-marker); }
|
||||||
.#{$fa-css-prefix}-message-in:before { content: fa-content($fa-var-shoe-prints); }
|
.#{$fa-css-prefix}-message-in:before { content: fa-content($fa-var-shoe-prints); }
|
||||||
.#{$fa-css-prefix}-time:before { content: fa-content($fa-var-clock); }
|
.#{$fa-css-prefix}-time:before { content: fa-content($fa-var-clock); }
|
||||||
|
|||||||
@@ -8,14 +8,17 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.lightbox {
|
.lightbox {
|
||||||
top: 50%;
|
display: flex;
|
||||||
left: 0;
|
align-items: center;
|
||||||
transform: translateY(-50%);
|
justify-content: center;
|
||||||
text-align: left;
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
|
||||||
|
|
||||||
.lb-outerContainer {
|
.lb-outerContainer {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
display: inline-block;
|
border-radius:0;
|
||||||
|
background-color: rgba(255, 255, 255, 0.5);
|
||||||
|
|
||||||
.lb-image {
|
.lb-image {
|
||||||
image-orientation: from-image;
|
image-orientation: from-image;
|
||||||
@@ -53,10 +56,12 @@
|
|||||||
padding: 0;
|
padding: 0;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
vertical-align: top;
|
vertical-align: top;
|
||||||
width: 300px;
|
width: auto;
|
||||||
padding: 1em;
|
white-space: nowrap;
|
||||||
|
|
||||||
.lb-data {
|
.lb-data {
|
||||||
|
padding: 1em 0 0 1em;
|
||||||
|
|
||||||
.lb-details {
|
.lb-details {
|
||||||
float: none;
|
float: none;
|
||||||
|
|
||||||
@@ -66,6 +71,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
.lb-closeContainer {
|
.lb-closeContainer {
|
||||||
|
display: none !important;
|
||||||
margin-top: 2em;
|
margin-top: 2em;
|
||||||
|
|
||||||
.lb-close {
|
.lb-close {
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user