Skip to content

Commit

Permalink
Merge branch 'cleaning-code' into v2-dev
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel W authored and Daniel W committed May 21, 2024
2 parents 2a2dd9b + 09a6a53 commit eab1d72
Show file tree
Hide file tree
Showing 62 changed files with 30 additions and 5,166 deletions.
72 changes: 1 addition & 71 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ const sass = require('sass');
const webpackConfig = require('./webpack.config.js');

module.exports = function (grunt) {
// configure the tasks
const config = {
jasmine: {
components: {
Expand Down Expand Up @@ -53,17 +52,6 @@ module.exports = function (grunt) {
}
},

// Compile ghpages css
gh: {
options: {
outputStyle: 'compressed',
sourcemap: false
},
files: {
'docs/css/ghpages-materialize.css': 'sass/ghpages-materialize.scss'
}
},

// Compile bin css
bin: {
options: {
Expand Down Expand Up @@ -158,62 +146,6 @@ module.exports = function (grunt) {
{ expand: true, cwd: 'dist/js/', src: ['**/*'], dest: 'materialize-src/js/bin/' },
{ expand: true, cwd: './', src: ['LICENSE', 'README.md'], dest: 'materialize-src/' }
]
},

starter_template: {
options: {
archive: 'templates/starter-template.zip',
level: 6
},
files: [
{ expand: true, cwd: 'dist/', src: ['**/*'], dest: 'starter-template/' },
{
expand: true,
cwd: 'templates/starter-template/',
src: ['index.html', 'LICENSE'],
dest: 'starter-template/'
},
{
expand: true,
cwd: 'templates/starter-template/css',
src: ['style.css'],
dest: 'starter-template/css'
},
{
expand: true,
cwd: 'templates/starter-template/js',
src: ['init.js'],
dest: 'starter-template/js'
}
]
},

parallax_template: {
options: {
archive: 'templates/parallax-template.zip',
level: 6
},
files: [
{ expand: true, cwd: 'dist/', src: ['**/*'], dest: 'parallax-template/' },
{
expand: true,
cwd: 'templates/parallax-template/',
src: ['index.html', 'LICENSE', 'background1.jpg', 'background2.jpg', 'background3.jpg'],
dest: 'parallax-template/'
},
{
expand: true,
cwd: 'templates/parallax-template/css',
src: ['style.css'],
dest: 'parallax-template/css'
},
{
expand: true,
cwd: 'templates/parallax-template/js',
src: ['init.js'],
dest: 'parallax-template/js'
}
]
}
},

Expand Down Expand Up @@ -338,7 +270,7 @@ module.exports = function (grunt) {

// define tasks
grunt.registerTask('monitor', ['concurrent:monitor']); // DEV
grunt.registerTask('sass_compile', ['sass:gh', 'sass:bin', 'postcss:bin']);
grunt.registerTask('sass_compile', ['sass:bin', 'postcss:bin']);
grunt.registerTask('jas_test', ['connect', 'jasmine']);
grunt.registerTask('test', ['webpack:dev', 'sass_compile', 'jas_test']);
grunt.registerTask('release', [
Expand All @@ -352,8 +284,6 @@ module.exports = function (grunt) {
'usebanner:release',
'compress:main',
'compress:src',
'compress:starter_template',
'compress:parallax_template',
'replace:version', // again because of cdn
'replace:package_json',
'rename:rename_src',
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 7 additions & 4 deletions sass/components/_modal.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
.modal {
--modal-footer-height: 56px;
--modal-footer-divider-height: 1px;

&:focus {
outline: none;
}
Expand Down Expand Up @@ -40,7 +43,7 @@
border-radius: 0 0 2px 2px;
background-color: $modal-background-color;
padding: 4px 6px;
height: 56px;
height: var(--modal-footer-height);
width: 100%;
text-align: right;

Expand Down Expand Up @@ -71,16 +74,16 @@

.modal-content {
position: absolute;
height: calc(100% - 56px);
height: calc(100% - var(--modal-footer-height));
max-height: 100%;
width: 100%;
overflow-y: auto;
}

.modal-footer {
border-top: 1px solid $divider-color;
border-top: var(--modal-footer-divider-height) solid $divider-color;
position: absolute;
bottom: 0;
bottom: var(--modal-footer-divider-height);
}
}

Expand Down
8 changes: 4 additions & 4 deletions src/bounding.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
export class Bounding {
public left: number; // left offset coordinate
public top: number;
public width: number;
public height: number;
left: number; // left offset coordinate
top: number;
width: number;
height: number;
}
10 changes: 5 additions & 5 deletions src/edges.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
export class Edges {
public top: boolean; // If the top edge was exceeded
public right: boolean; // If the right edge was exceeded
public bottom: boolean; // If the bottom edge was exceeded
public left: boolean; // If the left edge was exceeded
}
top: boolean; // If the top edge was exceeded
right: boolean; // If the right edge was exceeded
bottom: boolean; // If the bottom edge was exceeded
left: boolean; // If the left edge was exceeded
}
2 changes: 1 addition & 1 deletion src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ export class Utils {
* @param wait Wait time.
* @param options Additional options.
*/
public static throttle(func: Function, wait: number, options: Partial<{leading:boolean,trailing:boolean}> = null) {
static throttle(func: Function, wait: number, options: Partial<{leading:boolean,trailing:boolean}> = null) {
let context: object, args: IArguments, result: any;
let timeout = null;
let previous = 0;
Expand Down
2 changes: 1 addition & 1 deletion src/waves.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export class Waves {

// https://phoenix-dx.com/css-techniques-for-material-ripple-effect/

public static renderWaveEffect(targetElement: HTMLElement, position: Position|null = null, color: RGBColor|null = null): void {
static renderWaveEffect(targetElement: HTMLElement, position: Position|null = null, color: RGBColor|null = null): void {
const isCentered = position === null;
const duration = 500;
let animationFrame: number, animationStart: number;
Expand Down
21 changes: 0 additions & 21 deletions templates/masonry-template/LICENSE

This file was deleted.

Binary file removed templates/masonry-template/background1.jpg
Binary file not shown.
Binary file removed templates/masonry-template/background2.jpg
Binary file not shown.
Binary file removed templates/masonry-template/background3.jpg
Binary file not shown.
55 changes: 0 additions & 55 deletions templates/masonry-template/css/style.css

This file was deleted.

Loading

0 comments on commit eab1d72

Please sign in to comment.