Skip to content

add possibility to view image in full screen - T7582 #30

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 48 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
6a04440
add possibility to view image in full screen - T7582
Aug 29, 2022
d1eaa34
add possibility to see images in full screen - T7582
Aug 29, 2022
8851700
Refactor: Code Review
Aug 30, 2022
691bc02
Refactor: Code review
Aug 30, 2022
a70f2cf
Refactor: Code review
Sep 1, 2022
93d34a3
Refactor: Code review
Sep 1, 2022
44a488f
Refactor: Code review
Sep 1, 2022
cc85b4e
Refactor: Code review
Sep 1, 2022
4408226
Feat:Fit gallery images - T7582
Sep 1, 2022
49d5ca8
Feat:Fit gallery images - T7582
Sep 1, 2022
003c542
add possibility to see images in full screen - T7582
Sep 1, 2022
46af067
Merge branch 'T7582-feat-possibility-to-view-images-in-full-screen' o…
Sep 1, 2022
c6a6602
feat: possibility to view image in full screen - T7582
Sep 2, 2022
7a4a077
Merge branch 'master' of https://github.com/scaleflex/js-cloudimage-r…
Sep 2, 2022
3419482
feat: possibility to view image in full screen - T7582
Sep 2, 2022
bc6beb8
Feat:Fit gallery images - T7582
Sep 3, 2022
4ff33da
Feat:Add animation to gallery - T7582
Sep 4, 2022
e98367e
improve the zoom code - T7582
Sep 5, 2022
e11b77b
handle arrow events - T7582
Sep 5, 2022
a886953
fix arrows navigation - T7582
Sep 5, 2022
8917042
add prop for gallery image name - T7582
Sep 5, 2022
cd11652
Refactor:: Code review
Sep 6, 2022
dea05d0
Refactor: Code review
Sep 6, 2022
5d3d43e
Refactor: Code review
Sep 6, 2022
fa6a135
handle thmbnails and refactor - T7582
Sep 7, 2022
4f49626
Refactor: Code review T7582
Sep 7, 2022
2eaec6d
refactor - T7582
Sep 8, 2022
3989f7a
Merge branch 'T7582-feat-possibility-to-view-images-in-full-screen' o…
Sep 8, 2022
60cb873
fix thumbnail images - T7582
Sep 8, 2022
fb7c9ae
handle unloaded thumbnails - T7582
Sep 8, 2022
e60cded
Refactor: Code review - T7582
Sep 8, 2022
9753100
Refactor: Code review T7582
Sep 9, 2022
4f240e7
Refactor: Code review T7582
Sep 9, 2022
702ab63
Refactor: Code review T7582
Sep 9, 2022
04cc0b3
Refactor: Code review T7582
Sep 9, 2022
b051055
code refactor - T7582
Sep 9, 2022
e827495
code refactor - T7582
Sep 9, 2022
6386f37
code refactor - T7582
Sep 9, 2022
f034ff0
code refactor - T7582
Sep 9, 2022
0983ebc
add some improvements - T7582
Sep 14, 2022
e5e1c9d
Refactor: code review
Sep 22, 2022
02c6afb
code refactor - T7582
Sep 23, 2022
2957499
code refactor - T7582
Sep 23, 2022
d4d3806
add gallery section in demo - T7582
Sep 27, 2022
0664c6d
add disable Animation prop - T7582
Sep 27, 2022
6834acd
code refactor - T7582
Sep 27, 2022
3987771
add zoom section in demo - T7582
Sep 28, 2022
e2d4135
code review - T7582
Oct 3, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
"error",
"prefer-double"
],
"default-param-last": "off",
"class-methods-use-this": "off",
"max-lines": [
"warn",
{
Expand Down
45 changes: 27 additions & 18 deletions config/low-preview/webpack-demo.config.js
Original file line number Diff line number Diff line change
@@ -1,43 +1,52 @@
const path = require('path');
const HtmlWebpackPlugin = require("html-webpack-plugin");
const MiniCssExtractPlugin = require("mini-css-extract-plugin");
const HtmlWebpackPlugin = require('html-webpack-plugin');
const MiniCssExtractPlugin = require('mini-css-extract-plugin');


const htmlWebpackPlugin = new HtmlWebpackPlugin({
template: path.join(__dirname, "../../examples/low-preview/src/index.html"),
filename: "./index.html"
template: path.join(__dirname, '../../examples/low-preview/src/index.html'),
filename: './index.html',
});

const miniCssExtractPlugin = new MiniCssExtractPlugin({
// Options similar to the same options in webpackOptions.output
// both options are optional
filename: "[name].css",
chunkFilename: "[id].css",
})
filename: '[name].css',
chunkFilename: '[id].css',
});
module.exports = {
entry: path.resolve(__dirname, "../../examples/low-preview/src/index.js"),
entry: path.resolve(__dirname, '../../examples/low-preview/src/index.js'),
output: {
path: path.join(__dirname, "../../examples/low-preview/dist"),
filename: "bundle[hash].js"
path: path.join(__dirname, '../../examples/low-preview/dist'),
filename: 'bundle[hash].js',
},
module: {
rules: [
{
test: /\.(js|jsx)$/,
use: "babel-loader",
exclude: /node_modules/
use: 'babel-loader',
exclude: /node_modules/,
},
{
test: /\.css$/,
use: [ MiniCssExtractPlugin.loader, "css-loader" ],
use: [MiniCssExtractPlugin.loader, 'css-loader'],
},
{
test: /\.(png|jpe?g|gif|svg)$/i,
use: [
{
loader: 'file-loader',
},
],
},
]
],
},
plugins: [htmlWebpackPlugin, miniCssExtractPlugin],
resolve: {
extensions: [".js", ".jsx"]
extensions: ['.js', '.jsx'],
},
devServer: {
port: 3001
port: 3001,
},
devtool: 'source-map'
};
devtool: 'source-map',
};
10 changes: 9 additions & 1 deletion config/wp/webpack-demo.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,15 @@ module.exports = {
},
"css-loader"
]
}
},
{
test: /\.(png|jpe?g|gif|svg)$/i,
use: [
{
loader: 'file-loader',
},
],
},
]
},
plugins: [htmlWebpackPlugin, miniCssExtractPlugin],
Expand Down
139 changes: 139 additions & 0 deletions examples/low-preview/src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,145 @@ <h3>Auto Crop</h3>
</div>
</section>


