Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
VocalNutria9174 authored May 21, 2021
1 parent e5edff2 commit f8fcaf4
Show file tree
Hide file tree
Showing 35 changed files with 1,900 additions and 0 deletions.
Binary file added beep.mp3
Binary file not shown.
Binary file added beep.ogg
Binary file not shown.
26 changes: 26 additions & 0 deletions calculator.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<!DOCTYPE html>
<html>
<title>Calculator</title>
<link rel="icon" href="https://thumbs.dreamstime.com/b/blue-calculator-icon-vector-flat-simple-style-back-to-school-illustration-191797659.jpg">
<form name="calculator" >
<input type="button" value="1" onClick="document.calculator.ans.value+='1'">
<input type="button" value="2" onClick="document.calculator.ans.value+='2'">
<input type="button" value="3" onClick="document.calculator.ans.value+='3'"><br>
<input type="button" value="4" onClick="document.calculator.ans.value+='4'">
<input type="button" value="5" onClick="document.calculator.ans.value+='5'">
<input type="button" value="6" onClick="document.calculator.ans.value+='6'">
<input type="button" value="7" onClick="document.calculator.ans.value+='7'"><br>
<input type="button" value="8" onClick="document.calculator.ans.value+='8'">
<input type="button" value="9" onClick="document.calculator.ans.value+='9'">
<input type="button" value="-" onClick="document.calculator.ans.value+='-'">
<input type="button" value="+" onClick="document.calculator.ans.value+='+'"><br>
<input type="button" value="*" onClick="document.calculator.ans.value+='*'">
<input type="button" value="/" onClick="document.calculator.ans.value+='/'">

<input type="button" value="0" onClick="document.calculator.ans.value+='0'">
<input type="reset" value="Reset">
<input type="button" value="=" onClick="document.calculator.ans.value=eval(document.calculator.ans.value)">
<br>Solution is <input type="textfield" name="ans" value="">
</form>

</html>
278 changes: 278 additions & 0 deletions clock.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,278 @@
<!DOCTYPE html>
<html>
<head>

<link rel="icon" href="https://images.eq3.com/product-definitions/cjuedn73z05650162zt3g6fu8/instance/cjv6ukkqm02p30118culhn925/THUMBNAIL/4ad0d9c2-7dc6-40cc-9a61-df08bcce4e0e.jpg">

<div class="button button1">
<a href="home.html">Home</a>
</div>
<div class="button button2">
<a href="weather.html">Weather</a>
</div>
<div class="button button3">
<a href="game.html">Games</a>
</div>
<div class="button button4">
<a href="tools.html">Tools</a>
</div>
<div id="clock"></div>
<style>

.button {
border: none;
color: white;
padding: 16px 32px;
text-align: center;
text-decoration: none;
display: inline-block;
font-size: 16px;
margin: 4px 2px;
transition-duration: 0.4s;
cursor: pointer;
}

.button1 {
background-color: white;
color: black;
border: 2px solid #ff00ff;
}

.button1:hover {
background-color: #ff00ff;
color: white;
}

.button2 {
background-color: white;
color: black;
border: 2px solid #008CBA;
}

.button2:hover {
background-color: #008CBA;
color: white;
}

.button3 {
background-color: white;
color: black;
border: 2px solid #ff6600;
}

.button3:hover {
background-color: #ff6600;
color: white;
}

.button4 {
background-color: white;
color: black;
border: 2px solid #ffff00;
}

.button4:hover {
background-color: #ffff00;
color: white;
}
</style>
<a href="orig_clock.html"
target="popup" onclick="window.open('orig_clock.html','popup','width=425,height=460'); return false;">
View just the clock here. </a>
<h1>Welcome to the Clock!</h1>
<title>Time</title>

<body>
<canvas id="canvas" width="400" height="400"
style="background-color:#333">
<div id="clock"></div>
</canvas>
<body>


<script>
var canvas = document.getElementById("canvas");
var ctx = canvas.getContext("2d");
var radius = canvas.height / 2;
ctx.translate(radius, radius);
radius = radius * 0.90
setInterval(drawClock, 1000);


function drawClock() {
drawFace(ctx, radius);
drawNumbers(ctx, radius);
drawTime(ctx, radius);
}

function drawFace(ctx, radius) {
var grad;
ctx.beginPath();
ctx.arc(0, 0, radius, 0, 2*Math.PI);
ctx.fillStyle = 'white';
ctx.fill();
grad = ctx.createRadialGradient(0,0,radius*0.95, 0,0,radius*1.05);
grad.addColorStop(0, '#ff751a');
grad.addColorStop(0.5, 'white');
grad.addColorStop(1, '#00ff00');
ctx.strokeStyle = grad;
ctx.lineWidth = radius*0.1;
ctx.stroke();
ctx.beginPath();
ctx.arc(0, 0, radius*0.1, 0, 2*Math.PI);
ctx.fillStyle = '#00ff00';
ctx.fill();
}

