Skip to content
Open
Show file tree
Hide file tree
Changes from 14 commits
Commits
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
29 changes: 29 additions & 0 deletions .github/workflows/test.yml-template
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Test

on:
pull_request:
branches: [ master ]

jobs:
build:

runs-on: ubuntu-latest

strategy:
matrix:
node-version: [20.x]

steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: npm install
- run: npm test
- name: Upload HTML report(backstop data)
if: ${{ always() }}
uses: actions/upload-artifact@v2
with:
name: report
path: backstop_data
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Check font styles. Use [Playfair Display](https://fonts.google.com/specimen/Play
11. `git push origin develop` - to send you code for PR.
12. Create a Pull Request (PR) from your branch `develop` to branch `master` of original repo.
13. Replace `<your_account>` with your Github username in the
[DEMO LINK](https://<your_account>.github.io/Museum_2/).
[DEMO LINK](https://SashaGlazko.github.io/Museum_2/).
14. Copy `DEMO LINK` to the PR description.

> To update you PR repeat steps 7-11.
393 changes: 388 additions & 5 deletions index.html

Large diffs are not rendered by default.

9 changes: 5 additions & 4 deletions package-lock.json

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

3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
"name": "museum_2",
"version": "1.0.0",
"description": "museum_2",
"homepage": "Museum_2",
"scripts": {
"init": "mate-scripts init",
"start": "mate-scripts start",
Expand All @@ -24,7 +23,7 @@
"@mate-academy/eslint-config": "latest",
"@mate-academy/jest-mochawesome-reporter": "^1.0.0",
"@mate-academy/linthtml-config": "latest",
"@mate-academy/scripts": "^2.1.1",
"@mate-academy/scripts": "^2.1.3",
"@mate-academy/stylelint-config": "latest",
"cypress": "^13.13.0",
"eslint": "^8.57.0",
Expand Down
Binary file added src/images/angel.png
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 src/images/header-photos/women-photo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions src/images/icons/UA.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions src/images/icons/arrow-dow-icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions src/images/icons/arrow-right.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions src/images/icons/arrow-top.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions src/images/icons/facebook.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions src/images/icons/instagram.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions src/images/icons/menu-burger.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions src/images/icons/na-mu_favicon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions src/images/icons/telegram.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions src/images/icons/twitter.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions src/images/icons/white-close-icon.svg
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 src/images/img_menu.png
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 src/images/man-picture.png
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 src/images/namu-logo.png
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 src/images/news-photo-2.png
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 src/images/news-photo.png
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 src/images/person-picture.png
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 src/images/silhouette-picture.png
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 src/images/woman-picture.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
37 changes: 37 additions & 0 deletions src/scripts/main.js
Original file line number Diff line number Diff line change
@@ -1 +1,38 @@
'use strict';

document.addEventListener('DOMContentLoaded', () => {
const dropdowns = document.querySelectorAll('.dropdown');

dropdowns.forEach((dropdown) => {
const trigger = dropdown.querySelector('.dropdown__trigger');
const content = dropdown.querySelector('.dropdown__content');

// спочатку ховаємо
content.style.height = '0';
content.style.overflow = 'hidden';
content.style.transition = 'height 0.3s ease';

trigger.addEventListener('click', (e) => {
e.stopPropagation();

if (dropdown.classList.contains('is-open')) {
dropdown.classList.remove('is-open');
content.style.height = '0';
} else {
dropdown.classList.add('is-open');

const fullHeight = content.scrollHeight;

content.style.height = `${fullHeight}px`;
}
});

// клік поза dropdown закриває його
document.addEventListener('click', (e) => {
if (!dropdown.contains(e.target)) {
dropdown.classList.remove('is-open');
content.style.height = '0';
}
});
});
});
27 changes: 27 additions & 0 deletions src/styles/blocks/button.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
.button {
height: 60px;
border: 0;
display: flex;
justify-content: center;
align-items: center;
font-weight: 600;
background-color: $c-orange;
color: $c-white;
text-decoration: none;
cursor: pointer;

@include on-tablet {
max-width: 320px;
}

transition: all 0.3s;

&:hover {
background-color: $c-dark-orange;
}

&:active {
background-color: $c-orange;
color: $c-white;
}
}
57 changes: 57 additions & 0 deletions src/styles/blocks/dropdown.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
.dropdown {
display: none;

@include on-tablet {
display: block;
}

position: relative; // батько для absolute

&__trigger {
display: flex;
align-items: center;
padding: 0;
cursor: pointer;
background: $c-dark-green;
border: 0;

&::after {
content: '';
display: block;
width: 10px;
height: 10px;
background-image: url(/src/images/icons/arrow-dow-icon.svg);
background-size: contain;
background-repeat: no-repeat;
margin-left: 5px;
}
}

&__content {
position: absolute; // dropdown не впливає на layout
top: 120%; // одразу під кнопкою
right: 0;
width: max-content;
height: 0;
overflow: hidden;
background: $c-dark-green;
border-radius: 4px;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
transition: height 0.3s ease;

ul {
margin: 0;
padding: 0;
list-style: none;
}

li {
@include raleway-thin;

font-weight: 450;
padding: 8px 12px;
cursor: pointer;
color: $c-white;
}
}
}
99 changes: 99 additions & 0 deletions src/styles/blocks/events.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
.events {
display: grid;

&__content {
display: grid;
row-gap: 60px;
}

&__wrapper {
display: grid;
gap: 60px;

@include on-tablet {
gap: 76px;
}
}

&__article {
@include page-grid;
}

&__picture {
@include hover(transform, scale(1.05));

max-height: 360px;
width: 100%;
grid-column: 1/-1;
object-fit: cover;

@include on-tablet {
grid-column: span 3;
max-height: 420px;
}

@include on-desktop {
grid-column: span 6;
max-height: 480px;
}
}

&__info {
display: flex;
flex-direction: column;
gap: 20px;

grid-column: 1/-1;

@include on-tablet {
grid-column: span 3;
}

@include on-desktop {
grid-column: span 6;
}
}

&__top {
display: grid;
gap: 10px;
}

&__date {
@include raleway-thin;

color: $c-orange;
}

&__title {
font-size: 20px;
color: $c-text;
margin: 0;

@include playfair-bold;

@include on-tablet {
font-size: 24px;
}
}

&__description {
color: $c-dark-gray;
font-size: 16px;
margin: 0;

@include additional-text;
}

&__button {
margin-top: 30px;

@include on-tablet {
min-width: 100%;
}

@include on-desktop {
min-width: 270px;
}
}
}
Loading
Loading