HM-67. Верстка главной страницы (#33)
This commit is contained in:
9
src/components/main-content/MainContent.js
Normal file
9
src/components/main-content/MainContent.js
Normal file
@ -0,0 +1,9 @@
|
||||
import Component from '../component/Component';
|
||||
|
||||
class MainContent extends Component {
|
||||
constructor (parentNode) {
|
||||
super('#main-content', parentNode);
|
||||
}
|
||||
}
|
||||
|
||||
export default MainContent;
|
||||
3
src/components/main-content/index.js
Normal file
3
src/components/main-content/index.js
Normal file
@ -0,0 +1,3 @@
|
||||
import MainContent from './MainContent';
|
||||
|
||||
export default MainContent;
|
||||
@ -1,10 +1,12 @@
|
||||
import Component from '../component/index';
|
||||
import MainStatistic from '../main-statistic';
|
||||
import MainContent from '../main-content';
|
||||
|
||||
class MainPage extends Component {
|
||||
constructor (mainNodeSelector, parentNode) {
|
||||
super(mainNodeSelector, parentNode);
|
||||
|
||||
this.mainNode.textContent = 'Главная страница';
|
||||
this.mainStatistic = new MainStatistic(this.mainNode);
|
||||
this.mainContent = new MainContent(this.mainNode);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
9
src/components/main-statistic/MainStatistic.js
Normal file
9
src/components/main-statistic/MainStatistic.js
Normal file
@ -0,0 +1,9 @@
|
||||
import Component from '../component/index';
|
||||
|
||||
class MainStatistic extends Component {
|
||||
constructor (parentNode) {
|
||||
super('#main-statistic', parentNode);
|
||||
}
|
||||
}
|
||||
|
||||
export default MainStatistic;
|
||||
3
src/components/main-statistic/index.js
Normal file
3
src/components/main-statistic/index.js
Normal file
@ -0,0 +1,3 @@
|
||||
import MainStatistic from './MainStatistic';
|
||||
|
||||
export default MainStatistic;
|
||||
Reference in New Issue
Block a user