Skip to content
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

Eventpage content #8

Open
wants to merge 40 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
308e834
header fixes
Achpochmak Oct 16, 2024
ad93274
header fixes
Achpochmak Oct 16, 2024
7214ebf
header fixes
Achpochmak Oct 16, 2024
4862209
Update README.md
Achpochmak Oct 16, 2024
f6f9f0b
fixed feed rendering
kataamb Oct 27, 2024
ee6c46f
fixed problems with index html paths
kataamb Oct 27, 2024
ac4ced6
add: event page
kataamb Oct 30, 2024
37a8d62
ADD: fetch module
kataamb Oct 30, 2024
2cd9f15
ADD: event edit and create form
kataamb Nov 3, 2024
21daae7
ADD: user event page
kataamb Nov 3, 2024
2b034e1
ADD: module to handle actions with events
kataamb Nov 3, 2024
1b1b130
started to do router
kataamb Nov 3, 2024
4609533
Add button to header
kataamb Nov 3, 2024
fc1c588
fixed frontend api
kataamb Nov 3, 2024
e7fbda3
edit login
kataamb Nov 3, 2024
dba7a6f
changed registration, ADD: create form event
kataamb Nov 7, 2024
94b6c84
fixed event form lint warnings
kataamb Nov 7, 2024
ab06827
categore select handler
kataamb Nov 7, 2024
cfdc55b
Profile
Ko71k Nov 7, 2024
e70c5e1
Search
Ko71k Nov 7, 2024
44e01bb
PUT for Profile email&username
Ko71k Nov 7, 2024
16bed76
ADD: delete method
kataamb Nov 7, 2024
b5122a0
ADD: delete method
kataamb Nov 7, 2024
5f99d39
image direct to endpoint
Ko71k Nov 7, 2024
6ed864b
Image from backend
Ko71k Nov 7, 2024
d0c99eb
categories and event page
Achpochmak Nov 8, 2024
c92d0f5
Merge branch 'eventpage_content' of https://github.com/frontend-park-…
Achpochmak Nov 8, 2024
35a5f32
Navigatable feed elements
Ko71k Nov 8, 2024
5d26157
images from back
Ko71k Nov 8, 2024
a62b71c
comment + package
Ko71k Nov 8, 2024
da0531e
ADD: delete action for event
kataamb Nov 8, 2024
138a108
fixed blank lines in handleEventsActions.js
kataamb Nov 8, 2024
24540fa
Merge branch 'eventpage_content' of github.com:frontend-park-mail-ru/…
kataamb Nov 8, 2024
fd1e47f
ADD: delete action for event
kataamb Nov 8, 2024
944bb14
categ on refresh
Ko71k Nov 8, 2024
3ffa657
search
Ko71k Nov 8, 2024
9c21d74
Merge branch 'eventpage_content' into kobranch
Ko71k Nov 8, 2024
00f0a6c
Merge pull request #9 from frontend-park-mail-ru/kobranch
Ko71k Nov 8, 2024
1e39d98
Update config.js
Ko71k Nov 8, 2024
ddaa98a
fixed config
kataamb Nov 8, 2024
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
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
/node_modules
/node_modules
*.precompiled.js
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Frontend проекта "KudaGo" Команда 7
* [Backend](https://github.com/go-park-mail-ru/2024_2_Team7)

# Проект
* http://37.139.40.252/
* [vyhodnoy.ru](http://37.139.40.252/)

# figma
* https://www.figma.com/design/B9I0SPwTjYkMcqq6MwO2jW/kudaGo?node-id=0-1&t=DndAvQ4zTz4isemp-1
Expand Down
31 changes: 15 additions & 16 deletions package-lock.json

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

5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"lint": "npx eslint",
"prepare": "husky && husky install"
"prepare": "husky && husky install",
"compile:templates": "handlebars public/components/EventCreateForm/EventCreateForm.hbs -f public/components/EventCreateForm/EventCreateForm.precompiled.js"
},
"lint-staged": {
"*.{js, jsx}": [
Expand All @@ -32,7 +33,7 @@
"dependencies": {
"cors": "^2.8.5",
"dompurify": "^3.1.7",
"express": "^4.21.0",
"express": "^4.21.1",
"handlebars": "^4.7.8",
"minimist": "^1.2.8",
"node": "^22.9.0"
Expand Down
Empty file.
22 changes: 22 additions & 0 deletions public/components/CategorySelect/CategorySelect.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
async function loadCategories() {
const selectElement = document.createElement('select');
try {
const request = { headers: {} };
const response = await api.get('/categories', request);
const categories = await response.json();

console.log(categories);

// Заполнение выпадающего списка
categories.forEach(category => {
const option = document.createElement('option');
option.value = category.id; // id категории
option.textContent = category.name; // название категории
selectElement.appendChild(option);
});

} catch (error) {
console.error('Ошибка при загрузке категорий:', error);
}
return categorySelect;
}
147 changes: 147 additions & 0 deletions public/components/EventContentPage/EventContentPage.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,147 @@
/* Основной контейнер для страницы мероприятия */
.eventPage {
display: flex;
flex-direction: column;
align-items: center;
border: 1px solid #ddd;
border-radius: 8px;
box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1);
padding: 20px;
margin: 20px auto;
max-width: 70%;
background-color: #fff;
padding: 50px;
font-size: large;
}

.event__leftPart__title {
font-size: 36px;
font-weight: bold;
color: #333;
margin-bottom: 10px;
text-align: center;

}

.image {
max-width: 80%;
height: auto;
border-radius: 8px;
margin-top: 10px;
box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1);
}

/* Правая часть с датами, тегами и кнопками */
.event__rightPart {
width: 100%;
display: inline-block;
align-items: center;
padding-left: 15px;
padding-top: 15px;
}

.event__date {
padding: 5px;
font-size: 18px;
color: #666;
margin: 8px 0;
}

.event__tags {
display: flex;
flex-wrap: wrap;
gap: 10px;
}

.event__tag {
background-color: #009951;
color: white;
font-size: 20px;
padding: 7px;
border-radius: 15px;
}


/* Блок для кнопок */
.event_actionsDiv {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Лучше не использовать названия тега в селекторе ("div", "span" и т д) так как если вам понадобится поменять тег вы вряд ли полезете в css менять название класса, и это может сбивать с толку. Просто actions тут достаточно

margin-top: 15px;
display:inline-block;
margin-top: 15px;
}

/* Кнопка удаления */
.buttonDelete {
background: #fff;
border: 2px solid #e74c3c;
color: #e74c3c;
padding: 10px 20px;
border-radius: 20px;
font-size: 16px;
cursor: pointer;
transition: background-color 0.2s ease, color 0.2s ease;
}

.buttonDelete:hover {
background-color: #e74c3c;
color: #fff;
}

/* Кнопка редактирования */
.buttonEdit {
background: #fff;
border: 2px solid #ff7b00;
color: #ff7b00;
padding: 10px 20px;
border-radius: 20px;
font-size: 16px;
cursor: pointer;
transition: background-color 0.2s ease, color 0.2s ease;
}

.buttonEdit:hover {
background-color: #ff7b00;
color: #fff;
}

.eventPage {
display: flex;
flex-direction: column;
align-items: center;
}

.event__title {
font-size: 36px;
font-weight: bold;
}

.event__details {
display: flex;
flex-direction: column;
align-items: center;
}

.event__image {
max-width: 800px;
height: auto;
margin-top: 10px;
}

.event__info-row {
display: flex;
flex-direction: column;
justify-content: space-between;
width: 100%;
padding: 10px 0;
}

.event__tags, .event__date {
margin: 0 10px;
}

.event__actions {
display: flex;
justify-content: center;
margin-top: 30px;
gap: 350px;
}

Loading