-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Evgeny Talagaev
committed
Sep 25, 2023
1 parent
8332896
commit 5758263
Showing
77 changed files
with
1,314 additions
and
763 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
{ | ||
"extends": "stylelint-config-standard-scss" | ||
"extends": "stylelint-config-standard-scss", | ||
"ignoreFiles": ["build/*", "node_modules/*", "static/*"] | ||
} |
This file was deleted.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { render } from "../utils/index"; | ||
import { ErrorPage } from "../pages/index"; | ||
|
||
import "../scss/index.scss"; | ||
|
||
const props = { | ||
title: '404', | ||
text: 'who seeks will always find', | ||
linkText: 'go to chats page', | ||
linkHref: '/chats-and-chat/', | ||
} | ||
|
||
const page = new ErrorPage(props); | ||
|
||
render(page); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<!DOCTYPE html> | ||
<html class="page" lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<title>404 page</title> | ||
</head> | ||
<body> | ||
<main id="app"></main> | ||
<script src="404.ts" type="module"></script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { render } from "../utils/index"; | ||
import { ErrorPage } from "../pages/index"; | ||
|
||
import "../scss/index.scss"; | ||
|
||
const props = { | ||
title: '500', | ||
text: 'something went wrong', | ||
linkText: 'go to chats page', | ||
linkHref: '/chats-and-chat/', | ||
} | ||
|
||
const page = new ErrorPage(props); | ||
|
||
render(page); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<!DOCTYPE html> | ||
<html class="page" lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<title>500 page</title> | ||
</head> | ||
<body> | ||
<main id="app"></main> | ||
<script src="500.ts" type="module"></script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import { render } from "../utils/index"; | ||
import { ChatsAndChat } from "../pages/index"; | ||
|
||
import "../scss/index.scss"; | ||
|
||
const page = new ChatsAndChat(); | ||
|
||
render(page); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<!DOCTYPE html> | ||
<html class="page" lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<title>Chats and chat page</title> | ||
</head> | ||
<body> | ||
<main id="app"></main> | ||
<script src="chats-and-chat.ts" type="module"></script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
form.form | ||
if (title) | ||
h1.form__title= title | ||
.form__field!= fieldLogin | ||
.form__field!= fieldPassword | ||
.form__field.form__field--accent!= sendBtn | ||
.form__field.t-right!= link |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import { Block } from "../../core/index"; | ||
import template from "./AuthorizationForm.tmp.pug"; | ||
import { getValuesFromForm } from "../utils/index"; | ||
|
||
export default class AuthorizationForm extends Block { | ||
constructor(props?: object) { | ||
const newProps = { | ||
...props, | ||
events: new Map([ | ||
['submit', (event: object) => getValuesFromForm(event, this)], | ||
]), | ||
} | ||
|
||
super('div', newProps); | ||
} | ||
|
||
render() { | ||
return this.compile(template, this.props); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
button.btn text | ||
button(class=className, type=type, form=form)= text |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 5 additions & 0 deletions
5
src/components/EditingPasswordForm/EditingPasswordForm.tmp.pug
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
form#userSettingsForm.user-settings__form | ||
ul.user-settings__list | ||
li.user-settings__list-item!= currentPassword | ||
li.user-settings__list-item!= newPassword | ||
li.user-settings__list-item!= repeatNewPassword |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import { Block } from "../../core/index"; | ||
import template from "./EditingPasswordForm.tmp.pug"; | ||
import { getValuesFromForm } from "../utils/index"; | ||
|
||
export default class EditingPasswordForm extends Block { | ||
constructor(props?: object) { | ||
const newProps = { | ||
...props, | ||
events: new Map([ | ||
['submit', (event: object) => getValuesFromForm(event, this)], | ||
]), | ||
} | ||
|
||
super('div', newProps); | ||
} | ||
|
||
render() { | ||
return this.compile(template, this.props); | ||
} | ||
} |
25 changes: 25 additions & 0 deletions
25
src/components/EditingSettingsForm/EditingSettingsForm.tmp.pug
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
form#userSettingsForm.user-settings__form | ||
ul.user-settings__list | ||
li.user-settings__list-item!= nickname | ||
li.user-settings__list-item!= firstName | ||
li.user-settings__list-item!= secondName | ||
li.user-settings__list-item!= email | ||
li.user-settings__list-item!= phone | ||
|
||
//ul.user-settings__list | ||
li.user-settings__list-item | ||
label.user-settings__list-item-name(for="display_name") Nickname: | ||
input.user-settings__list-item-value.t-right(id="display_name" type="text" name="display_name" value="user name") | ||
li.user-settings__list-item | ||
label.user-settings__list-item-name(for="first_name") First name: | ||
input.user-settings__list-item-value.t-right(id="first_name" type="text" name="first_name" value="first name") | ||
li.user-settings__list-item | ||
label.user-settings__list-item-name(for="second_name") Second name: | ||
input.user-settings__list-item-value.t-right(id="second_name" type="text" name="second_name" value="second name") | ||
li.user-settings__list-item | ||
label.user-settings__list-item-name(for="email") Email: | ||
input.user-settings__list-item-value.t-right(id="email" type="text" name="email" value="[email protected]") | ||
li.user-settings__list-item | ||
label.user-settings__list-item-name(for="phone") Phone: | ||
input.user-settings__list-item-value.t-right(id="phone" type="text" name="phone" value="+7 (000) 000-00-00") | ||
//input(type="file", name="avatar", hidden) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import { Block } from "../../core/index"; | ||
import template from "./EditingSettingsForm.tmp.pug"; | ||
import { getValuesFromForm } from "../utils/index"; | ||
|
||
export default class EditingSettingsForm extends Block { | ||
constructor(props?: object) { | ||
const newProps = { | ||
...props, | ||
events: new Map([ | ||
['submit', (event: object) => getValuesFromForm(event, this)], | ||
]), | ||
} | ||
|
||
super('div', newProps); | ||
} | ||
|
||
render() { | ||
return this.compile(template, this.props); | ||
} | ||
} |
Oops, something went wrong.