Skip to content

Commit

Permalink
add all files for first backup version
Browse files Browse the repository at this point in the history
  • Loading branch information
mronowska committed Oct 1, 2019
1 parent 91dc35c commit 7a6a2a3
Show file tree
Hide file tree
Showing 24 changed files with 479 additions and 0 deletions.
Binary file added img/1.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/2.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/3.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/4.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/5.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/6.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/7.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/8.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/9.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
96 changes: 96 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="stylesheet" href="https://www.w3schools.com/w3css/4/w3.css">
<title>Gallery</title>

<!--[if IE]>
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js">
</script>
<!--[endif]-->

<!--my styles-->
<link href="./scss/main.css" rel="stylesheet">
<!--fonts-->
<link href="https://fonts.googleapis.com/css?family=Bai+Jamjuree&display=swap" rel="stylesheet">
</head>
<body>
<header class="header">
<h1 class="header__title">Gallery of photos</h1>
</header>

<div class="masonry">
<!-- <div class="masonry__item">
<img class="masonry__img"src="../img/5.jpg">
<div class="masonry__description">
<p class="masonry__description--title">Tytuł1</p>
<p class="masonry__description--date">Data 2017</p></div>
</div>
<div class="masonry__item">
<img class="masonry__img"src="../img/5.jpg">
<div class="masonry__description">
<p class="masonry__description--title">Tytuł2</p>
<p class="masonry__description--date">Data 2018</p></div>
</div>
<div class="masonry__item">
<img class="masonry__img"src="../img/5.jpg">
<div class="masonry__description">
<p class="masonry__description--title">Tytuł3</p>
<p class="masonry__description--date">Data 2019</p></div>
</div>
<div class="masonry__item">
<img class="masonry__img"src="../img/5.jpg">
<div class="masonry__description">
<p class="masonry__description--title">Tytuł1</p>
<p class="masonry__description--date">Data 2017</p></div>
</div>
<div class="masonry__item">
<img class="masonry__img" src="../img/5.jpg">
<div class="masonry__description">
<p class="masonry__description--title">Tytuł2</p>
<p class="masonry__description--date">Data 2018</p></div>
</div>
<div class="masonry__item">
<img class="masonry__img"src="../img/5.jpg">
<div class="masonry__description">
<p class="masonry__description--title">Tytuł3</p>
<p class="masonry__description--date">Data 2019</p></div>
</div>-->
</div>
<script src="js/main.js"></script>
</body>
</html>
61 changes: 61 additions & 0 deletions js/main.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
const listOfImgNames = ['1.jpg', '2.jpg', '3.jpg', '4.jpg', '5.jpg', '6.jpg', '7.jpg', '8.jpg', '9.jpg'];
const listOfImgTitles = ['Wędrówka', 'Wolność', 'Spacer', 'Zielony kanion', 'Górskie widoki', 'W chmurach', 'Przbijające słońce', 'Tak mieszkać', 'Natura'];


for (let i = 0; i < listOfImgNames.length; i++)
{
//adding div with masonry__item class
const masonry = document.getElementsByClassName('masonry')[0];
const masonryItem = document.createElement('div');
masonryItem.className = "masonry__item";
masonry.appendChild(masonryItem);

const item = document.getElementsByClassName('masonry__item')[i];

//adding img with masonry__img class
const img = document.createElement('img');
img.className = "masonry__img w3-image";
img.src = `././img/${i+1}.jpg`;
item.appendChild(img);


//adding div with masonry__description class
const description = document.createElement('div');
description.className = "masonry__description";
item.appendChild(description);

const descriptionItem = document.getElementsByClassName('masonry__description')[i];

//adding p with masonry__description--title class
const title = document.createElement('p');
title.className = "masonry__description--title";
title.innerText = `${listOfImgTitles[i]}`;
descriptionItem.appendChild(title);

//adding p with masonry__description--date class
const date = document.createElement('p');
date.className = "masonry__description--date";
date.innerText = `10.02.200${i}`;
descriptionItem.appendChild(date);

}

for (let i = 0; i < listOfImgNames.length; i++)
{
document.getElementsByTagName("img")[i].addEventListener("click", () => {
console.log("WOOW");
})}



