-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
130 lines (109 loc) · 3.59 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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>jQuery Template</title>
<script src="//code.jquery.com/jquery-1.12.0.min.js"></script>
<link href='https://fonts.googleapis.com/css?family=Sigmar+One' rel='stylesheet' type='text/css'>
<link href='https://fonts.googleapis.com/css?family=Permanent+Marker' rel='stylesheet' type='text/css'>
<link href='https://fonts.googleapis.com/css?family=Cinzel+Decorative:400,700' rel='stylesheet' type='text/css'>
<script>
$(function() {
$('#create').click(function() {
//set user inputs into variables
var name = $('#name').val();
var age = $('#age').val();
var future = $('#future').val();
var line = $('#line').val();
var ac = age + ", " + "Future " + future;
//set user inputs on the banner when button is clicked
$('h1').html(name);
$('h3').html(ac);
$('p').html(line);
//when button is clicked, the banner will fade in
$('#banner').fadeIn(2000);
//when button is clicked, the user input div will disappear
$('#userInputs').fadeOut(200);
//based on which option the user chooses for the background
var backImage = $('#background').val();
//the background will be set to the image attached that choice the user picked
$('#banner').css('background-image', 'url(' + backImage + ')');
$('#banner').css('text-shadow', '2px 2px 5px black');
//set user inputs into variables
var color1 = $('#color1').val();
var color2 = $('#color2').val();
var color3 = $('#color3').val();
//sets the text color to the color chosen
$('h1').css('color', color1);
$('h3').css('color', color2);
$('p').css('color', color3);
});
});
</script>
<style type="text/css">
body {
background-color: black;
font-family: "Comic Sans MS";
}
h2 {
font-family: 'Sigmar One', cursive;
color: turquoise;
}
#userInputs {
color: lightBlue;
}
h1 h3 p{
text-shadow: 20px 20px;
}
h1{
font-size: 40px;
font-family: 'Cinzel Decorative', cursive;
}
h3{
font-size: 25px;
font-family: 'Permanent Marker', cursive;
}
p{
font-size: 20px;
}
#banner {
background-repeat: no-repeat;
background-size: cover;
}
</style>
</head>
<body>
<!--hides the banner until button is clicked-->
<div id="banner" style="display: none; text-align: center;">
<h1></h1>
<h3></h3>
<p></p>
</div>
<div id="userInputs">
<h2>Create Your Own Banner</h2> Full Name:
<input id='name' type="text" name="name" />
<br> Age:
<input id='age' type="text" name="age" />
<br> Future Career:
<input id='future' type="text" name="future" />
<br> Favorite Quote or Lyric: (optional)
<input id='line' type="text" name="line" />
<br> Favorite Colors:
<!--color boxes inputs-->
<input type="color" id="color1" value="#cc99ff" />
<input type="color" id="color2" value="#00b3b3" />
<input type="color" id="color3" value="#adc2eb" />
<br> Background:
<!--background drop down menu-->
<select id='background'>
<option>Pick a background image</option>
<option id='food' value="images/food.png">food</option>
<option id='flowers' value="images/floral.png">flowers</option>
<option id='car' value="images/car.png">car</option>
<option id='balls' value="images/sports.png">balls</option>
</select>
<br>
<button id="create">Create Banner!!!</button>
</div>
</body>
</html>