From 9189c499aaed1bd1f608ecf7d493cbe32daf9e81 Mon Sep 17 00:00:00 2001 From: Bluhotsauce Date: Sat, 9 Jan 2021 17:26:46 -0500 Subject: [PATCH 1/3] tempconverterlab1 --- index.html | 41 +++++++++++++++++++++++++++++++++++++++++ main.js | 22 ++++++++++++++++++++++ style.css | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 115 insertions(+) create mode 100644 index.html create mode 100644 main.js create mode 100644 style.css diff --git a/index.html b/index.html new file mode 100644 index 0000000..41f65c5 --- /dev/null +++ b/index.html @@ -0,0 +1,41 @@ + + + + + + + Temp Scale Converter + + + +
+
+

Temperature Scale Converter

+
+
+

Value

+ +
+
+

Fahrenheit

+ + + + +
+
+

Celcius

+ + +
+
+

+ +
+ + + +
+ + + diff --git a/main.js b/main.js new file mode 100644 index 0000000..41b00f5 --- /dev/null +++ b/main.js @@ -0,0 +1,22 @@ +// function celsius +// { +// var cTemp = celsius; +// var cToFahr = cTemp * 9 / 5 + 32; +// var message = cTemp+'\xB0C is ' + cToFahr + ' \xB0F.'; +// console.log(This is Celsius); +// } + +// function fahrenheit +// { +// var fTemp = fahrenheit; +// var fToCel = (fTemp - 32) * 5 / 9; +// var message = fTemp+'\xB0F is ' + fToCel + '\xB0C.'; +// console.log(This is Fahrenheit); +// } +// celcius(60); +// fahrenheit(45); + +function myfunction() { + let celsius = (document.getElementById('value').value - 32) * 5/9; + document.getElementById('celciusformula').innerHTML = celsius; +} diff --git a/style.css b/style.css new file mode 100644 index 0000000..049e1f9 --- /dev/null +++ b/style.css @@ -0,0 +1,52 @@ + +main { + width: 100%; + height: 100vh; +} + +header { + display: flex; + justify-content: center; + padding-top: 30px; +} + +h1 { + margin-botton: 30px; +} + +.fahrenheit{ + text-align: center; + display: flex; + flex-wrap: wrap; + justify-content: center; + align-items: center; + max-width: 768px; + margin: 10px; +} + +.input { + margin: 0 100px; + border-radius: 5px; + padding: 5px; + border: solid; +} + +body { + text-align: center; + border-style: solid; + margin: 50px; +} + + +.value { + text-align: center; + margin: 10px; +} + +.celciusName { + text-align: center; +} + +.celcius { + text-align: center; +} \ No newline at end of file From 4442f8497fa9af6f575f0f645c622a7401233825 Mon Sep 17 00:00:00 2001 From: Bluhotsauce Date: Sat, 9 Jan 2021 17:32:27 -0500 Subject: [PATCH 2/3] tempconverterlab --- style.css | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/style.css b/style.css index 049e1f9..71cb851 100644 --- a/style.css +++ b/style.css @@ -10,9 +10,7 @@ header { padding-top: 30px; } -h1 { - margin-botton: 30px; -} + .fahrenheit{ text-align: center; From 7244b34b8e73669073f49cca1b297fcf5cc3af0c Mon Sep 17 00:00:00 2001 From: Bluhotsauce Date: Sat, 9 Jan 2021 18:54:41 -0500 Subject: [PATCH 3/3] tempconvlab --- style.css | 1 - 1 file changed, 1 deletion(-) diff --git a/style.css b/style.css index 71cb851..fd0958e 100644 --- a/style.css +++ b/style.css @@ -18,7 +18,6 @@ header { flex-wrap: wrap; justify-content: center; align-items: center; - max-width: 768px; margin: 10px; }