From 5637849e57156873b8568fee39d2be693716b840 Mon Sep 17 00:00:00 2001 From: Bhadreshwara Date: Mon, 26 Oct 2020 17:56:22 +0530 Subject: [PATCH] clock --- Javascript/Js clock/index.html | 35 +++ Javascript/Js clock/script.js | 48 ++++ Javascript/Js clock/style.css | 81 ++++++ .../.dart_tool/package_config.json | 254 ++++++++++++++++++ flutter_xylophone/.flutter-plugins | 5 + .../.flutter-plugins-dependencies | 1 + flutter_xylophone/.packages | 42 +++ 7 files changed, 466 insertions(+) create mode 100644 Javascript/Js clock/index.html create mode 100644 Javascript/Js clock/script.js create mode 100644 Javascript/Js clock/style.css create mode 100644 flutter_xylophone/.dart_tool/package_config.json create mode 100644 flutter_xylophone/.flutter-plugins create mode 100644 flutter_xylophone/.flutter-plugins-dependencies create mode 100644 flutter_xylophone/.packages diff --git a/Javascript/Js clock/index.html b/Javascript/Js clock/index.html new file mode 100644 index 0000000..35bf5ea --- /dev/null +++ b/Javascript/Js clock/index.html @@ -0,0 +1,35 @@ + + + + + + + + + JS Clock + + + + +
+

