Skip to content

Commit

Permalink
feat: rebuild
Browse files Browse the repository at this point in the history
  • Loading branch information
afeiship committed Dec 18, 2020
1 parent f1335fe commit 8416cef
Show file tree
Hide file tree
Showing 16 changed files with 132 additions and 129 deletions.
3 changes: 1 addition & 2 deletions .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,9 @@ test
__tests__
.prettierrc
.editorconfig
bower.json
Gemfile
gulpfile.js
LICENSE.txt
Rakefile
server.js
.prettierrc
.release-it.json
16 changes: 16 additions & 0 deletions .release-it.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"git": {
"requireCleanWorkingDir": false
},
"hooks": {
"after:init": [
"t2k"
],
"after:bump": [
"npm run build"
]
},
"github": {
"release": true
}
}
5 changes: 0 additions & 5 deletions Gemfile

This file was deleted.

35 changes: 27 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,37 @@
# webkit-sassui-layout-fixed-header
> Fixed header bar for sassui.
# wsui-layout-fixed-header
> Fixed header bar for wsui.
## documentation
- https://afeiship.github.io/webkit-sassui-layout-fixed-header/
[![version][version-image]][version-url]
[![license][license-image]][license-url]
[![size][size-image]][size-url]
[![download][download-image]][download-url]

## installation
```shell
npm i @feizheng/webkit-sassui-layout-fixed-header
npm i @jswork/wsui-layout-fixed-header
```

## usage
```scss
@import '~@feizheng/webkit-sassui-layout-fixed-header';
@import '~@jswork/wsui-layout-fixed-header';

// header-height: 50px;
// gap: 10px;
@include wsui-layout-fixed-header($in-height: 50px, $in-gap: 10px);
```

