This commit is contained in:
qrhlhplhp 2022-11-09 08:58:15 +09:00
parent bdaa8d79a9
commit db72269d7b
8 changed files with 252 additions and 9 deletions

View File

@ -2,11 +2,4 @@
There are my works of html, css, javascript, made mainly with the help of Administrator.
Click link here to access:
- Apple Per Man Calculator<br>
https://qrhlhplhp.github.io/webs/APMC/
- BACH=DEMO MACHINE<br>
https://qrhlhplhp.github.io/webs/bahdem/
- PAIN TOOL<br>
https://qrhlhplhp.github.io/webs/pain/
- Ultra Super Stylish Reversi<br>
https://qrhlhplhp.github.io/webs/ultra-super-stylish-reversi/
https://qrhlhplhp.github.io/webs/

View File

@ -19,8 +19,11 @@
<h2>PAIN TOOL</h2>
<p>This is a tool to pain... OH NO! Where has the "T" gone!?</p>
<a href="pain/">Link</a>
<h2>Ultra Super Stylish Reversi</h2>
<h2>ULTRA SUPER STYLISH REVERSI</h2>
<p>Workers of the world, play!</p>
<a href="ultra-super-stylish-reversi/">Link</a>
<h2>PASSWARD TYPING TRAINING</h2>
<p>You can improve your skill to type in the passwards through use this.</p>
<a href="ultra-super-stylish-reversi/">Link</a>
</body>
</html>

10
typing/fonts/AUTHORS.txt Normal file
View File

@ -0,0 +1,10 @@
# This is the official list of project authors for copyright purposes.
# This file is distinct from the CONTRIBUTORS.txt file.
# See the latter for an explanation.
#
# Names should be added to this file as:
# Name or Organization <email address>
JetBrains <>
Philipp Nurullin <philipp.nurullin@jetbrains.com>
Konstantin Bulenkov <kb@jetbrains.com>

93
typing/fonts/OFL.txt Normal file
View File

@ -0,0 +1,93 @@
Copyright 2020 The JetBrains Mono Project Authors (https://github.com/JetBrains/JetBrainsMono)
This Font Software is licensed under the SIL Open Font License, Version 1.1.
This license is copied below, and is also available with a FAQ at: https://scripts.sil.org/OFL
-----------------------------------------------------------
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
-----------------------------------------------------------
PREAMBLE
The goals of the Open Font License (OFL) are to stimulate worldwide
development of collaborative font projects, to support the font creation
efforts of academic and linguistic communities, and to provide a free and
open framework in which fonts may be shared and improved in partnership
with others.
The OFL allows the licensed fonts to be used, studied, modified and
redistributed freely as long as they are not sold by themselves. The
fonts, including any derivative works, can be bundled, embedded,
redistributed and/or sold with any software provided that any reserved
names are not used by derivative works. The fonts and derivatives,
however, cannot be released under any other type of license. The
requirement for fonts to remain under this license does not apply
to any document created using the fonts or their derivatives.
DEFINITIONS
"Font Software" refers to the set of files released by the Copyright
Holder(s) under this license and clearly marked as such. This may
include source files, build scripts and documentation.
"Reserved Font Name" refers to any names specified as such after the
copyright statement(s).
"Original Version" refers to the collection of Font Software components as
distributed by the Copyright Holder(s).
"Modified Version" refers to any derivative made by adding to, deleting,
or substituting -- in part or in whole -- any of the components of the
Original Version, by changing formats or by porting the Font Software to a
new environment.
"Author" refers to any designer, engineer, programmer, technical
writer or other person who contributed to the Font Software.
PERMISSION & CONDITIONS
Permission is hereby granted, free of charge, to any person obtaining
a copy of the Font Software, to use, study, copy, merge, embed, modify,
redistribute, and sell modified and unmodified copies of the Font
Software, subject to the following conditions:
1) Neither the Font Software nor any of its individual components,
in Original or Modified Versions, may be sold by itself.
2) Original or Modified Versions of the Font Software may be bundled,
redistributed and/or sold with any software, provided that each copy
contains the above copyright notice and this license. These can be
included either as stand-alone text files, human-readable headers or
in the appropriate machine-readable metadata fields within text or
binary files as long as those fields can be easily viewed by the user.
3) No Modified Version of the Font Software may use the Reserved Font
Name(s) unless explicit written permission is granted by the corresponding
Copyright Holder. This restriction only applies to the primary font name as
presented to the users.
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
Software shall not be used to promote, endorse or advertise any
Modified Version, except to acknowledge the contribution(s) of the
Copyright Holder(s) and the Author(s) or with their explicit written
permission.
5) The Font Software, modified or unmodified, in part or in whole,
must be distributed entirely under this license, and must not be
distributed under any other license. The requirement for fonts to
remain under this license does not apply to any document created
using the Font Software.
TERMINATION
This license becomes null and void if any of the above conditions are
not met.
DISCLAIMER
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
OTHER DEALINGS IN THE FONT SOFTWARE.

