3
I am starting a project and would like to create a page with a gallery as in the scheme below:
Website that owns the Gallery
So it seems the images are made available by lines, only I was able to do only by providing the images by columns following this example, but it wasn’t very nice.
How could I make a gallery like this one from the example? Can someone show me a path or examples?
Note: I just want to be able to make the images available as in the example above and I intend to load the images using Angularjs.
Edited
This is my current HTML page
/*CSS Photos*/
#photoContainer {
width: 1200px;
overflow: hidden;
background: black;
/*transparent*/
position: absolute;
/*top: 350px;*/
left: 50%;
transform: translateX(-50%);
}
/*photobanner*/
.photobanner {
/*height: 100%;
width: 100%;
display: inline;*/
}
.photobanner img {
/*max-width:350px;
max-height:233px;
width: auto;
height: auto;
margin: 20px;*/
/*Animação zoom*/
-webkit-transition: all 0.5s ease;
-moz-transition: all 0.5s ease;
-o-transition: all 0.5s ease;
-ms-transition: all 0.5s ease;
transition: all 0.5s ease;
}
.photobanner img:hover {
-webkit-transform: scale(1.1);
-moz-transform: scale(1.1);
-o-transform: scale(1.1);
-ms-transform: scale(1.1);
transform: scale(1.1);
cursor: pointer;
-webkit-box-shadow: 0px 3px 5px rgba(0, 0, 0, 0.2);
-moz-box-shadow: 0px 3px 5px rgba(0, 0, 0, 0.2);
box-shadow: 0px 3px 5px rgba(0, 0, 0, 0.2);
}
.row {
display: flex;
flex-wrap: wrap;
padding: 0 4px;
}
/* Create two equal columns that sits next to each other */
.column {
flex: 25%;
padding: 0 4px;
}
.column img {
margin-top: 8px;
vertical-align: middle;
}
/* Responsive layout - makes a two column-layout instead of four columns */
@media screen and (max-width: 800px) {
.column {
flex: 50%;
max-width: 50%;
}
}
/* Responsive layout - makes the two columns stack on top of each other instead of next to each other */
@media screen and (max-width: 600px) {
.column {
flex: 25%;
max-width: 25%;
}
}
<!DOCTYPE html>
<html ng-app="controllerPrincipal">
<head>
<link rel="icon" href="images/favicon.png" />
<!--Import Google Icon Font-->
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<!--Import materialize.css-->
<!--<link type="text/css" rel="stylesheet" href="css/materialize.css" media="screen,projection"/>-->
<link href="css/CardStyle.css" type="text/css" rel="stylesheet" media="screen,projection" />
<link href="css/mainstyle.css" type="text/css" rel="stylesheet" media="screen,projection" />
<link href="css/photos.css" type="text/css" rel="stylesheet" media="screen,projection" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
</head>
<body>
<div class="wrapper">
<header>
<nav>
<div class="menu-icon"><i class="material-icons">menu</i></div>
<div class="logo">LOGO</div>
<div class="menu">
<ul>
<li><a href="#" class="active">Home</a></li>
<li><a href="#">About</a></li>
<li><a href="#">Blog</a></li>
<li><a href="#">Contact</a></li>
</ul>
</div>
</nav>
</header>
<div class="content">
<div class="container" ng-controller="PesquisaFotos">
<div id="photoContainer">
<div class="row photobanner" ng-repeat="item in dados">
<div class="column">
<img class="img first" src="{{ item.foto }}" alt="{{ item.descricao }}" style="width:100%" />
</div>
<div class="column">
<img class="img first" src="{{ item.foto }}" alt="{{ item.descricao }}" style="width:100%" />
</div>
</div>
</div>
</div>
</div>
<div class="content">
<p>
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has
survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop
publishing software like Aldus PageMaker including versions of Lorem Ipsum.
</p>
<p>
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has
survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop
publishing software like Aldus PageMaker including versions of Lorem Ipsum.
</p>
</div>
</div>
<!--Scripts-->
<script type="text/javascript" src="https://code.jquery.com/jquery-3.2.1.min.js"></script>
<script type="text/javascript" src="js/materialize.js"></script>
<script type="text/javascript" src="js/angular.min.js"></script>
<script type="text/javascript" src="js/app.js"></script>
<script type="text/javascript" src="js/index.js"></script>
</body>
</html>
It’s a little messy 'cause I’m running tests
Enter the code that you already have, that the staff helps. The pattern that I understand is that the photos are the same height, only changes the width. I believe setting a standard height and using a function to cut the image(I don’t remember if it is
overflow:clip
, something like that). But put the code...– MagicHat
@Magichat I added my current font
– Matheus Ribeiro