Skip to content

Commit

Permalink
Some fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
nmihalyov committed Jul 12, 2021
1 parent aa27b36 commit 4ff1225
Show file tree
Hide file tree
Showing 13 changed files with 268 additions and 266 deletions.
4 changes: 3 additions & 1 deletion changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,4 +84,6 @@

1.2.4 – Переработана система сжатия изображений, теперь изображения сжимаются более эффективно

1.3.0 – Быстрое создание компонентов, готовые компоненты уже в сборке
1.3.0 – Быстрое создание компонентов, готовые компоненты уже в сборке

1.3.1 – Исправление незначительных ошибок
4 changes: 2 additions & 2 deletions create-component.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const path = require('path');

let basePath = './dev/components/';
const files = {
pug: `mixin {component}\n\t.{component}`,
pug: `mixin {component}\n .{component}`,
sass: `.{component}`
};

Expand Down Expand Up @@ -43,7 +43,7 @@ if (args.includes('--js')) {
}

if (args.includes('--section')) {
files.pug = `mixin {component}\n\tsection.{component}.container\n\t\t.{component}__wrapper.wrapper`;
files.pug = `mixin {component}\n section.{component}.container\n .{component}__wrapper.wrapper`;
}

args.map(component => {
Expand Down
10 changes: 5 additions & 5 deletions dev/components/_ui/button/button.pug
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
mixin button(style, type, text, className, options)
- className = `button--${style} ${className || ''}`
- className = `button button--${style} ${className || ''}`

if options && options.disabled
- className += 'button--disabled'

if type === 'link'
a.button(class=className, href=options.link)= text
a(class=className, href=options.link)= text
else if type === 'button'
button.button(class=className)= text
button(class=className)= text
else if type === 'popup'
button.button.js-open-popup(class=className, data-popup=options.popup)= text
button.js-open-popup(class=className, data-popup=options.popup)= text
else if type === 'submit'
button.button(type="submit", class=className)= text
button(type="submit", class=className)= text
6 changes: 3 additions & 3 deletions dev/components/_ui/input/input.pug
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
mixin input(type, label, name, placeholder, value, className, options)
mixin input(type, label, name, placeholder, className, options)
label.input(class=`${className || ''}`)
if label.length
p.input__label= label
input.input__field(
class=`${className ? className + '-field' : ''}`,
type=type,
name=name,
required=required,
required=options && options.required,
placeholder=placeholder,
value=value,
value=options && options.value,
readonly=options && options.readonly)
if options && options.error
p.input__error= options.error
2 changes: 1 addition & 1 deletion dev/components/_ui/input/input.sass
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
border-color: $black
&--error
.input__error
display: block;
display: block
&__label
margin-bottom: 5px
color: $black
Expand Down
4 changes: 2 additions & 2 deletions dev/components/footer/footer.pug
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
mixin footer
footer.footer.container
.footer__wrapper.wrapper
footer.footer.container
.footer__wrapper.wrapper
4 changes: 2 additions & 2 deletions dev/components/header/header.pug
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
mixin header
header.header.container
.header__wrapper.wrapper
header.header.container
.header__wrapper.wrapper
78 changes: 39 additions & 39 deletions dev/manifest.json
Original file line number Diff line number Diff line change
@@ -1,41 +1,41 @@
{
"name": "Application Name",
"short_name": "AppName",
"icons": [
{
"src": "img/favicons/128x128.png",
"sizes": "128x128",
"type": "img/png"
},
{
"src": "img/favicons/144x144.png",
"sizes": "144x144",
"type": "img/png"
},
{
"src": "img/favicons/152x152.png",
"sizes": "152x152",
"type": "img/png"
},
{
"src": "img/favicons/192x192.png",
"sizes": "192x192",
"type": "img/png"
},
{
"src": "img/favicons/256x256.png",
"sizes": "256x256",
"type": "img/png"
},
{
"src": "img/favicons/512x512.png",
"sizes": "512x512",
"type": "img/png"
}
],
"start_url": "index.html",
"display": "standalone",
"theme_color": "#000000",
"background_color": "#000000",
"orientation": "portrait-primary"
"name": "Application Name",
"short_name": "AppName",
"icons": [
{
"src": "img/favicons/128x128.png",
"sizes": "128x128",
"type": "img/png"
},
{
"src": "img/favicons/144x144.png",
"sizes": "144x144",
"type": "img/png"
},
{
"src": "img/favicons/152x152.png",
"sizes": "152x152",
"type": "img/png"
},
{
"src": "img/favicons/192x192.png",
"sizes": "192x192",
"type": "img/png"
},
{
"src": "img/favicons/256x256.png",
"sizes": "256x256",
"type": "img/png"
},
{
"src": "img/favicons/512x512.png",
"sizes": "512x512",
"type": "img/png"
}
],
"start_url": "index.html",
"display": "standalone",
"theme_color": "#000000",
"background_color": "#000000",
"orientation": "portrait-primary"
}
10 changes: 5 additions & 5 deletions dev/pug/assets/_og.pug
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//- Мета теги для соц. сетей Open Graph
mixin open-graph(title, url, image, description)
meta(property="og:title", content=title)
meta(property="og:url", content=url)
meta(property="og:type", content='website')
meta(property="og:image", content=image)
meta(property="og:description", content=description)
meta(property="og:title", content=title)
meta(property="og:url", content=url)
meta(property="og:type", content='website')
meta(property="og:image", content=image)
meta(property="og:description", content=description)
8 changes: 4 additions & 4 deletions dev/pug/index.pug
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ html(lang="ru", prefix="og: http://ogp.me/ns#")
section.container
.wrapper
h1(style="margin: 35px 0") Gulp Pure Start
sup(style="font-size: 12px") v1.3.0
sup(style="font-size: 12px") v1.3.1
h3(style="margin-bottom: 25px") Примеры компонентов

h4(style="margin-bottom: 10px") 1. Кнопки
Expand All @@ -38,11 +38,11 @@ html(lang="ru", prefix="og: http://ogp.me/ns#")

h4(style="margin-bottom: 10px") 2. Инпуты
div(style="max-width: 400px; margin-bottom: 10px")
+input('text', 'Лейбл:', 'data', 'Плейсхолдер', '', '', {error: 'Неверные данные'})
+input('text', 'Лейбл:', 'data', 'Плейсхолдер', '', {required: true, error: 'Неверные данные'})
div(style="max-width: 400px; margin-bottom: 10px")
+input('text', '', 'data', 'Плейсхолдер', 'Только для чтения', '', {readonly: true})
+input('text', '', 'data', 'Плейсхолдер', '', {value: 'Только для чтения', required: true, readonly: true})
div(style="max-width: 400px; margin-bottom: 25px")
+input('text', 'Инпут с ошибкой:', 'error', 'Плейсхолдер', 'Текст', 'input--error', {error: 'Неверные данные'})
+input('text', 'Инпут с ошибкой:', 'error', 'Плейсхолдер', 'input--error', {value: 'Текст', required: true, error: 'Неверные данные'})

h4(style="margin-bottom: 10px") 3. Чекбоксы
div(style="max-width: 400px; margin-bottom: 25px")
Expand Down
Loading

0 comments on commit 4ff1225

Please sign in to comment.