Skip to content

Commit 0022767

Browse files
authored
Merge pull request #4 from Nimgr/home_1
Home 1
2 parents b4eba09 + 673a14d commit 0022767

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

83 files changed

+17598
-85
lines changed

.storybook/main.js

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
module.exports = {
2+
stories: ['../src/admin/**/*.stories.js'],
3+
addons: ['@storybook/addon-actions', '@storybook/addon-links'],
4+
webpackFinal: (config) => {
5+
config.module.rules.push({
6+
test: /\.pug$/,
7+
use: ["pug-plain-loader"],
8+
});
9+
10+
config.module.rules.push({
11+
test: /\.(p|post|)css$/,
12+
use: [
13+
"vue-style-loader",
14+
"css-loader",
15+
"postcss-loader"
16+
],
17+
});
18+
19+
return config;
20+
},
21+
};

package-lock.json

Lines changed: 10462 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,26 @@
66
"scripts": {
77
"dev": "webpack-dev-server --mode=development --hot",
88
"build": "rm -rf dist && webpack --mode=production --progress",
9-
"reg": "node reg-util.js"
9+
"reg": "node reg-util.js",
10+
"storybook": "start-storybook -p 6006",
11+
"build-storybook": "build-storybook"
1012
},
1113
"keywords": [],
1214
"author": "",
1315
"license": "ISC",
1416
"devDependencies": {
15-
"@babel/core": "^7.2.2",
17+
"@babel/core": "^7.9.6",
1618
"@babel/plugin-syntax-dynamic-import": "^7.2.0",
1719
"@babel/preset-env": "^7.3.1",
20+
"@storybook/addon-actions": "^5.3.18",
21+
"@storybook/addon-links": "^5.3.18",
22+
"@storybook/addons": "^5.3.18",
23+
"@storybook/vue": "^5.3.18",
1824
"acorn": "^6.0.5",
1925
"acorn-dynamic-import": "^4.0.0",
2026
"autoprefixer": "^9.4.8",
2127
"babel-loader": "^8.0.5",
28+
"babel-preset-vue": "^2.0.2",
2229
"css-loader": "^2.1.0",
2330
"cssnano": "^4.1.10",
2431
"file-loader": "^3.0.1",
@@ -56,6 +63,7 @@
5663
"request": "^2.88.0",
5764
"signale": "^1.4.0",
5865
"vue": "^2.6.7",
66+
"vue-flickity": "^1.2.1",
5967
"vue-router": "^3.0.2"
6068
}
6169
}

src/admin/App.vue

