Ben Blinebury 6 gadus atpakaļ
revīzija
7898c0c9b2
7 mainītis faili ar 171 papildinājumiem un 0 dzēšanām
  1. 54
    0
      App.css
  2. 14
    0
      App.html
  3. 36
    0
      App.js
  4. 1
    0
      App.js.map
  5. 48
    0
      App.ts
  6. 11
    0
      package.json
  7. 7
    0
      tsconfig.json

+ 54
- 0
App.css Parādīt failu

@@ -0,0 +1,54 @@
1
+@import 'https://fonts.googleapis.com/css?family=Catamaran';
2
+
3
+html, body
4
+{
5
+	width: 100%;
6
+	height: 100%;
7
+	margin: 0;
8
+	padding: 0;
9
+	font-family: 'Catamaran', sans-serif;
10
+}
11
+
12
+body {
13
+  background: #eee;
14
+  background: linear-gradient(to left, #ddd , #eee);
15
+}
16
+
17
+.container
18
+{
19
+    display: flex;
20
+	flex-direction: column;
21
+    align-items: center;
22
+  	justify-content: space-around;
23
+	margin: 0;
24
+	padding: 0;
25
+	height: 100%;
26
+	width: 100%;
27
+	font-size: 20px;
28
+}
29
+
30
+#title
31
+{
32
+	padding: 40px;
33
+	text-align: center;
34
+}
35
+
36
+#button
37
+{
38
+	cursor: pointer;
39
+	padding: 10px;
40
+	background-color: #7986CB;
41
+	border: 0;
42
+	color: white;
43
+	font-size: 16px;
44
+	
45
+}:hover
46
+
47
+	{
48
+		background-color: #5C6BC0;
49
+	}
50
+	
51
+:active
52
+	{
53
+		background-color: #3949AB;
54
+	}

+ 14
- 0
App.html Parādīt failu

@@ -0,0 +1,14 @@
1
+<!DOCTYPE html>
2
+<html>
3
+<head>
4
+    <title>Cool tapes</title>
5
+</head>
6
+<body>
7
+    <h1>Cool Tapes!</h1>
8
+    <div class = "container">
9
+        <div id="sentenceDisplay">
10
+    </div>
11
+    <button id="button">truth</button>
12
+    <script type="text/javascript" src="App.js"></script>
13
+</body>
14
+</html>

+ 36
- 0
App.js Parādīt failu

@@ -0,0 +1,36 @@
1
+console.clear();
2
+var combinations = [
3
+    ['Behind', 'Inside',
4
+        'Why you should hate', 'Beyond', 'Beneath', 'Below'],
5
+    ['the', 'the best', 'the worst', 'the smallest',
6
+        'the coolest', 'every amazing', 'the biggest',
7
+        'the toughest', 'the strongest', 'the prettiest',
8
+        'every happy', 'the', 'every incredible'],
9
+    ['joy', 'buzzword', 'douchebag', 'moment', 'man', 'woman',
10
+        'machine', 'experience', 'jawn', 'dog', 'Shiv', 'spaceship', 'romance',
11
+        'love'],
12
+    [':'],
13
+    ['', 'stupendous', 'the ugliest',
14
+        'real life', 'the prettiest', 'the shiniest',
15
+        'the neediest', 'very complex', 'amazing',
16
+        'aggressive', 'handsome', 'arrogant', 'speedy',
17
+        'lovely', 'lazy', 'learned', 'nervous', 'thoughtless',
18
+        'high-performance', 'charming', 'narcissistic', 'violent'],
19
+    ['apathy', 'jealousy', 'empathy', 'evil', 'beauty',
20
+        'vindictiveness', 'avarice', 'stupidity', 'greed',
21
+        'love', 'voilence', 'generosity', 'popularity',
22
+        'chivalry', 'masculinity', 'infidelity']
23
+];
24
+var sentenceDisplay = document.getElementById('sentenceDisplay');
25
+var button = document.getElementById('button');
26
+button.addEventListener('click', function () { generate(); });
27
+function generate() {
28
+    var confTalkName = [];
29
+    for (var i = 0; i < combinations.length; i++) {
30
+        confTalkName.push(newSentence(combinations[i]));
31
+    }
32
+    sentenceDisplay.innerHTML = confTalkName.join(' ');
33
+}
34
+function newSentence(array) {
35
+    return array[Math.floor(Math.random() * array.length)];
36
+}

+ 1
- 0
App.js.map Parādīt failu

@@ -0,0 +1 @@
1
+{"version":3,"file":"App.js","sourceRoot":"","sources":["App.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,KAAK,EAAE,CAAC;AAEhB,IAAI,YAAY,GAAG;IACf,CAAC,QAAQ,EAAE,QAAQ;QACnB,qBAAqB,EAAE,QAAQ,EAAE,SAAS,EAAE,OAAO,CAAC;IACpD,CAAC,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,cAAc;QAC/C,aAAa,EAAE,eAAe,EAAE,aAAa;QAC7C,cAAc,EAAE,eA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AC,CAAC;KAChD;IAEE,KAAK,CAAC,SAAS,GAAG,YAAY,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAE7C,CAAC;AAED,qBAAqB,KAAc;IAE/B,OAAO,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,KAAK,CAAC,MAAM,CAAC,CACpD,CAAC;AAEN,CAAC;AAED,QAAQ,EAAE,CAAC"}

+ 48
- 0
App.ts Parādīt failu

@@ -0,0 +1,48 @@
1
+console.clear();
2
+
3
+let combinations = [
4
+    ['Behind', 'Inside', 
5
+    'Why you should hate', 'Beyond', 'Beneath', 'Below'],
6
+    ['the', 'the best', 'the worst', 'the smallest', 
7
+    'the coolest', 'every amazing', 'the biggest',
8
+    'the toughest', 'the strongest', 'the prettiest',
9
+    'every happy', 'the', 'every incredible'],
10
+    ['joy', 'buzzword', 'douchebag', 'moment','man','woman',
11
+    'machine', 'experience', 'jawn', 'dog', 'Shiv', 'spaceship', 'romance', 
12
+    'love'],
13
+	[':'],
14
+    ['', 'stupendous', 'the ugliest', 
15
+    'real life', 'the prettiest', 'the shiniest', 
16
+    'the neediest', 'very complex', 'amazing', 
17
+    'aggressive', 'handsome', 'arrogant', 'speedy', 
18
+    'lovely', 'lazy', 'learned', 'nervous', 'thoughtless', 
19
+    'high-performance', 'charming', 'narcissistic', 'violent'],
20
+    ['apathy', 'jealousy', 'empathy', 'evil', 'beauty',
21
+    'vindictiveness', 'avarice', 'stupidity', 'greed',
22
+    'love', 'voilence', 'generosity', 'popularity',
23
+    'chivalry', 'masculinity', 'infidelity']
24
+]
25
+
26
+const sentenceDisplay:HTMLElement = document.getElementById('sentenceDisplay');
27
+const button:HTMLElement = document.getElementById('button');
28
+button.addEventListener('click', () => {generate();})
29
+
30
+function generate()
31
+{
32
+	let confTalkName:string[] = [];
33
+
34
+	for(let i = 0; i < combinations.length; i++)
35
+	{
36
+		confTalkName.push(newSentence(combinations[i]));
37
+	}
38
+
39
+    sentenceDisplay.innerHTML = confTalkName.join(' ');
40
+    
41
+}
42
+
43
+function newSentence(array:string[]):string
44
+{
45
+    return array[Math.floor(Math.random() * array.length)
46
+    ];
47
+    
48
+}

+ 11
- 0
package.json Parādīt failu

@@ -0,0 +1,11 @@
1
+{
2
+  "name": "tstestapp",
3
+  "version": "1.0.0",
4
+  "main": "index.js",
5
+  "scripts": {
6
+    "test": "echo \"Error: no test specified\" && exit 1"
7
+  },
8
+  "author": "",
9
+  "license": "ISC",
10
+  "description": ""
11
+}

+ 7
- 0
tsconfig.json Parādīt failu

@@ -0,0 +1,7 @@
1
+{
2
+    "compilerOptions":{
3
+        "target": "es5",
4
+        "module": "commonjs",
5
+        "sourceMap": true
6
+    }
7
+}