What's Your Sign?
How do I make an what's your sign??
Little app built on javascript with Bootstrap framework and play in CSS based on zodiac signs. Stay tuned for fuller descriptions of each sign!. What is a what's your sign?? How do you make a what's your sign?? This script and codes were developed by Tess DiNapoli on 14 January 2023, Saturday.
What's Your Sign? - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>What's Your Sign?</title> <link rel='stylesheet prefetch' href='https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css'> <link rel="stylesheet" href="css/style.css">
</head>
<body>
<html>
<head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>What's Your Sign?</title>
<!--google font for landing page header-->
<link href='https://fonts.googleapis.com/css?family=Rock+Salt' rel='stylesheet' type='text/css'>
<!-- core bootstrap
<link href="css/bootstrap.css" rel="stylesheet"> -->
<!--styles-->
<link href="css/stylesheet.css" rel="stylesheet">
</head> <body> <header> <h1>Zodiac Signs</h1> <h3 class="symbols">♈ ♉ ♊ ♋ ♌ ♍ ♎ ♏ ♐ ♑ ♒ ♓</h3> <!--alt key symbols for zodiac signs for motif at top of page--> <div class="user"> <form class="col-sm-4 col-sm-offset-4"> <input class="form-control input-lg" type="text" id="signType" placeholder="What's your zodiac sign?" /> <button type="button" class="btn btn-info" onclick="getInfo()">click</button> </form> </div> </header> <div id="content"> <div id="name"></div> <!--name of sign --> <div id="blurb"></div> <!--blurb about sign--> </div>
<!-- Scripts! -->
<!--core bootstrap min js-->
<script src="js/bootstrap.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
<script src="js/main.js"></script>
</body>
</html> <script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script>
<script src='http://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js'></script> <script src="js/index.js"></script>
</body>
</html>
What's Your Sign? - Script Codes CSS Codes
body { background-color: #333; background-image: url('http://cdn.paper4pc.com/images/space-galaxy-cosmos-universe-wallpaper-4.jpg'); height: 100%;
}
body { text-align: center; color: #999;
}
header { padding: 90px;
}
h1 { font-family: 'Rock Salt', cursive, sans-serif; font-weight: 400; font-size: 45px;
}
.form-control { opacity: .8; background-color: #F3B8FA; color: #222; border-color: #812D6B; margin: 0 auto; text-align: center; font-size: 20px;
}
.btn { margin-top: 20px; background-color: #22205A; border-color: #4F2360; opacity: .9; font-style: bold;
}
.user, #blurb { font-size: 18px; font-family: Times, serif;
}
.well-sm { background-color: rgba(245, 245, 245, 0.3); color: #FFF; margin: 20px 180px 180px; border: none; border-radius: 30px; position: relative; display: inline-block;
}
#blurb { padding-bottom: 20px;
}
.symbols { font-size: 80px; color: #F7F7F6; opacity: .1;
}
#name { font-family: 'Rock Salt', cursive, sans-serif; font-size: 30px;
}
What's Your Sign? - Script Codes JS Codes
var zodiacSigns = [{ zodiac: "aries", descript: "Your spirit animal is the Ram. Fiery, ambitious, driven and energetic in your path to power." }, { zodiac: "taurus", descript: "Your spirit animal is the Bull. Seeker of worldly pleasures, stubborn to the end, stability and strength and yes, you're always right, of course, yep." }, { zodiac: "gemini", descript: "We think your spirit animal are conjoined hamster twins, or something akin to that. You are dual in nature, or something like that." }, { zodiac: "cancer", descript: "Your spirit animal is the Crab. Besides being delicious while dunked in butter, you're also caring, protective and sensitive." }, { zodiac: "leo", descript: "Your spirit animal is the Lion. Regal, fiery and strong willed." }, { zodiac: "virgo", descript: "Your spirit animal is a discerning Maiden. Efficiency, practicality and organization are the trifecta of your awesomeness, and your sense of humor matches just how flawlessly filtered, organized and efficient your inbox is. Wanna come over to organize my house?" }, { zodiac: "libra", descript: "Your spirit object is the Scales. Supposedly balanced, fair and the 'popular' one of the 12, easily sociable and amicable." }, { zodiac: "scorpio", descript: "Your spirit animal is the Scorpion. Predictably, it's said your stinger is rough. You feel passionately and deeply, are sensual and moody." }, { zodiac: "sagittarius", descript: "Your spirit animal is the mythological Centaur with its bow and arrow. Half human, half horse - wanderlust, fiery, loves new idea and waxing philosophical." }, { zodiac: "capricorn", descript: "Your spirit animal is the Mountain Goat. Calculating, steady and reserved with a tenaceous streak, you scale the mountain of your success with grace." }, { zodiac: "aquarius", descript: "You are Water Carrier. Quirky and interesting and said to be aloof and creative." }, { zodiac: "pisces", descript: "Your spirit animals are two Fish. Introspective, thoughtful, creative and lean toward creative pursuits despite all odds." } ] //make sure to change first leter of above strings into lower case so that toLowerCase will work OK
function getInfo() { //user types sign, do this var signType = document.getElementById("signType").value.toLowerCase() //for loop - each time we loop through, we want to see if the user input matches zodiac object key - 1 at a time for( var i = 0; i < zodiacSigns.length; i++ ) { if(signType == zodiacSigns[i].zodiac) { var signBlurb = document.getElementById("content") //call content div var signName = document.createTextNode(zodiacSigns[i].zodiac) //createTextNode for zodiac type var blurb = document.createTextNode(zodiacSigns[i].descript) //createTextNode for zodiac description var signHead = document.createElement("h2") //h4 tag to contain zodiac type signHead.appendChild(signName) var signInfo = document.createElement("p") //paragraph to contain zodiac description signInfo.appendChild(blurb) signBlurb.className="well well-sm" //new class to contain zodiac info in bootstrap well signHead.appendChild(signInfo) document.getElementById("name").innerHTML = zodiacSigns[i].zodiac document.getElementById("blurb").innerHTML = zodiacSigns[i].descript return } else { document.getElementById("name").innerHTML = "this isn't a sign!" } } }
Developer | Tess DiNapoli |
Username | TessDiNapoli |
Uploaded | January 14, 2023 |
Rating | 3 |
Size | 4,163 Kb |
Views | 10,120 |
Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!
Name | Size |
JQuery ui experiments | 1,957 Kb |
Daily Task List | 2,254 Kb |
Feedback Page | 2,836 Kb |
Play with Instagram API | 2,903 Kb |
Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!
Name | Username | Size |
Ocean | Gordonnl | 2,817 Kb |
Animated Vertical CSS3 Menu Black | MaCeLMp4 | 2,750 Kb |
Right Click Menu | Anodpixels | 2,252 Kb |
CSS Piano | Dannystyle | 5,138 Kb |
Importable Clearfix | Corysimmons | 1,411 Kb |
C.Rowe Button | Brownerd | 2,473 Kb |
TinFoil Boats | Chandralil | 4,577 Kb |
Drag n Drop | Martin42 | 2,594 Kb |
Feedback Page | TessDiNapoli | 2,836 Kb |
Whyutils | LeYvan | 3,752 Kb |
Surf anonymously, prevent hackers from acquiring your IP address, send anonymous email, and encrypt your Internet connection. High speed, ultra secure, and easy to use. Instant setup. Hide Your IP Now!