Lines changed: 115 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,116 @@
11
<template lang="pug">
2-
h1 Welcome to the Vue App
3-
</template>
2+
form.form
3+
input(type="text" placeholder="Login" v-model="user.login")
4+
input(type="password" placeholder="password" v-model="user.password")
5+
button(type="submit") LogIn
6+
7+
body
8+
.wrapper
9+
.maincontent
10+
section.about
11+
.container.about__container
12+
header.header
13+
.header__top
14+
.about__user
15+
.user__avatar
16+
img(src=require("images/content/Aigor.jpg")).user__avatar-pic
17+
.user__name Игорь Немгиров
18+
.adm__panel
19+
h2 Панель администрирования
20+
a(href="").quit__btn Выйти
21+
.header__bottom
22+
.header__menu
23+
nav.nav
24+
- var menu = ['Обо мне', 'Работы', 'Отзывы']
25+
ul.nav__list
26+
each item in menu
27+
li.nav__item
28+
a(href="").nav__link #item
29+
30+
.about__block
31+
.head__part
32+
.block__title
33+
h1 Блок "Обо мне"
34+
.add__btn
35+
button.add__btn-group
36+
.button__name Добавить группу
37+
.about__wrapper
38+
.about__groups
39+
ul.groups__list
40+
li.groups__item
41+
tr
42+
tr
43+
tr
44+
tr
45+
tr
46+
li.groups__item
47+
tr
48+
li.groups__item
49+
tr
50+
51+
section.works
52+
container.works__container
53+
.works__block
54+
.head__part
55+
.block__title
56+
h2 Блок "Работы"
57+
.works__wrapper
58+
.works__collection
59+
.edit__work
60+
h3 Редактирование работы
61+
.edit__content
62+
.edit__content-left
63+
.edit__content-right
64+
.works__preview
65+
.works__add
66+
ul.works__list
67+
li.works__item
68+
69+
section.reviews
70+
container.reviews__container
71+
.reviews__block
72+
.head__part
73+
.block__title
74+
h2 Блок "Отзывы"
75+
.reviews__wrapper
76+
.reviews__collection
77+
.reviews__new
78+
h3 Новый отзыв
79+
.reviews__content
80+
.reviews__content-left
81+
.reviews__content-right
82+
.reviews__preview
83+
.reviews__add
84+
ul.reviews__list
85+
li.reviews__item
86+
87+
</template>
88+
89+
<script>
90+
import SimpleVueValidator from 'simple-vue-validator';
91+
const Validator = SimpleVueValidator.Validator;
92+
export default {
93+
mixins: [SimpleVueValidator.mixin],
94+
validators: {
95+
'user.login': function (value) {
96+
return Validator.custom(function() {
97+
if (value.length < 5) {
98+
return 'Не менее 5 символов'
99+
}
100+
});
101+
},
102+
'user.password': function (value) {
103+
return Validator.custom(function() {
104+
if (value.length < 8) {
105+
return 'Не менее 8 символов'
106+
}
107+
});
108+
},
109+
}
110+
}
111+
</script>
112+
113+
<style lang="postcss">
114+
115+
</style>
116+

src/admin/components/user/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export {default} from "./user.vue";
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
import user from "./user.vue";
2+
import "../../default.pcss";
3+
4+
function bg() {
5+
return {
6+
data: () => ({
7+
styles: {
8+
padding: "20px",
9+
background: "#ccc",
10+
},
11+
}),
12+
template: '<div :style="styles"><story/></div>',
13+
};
14+
}
15+
16+
export default {
17+
title: "User",
18+
decorators: [bg],
19+
};
20+
21+
export const Default = () => ({
22+
components: {user},
23+
template: `
24+
<user
25+
username="Игорь Немгиров"
26+
userpic="https://picsum.photos/300/300"
27+
/>
28+
`,
29+
});
30+
31+
Default.story = {
32+
name: "По умолчанию",
33+
};

src/admin/components/user/user.vue

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
<template lang="pug">
2+
.user-component
3+
.avatar
4+
img(:src="userpic")
5+
.username {{username}}
6+
</template>
7+
8+
<script>
9+
export default {
10+
props: ["username", "userpic"]
11+
}
12+
</script>
13+
14+
<style lang="postcss" scoped>
15+
.user-component {
16+
display: flex;
17+
align-items: center;
18+
}
19+
.avatar {
20+
border-radius: 50%;
21+
overflow: hidden;
22+
width: 50px;
23+
height: 50px;
24+
margin-right: 10px;
25+
}
26+
.name {
27+
font-size: 18px;
28+
color: #fff;
29+
}
30+
</style>

src/admin/default.pcss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
@import "normalize.css";
2+
@import "../styles//mixins.pcss";
3+
@import "../styles/layout/base.pcss";
4+
@import url('https://fonts.googleapis.com/css?family=Open+Sans:300,400,600,700,800');

