Skip to content

Commit c8bca1b

Browse files
committed
DO DE DADA
stopft euch mit pralinen spült euch das gehirn dadadudel dudeldada jetzt gibts sprudel
0 parents  commit c8bca1b

Some content is hidden

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

41 files changed

+2902
-0
lines changed

.gitignore

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Logs
2+
*.log
3+
4+
# TODOs
5+
*.todo
6+
todo
7+
8+
# Runtime data
9+
pids
10+
*.pid
11+
*.seed
12+
13+
# Directory for instrumented libs generated by jscoverage/JSCover
14+
lib-cov
15+
16+
# Coverage directory used by tools like istanbul
17+
coverage
18+
19+
# node-waf configuration
20+
.lock-wscript
21+
22+
# Compiled binary addons (http://nodejs.org/api/addons.html)
23+
build/Release
24+
25+
# Dependency directory
26+
# https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git-
27+
node_modules

.npmignore

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# Distributions
2+
**/dist/
3+
4+
# Logs
5+
*.log
6+
7+
# TODOs
8+
*.todo
9+
todo
10+
11+
# Runtime data
12+
pids
13+
*.pid
14+
*.seed
15+
16+
# Directory for instrumented libs generated by jscoverage/JSCover
17+
lib-cov
18+
19+
# Coverage directory used by tools like istanbul
20+
coverage
21+
22+
# node-waf configuration
23+
.lock-wscript
24+
25+
# Compiled binary addons (http://nodejs.org/api/addons.html)
26+
build/Release
27+
28+
# Dependency directory
29+
# https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git-
30+
node_modules

LICENSE

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
2+
Version 2, December 2004
3+
4+
Copyright (C) 2016 Matthias Vogt
5+
6+
Everyone is permitted to copy and distribute verbatim or modified
7+
copies of this license document, and changing it is allowed as long
8+
as the name is changed.
9+
10+
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
11+
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
12+
13+
0. You just DO WHAT THE FUCK YOU WANT TO.
14+
15+
16+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
19+
IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
20+
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
21+
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
22+
OTHER DEALINGS IN THE SOFTWARE.

README.md