// const showImage = () => {
// image = document.querySelector(img);
// image.addEventListener("click", change);
// }

const change = () => {
// let obraz = document.getElementsByTagName(img);
// obraz.styles.width = "100%";
console.log("JUZ");

}
1 change: 1 addition & 0 deletions scss/abstracts/_abstracts.css
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
null
1 change: 1 addition & 0 deletions scss/abstracts/_abstracts.min.css
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
null
3 changes: 3 additions & 0 deletions scss/abstracts/_abstracts.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
//ABSTRACTS

$imgList2 : '1.jpg', '2.jpg', '3.jpg', '4.jpg', '5.jpg', '6.jpg', '7.jpg', '8.jpg', '9.jpg';
81 changes: 81 additions & 0 deletions scss/layout/_layout.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
html {
box-sizing: border-box;
}

*,
*:before,
*:after {
box-sizing: inherit;
}

body {
height: 100vh;
background-color: #264cbf;
}

.header__title {
text-align: center;
font-size: 3em;
margin: 1em 0 1.5em 0;
color: #FFF;
}

.masonry {
margin: 1.5 auto;
max-width: 100%;
column-gap: 1.5em;
/* Masonry on large screens */
/* Masonry on medium-sized screens */
/* Masonry on small screens */
}

.masonry__item {
background: #0B2573;
margin: 0 9px 9px 9px;
padding: 1.5em;
}

.masonry__description {
display: inline-block;
line-height: 9px;
vertical-align: top;
color: #FFF;
padding: 0.5em;
}

.masonry__description--title {
font-size: 24px;
}

.masonry__description--date {
font-size: 16px;
}

.masonry__img {
width: 120px;
height: 120px;
vertical-align: center;
}

.masonry__img:hover {
opacity: 0.5;
border: 1px solid #FFF;
}

@media only screen and (min-width: 1024px) {
.masonry {
column-count: 3;
}
}

@media only screen and (max-width: 1023px) and (min-width: 768px) {
.masonry {
column-count: 2;
}
}

@media only screen and (max-width: 767px) and (min-width: 520px) {
.masonry {
column-count: 1;
}
}
1 change: 1 addition & 0 deletions scss/layout/_layout.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

113 changes: 113 additions & 0 deletions scss/layout/_layout.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
//LAYOUT
$imgListNames : '1.jpg', '2.jpg', '3.jpg', '4.jpg', '5.jpg', '6.jpg', '7.jpg', '8.jpg', '9.jpg';
$imgSide: 120px;

html {
box-sizing: border-box;
}

*,
*:before,
*:after {
box-sizing: inherit;
}

body {
height: 100vh;
background-color: rgb(38,76,191);
}

.header {
&__title {
text-align: center;
font-size: 3em;
margin: 1em 0 1.5em 0;
//background-color: #487311;
color: #FFF;
}
}

.masonry {

margin: 1.5 auto;
max-width: 100%;
column-gap: 1.5em;



&__item {
background:#0B2573;

//border: 2px solid #808080;
margin: 0 9px 9px 9px;
padding: 1.5em;



// &--img {
// display: inline-block;
// font-size: 30px;
// color: white;
// background-image: url('../img/3.jpg');
// height: 30px;
// width: 30px;
// }

}
&__description {
display: inline-block;
line-height: 9px;
vertical-align: top;
color: #FFF;
padding: 0.5em;

&--title {
font-size: 24px;
// color: #487311;
// &:hover {
// color: #FFD0BF;
// }


}

&--date {
font-size: 16px;
//color: #558C0E;


}
}
&__img {
width: $imgSide;
height: $imgSide;
vertical-align: center;

&:hover {
opacity: 0.5;
border: 1px solid #FFF;

}
}

/* Masonry on large screens */
@media only screen and (min-width: 1024px) {
column-count: 3;
}

/* Masonry on medium-sized screens */
@media only screen and (max-width: 1023px) and (min-width: 768px) {
column-count: 2;
}

/* Masonry on small screens */
@media only screen and (max-width: 767px) and (min-width: 520px) {
column-count: 1;
}

}





Loading

0 comments on commit 7a6a2a3

Please sign in to comment.