src/data/reviews.json

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
[
2+
{
3+
"id": 0,
4+
"text": "1 Этот парень проходил обучение веб-разработке не где-то, а в Loftschool! 4,5 месяца только самых тяжелых испытаний и бессонных ночей!",
5+
"author-name": "Ковальчук Дмитрий",
6+
"author-occ": "Основатель Loftschool",
7+
"author-pic": "user.jpg"
8+
},
9+
{
10+
"id": 1,
11+
"text": "2 Этот парень проходил обучение веб-разработке не где-то, а в Loftschool! 4,5 месяца только самых тяжелых испытаний и бессонных ночей!",
12+
"author-name": "Ковальчук Дмитрий",
13+
"author-occ": "Основатель Loftschool",
14+
"author-pic": "user.jpg"
15+
},
16+
{
17+
"id": 2,
18+
"text": "3 Этот парень проходил обучение веб-разработке не где-то, а в Loftschool! 4,5 месяца только самых тяжелых испытаний и бессонных ночей!",
19+
"author-name": "Ковальчук Дмитрий",
20+
"author-occ": "Основатель Loftschool",
21+
"author-pic": "user.jpg"
22+
},
23+
{
24+
"id": 3,
25+
"text": "4 Этот парень проходил обучение веб-разработке не где-то, а в Loftschool! 4,5 месяца только самых тяжелых испытаний и бессонных ночей!",
26+
"author-name": "Ковальчук Дмитрий",
27+
"author-occ": "Основатель Loftschool",
28+
"author-pic": "user.jpg"
29+
},
30+
{
31+
"id": 4,
32+
"text": "5 Этот парень проходил обучение веб-разработке не где-то, а в Loftschool! 4,5 месяца только самых тяжелых испытаний и бессонных ночей!",
33+
"author-name": "Ковальчук Дмитрий",
34+
"author-occ": "Основатель Loftschool",
35+
"author-pic": "user.jpg"
36+
},
37+
{
38+
"id": 5,
39+
"text": "6 Этот парень проходил обучение веб-разработке не где-то, а в Loftschool! 4,5 месяца только самых тяжелых испытаний и бессонных ночей!",
40+
"author-name": "Ковальчук Дмитрий",
41+
"author-occ": "Основатель Loftschool",
42+
"author-pic": "user.jpg"
43+
},
44+
{
45+
"id": 6,
46+
"text": "7 Этот парень проходил обучение веб-разработке не где-то, а в Loftschool! 4,5 месяца только самых тяжелых испытаний и бессонных ночей!",
47+
"author-name": "Ковальчук Дмитрий",
48+
"author-occ": "Основатель Loftschool",
49+
"author-pic": "user.jpg"
50+
},
51+
{
52+
"id": 7,
53+
"text": "8 Этот парень проходил обучение веб-разработке не где-то, а в Loftschool! 4,5 месяца только самых тяжелых испытаний и бессонных ночей!",
54+
"author-name": "Ковальчук Дмитрий",
55+
"author-occ": "Основатель Loftschool",
56+
"author-pic": "user.jpg"
57+
}
58+
]

src/data/skills.json

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
[
2+
{
3+
"title": "Front-end",
4+
"skills": [
5+
{
6+
"id": 1,
7+
"title": "HTML5",
8+
"percent": 80
9+
},
10+
{
11+
"id": 2,
12+
"title": "CSS3",
13+
"percent": 80
14+
},
15+
{
16+
"id": 3,
17+
"title": "Javascript",
18+
"percent": 50
19+
},
20+
{
21+
"id": 4,
22+
"title": "jQuery и Vue.js",
23+
"percent": 60
24+
}
25+
]
26+
},
27+
{
28+
"title": "Workflow",
29+
"skills": [
30+
{
31+
"id": 5,
32+
"title": "GIT",
33+
"percent": 60
34+
},
35+
{
36+
"id": 6,
37+
"title": "Terminal",
38+
"percent": 60
39+
},
40+
{
41+
"id": 7,
42+
"title": "Gulp",
43+
"percent": 50
44+
},
45+
{
46+
"id": 8,
47+
"title": "Webpack",
48+
"percent": 50
49+
}
50+
]
51+
}
52+
]

0 commit comments

Comments
 (0)