## resources
- https://github.com/afeiship/generator-webkit-sassui
## license
Code released under [the MIT license](https://github.com/afeiship/wsui-layout-fixed-header/blob/master/LICENSE.txt).

[version-image]: https://img.shields.io/npm/v/@jswork/wsui-layout-fixed-header
[version-url]: https://npmjs.org/package/@jswork/wsui-layout-fixed-header

[license-image]: https://img.shields.io/npm/l/@jswork/wsui-layout-fixed-header
[license-url]: https://github.com/afeiship/wsui-layout-fixed-header/blob/master/LICENSE.txt

[size-image]: https://img.shields.io/bundlephobia/minzip/@jswork/wsui-layout-fixed-header
[size-url]: https://github.com/afeiship/wsui-layout-fixed-header/blob/master/dist/wsui-layout-fixed-header.min.js

[download-image]: https://img.shields.io/npm/dm/@jswork/wsui-layout-fixed-header
[download-url]: https://www.npmjs.com/package/@jswork/wsui-layout-fixed-header

4 changes: 0 additions & 4 deletions Rakefile

This file was deleted.

12 changes: 3 additions & 9 deletions build/docs.js
Original file line number Diff line number Diff line change
@@ -1,21 +1,15 @@
(function() {
(function () {
'use strict';

var gulp = require('gulp');
var $ = require('gulp-load-plugins')({
pattern: ['gulp-*', 'gulp.*', 'del'],
});
var { includePaths } = nx.$global;
//styles
gulp.task('docs', function() {
gulp.task('docs', function () {
return gulp
.src('docs/style.scss')
.pipe(
$.sass({ outputStyle: 'expanded', includePaths }).on(
'error',
$.sass.logError
)
)
.pipe($.sass({ outputStyle: 'expanded' }).on('error', $.sass.logError))
.pipe(gulp.dest('docs'));
});
})();
12 changes: 5 additions & 7 deletions build/styles.js
Original file line number Diff line number Diff line change
@@ -1,21 +1,19 @@
(function() {
(function () {
'use strict';

var gulp = require('gulp');
var autoprefixer = require('autoprefixer');
var $ = require('gulp-load-plugins')({
pattern: ['gulp-*', 'gulp.*', 'del', '@feizheng/gulp-*'],
pattern: ['gulp-*', 'gulp.*', 'del', '@jswork/gulp-*'],
});

var { includePaths } = nx.$global;

//styles
gulp.task('styles', function() {
gulp.task('styles', function () {
return gulp
.src('src/*.scss')
.pipe($.feizheng.pkgHeader())
.pipe($.jswork.pkgHeader())
.pipe(gulp.dest('dist'))
.pipe($.sass({ includePaths }))
.pipe($.sass())
.pipe($.postcss([autoprefixer()]))
.pipe(gulp.dest('dist'));
});
Expand Down
12 changes: 6 additions & 6 deletions dist/index.css
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
/*!
* name: @feizheng/webkit-sassui-layout-fixed-header
* description: Fixed header bar for sassui.
* url: https://github.com/afeiship/webkit-sassui-layout-fixed-header
* name: @jswork/wsui-layout-fixed-header
* description: Fixed header bar for wsui.
* homepage: https://github.com/afeiship/wsui-layout-fixed-header
* version: 1.0.0
* date: 2020-02-25 12:34:49
* date: 2020-12-18 21:40:57
* license: MIT
*/
/*webkit-sassui-layout-fixed-header Start*/
/*webkit-sassui-layout-fixed-header End*/
/*wsui-layout-fixed-header Start*/
/*wsui-layout-fixed-header End*/
23 changes: 14 additions & 9 deletions dist/index.scss
Original file line number Diff line number Diff line change
@@ -1,19 +1,24 @@
/*!
* name: @feizheng/webkit-sassui-layout-fixed-header
* description: Fixed header bar for sassui.
* url: https://github.com/afeiship/webkit-sassui-layout-fixed-header
* name: @jswork/wsui-layout-fixed-header
* description: Fixed header bar for wsui.
* homepage: https://github.com/afeiship/wsui-layout-fixed-header
* version: 1.0.0
* date: 2020-02-25 12:34:49
* date: 2020-12-18 21:40:57
* license: MIT
*/

/*webkit-sassui-layout-fixed-header Start*/
@mixin webkit-sassui-layout-fixed-header($inHeight: 50px, $inGap: 10px) {
$padding-top: $inHeight + $inGap;
/*wsui-layout-fixed-header Start*/
$wsui-layout-fixed-header-options: (
color: #f00,
) !default;

@mixin wsui-layout-fixed-header($in-height: 50px, $in-gap: 10px) {
$padding-top: $in-height + $in-gap;

&[data-hasbar="true"] {
padding-top: $padding-top;
}

&[data-hasbar="false"] {
padding-top: 0;
> .is-header {
Expand All @@ -23,11 +28,11 @@

> .is-header {
position: fixed;
height: $inHeight;
height: $in-height;
top: 0;
left: 0;
right: 0;
z-index: 2;
}
}
/*webkit-sassui-layout-fixed-header End*/
/*wsui-layout-fixed-header End*/
54 changes: 25 additions & 29 deletions docs/index.html
Original file line number Diff line number Diff line change
@@ -1,44 +1,40 @@
<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>webkit-sassui-layout-fixed-footer</title>
<title>wsui-layout-fixed-header</title>
<link rel="stylesheet" href="./style.css">
</head>

<body>


<div class="wrapper test-webkit-sassui-layout-fixed-footer" data-hasbar=true>
<div class="is-header">
<span>My header</span>
<button id='btn'>Close ME</button>
</div>

<div style="height:200px; background:salmon;"></div>
<div style="height:200px; background:royalblue;"></div>
<div style="height:200px; background:saddlebrown;"></div>
<div style="height:200px; background:salmon;"></div>
<div style="height:200px; background:seagreen;"></div>
<div style="height:200px; background:sienna;"></div>
<div style="height:200px; background:salmon;"></div>
<div style="height:200px; background:skyblue;"></div>
<div style="height:200px; background:salmon;"></div>


<div class="wrapper test-wsui-layout-fixed-footer" data-hasbar=true>
<div class="is-header">
<span>My header</span>
<button id='btn'>Close ME</button>
</div>

<script>
var btn = document.querySelector('#btn');
var wrapper = document.querySelector('.wrapper');
btn.onclick = function () {
wrapper.setAttribute('data-hasbar', false);
}
</script>

<div style="height:200px; background:salmon;"></div>
<div style="height:200px; background:royalblue;"></div>
<div style="height:200px; background:saddlebrown;"></div>
<div style="height:200px; background:salmon;"></div>
<div style="height:200px; background:seagreen;"></div>
<div style="height:200px; background:sienna;"></div>
<div style="height:200px; background:salmon;"></div>
<div style="height:200px; background:skyblue;"></div>
<div style="height:200px; background:salmon;"></div>


</div>

<script>
var btn = document.querySelector('#btn');
var wrapper = document.querySelector('.wrapper');
btn.onclick = function () {
wrapper.setAttribute('data-hasbar', false);
}
</script>
</body>

</html>
24 changes: 12 additions & 12 deletions docs/style.css
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
/*!
* name: @feizheng/webkit-sassui-layout-fixed-header
* description: Fixed header bar for sassui.
* url: https://github.com/afeiship/webkit-sassui-layout-fixed-header
* name: @jswork/wsui-layout-fixed-header
* description: Fixed header bar for wsui.
* homepage: https://github.com/afeiship/wsui-layout-fixed-header
* version: 1.0.0
* date: 2020-02-25 12:34:49
* date: 2020-12-18 21:40:57
* license: MIT
*/
/*webkit-sassui-layout-fixed-header Start*/
/*webkit-sassui-layout-fixed-header End*/
/*wsui-layout-fixed-header Start*/
/*wsui-layout-fixed-header End*/
* {
margin: 0;
padding: 0;
-webkit-margin-before: 0;
-webkit-margin-after: 0;
}

.test-webkit-sassui-layout-fixed-footer > .is-header {
.test-wsui-layout-fixed-footer > .is-header {
background: #eee;
line-height: 50px;
text-align: center;
}

.test-webkit-sassui-layout-fixed-footer > .is-header button {
.test-wsui-layout-fixed-footer > .is-header button {
background: #4cd964;
color: #fff;
border: none;
Expand All @@ -30,19 +30,19 @@
padding: 10px 20px;
}

.test-webkit-sassui-layout-fixed-footer[data-hasbar="true"] {
.test-wsui-layout-fixed-footer[data-hasbar="true"] {
padding-top: 60px;
}

.test-webkit-sassui-layout-fixed-footer[data-hasbar="false"] {
.test-wsui-layout-fixed-footer[data-hasbar="false"] {
padding-top: 0;
}

.test-webkit-sassui-layout-fixed-footer[data-hasbar="false"] > .is-header {
.test-wsui-layout-fixed-footer[data-hasbar="false"] > .is-header {
display: none;
}

.test-webkit-sassui-layout-fixed-footer > .is-header {
.test-wsui-layout-fixed-footer > .is-header {
position: fixed;
height: 50px;
top: 0;
Expand Down
4 changes: 2 additions & 2 deletions docs/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
-webkit-margin-after: 0;
}

.test-webkit-sassui-layout-fixed-footer {
.test-wsui-layout-fixed-footer {
> .is-header {
background: #eee;
line-height: 50px;
Expand All @@ -23,5 +23,5 @@
}
}

@include webkit-sassui-layout-fixed-header();
@include wsui-layout-fixed-header();
}
6 changes: 0 additions & 6 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,6 @@
var gulp = require('gulp');
var path = require('path');
var fs = require('fs');
var includePaths = [path.join(__dirname, '/node_modules/')];

// save globals
require('@feizheng/next-global');
nx.global(null);
nx.$global = { includePaths };

//import
fs.readdirSync('./build').map(function(file) {
Expand Down
Loading

0 comments on commit 8416cef

Please sign in to comment.