+ + +
+ +
+ +
+
+
+
+ + + +
+ + + + \ No newline at end of file diff --git a/Javascript/Js clock/script.js b/Javascript/Js clock/script.js new file mode 100644 index 0000000..835b9ff --- /dev/null +++ b/Javascript/Js clock/script.js @@ -0,0 +1,48 @@ + + const secondHand = document.querySelector('.second-hand'); + const minHand = document.querySelector('.min-hand'); + const hourHand = document.querySelector('.hour-hand'); + const digital = document.querySelector('.digital'); + function setDate(){ + + + + const now = new Date(); + const day = now.getDay(); + const daylist = ["Sunday", "Monday", "Tuesday", + "Wednesday", "Thursday", "Friday", + "Saturday"] + console.log("Today is " + daylist[day] + ".") + + const seconds = now.getSeconds(); + const secondDegree = ((seconds / 60) * 360 + 90) ; + secondHand.style.transform =`rotate(${secondDegree}deg)`; + + const minutes = now.getMinutes(); + const minuteDegree = ((minutes / 60) * 360 + 90) ; + minHand.style.transform =`rotate(${minuteDegree}deg)`; + + const hours = now.getHours(); + const hourDegree = ((hours / 12) * 360 + 90) ; + hourHand.style.transform =`rotate(${hourDegree}deg)`; + var ampm = "AM"; + if(hours < 12){ + ampm = "AM"; + } + if(hours >= 12){ + + ampm = "AM"; + } + if(seconds < 10){ + seconds = "0"+ seconds; + } + + if(minutes < 10){ + minutes = "0"+ minutes; + } + document.getElementById('date').innerHTML = daylist[day]; + digital.innerHTML = hours +" : "+ minutes +" : "+seconds; + +} + +setInterval(setDate,1000); \ No newline at end of file diff --git a/Javascript/Js clock/style.css b/Javascript/Js clock/style.css new file mode 100644 index 0000000..16c91a1 --- /dev/null +++ b/Javascript/Js clock/style.css @@ -0,0 +1,81 @@ +@import url(https://fonts.googleapis.com/css?family=Open+Sans+Condensed:300); +* { + box-sizing: border-box; +} +body { + background-image: linear-gradient(120deg, #a1c4fd 0%, #c2e9fb 100%); + height: 100vh; +} + +.clock { + border: 3px solid white; + border-radius: 50%; + width: 15em; + height: 15em; + margin: 60px auto; + position: relative; + padding: 3rem; + background: pink; + box-shadow: 5px 9px 20px 0 rgba(0, 0, 0, 0.35); +} +.clockface { + width: 100%; + height: 100%; + position: relative; + transform: translateY(-3px); +} +.hand { + width: 50%; + height: 4px; + position: absolute; + top: 50%; + background: black; + transform-origin: 100%; + transform: rotate(90deg); + transition: all ease 0.8s; +} +.hour-hand { + width: 30%; + margin-left: 20%; +} +.min-hand { + width: 50%; + margin-left: 1%; +} +#date { + width: 100%; + position: relative; + top: 300px; + left: 7px; + text-align: center; + text-transform: uppercase; + letter-spacing: 5px; + color: black; + font-weight: bold; + font-size: 20px; + z-index: 2; +} +h2 { + width: 100%; + position: relative; + top: 191px; + left: 2px; + text-align: center; + text-transform: uppercase; + letter-spacing: 5px; + color: black; + font-size: 24px; + font-weight: bold; + z-index: 2; +} +footer { + width: 280px; + margin-top: 80px; + margin-left: -40px; + font-size: 24px; + color: black; +} +footer a { + text-decoration: none; + color: black; +} diff --git a/flutter_xylophone/.dart_tool/package_config.json b/flutter_xylophone/.dart_tool/package_config.json new file mode 100644 index 0000000..a3721b8 --- /dev/null +++ b/flutter_xylophone/.dart_tool/package_config.json @@ -0,0 +1,254 @@ +{ + "configVersion": 2, + "packages": [ + { + "name": "archive", + "rootUri": "file:///C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/archive-2.0.13", + "packageUri": "lib/", + "languageVersion": "2.0" + }, + { + "name": "args", + "rootUri": "file:///C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/args-1.6.0", + "packageUri": "lib/", + "languageVersion": "2.3" + }, + { + "name": "async", + "rootUri": "file:///C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/async-2.4.1", + "packageUri": "lib/", + "languageVersion": "2.2" + }, + { + "name": "audioplayers", + "rootUri": "file:///C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/audioplayers-0.15.1", + "packageUri": "lib/", + "languageVersion": "2.6" + }, + { + "name": "boolean_selector", + "rootUri": "file:///C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/boolean_selector-2.0.0", + "packageUri": "lib/", + "languageVersion": "2.4" + }, + { + "name": "charcode", + "rootUri": "file:///C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/charcode-1.1.3", + "packageUri": "lib/", + "languageVersion": "2.0" + }, + { + "name": "collection", + "rootUri": "file:///C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/collection-1.14.12", + "packageUri": "lib/", + "languageVersion": "2.0" + }, + { + "name": "convert", + "rootUri": "file:///C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/convert-2.1.1", + "packageUri": "lib/", + "languageVersion": "1.17" + }, + { + "name": "crypto", + "rootUri": "file:///C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/crypto-2.1.4", + "packageUri": "lib/", + "languageVersion": "2.1" + }, + { + "name": "cupertino_icons", + "rootUri": "file:///C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/cupertino_icons-0.1.3", + "packageUri": "lib/", + "languageVersion": "2.0" + }, + { + "name": "file", + "rootUri": "file:///C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/file-5.2.1", + "packageUri": "lib/", + "languageVersion": "2.2" + }, + { + "name": "flutter", + "rootUri": "file:///C:/src/flutter/packages/flutter", + "packageUri": "lib/", + "languageVersion": "2.2" + }, + { + "name": "flutter_test", + "rootUri": "file:///C:/src/flutter/packages/flutter_test", + "packageUri": "lib/", + "languageVersion": "2.2" + }, + { + "name": "flutter_web_plugins", + "rootUri": "file:///C:/src/flutter/packages/flutter_web_plugins", + "packageUri": "lib/", + "languageVersion": "2.0" + }, + { + "name": "image", + "rootUri": "file:///C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/image-2.1.12", + "packageUri": "lib/", + "languageVersion": "2.0" + }, + { + "name": "intl", + "rootUri": "file:///C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/intl-0.16.1", + "packageUri": "lib/", + "languageVersion": "2.5" + }, + { + "name": "matcher", + "rootUri": "file:///C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/matcher-0.12.6", + "packageUri": "lib/", + "languageVersion": "2.2" + }, + { + "name": "meta", + "rootUri": "file:///C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/meta-1.1.8", + "packageUri": "lib/", + "languageVersion": "1.12" + }, + { + "name": "path", + "rootUri": "file:///C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/path-1.6.4", + "packageUri": "lib/", + "languageVersion": "2.0" + }, + { + "name": "path_provider", + "rootUri": "file:///C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/path_provider-1.6.11", + "packageUri": "lib/", + "languageVersion": "2.1" + }, + { + "name": "path_provider_linux", + "rootUri": "file:///C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/path_provider_linux-0.0.1+2", + "packageUri": "lib/", + "languageVersion": "2.1" + }, + { + "name": "path_provider_macos", + "rootUri": "file:///C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/path_provider_macos-0.0.4+3", + "packageUri": "lib/", + "languageVersion": "2.1" + }, + { + "name": "path_provider_platform_interface", + "rootUri": "file:///C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/path_provider_platform_interface-1.0.2", + "packageUri": "lib/", + "languageVersion": "2.1" + }, + { + "name": "petitparser", + "rootUri": "file:///C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/petitparser-2.4.0", + "packageUri": "lib/", + "languageVersion": "2.4" + }, + { + "name": "platform", + "rootUri": "file:///C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/platform-2.2.1", + "packageUri": "lib/", + "languageVersion": "1.24" + }, + { + "name": "plugin_platform_interface", + "rootUri": "file:///C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/plugin_platform_interface-1.0.2", + "packageUri": "lib/", + "languageVersion": "2.1" + }, + { + "name": "process", + "rootUri": "file:///C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/process-3.0.13", + "packageUri": "lib/", + "languageVersion": "2.0" + }, + { + "name": "quiver", + "rootUri": "file:///C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/quiver-2.1.3", + "packageUri": "lib/", + "languageVersion": "2.0" + }, + { + "name": "sky_engine", + "rootUri": "file:///C:/src/flutter/bin/cache/pkg/sky_engine", + "packageUri": "lib/", + "languageVersion": "1.11" + }, + { + "name": "source_span", + "rootUri": "file:///C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/source_span-1.7.0", + "packageUri": "lib/", + "languageVersion": "2.6" + }, + { + "name": "stack_trace", + "rootUri": "file:///C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/stack_trace-1.9.3", + "packageUri": "lib/", + "languageVersion": "1.23" + }, + { + "name": "stream_channel", + "rootUri": "file:///C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/stream_channel-2.0.0", + "packageUri": "lib/", + "languageVersion": "2.0" + }, + { + "name": "string_scanner", + "rootUri": "file:///C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/string_scanner-1.0.5", + "packageUri": "lib/", + "languageVersion": "2.0" + }, + { + "name": "term_glyph", + "rootUri": "file:///C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/term_glyph-1.1.0", + "packageUri": "lib/", + "languageVersion": "1.8" + }, + { + "name": "test_api", + "rootUri": "file:///C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/test_api-0.2.15", + "packageUri": "lib/", + "languageVersion": "2.4" + }, + { + "name": "typed_data", + "rootUri": "file:///C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/typed_data-1.1.6", + "packageUri": "lib/", + "languageVersion": "2.0" + }, + { + "name": "uuid", + "rootUri": "file:///C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/uuid-2.2.0", + "packageUri": "lib/", + "languageVersion": "2.0" + }, + { + "name": "vector_math", + "rootUri": "file:///C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/vector_math-2.0.8", + "packageUri": "lib/", + "languageVersion": "2.0" + }, + { + "name": "xdg_directories", + "rootUri": "file:///C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/xdg_directories-0.1.0", + "packageUri": "lib/", + "languageVersion": "2.3" + }, + { + "name": "xml", + "rootUri": "file:///C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/xml-3.6.1", + "packageUri": "lib/", + "languageVersion": "2.6" + }, + { + "name": "xylophone", + "rootUri": "../", + "packageUri": "lib/", + "languageVersion": "2.7" + } + ], + "generated": "2020-10-26T12:23:24.045698Z", + "generator": "pub", + "generatorVersion": "2.8.4" +} diff --git a/flutter_xylophone/.flutter-plugins b/flutter_xylophone/.flutter-plugins new file mode 100644 index 0000000..2ea1e39 --- /dev/null +++ b/flutter_xylophone/.flutter-plugins @@ -0,0 +1,5 @@ +# This is a generated file; do not edit or check into version control. +audioplayers=C:\\src\\flutter\\.pub-cache\\hosted\\pub.dartlang.org\\audioplayers-0.15.1\\ +path_provider=C:\\src\\flutter\\.pub-cache\\hosted\\pub.dartlang.org\\path_provider-1.6.11\\ +path_provider_linux=C:\\src\\flutter\\.pub-cache\\hosted\\pub.dartlang.org\\path_provider_linux-0.0.1+2\\ +path_provider_macos=C:\\src\\flutter\\.pub-cache\\hosted\\pub.dartlang.org\\path_provider_macos-0.0.4+3\\ diff --git a/flutter_xylophone/.flutter-plugins-dependencies b/flutter_xylophone/.flutter-plugins-dependencies new file mode 100644 index 0000000..0987c59 --- /dev/null +++ b/flutter_xylophone/.flutter-plugins-dependencies @@ -0,0 +1 @@ +{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"audioplayers","path":"C:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\audioplayers-0.15.1\\\\","dependencies":["path_provider"]},{"name":"path_provider","path":"C:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\path_provider-1.6.11\\\\","dependencies":[]}],"android":[{"name":"audioplayers","path":"C:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\audioplayers-0.15.1\\\\","dependencies":["path_provider"]},{"name":"path_provider","path":"C:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\path_provider-1.6.11\\\\","dependencies":[]}],"macos":[{"name":"audioplayers","path":"C:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\audioplayers-0.15.1\\\\","dependencies":[]},{"name":"path_provider_macos","path":"C:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\path_provider_macos-0.0.4+3\\\\","dependencies":[]}],"linux":[{"name":"path_provider_linux","path":"C:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\path_provider_linux-0.0.1+2\\\\","dependencies":[]}],"windows":[],"web":[{"name":"audioplayers","path":"C:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\audioplayers-0.15.1\\\\","dependencies":[]}]},"dependencyGraph":[{"name":"audioplayers","dependencies":["path_provider"]},{"name":"path_provider","dependencies":["path_provider_macos","path_provider_linux"]},{"name":"path_provider_linux","dependencies":[]},{"name":"path_provider_macos","dependencies":[]}],"date_created":"2020-10-26 17:53:24.165059","version":"1.17.3"} \ No newline at end of file diff --git a/flutter_xylophone/.packages b/flutter_xylophone/.packages new file mode 100644 index 0000000..d684fb8 --- /dev/null +++ b/flutter_xylophone/.packages @@ -0,0 +1,42 @@ +# Generated by pub on 2020-10-26 17:53:24.022759. +archive:file:///C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/archive-2.0.13/lib/ +args:file:///C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/args-1.6.0/lib/ +async:file:///C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/async-2.4.1/lib/ +audioplayers:file:///C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/audioplayers-0.15.1/lib/ +boolean_selector:file:///C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/boolean_selector-2.0.0/lib/ +charcode:file:///C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/charcode-1.1.3/lib/ +collection:file:///C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/collection-1.14.12/lib/ +convert:file:///C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/convert-2.1.1/lib/ +crypto:file:///C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/crypto-2.1.4/lib/ +cupertino_icons:file:///C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/cupertino_icons-0.1.3/lib/ +file:file:///C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/file-5.2.1/lib/ +flutter:file:///C:/src/flutter/packages/flutter/lib/ +flutter_test:file:///C:/src/flutter/packages/flutter_test/lib/ +flutter_web_plugins:file:///C:/src/flutter/packages/flutter_web_plugins/lib/ +image:file:///C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/image-2.1.12/lib/ +intl:file:///C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/intl-0.16.1/lib/ +matcher:file:///C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/matcher-0.12.6/lib/ +meta:file:///C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/meta-1.1.8/lib/ +path:file:///C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/path-1.6.4/lib/ +path_provider:file:///C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/path_provider-1.6.11/lib/ +path_provider_linux:file:///C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/path_provider_linux-0.0.1+2/lib/ +path_provider_macos:file:///C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/path_provider_macos-0.0.4+3/lib/ +path_provider_platform_interface:file:///C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/path_provider_platform_interface-1.0.2/lib/ +petitparser:file:///C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/petitparser-2.4.0/lib/ +platform:file:///C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/platform-2.2.1/lib/ +plugin_platform_interface:file:///C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/plugin_platform_interface-1.0.2/lib/ +process:file:///C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/process-3.0.13/lib/ +quiver:file:///C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/quiver-2.1.3/lib/ +sky_engine:file:///C:/src/flutter/bin/cache/pkg/sky_engine/lib/ +source_span:file:///C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/source_span-1.7.0/lib/ +stack_trace:file:///C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/stack_trace-1.9.3/lib/ +stream_channel:file:///C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/stream_channel-2.0.0/lib/ +string_scanner:file:///C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/string_scanner-1.0.5/lib/ +term_glyph:file:///C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/term_glyph-1.1.0/lib/ +test_api:file:///C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/test_api-0.2.15/lib/ +typed_data:file:///C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/typed_data-1.1.6/lib/ +uuid:file:///C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/uuid-2.2.0/lib/ +vector_math:file:///C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/vector_math-2.0.8/lib/ +xdg_directories:file:///C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/xdg_directories-0.1.0/lib/ +xml:file:///C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/xml-3.6.1/lib/ +xylophone:lib/