-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
massive: design, unification, fonts, glagolitic, abbr
- Loading branch information
Showing
24 changed files
with
662 additions
and
355 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +0,0 @@ | ||
# uk-shavian | ||
Change cyrillic to shavian | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
.grey { | ||
-webkit-filter: grayscale(100%); | ||
filter: grayscale(100%); | ||
} | ||
|
||
.grey:hover { | ||
-webkit-filter: grayscale(0%); | ||
filter: grayscale(0%); | ||
} |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,55 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
|
||
<head> | ||
<meta charset="utf-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> | ||
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css"> | ||
|
||
<title>Main | Linden Top</title> | ||
</head> | ||
|
||
<body> | ||
<ul> | ||
<li><a href="./projects/uk-latin/index.html">Ukrainian Latin Alphabet</a></li> | ||
<li><a href="./projects/uk-shavian/index.html">Ukrainian Shavian Alphabet</a></li> | ||
</ul> | ||
<!-- HEADER --> | ||
<header role="navigation" class="masthead mb-auto"> | ||
<nav class="navbar navbar-expand-lg navbar-dark bg-dark"> | ||
<a class="navbar-brand" href="index.html">🌳</a> | ||
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" | ||
aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation"> | ||
<span class="navbar-toggler-icon"></span> | ||
</button> | ||
|
||
<div class="collapse navbar-collapse" id="navbarSupportedContent"> | ||
<ul class="navbar-nav mr-auto"> | ||
<li class="nav-item active"> | ||
<a class="nav-link" href="index.html">Main</a> | ||
</li> | ||
<li class="nav-item"> | ||
<a class="nav-link" href="pages/about.html">About</a> | ||
</li> | ||
</ul> | ||
</div> | ||
</nav> | ||
</header> | ||
|
||
<!-- MAIN --> | ||
<div class="container-fluid"> | ||
<div class="card-deck"> | ||
<div class="card m-2" style="max-width: 18rem;"> | ||
<div class="card-header">Tool</div> | ||
<div class="card-body"> | ||
<h5 class="card-title">Ukrainian Transliteration</h5> | ||
<p class="card-text">Cyrillic, Shavian, Latin, Glagolitic.</p> | ||
<a href="./projects/transliteration/index.html" class="btn btn-primary">Use</a> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
<!-- FOOTER --> | ||
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js"></script> | ||
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js"></script> | ||
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js"></script> | ||
</body> | ||
|
||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
|
||
<head> | ||
<meta charset="utf-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> | ||
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css"> | ||
|
||
<link rel="stylesheet" href="../css/style.css"> | ||
<title>About | Linden Top</title> | ||
</head> | ||
|
||
<body> | ||
<!-- HEADER --> | ||
<header role="navigation"> | ||
<nav class="navbar navbar-expand-lg navbar-dark bg-dark"> | ||
<a class="navbar-brand grey" href="../index.html">🌳</a> | ||
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" | ||
aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation"> | ||
<span class="navbar-toggler-icon"></span> | ||
</button> | ||
|
||
<div class="collapse navbar-collapse" id="navbarSupportedContent"> | ||
<ul class="navbar-nav mr-auto"> | ||
<li class="nav-item"> | ||
<a class="nav-link" href="../index.html">Main</a> | ||
</li> | ||
<li class="nav-item active"> | ||
<a class="nav-link" href="about.html">About</a> | ||
</li> | ||
</ul> | ||
</div> | ||
</nav> | ||
</header> | ||
|
||
<!-- MAIN --> | ||
|
||
<!-- FOOTER --> | ||
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js"></script> | ||
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js"></script> | ||
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js"></script> | ||
</body> | ||
|
||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
@font-face { | ||
font-family: 'Noto Sans Regular'; | ||
font-style: normal; | ||
font-weight: 400; | ||
src: url(../../../fonts/NotoSans/NotoSans-Regular.ttf); | ||
} | ||
|
||
@font-face { | ||
font-family: 'Noto Sans Glagolitic'; | ||
font-style: normal; | ||
font-weight: 400; | ||
src: url(../../../fonts/NotoSansGlagolitic-Regular.ttf); | ||
} | ||
|
||
@font-face { | ||
font-family: 'Noto Sans Shavian'; | ||
font-style: normal; | ||
font-weight: 400; | ||
src: url(../../../fonts/NotoSansShavian-Regular.ttf); | ||
} | ||
|
||
#result, textarea { | ||
font-family: 'Noto Sans Regular', 'Noto Sans Glagolitic', 'Noto Sans Shavian', sans-serif; | ||
font-size: 16px; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
|
||
<head> | ||
<meta charset="utf-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> | ||
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css"> | ||
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.6.3/css/all.css"> | ||
|
||
<!-- global --> | ||
<link rel="stylesheet" href="../../css/style.css"> | ||
<!-- local --> | ||
<link rel="stylesheet" href="css/style.css"> | ||
|
||
<title>Transliteration | Linden Top</title> | ||
</head> | ||
|
||
<body> | ||
<!-- HEADER --> | ||
<header role="navigation" class="masthead mb-auto"> | ||
<nav class="navbar navbar-expand-lg navbar-dark bg-dark"> | ||
<a class="navbar-brand grey" href="../../index.html">🌳</a> | ||
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" | ||
aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation"> | ||
<span class="navbar-toggler-icon"></span> | ||
</button> | ||
|
||
<div class="collapse navbar-collapse" id="navbarSupportedContent"> | ||
<ul class="navbar-nav mr-auto"> | ||
<li class="nav-item"> | ||
<a class="nav-link" href="../../index.html">Main</a> | ||
</li> | ||
<li class="nav-item"> | ||
<a class="nav-link" href="../../pages/about.html">About</a> | ||
</li> | ||
</ul> | ||
</div> | ||
</nav> | ||
</header> | ||
|
||
<!-- MAIN --> | ||
<div class="container-fluid mt-2"> | ||
<!-- <h1 class="display-4">Transliteration</h1> --> | ||
<form> | ||
<div class="form-inline align-items-center mt-1 mb-2"> | ||
<select name="from" id="from" class="form-control selectpicker"> | ||
<option>Cyrillic</option> | ||
<option>Glagolitic</option> | ||
<option selected="selected">Latin</option> | ||
<option>Shavian</option> | ||
</select> | ||
<button type="button" class="btn btn-link" title="Swap" onclick="swapValueOfSelections()"> | ||
<i class="fas fa-exchange-alt"></i> | ||
</button> | ||
<select name="to" id="to" class="form-control"> | ||
<option selected="selected">Cyrillic</option> | ||
<option>Glagolitic</option> | ||
<option>Latin</option> | ||
<option>Shavian</option> | ||
</select> | ||
<button type="button" class="btn btn-link" title="Transliterate : Ctrl + Enter @ textarea" | ||
onclick="sendValueOfTextarea()"> | ||
<i class="fas fa-check"></i> | ||
</button> | ||
<button type="button" class="btn btn-link" title="Copy result" onclick="copyResultToClipboard()"> | ||
<i class="fas fa-copy"></i> | ||
</button> | ||
<button type="button" class="btn btn-link" title="Clear all" onclick="eraseTextareaAndResult()"> | ||
<i class="fas fa-eraser"></i> | ||
</button> | ||
</div> | ||
</form> | ||
<textarea id="send" class="form-control" rows="10"></textarea> | ||
<div id="result" class="m-2"></div> | ||
</div> | ||
|
||
<!-- FOOTER --> | ||
<!-- non-local --> | ||
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js"></script> | ||
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js"></script> | ||
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js"></script> | ||
|
||
<!-- local --> | ||
<script src="js/objects.js"></script> | ||
<script src="js/lib.js"></script> | ||
<script src="js/script.js"></script> | ||
</body> | ||
|
||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
function valueOfSelection(id) { // string | ||
let selObj = document.getElementById(id) | ||
return selObj.options[selObj.selectedIndex].text | ||
} // string | ||
|
||
function printResult(string) { // string | ||
document.getElementById('result').innerHTML = string.replace(/\n\r?/g, '<br />') | ||
} | ||
|
||
function transliteration(from, to, value) { // string, string, string | ||
|
||
var upCaseLetters = upCase(from, getLetters(from)) + upCase(to, getLetters(to)) | ||
var softLetters = getLetters(to, 'Soft'); | ||
var iotaSign = getLetters(to, 'Jot') | ||
var softSign = getLetters(to, 'Soft sign') | ||
|
||
console.log('test'); | ||
|
||
for (letter of scripts) { | ||
if (isUnderfined([letter[from], letter[to]])) { continue } | ||
|
||
// Party uppercase | ||
let partlyIn = upCase(from, letter[from], false) | ||
let partlyOut = upCase(to, letter[to], false) | ||
|
||
// Full uppercase | ||
let exception = '([' + '0-9\-' + upCaseLetters + ']{0,})' | ||
let fullIn = '(?<=[\\s,.:;"\']|^)' | ||
+ exception + upCase(from) + exception | ||
+ '(?=[\\s,.:;"\']|$)' | ||
|
||
// Iotation | ||
let lowerSoft = '([' + softLetters + '])' + iotaSign | ||
let upperSoft = '([' + upCase(softLetters) + '])' + upCase(iotaSign) | ||
|
||
value = value | ||
.normalize('NFD') | ||
.replace(new RegExp(fullIn, 'g'), '$1' + upCase(to) + '$2') | ||
.replace(new RegExp(partlyIn, 'g'), partlyOut) | ||
.replace(new RegExp(letter[from], 'g'), letter[to]) | ||
.replace(new RegExp(lowerSoft, 'g'), '$1' + softSign) | ||
.replace(new RegExp(upperSoft, 'g'), '$1' + upCase(softSign)) | ||
} | ||
return value | ||
} // string | ||
|
||
function upCase(script, symbol = letter[script], all = true) { // string, string, boolean | ||
if (isUnderfined(symbol)) return | ||
switch (script) { | ||
case 'Shavian': { | ||
symbol = all ? '·' + [...symbol].join('·') : '·' + symbol | ||
break | ||
} | ||
default: { | ||
symbol = all ? symbol.toUpperCase() : symbol[0].toUpperCase() + symbol.slice(1) | ||
break | ||
} | ||
} | ||
return symbol | ||
} // string | ||
|
||
function isUnderfined(value) { // any | ||
switch (typeof value) { | ||
case 'object': { | ||
if (value === undefined) { return true } | ||
for (i of value) if (i === undefined) { return true } | ||
return false | ||
} | ||
default: { | ||
return value === undefined ? true : false | ||
} | ||
} | ||
} // boolean | ||
|
||
function getLetters(script, param = 'all') { // array, string | ||
var string = '' | ||
switch (param) { | ||
case 'all': { | ||
for (letter of scripts) { | ||
if (isUnderfined(letter[script])) { continue } | ||
string += letter[script] | ||
} | ||
break | ||
} | ||
default: { | ||
for (letter of scripts) { | ||
if (isUnderfined(letter[script]) | ||
|| isUnderfined(letter['Param']) | ||
|| letter['Param'].indexOf(param) < 0) { continue } | ||
string += letter[script] | ||
} | ||
break | ||
} | ||
} | ||
return string | ||
} // string |
Oops, something went wrong.