Binary file not shown.

31
typing/index.html Normal file
View File

@ -0,0 +1,31 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" type="text/css" href="main.css">
<title>Passward Typing Training</title>
</head>
<body onselectstart="return false";>
<p><span id="totype"></span></p>
<input type="text" id="typed">
<table style="border-collapse:collapse; margin-top:5vh;">
<tr>
<th>LIMIT:</th>
<td style="text-align:left;"><span id="timecounttext">0</span></td>
</tr><tr>
<th>SCORE:</th>
<td style="text-align:left;"><span id="scorecounttext">0</span></td>
</tr><tr>
<th>LEVEL:</th>
<td style="text-align:left;"><span id="levelcounttext">0</span></td>
</tr><tr>
<th>LIFE:</th>
<td style="text-align:left; font-weight:700; color:red;"><span id="lifecounttext">0</span></td>
</tr><tr>
</tr>
</table>
</body>
<script src="main.js"></script>
</html>

26
typing/main.css Normal file
View File

@ -0,0 +1,26 @@
body{
font-family: JetBrain;
}
#totype{
font-size:200%;
background: linear-gradient(90deg, red 0% 50%,black 50% 100%);
background-size: 200% 200%;
background-clip:text;
-webkit-background-clip:text;
-webkit-text-fill-color: transparent;
}
@keyframes karaoke{
0% {background-position: 100% 50%;}
100% {background-position: 0% 50%;}
/*0%{background:linear-gradient(90deg,red 0% 0%, transparent 0% 100%)}
100%{background:linear-gradient(90deg,red 0% 100%, transparent 100% 100%)}
0%{color: black;}
100%{color: red;}*/
}
@font-face {
font-family: "JetBrain";
src: url("./fonts/fonts/webfonts/JetBrainsMono-Medium.woff2") format("woff2");
}

87
typing/main.js Normal file
View File

@ -0,0 +1,87 @@
let totype = document.getElementById("totype")
let typed = document.getElementById("typed")
let scorecounttext = document.getElementById("scorecounttext")
let scorecounter = 0
let timecounttext = document.getElementById("timecounttext")
let timecounter = 0
let intervalID = setInterval(timeclock, 1000)
let levelcounttext = document.getElementById("levelcounttext")
let lifecounttext = document.getElementById("lifecounttext")
let lifecounter = 0
//def
setToType()
timecounter = 20
timecounttext.innerText = timecounter
lifecounter = 5
lifecounttext.innerText = lifecounter
setcolor(timecounter)
window.document.onkeydown = function(event){
if (event.key === 'Enter') {
entered();
}
}
//totype.document.onselectstart = () => false;
function entered(){
if(typed.value == totype.innerText){
scorecounttext.innerText = ++scorecounter
levelcounttext.innerText = 1 + Math.ceil(scorecounter * 0.5)
resetcolor()
setToType()
typed.value = ""
timecountspeed()
setTimeout(setcolor,5,timecounter);
}else{
}
}
//make an array with N characters
//make random numbers counterpart to character
//make the characters connected in the array
function setToType(){
let charakind = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"
let randomStrings = Array.from(Array(Math.floor(Math.random()*20 + 10))).map(
()=>charakind[Math.floor(Math.random()*charakind.length)]
).join('');
totype.innerText = randomStrings;
}
function timeclock(){
--timecounter
if(timecounter != 0){
timecounttext.style.color = "black"
timecounttext.style.fontWeight = "normal"
timecounttext.innerText = timecounter
}else if(lifecounter - 1 != 0){
lifecounttext.innerText = --lifecounter
timecounttext.style.color = "red"
timecounttext.style.fontWeight = "bold"
timecounttext.innerText = "TIME OVER"
resetcolor()
setToType()
typed.value = ""
timecountspeed()
setTimeout(setcolor,1000,timecounter);
}else{
lifecounttext.innerText = --lifecounter
timecounttext.style.color = "red"
timecounttext.style.fontWeight = "bold"
timecounttext.innerText = "GAME OVER"
typed.value = ""
clearInterval(intervalID)
}
}
function timecountspeed(){
//timelimit then
timecounter = 21-Math.ceil(scorecounter * 0.5)
}
function setcolor(time){
totype.style.animation = `karaoke ${time}s`
}
function resetcolor(){
totype.style.animation = null
}
//window.requestAnimationFrame(callback);