+150
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,150 @@
1+
# DADA.js
2+
Bring DADA to your website!
3+
4+
[![Demo](//raw.githubusercontent.com/matthias-vogt/DADA.js/gh-pages/demo-media/img/demo.gif)](//matthias-vogt.github.io/DADA.js)
5+
6+
Demo: [matthias-vogt.github.io/DADA.js](//matthias-vogt.github.io/DADA.js)
7+
8+
This is a [`jQuery`](//jquery.com) plugin to plant something that looks like a Virus on your website. When activated, lots of `Windows 98` dialogs pop up with configurable random phrases, icons and sounds. The dialogs are spinning, pulsing, rotating, and even move away from your cursor if you try to close them.
9+
10+
## What even
11+
> **Dada** ([/ˈdɑːdɑː/](https://en.wikipedia.org/wiki/Help:IPA_for_English)) or **Dadaism** was an [art movement](https://en.wikipedia.org/wiki/Art_movement) of the European [avant-garde](https://en.wikipedia.org/wiki/Avant-garde) in the early 20th century. [...]
12+
> The beginnings of Dada correspond to the outbreak of [World War I](https://en.wikipedia.org/wiki/World_War_I). For many participants, the movement was a protest against the [bourgeois](https://en.wikipedia.org/wiki/Bourgeoisie) [nationalist](https://en.wikipedia.org/wiki/Nationalism) and [colonialist](https://en.wikipedia.org/wiki/Colonialism) interests, which many Dadaists believed were the root cause of the war, and against the cultural and intellectual conformity—in art and more broadly in society—that corresponded to the war.
13+
> Many Dadaists believed that the 'reason' and 'logic' of bourgeois [capitalist](https://en.wikipedia.org/wiki/Capitalism) society had led people into war. They expressed their rejection of that ideology in artistic expression that appeared to reject logic and embrace [chaos](https://en.wikipedia.org/wiki/Randomness) and [irrationality](https://en.wikipedia.org/wiki/Irrationality). For example, [George Grosz](https://en.wikipedia.org/wiki/George_Grosz) later recalled that his Dadaist art was intended as a protest "against this world of mutual destruction."
14+
15+
[Wikipedia](https://en.wikipedia.org/wiki/Dada)
16+
17+
In this spirit and to celebrate DADA's 100th anniversary, this plugin is supposed to bring confusion, havoc and fun to the web.
18+
**It can also be used to announce DADA performances** ;)
19+
20+
## Usage
21+
`DADA.js` depends on [jQuery](https://jquery.com/), so make sure you have that loaded. You can use it like this:
22+
```javascript
23+
$.DADA(options);
24+
```
25+
26+
### Install
27+
28+
```html
29+
<link href="stylesheet" type="text/css" href="DADA.min.css">
30+
<link href="stylesheet" type="text/css" href="DADA-button.min.css"> <!-- optional -->
31+
<script src="jquery.min.js"></script>
32+
<script src="DADA.min.js"></script>
33+
```
34+
35+
The plugin comes with `DADA-button.scss` which helps you style a cool looking button users can click to initiate the DADA. Kinda ruins the whole point of surprise and confusion but whatever.
36+
```html
37+
<div class="dada-button-container">
38+
<button class="dada-button" title="DADA expressly dissociates itself from the contents of this website.">DADA!</button>
39+
<span>Please click the button now!</span>
40+
</div>
41+
```
42+
For better loading performance, I'd recommend loading the script as non-critical content (by putting the `<script>` and `<style>` tags at the end of the body tag). Please also consider concatenating it with your other dependencies.
43+
44+
Install and update easily using [npm](http://npmjs.com):
45+
```sh
46+
npm install dada --save
47+
```
48+
49+
### Options
50+
```javascript
51+
{
52+
53+
// content
54+
55+
phrases: [
56+
// possible random phrases for dialogs
57+
// expects array of strings
58+
"DADA is DADA is DADA"
59+
],
60+
icons: [
61+
// possible random icons for dialogs
62+
// expects array of URIs as strings
63+
],
64+
sounds: {
65+
random: [
66+
// possible random sounds for dialogs
67+
// expects array of URIs as strings
68+
],
69+
special: {
70+
// possible random sounds for special events of dialogs
71+
72+
close: [
73+
// possible random sounds for when dialogs close
74+
],
75+
start: [
76+
// possible random sounds for the first modal
77+
]
78+
}
79+
},
80+
81+
// callbacks
82+
83+
on: {
84+
start: function() {
85+
// when the first modal opens
86+
},
87+
end: function() {
88+
// when DADA ends
89+
},
90+
ok: function() {
91+
// when any OK button is clicked
92+
},
93+
cancel: function() {
94+
// when any Cancel button is clicked
95+
}
96+
},
97+
98+
// timing
99+
100+
time: 20000, // total time DADA should run
101+
baseTimePerDialog: 1500, // time before a new dialog pops up (+- a little randomization)
102+
waitTimeAfterFirstDialog: 8000, // time to wait after the first pop up (suspense)
103+
104+
// window markup
105+
106+
windowTemplate: '' + // template for windows' markups
107+
'<div class="window">' +
108+
' <div class="bar">' +
109+
' {{title}}' +
110+
' <button class="close js-cancel">×</button>' +
111+
' </div>' +
112+
' <div class="content">' +
113+
' <img class="icon" alt="DADA Icon">' +
114+
' <div class="text">' +
115+
' <br>' +
116+
' <button class="js-ok">{{ok}}</button>' +
117+
' <button class="js-cancel">{{cancel}}</button>' +
118+
' </div>' +
119+
' </div>' +
120+
'</div>',
121+
words: { // context for windows' templates
122+
title: "DADA-Error!!1",
123+
ok: "OK",
124+
cancel: "Cancel"
125+
},
126+
127+
}
128+
```
129+
130+
131+
### Destroying
132+
DADA cannot be stopped.
133+
134+
## Browser support
135+
This uses CSS3 transitions, animations and filters, so full [browser support](http://caniuse.com/#feat=css-transitions) is ie10+. Everything >ie8 should degrade just fine, though.
136+
137+
Yes, it's responsive*.<br>*kinda
138+
139+
## Contributing
140+
You are very welcome to contribute! Please send pull requests and issues.
141+
142+
## Feature requests
143+
Feel free to post issues to ask for features.
144+
145+
## TODO
146+
- [ ] support CommonJS and AMD
147+
- [ ] Clean up gulpfile
148+
149+
## License
150+
WTFPL, no warranty. Attribution would be appreciated.

demo-media/Windows/os2warp3 bells.mp3

68.4 KB
Binary file not shown.
53.1 KB
Binary file not shown.

demo-media/Windows/os2warp3 twip.mp3

7.14 KB
Binary file not shown.
31.6 KB
Binary file not shown.
52 KB
Binary file not shown.
54.1 KB
Binary file not shown.

demo-media/Windows/winme chord.mp3

45.9 KB
Binary file not shown.

demo-media/Windows/winnt 40 chord.mp3

46.9 KB
Binary file not shown.

demo-media/Windows/winnt40 ding.mp3

23.5 KB
Binary file not shown.
35.7 KB
Binary file not shown.

demo-media/Windows/xp error.mp3

41.8 KB
Binary file not shown.

demo-media/Windows/xp notify.mp3

45.9 KB
Binary file not shown.

demo-media/css/_checkbox.scss

+94
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
/*
2+
Copyright Matthias Vogt 2016
3+
All rights reserved.
4+
*/
5+
6+
$checkmarkSVG: '<svg xmlns="http://www.w3.org/2000/svg" version="1.1" xml:space="preserve" filter="url(#dropShadow)" fill="white" viewBox="0 0 9 9"><defs><filter id="dropShadow" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .5 0" /><feGaussianBlur stdDeviation=".4"></feGaussianBlur><feOffset dx="0" dy=".5" result="shadow"></feOffset><feComposite in="SourceGraphic" in2="shadow" operator="over"></feComposite></filter></defs><rect x="0" y="4.3" transform="matrix(-0.707 -0.7072 0.7072 -0.707 0.5891 10.4702)" width="4.3" height="1.6" /><rect x="2.2" y="2.9" transform="matrix(-0.7071 0.7071 -0.7071 -0.7071 12.1877 2.9833)" width="6.1" height="1.7" /></svg>';
7+
// checkmark could also be replaced with an icon font or unicode but zoom animations would be harder
8+
9+
[type="checkbox"].substituted {
10+
// can't have visibility: hidden; or display: none; or they wouldn't be focusable/usable
11+
position: fixed;
12+
top: -999px;
13+
14+
&+label:before {
15+
content: "";
16+
display: inline-block;
17+
vertical-align: top;
18+
height: 1.15em;
19+
width: 1.15em;
20+
margin-right: .275em;
21+
22+
color: rgba(0,0,0,0.275);
23+
border: solid .06em;
24+
box-shadow:
25+
0 0 .04em,
26+
0 .06em 0.16em -0.03em inset,
27+
0 0 0 .07em transparent inset; // only here because transitions should be color-only
28+
border-radius: 0.2em;
29+
background: url('data:image/svg+xml;charset=UTF-8,#{$checkmarkSVG}')
30+
no-repeat center / 0, white;
31+
32+
will-change: color, border, background, background-size, box-shadow;
33+
transform: translate3d(0,0,0); // hardware acceleration hack for no support for will-change
34+
transition:
35+
color .1s,
36+
border .1s,
37+
background .15s,
38+
box-shadow .1s;
39+
}
40+
/*
41+
label:active -> when label clicked
42+
input:active -> when spacebar pressed while focused
43+
*/
44+
&:enabled:active+label:before,
45+
&:enabled+label:active:before {
46+
box-shadow:
47+
0 0 0.04em,
48+
0 .06em 0.16em -0.03em transparent inset,
49+
0 0 0 .07em rgba(0,0,0,.1) inset;
50+
background-color: rgb(240, 240, 240);
51+
}
52+
53+
&:checked {
54+
&+label:before {
55+
background-color: #3B99FC;
56+
background-size: 0.75em;
57+
58+
color: rgba(0, 0, 0, 0.075);
59+
}
60+
&:enabled:active+label:before,
61+
&:enabled+label:active:before {
62+
background-color: #0a7ffb;
63+
color: rgba(0,0,0,0.275);
64+
}
65+
}
66+
67+
// faking focus outline
68+
&:focus+label:before {
69+
box-shadow:
70+
// inherited
71+
0 0 0.04em,
72+
0 .06em 0.16em -0.03em transparent inset,
73+
0 0 0 .07em rgba(0,0,0,.1) inset,
74+
// additional
75+
0 0 0 3px rgba(65, 159, 255, 0.55),
76+
0 0 0 4px rgba(65, 159, 255, 0.3);
77+
}
78+
&:focus:active+label:before,
79+
&:focus+label:active:before {
80+
box-shadow:
81+
// inherited
82+
0 0 0.04em,
83+
0 .06em 0.16em -0.03em transparent inset,
84+
0 0 0 .07em rgba(0,0,0,.1) inset,
85+
// additional
86+
0 0 0 3px rgba(65, 159, 255, 0.55),
87+
0 0 0 4px rgba(65, 159, 255, 0.3);
88+
}
89+
90+
// disabled
91+
&:disabled+label:before {
92+
opacity: .5;
93+
}
94+
}

0 commit comments

Comments
 (0)