<section class="zoom-section">
<h2>Zoom in Images</h2>
<div class="zoom">
<img
ci-src="windmill.jpg"
alt="windmill"
ci-zoom
/>
<img
ci-src="landscape.jpg"
alt="landscape"
ci-zoom
/>
<img
ci-src="port.jpg"
alt="port"
ci-zoom
/>
</div>
</section>

<section class="gallery-section">
<h2>Responsive Gallery</h2>
<div class="gallery">
<div class="bird">
<img
ci-src="bird.jpg"
alt="bird"
ci-ratio="1.5"
ci-gallery="gallery1"
ci-image-name= 'Peacock'
/>
</div>
<img
ci-src="fox.jpg"
alt="fox"
ci-ratio="1.5"
ci-gallery="gallery1"
ci-image-name= 'Fox'
/>
<img
ci-src="windmill.jpg"
alt="windmill"
ci-ratio="1.5"
ci-gallery="gallery1"
ci-image-name= 'Windmill'
/>
<img
ci-src="landscape.jpg"
alt="landscape"
ci-ratio="1.5"
ci-gallery="gallery1"
ci-image-name= 'Bridge'
/>
<img
ci-src="cat.jpg"
alt="cat"
ci-ratio="1.5"
ci-gallery="gallery1"
ci-image-name= 'Cat'
/>
<img
ci-src="port.jpg"
alt="port"
ci-ratio="1.5"
ci-gallery="gallery1"
ci-image-name= 'Ship'
/>
<div class="stellers">
<img
ci-src="stellers.jpg"
alt="stellers"
ci-ratio="1.5"
ci-gallery="gallery1"
ci-image-name= 'Falcon'
/>
</div>
<img
ci-src="lion.jpg"
alt="lion"
ci-ratio="1.5"
ci-gallery="gallery1"
ci-image-name= 'Lion'
/>
<img
ci-src="port.jpg"
alt="port"
ci-ratio="1.5"
ci-gallery="gallery1"
ci-image-name= 'Ship'
/>
<img
ci-src="road.jpg"
alt="road"
ci-ratio="1.5"
ci-gallery="gallery1"
ci-image-name= 'road'
/>
<div class="road">
<img
ci-src="road.jpg"
alt="road"
ci-ratio="1.5"
ci-gallery="gallery1"
ci-image-name= 'road'
/>
</div>
<img
ci-src="sea.jpg"
alt="sea"
ci-ratio="1.5"
ci-gallery="gallery1"
ci-image-name= 'Sea'
/>
<img
ci-src="landscape.jpg"
alt="landscape"
ci-ratio="1.5"
ci-gallery="gallery1"
ci-image-name= 'Bridge'
/>
<img
ci-src="windmill.jpg"
alt="windmill"
ci-ratio="1.5"
ci-gallery="gallery1"
ci-image-name= 'Windmill'
/>
<img
ci-src="fox.jpg"
alt="fox"
ci-ratio="1.5"
ci-gallery="gallery1"
ci-image-name= 'Fox'
/>
</div>
</section>