function drawNumbers(ctx, radius) {
var ang;
var num;
ctx.font = radius*0.15 + "px arial";
ctx.textBaseline="middle";
ctx.textAlign="center";
for(num = 1; num < 13; num++){
ang = num * Math.PI / 6;
ctx.rotate(ang);
ctx.translate(0, -radius*0.85);
ctx.rotate(-ang);
ctx.fillText(num.toString(), 0, 0);
ctx.rotate(ang);
ctx.translate(0, radius*0.85);
ctx.rotate(-ang);
}
}

function drawTime(ctx, radius){
var now = new Date();
var hour = now.getHours();
var minute = now.getMinutes();
var second = now.getSeconds();
//hour
hour=hour%12;
hour=(hour*Math.PI/6)+
(minute*Math.PI/(6*60))+
(second*Math.PI/(360*60));
drawHand(ctx, hour, radius*0.5, radius*0.07);
//minute
minute=(minute*Math.PI/30)+(second*Math.PI/(30*60));
drawHand(ctx, minute, radius*0.8, radius*0.07);
// second
second=(second*Math.PI/30);
drawHand(ctx, second, radius*0.9, radius*0.02);
}

function drawHand(ctx, pos, length, width) {
ctx.beginPath();
ctx.lineWidth = width;
ctx.lineCap = "round";
ctx.moveTo(0,0);
ctx.rotate(pos);
ctx.lineTo(0, -length);
ctx.stroke();
ctx.rotate(-pos);
}
</script>
<style type="text/css">
body {
font-family: Arial, Google-Sans;
font-size: 10px;
}
#ws { width: 100%; }
@media(min-width: 780px){ #ws { max-width: 760px; margin: 0 auto; } }

#header {background:#ddd; padding: 5px;border-radius:.5em .5em 0 0;}
#content {background:white; padding: 5px; }
h1 {margin:0px;}
#header a{text-decoration:none;color:#888;}
#header a:hover {color:black;text-decoration:none;}

.bow {background:white;color:black;padding:0 .1em;}
.wob {background:black;color:white;padding:0 .1em;border-radius:50%;}
#lbg {background:white;}
#bc span, #bc a {display:inline-block;padding:.5em 1em;}
#bc span {background:white;border:1px solid #888; border-bottom: 1px solid white;}
#cid {float:left;}
#hsup {float:left;text-align:left;}
.ad-b {margin-top:1em;}
.clear {clear:both;}

#dclock {text-align:left;color:#000000;font-family: helvetica, arial, sans-serif;}
#timer {font-size:3em;}
form {margin-top:1em;}

.blink {display:inline-block;cursor:pointer;background:#ccc;border:1px solid #999;padding:0 5px;}
#clink {background:#eee;font-family:Consolas,Monaco,Courier New;}
</style>
<script type="text/javascript">
var timer, alarm;

function prepareSound(){
var butsnd = document.getElementById("bsnd");
if (butsnd.getAttribute("data-sound-loaded") == 0){
butsnd.setAttribute("data-sound-loaded", 1);
snd = document.getElementById('ce-snd');
snd.play();
snd.volume = 0.0;
snd.pause();
snd.volume = 1.0;
}
if (butsnd.getAttribute("data-sound-status") == 0){
butsnd.src = "/sound.png";
butsnd.setAttribute("data-sound-status", 1);
butsnd.setAttribute("title", "Sound On");
}
else {
butsnd.src = "/no-sound.png";
butsnd.setAttribute("data-sound-status", 0);
butsnd.setAttribute("title", "Sound Off");
}
}

function setAlarm(){
var mi = dselect.m.options.selectedIndex;
var m = dselect.m.options[mi].value;

clearTimeout(alarm);
alarm = setTimeout(function(){playBeep()},+m*1000*60);
}
function setClock(){
timer = setInterval(function (){
var d = new Date();
var h = d.getHours();
if (h>=12){h = h%12==0?12:h%12; a = 'PM';}
else { a = 'AM';}
var m = d.getMinutes();
var s = d.getSeconds();
document.getElementById("timer").innerHTML = '<span id="h">' + ('00'+h).slice(-2) + '</span>:<span id="m">' + ('00'+m).slice(-2)+ '</span>:<span id="s">' + ('00'+s).slice(-2) + '</span> '+a;
},
1000);
}
function playBeep(){
if (document.getElementById("bsnd").getAttribute("data-sound-status")==1){
snd = document.getElementById('ce-snd');
//snd.volume = 1.0;
snd.play();
snd.loop = true;
setTimeout(function () {snd.pause();}, 3000);
}
//reset change
dselect.m.options.selectedIndex = 0;
clearTimeout(alarm);
}
</script>

<div id="dclock">
<div id="timer"><script type="text/javascript">setClock();</script></div>
<form name="dselect" id="dselect">
<label>
<br/>

<audio id="ce-snd" preload="auto">
<source src="/beep.mp3" type='audio/mpeg; codecs="mp3"'>
<source src="/beep.ogg" type='audio/ogg; codecs="vorbis"'>
</audio>

<p>This code was made in HTML.</p>
<p>Made by: VocalNutria9174</p>
</html>

47 changes: 47 additions & 0 deletions default.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added dice-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added dice1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added dice2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added dice3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added dice4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added dice5.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added dice6.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit f8fcaf4

Please sign in to comment.