-
Notifications
You must be signed in to change notification settings - Fork 1
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
Showing
4 changed files
with
42 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import AppView from '../view/AppView.ts'; | ||
|
||
class AppModel { | ||
private appView: AppView = new AppView(); | ||
|
||
public getHTML(): HTMLDivElement { | ||
return this.appView.getHTML(); | ||
} | ||
} | ||
|
||
export default AppModel; |
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,27 @@ | ||
import { TAG_NAMES } from '@/shared/constants/enums.ts'; | ||
import createBaseElement from '@/shared/utils/createBaseElement.ts'; | ||
|
||
import APP_STYLES from './appView.module.scss'; | ||
|
||
class AppView { | ||
private pagesContainer: HTMLDivElement; | ||
|
||
constructor() { | ||
this.pagesContainer = this.createHTML(); | ||
} | ||
|
||
private createHTML(): HTMLDivElement { | ||
this.pagesContainer = createBaseElement({ | ||
cssClasses: [APP_STYLES.siteWrapper], | ||
tag: TAG_NAMES.DIV, | ||
}); | ||
|
||
return this.pagesContainer; | ||
} | ||
|
||
public getHTML(): HTMLDivElement { | ||
return this.pagesContainer; | ||
} | ||
} | ||
|
||
export default AppView; |
File renamed without changes.
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,5 @@ | ||
import AppModel from '@/app/App/model/AppModel.ts'; | ||
import '@/styles.scss'; | ||
|
||
const myApp = new AppModel(); | ||
document.body.append(myApp.getHTML()); |