<section
class="background-images-section"
ci-bg-url="BG+image.jpg"
Expand Down
2 changes: 1 addition & 1 deletion examples/low-preview/src/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import '../../../src/low-preview';
import './init';
import '../../common/demo';
import './styles/main.css';
import './styles/main.css';
4 changes: 2 additions & 2 deletions examples/low-preview/src/init.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ window.ciResponsive = new window.CIResponsive({
lazyLoading: true,
apiVersion: null,
lowQualityPreview: {
minImgWidth: 180
minImgWidth: 180,
},
doNotReplaceURL: true
doNotReplaceURL: true,
});

window.lazySizes.init();
96 changes: 96 additions & 0 deletions examples/low-preview/src/styles/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -490,6 +490,102 @@ body {
font-weight: 500;
}

.gallery-section {
background-color: #f2f7fa;
padding: 50px 50px 80px 50px;
margin-bottom: 80px;
}

.gallery-section h2 {
font-size: 40px;
font-weight: 600;
color: #203254;
text-align: center;
margin-bottom: 30px;
}

.gallery {
height: max-content;
display: grid;
grid-template-columns: repeat(6, 1fr);
grid-auto-rows: repeat(4, 1fr);
}

.gallery img {
object-fit: cover;
}

.bird {
grid-column: 1/3;
grid-row: 1/3;
box-sizing: content-box;
}

.stellers {
grid-column: 4/6;
grid-row: 2/4;
}

.road {
grid-column: 2/4;
grid-row: 3/5;
}

.zoom-section {
padding: 0px 5%;
}

.zoom-section h2 {
font-size: 37px;
line-height: 54px;
font-weight: 600;
text-align: center;
color: #203254;
margin: 50px 0px 35px;
}

.zoom {
height: max-content;
display: grid;
grid-template-columns: repeat(3, 1fr);
column-gap: 15px;
padding: 0px 25px;
margin-bottom: 80px;
}

@media (max-width: 700px) {
.gallery {
grid-template-columns: repeat(3, 1fr);
grid-auto-rows: repeat(8, 1fr);
}

.gallery-section {
padding: 20px 20px 40px 20px;
}

.gallery-section h2 {
font-size: 30px;
}

.stellers {
grid-column: 1/3;
grid-row: 7/9;
}

.road {
grid-column: 2/4;
grid-row: 4/6;
}

.zoom-section h2 {
font-size: 30px;
}

.zoom {
column-gap: 10px;
}
}

.background-images-section {
display: flex;
flex-direction: column;
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@
"eslint-config-airbnb-base": "^15.0.0",
"eslint-plugin-import": "^2.25.2",
"extract-text-webpack-plugin": "^1.0.1",
"file-loader": "^6.2.0",
"gh-pages": "^2.2.0",
"highlight.js": "^11.1.0",
"html-webpack-plugin": "^5.5.0",
Expand Down
Loading