-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
94 lines (85 loc) · 2.66 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
<html>
<head>
<!-- Compiled and minified CSS -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/css/materialize.min.css">
<!-- Compiled and minified JavaScript -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/js/materialize.min.js"></script>
<style>
.card-panel {
margin: 40px;
}
.prompt {
margin: 30px;
}
.contents {
margin-top: 100px;
}
body {
background-color: #263238;
}
</style>
</head>
<body>
<div class="navbar-fixed">
<nav class="blue-grey darken-4">
<div class="nav-wrapper blue-grey darken-4">
<div class="title center">
<h1>Writing prompts</h1>
</div>
</div>
</nav>
</div>
<div class="row contents">
<div class="col s12">
<div class="card-panel teal lighten-5">
<h2 class="prompt blue-grey-text"></h2>
</div>
<div class="card-panel teal lighten-5">
<h2 class="prompt blue-grey-text"></h2>
</div>
<div class="card-panel teal lighten-5">
<h2 class="prompt blue-grey-text"></h2>
</div>
</div>
</div>
<script>
WRITING_PROMPTS = [
"I feel fulfilled when...",
"When I'm at my best, I am...",
"Some of my biggest challenges and opportunities are...",
"What surprises me most is...",
"Things I am thankful for are...",
"What often holds me back and what motivates me to move foward are...",
"My strengths are...",
"Values that are important to me are...",
"What would support me is...",
"What I appreciate about myself is...",
"What makes me feel loved is...",
"In the next year, I really want to...",
"Qualities I admire in others are...",
"Things that bring me alive and things that drain my energy are...",
"Things I need more of in my life right now are...",
"Things that are going well in my life right now are...",
"What would make me happy right now is...",
"Things that I can acknowledge myself more for are...",
"I depend on others for...",
"Others depend on me for...",
"What's in my heart is...",
"I feel inspired by...",
"Things I tend to avoid and thing that attract me are...",
"What is most important to me is...",
"Things I can do to take care of myself are...",
"Life is calling me to...",
];
let shuffled = WRITING_PROMPTS
.map(value => ({ value, sort: Math.random() }))
.sort((a, b) => a.sort - b.sort)
.map(({ value }) => value);
const prompt_spans = document.getElementsByClassName("prompt");
console.log(prompt_spans);
Array.from(prompt_spans).forEach((element, index) => {
element.innerHTML = shuffled[index];
});
</script>
</body>
</html>