Skip to content

Commit 2762cee

Browse files
committed
cleanup
1 parent 7418fc9 commit 2762cee

25 files changed

+94
-1583
lines changed

blocks/button/ButtonAbstract.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
/**
2+
* Base for the event controllers for button blocks, which automate
3+
* mouse pointer shadows
4+
*/
5+
export default class ButtonAbstract {
6+
7+
}

blocks/button/button.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@
7070
}
7171

7272
/**
73-
* @modifier button--s Small sqare version of the button. Only shows icon
73+
* @modifier button--s Small square version of the button. Only shows icon
7474
* by default, extends <code>width</code> and shows text on
7575
* <code>:hover</code>.
7676
*/

blocks/card/Card--projects.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
import LA
22
from '../../js/math/LinearAlgebra.js';
33
import TF
4-
from '../../js/transformationNew/TransformationFunctions.js';
4+
from '../../js/transformation/TransformationFunctions.js';
55

66
import CardAbstract from './CardAbstract.js';
77

88
/**
9-
* automates event based effects for card blocks with the --projects
9+
* automates event based effects for card blocks with the --projects
1010
* modifier
1111
* @extends CardAbstract
1212
*/
@@ -18,7 +18,7 @@ export default class CardProjects extends CardAbstract {
1818
super(
1919
'--projects',
2020
CardProjects._postTransformFunction,
21-
() => {},
21+
() => {},
2222
CardProjects._transformationFunction
2323
//TODO: implement shadowFunction for project cards
2424
);

blocks/card/Card.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ import CardAbstract from './CardAbstract.js';
55
* @extends CardAbstract
66
*/
77
export default class Card extends CardAbstract {
8+
/**
9+
* @returns {void}
10+
*/
811
constructor() {
912
// in cards without modifiers, nothing happens
1013
// after the transformation, thus the empty functions

blocks/card/CardAbstract.js

Lines changed: 19 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
import CT from './CardTransformable.js';
22
import CM from './CardMouseShadowed.js';
3-
import TF from '../../js/transformationNew/TransformationFunctions.js';
3+
import TF from '../../js/transformation/TransformationFunctions.js';
44
import LA from '../../js/math/LinearAlgebra.js';
55

66
/**
7-
* Base for the transformation controller for card blocks, which automates
8-
* the 3d effect
7+
* Base for the event controllers for card blocks, which automates
8+
* the effects
99
* @abstract
10-
* @extends TransformationController
1110
*/
1211
export default class cardAbstract {
1312
/**
@@ -38,7 +37,7 @@ export default class cardAbstract {
3837
modifier,
3938
postShadowFunction,
4039
shadowFunction
41-
)
40+
);
4241
}
4342

4443
/**
@@ -64,7 +63,7 @@ export default class cardAbstract {
6463
rotAxis[1],
6564
-rotAxis[0]
6665
];
67-
66+
6867
return {
6968
transform:
7069
`perspective(2000px) ` +
@@ -77,18 +76,24 @@ export default class cardAbstract {
7776
};
7877
}
7978

79+
/**
80+
* function which takes an object args which contains e mousemove
81+
* event (event) and returns css changes
82+
* @param {object} args
83+
* @returns {object} object of css properties and their values
84+
*/
8085
static _shadowFunction(args) {
81-
const
82-
rect = args.eventControlElement.domElement.getBoundingClientRect(),
83-
hover = [
84-
args.event.clientX - rect.left,
85-
args.event.clientY - rect.top
86-
];
87-
86+
const
87+
rect = args.eventControlElement.domElement.getBoundingClientRect(),
88+
hover = [
89+
args.event.clientX - rect.left,
90+
args.event.clientY - rect.top
91+
];
92+
8893
return {
8994
'--card__inner--mouse-shadow-left': hover[0] + 'px',
9095
'--card__inner--mouse-shadow-top': hover[1] + 'px'
91-
}
96+
};
9297
}
9398

9499
/**

blocks/card/CardMouseShadowed.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export default class CardMouseShadowed extends MC {
1414
*/
1515
constructor(
1616
modifier = '',
17-
postShadowFunction,
17+
postShadowFunction,
1818
shadowFunction) {
1919

2020
super(

blocks/card/CardTransformable.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import TC from '../../js/transformationNew/TransformationController.js';
1+
import TC from '../../js/transformation/TransformationController.js';
22

33
/**
44
* Base for the transformation controller for card blocks, which automates
@@ -14,7 +14,7 @@ export default class CardTransformable extends TC {
1414
*/
1515
constructor(
1616
modifier = '',
17-
postTransformFunction,
17+
postTransformFunction,
1818
transformationFunction) {
1919

2020
super(

blocks/disclaimers/disclaimers.css

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,8 @@
3131
.disclaimers ul :not(:last-child)::after {
3232
content: " | ";
3333
}
34+
35+
.disclaimers a {
36+
color: var(--c1);
37+
text-decoration: none;
38+
}

index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ <h3 class="card__title project-card__title">
174174
<ul>
175175
<li>Leonard Goldstein</li>
176176
<li>Fork this on GitHub</li>
177-
<li><a href="impressum.html" style="text-decoration: none; color: var(--c1)">Impressum &amp; Datenschutz</a></li>
177+
<li><a href="impressum.html">Impressum &amp; Datenschutz</a></li>
178178
</ul>
179179
</footer>
180180
<script src="blocks/index.js" type="module"></script>

js/eventControl/EventController.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ export default class EventController {
216216
document.addEventListener(eventType, event => {
217217
this._modify(event, ece, modificationFunction);
218218
postFunction.call(this, event, ece);
219-
})
219+
});
220220
}
221221
);
222222
}

0 commit comments

Comments
 (0)