mirror of
https://github.com/Oreolek/oreolek.ru.git
synced 2024-05-16 16:08:22 +03:00
version bumps, lightbox from CDN
This commit is contained in:
parent
c037a643f0
commit
4b6f3b6ef8
Binary file not shown.
Before Width: | Height: | Size: 280 B |
Binary file not shown.
Before Width: | Height: | Size: 8.3 KiB |
Binary file not shown.
Before Width: | Height: | Size: 1.3 KiB |
Binary file not shown.
Before Width: | Height: | Size: 1.3 KiB |
|
@ -1,204 +0,0 @@
|
|||
@radius: 4px;
|
||||
|
||||
.opacity(@opacity: 0.5) {
|
||||
@percent: @opacity * 100;
|
||||
/* IE 8 */
|
||||
-ms-filter: ~"progid:DXImageTransform.Microsoft.Alpha(opacity=@{percent})";
|
||||
/* IE 5-7 */
|
||||
filter: ~"alpha(opacity=@{percent})";
|
||||
/* Netscape */
|
||||
-moz-opacity: @opacity;
|
||||
/* Safari 1.x */
|
||||
-khtml-opacity: @opacity;
|
||||
/* Webkit */
|
||||
-webkit-opacity: @opacity;
|
||||
/* Good browsers */
|
||||
opacity: @opacity;
|
||||
}
|
||||
|
||||
.border-radius (@radius) {
|
||||
border-radius: @radius;
|
||||
-moz-border-radius: @radius;
|
||||
-webkit-border-radius: @radius;
|
||||
}
|
||||
|
||||
.clearfix() {
|
||||
&:before,
|
||||
&:after {
|
||||
content: " "; /* 1 */
|
||||
display: table; /* 2 */
|
||||
}
|
||||
&:after {
|
||||
clear: both;
|
||||
}
|
||||
}
|
||||
|
||||
.transition(@transition) {
|
||||
-webkit-transition: @transition;
|
||||
transition: @transition;
|
||||
}
|
||||
|
||||
.border-bottom-radius(@radius) {
|
||||
border-bottom-right-radius: @radius;
|
||||
border-bottom-left-radius: @radius;
|
||||
}
|
||||
|
||||
// Preload images
|
||||
body:after {
|
||||
content: url("@{image_path}/close.png") url("@{image_path}/loading.gif") url("@{image_path}/prev.png") url("@{image_path}/next.png");
|
||||
display: none;
|
||||
}
|
||||
|
||||
.lightboxOverlay {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
z-index: 9999;
|
||||
background-color: black;
|
||||
.opacity(0.8);
|
||||
display: none;
|
||||
}
|
||||
|
||||
.lightbox {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
z-index: 10000;
|
||||
text-align: center;
|
||||
line-height: 0;
|
||||
font-weight: normal;
|
||||
.lb-image {
|
||||
display: block;
|
||||
height: auto;
|
||||
max-width: inherit;
|
||||
.border-radius(@radius - 1);
|
||||
}
|
||||
a img {
|
||||
border: none;
|
||||
}
|
||||
}
|
||||
|
||||
.lb-outerContainer {
|
||||
position: relative;
|
||||
background-color: white;
|
||||
.clearfix();
|
||||
width: 250px;
|
||||
height: 250px;
|
||||
margin: 0 auto;
|
||||
.border-radius(@radius);
|
||||
}
|
||||
|
||||
.lb-container {
|
||||
padding: 4px;
|
||||
}
|
||||
|
||||
.lb-loader {
|
||||
position: absolute;
|
||||
top: 43%;
|
||||
left: 0%;
|
||||
height: 25%;
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
line-height: 0;
|
||||
}
|
||||
|
||||
.lb-cancel {
|
||||
display: block;
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
margin: 0 auto;
|
||||
background: url("@{image_path}/loading.gif") no-repeat;
|
||||
}
|
||||
|
||||
.lb-nav {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
z-index: 10;
|
||||
}
|
||||
|
||||
.lb-container > .nav {
|
||||
left: 0;
|
||||
}
|
||||
|
||||
.lb-nav a {
|
||||
outline: none;
|
||||
}
|
||||
|
||||
.lb-prev, .lb-next {
|
||||
width: 49%;
|
||||
height: 100%;
|
||||
cursor: pointer;
|
||||
/* Trick IE into showing hover */
|
||||
display: block;
|
||||
}
|
||||
|
||||
.lb-prev {
|
||||
left: 0;
|
||||
float: left;
|
||||
.opacity(0);
|
||||
.transition(opacity 0.6s);
|
||||
&:hover {
|
||||
.opacity(1);
|
||||
background: url("@{image_path}/prev.png") left 48% no-repeat;
|
||||
}
|
||||
}
|
||||
|
||||
.lb-next {
|
||||
right: 0;
|
||||
float: right;
|
||||
.opacity(0);
|
||||
.transition(opacity 0.6s);
|
||||
&:hover {
|
||||
.opacity(1);
|
||||
background: url("@{image_path}/next.png") right 48% no-repeat;
|
||||
}
|
||||
}
|
||||
|
||||
.lb-dataContainer {
|
||||
margin: 0 auto;
|
||||
padding-top: 5px;
|
||||
.clearfix();
|
||||
width: 100%;
|
||||
.border-bottom-radius(@radius);
|
||||
}
|
||||
|
||||
.lb-data {
|
||||
padding: 0 4px;
|
||||
color: #bbbbbb;
|
||||
.lb-details {
|
||||
width: 85%;
|
||||
float: left;
|
||||
text-align: left;
|
||||
line-height: 1.1em;
|
||||
}
|
||||
.lb-caption {
|
||||
font-size: 13px;
|
||||
font-weight: bold;
|
||||
line-height: 1em;
|
||||
}
|
||||
.lb-number {
|
||||
display: block;
|
||||
clear: left;
|
||||
padding-bottom: 1em;
|
||||
font-size: 12px;
|
||||
color: #999999;
|
||||
}
|
||||
.lb-close {
|
||||
display: block;
|
||||
float: right;
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
background: url("@{image_path}/close.png") top right no-repeat;
|
||||
text-align: right;
|
||||
outline: none;
|
||||
.opacity(0.7);
|
||||
.transition(opacity 0.2s);
|
||||
&:hover {
|
||||
cursor: pointer;
|
||||
.opacity(1);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,6 +1,5 @@
|
|||
@import 'bootstrap/bootstrap';
|
||||
@import 'colors';
|
||||
@import 'layout';
|
||||
@import 'lightbox';
|
||||
@import 'debug';
|
||||
@image_path: '../../assets/images';
|
||||
|
|
|
@ -56,7 +56,7 @@ class View_Layout {
|
|||
}
|
||||
public function stylesheet()
|
||||
{
|
||||
return HTML::style('https://netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.min.css')."\n".Less::compile(APPPATH.'assets/stylesheets/main', 'all');
|
||||
return HTML::style('https://netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.min.css')."\n".Less::compile(APPPATH.'assets/stylesheets/main', 'all')."\n".HTML::style('https://cdnjs.cloudflare.com/ajax/libs/lightbox2/2.8.1/css/lightbox.css');
|
||||
}
|
||||
|
||||
public function get_content()
|
||||
|
@ -74,11 +74,11 @@ class View_Layout {
|
|||
switch ($script) // CDN shortcuts
|
||||
{
|
||||
case 'jquery':
|
||||
$temp .= HTML::script('https://code.jquery.com/jquery-2.1.3.min.js')."\n";
|
||||
$temp .= HTML::script('https://code.jquery.com/jquery-2.1.4.min.js')."\n";
|
||||
break;
|
||||
|
||||
case 'bootstrap':
|
||||
$temp .= HTML::script('https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js')."\n";
|
||||
$temp .= HTML::script('https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js')."\n";
|
||||
break;
|
||||
|
||||
case 'hyphenator':
|
||||
|
@ -86,15 +86,15 @@ class View_Layout {
|
|||
break;
|
||||
|
||||
case 'moment':
|
||||
$temp .= HTML::script('https://cdn.jsdelivr.net/momentjs/2.10.2/moment.min.js')."\n";
|
||||
$temp .= HTML::script('https://cdn.jsdelivr.net/momentjs/2.10.6/moment.min.js')."\n";
|
||||
break;
|
||||
|
||||
case 'autosize':
|
||||
$temp .= HTML::script('https://cdn.jsdelivr.net/jquery.autosize/3.0.3/autosize.min.js')."\n";
|
||||
$temp .= HTML::script('https://cdn.jsdelivr.net/jquery.autosize/3.0.8/autosize.min.js')."\n";
|
||||
break;
|
||||
|
||||
case 'lightbox':
|
||||
$temp .= HTML::script('https://cdn.jsdelivr.net/lightbox2/2.7.1/js/lightbox.min.js')."\n";
|
||||
$temp .= HTML::script('https://cdnjs.cloudflare.com/ajax/libs/lightbox2/2.8.1/js/lightbox.min.js')."\n";
|
||||
break;
|
||||
|
||||
default:
|
||||
|
|
|
@ -71,6 +71,7 @@ class View_Read extends View_Index {
|
|||
$scripts = array(
|
||||
'/application/assets/javascript/load_comment_form.js',
|
||||
'/application/assets/javascript/load_comments.js',
|
||||
'https://cdn.jsdelivr.net/jquery.autosize/3.0.8/autosize.min.js',
|
||||
'https://yandex.st/share/share.js'
|
||||
);
|
||||
foreach ($scripts as $script)
|
||||
|
|
Loading…
Reference in a new issue