Commit 76544be8 authored by William Paul Liggett's avatar William Paul Liggett

Initial commit

parents
<!DOCTYPE html>
<html>
<head>
<title>OpenVigilance Task: Change Log</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<style type="text/css">
h1 {
margin-bottom: 0.2rem;
}
h2 {
margin-top: 0;
font-size: 12pt;
}
.version_info {
text-decoration: underline;
}
li {
margin-bottom: 1rem;
}
</style>
</head>
<body>
<h1>OpenVigilance Task: Change Log</h1>
<h2>Programmer: William Paul Liggett (junktext@junktext.com)</h2>
<p><em>Total labor time: 12 hours.</em></p>
<p class="version_info">Version 1.1.0 (2018-02-07):</p>
<p><em>Estimated labor time: 4 hours.</em></p>
<ul>
<li>Randomization function added and the capability for a random letter to update automatically works at the rate of 57.5 events per minute.</li>
</ul>
<p class="version_info">Version 1.0.0 (2018-01-31):</p>
<p><em>Estimated labor time: 8 hours.</em></p>
<ul>
<li>Initial codebase. Main HTML and CSS files were created, with a focus on display precision by using a real-world ruler (in millimeters)!</li>
<li>Smaller Background Circles: Exact dimensions in millimeters to 1360x768 pixel resolution. This took a while as converting a pixel-based image to the correct millimeter equivalent was extremely tedious.</li>
<li>CSS: The random letter is at the exact millimeter dimensions (8x6mm), and it is precisely in the middle of the image, and uses the same gray color from the older paper.</li>
<li>CSS: Backwards D letter renders correctly.</li>
<li>Font: TeX Gyre Adventor Bold is an open source font replacement for the costly and legally-restrictive ITC Avant Garde Gothic font. The ITC font was designed by Herb Lubalin and Tom Carnase in 1970. Here is the EULA for that ITC Avant Garde font (which is why we're not using this font): <br /><a href="https://www.fonts.com/info/legal/eula/monotype-imaging" target="_blank">https://www.fonts.com/info/legal/eula/monotype-imaging</a></li>
</ul>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>LICENSE: Mozilla Public License (MPL), v. 2.0</title>
</head>
<body>
<p>
OpenVigilance Task <br />
Copyright (C) 2018 by William Paul Liggett (junktext@junktext.com)
</p>
<p>
This Source Code Form is subject to the terms of the Mozilla Public License (MPL), v. 2.0. <br />
If a copy of the MPL was not distributed with this file, You can obtain one at <a href="https://mozilla.org/MPL/2.0/" target="_blank">https://mozilla.org/MPL/2.0/</a>.
</p>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<title>Vigilance Task</title>
<!-- Copyright (C) 2018 by William Paul Liggett (junktext@junktext.com)
This Source Code Form is subject to the terms of the Mozilla Public License (MPL), v. 2.0.
If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. -->
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" type="text/css" href="css/style.css" />
</head>
<body>
<h1>Vigilance Task</h1>
<div class="container">
<img id="background-smaller-circles" src="media/background-smaller-circles (Image is 936 by 466 px, Resolution at 1360x768 [~16 by 9]).png" alt="Background of Smaller Circles" />
<div class="random_letter">
<span class="letter_o">O</span>
<span class="letter_d">D</span>
<span class="letter_backwards_d">D</span>
</div>
</div>
<script type="text/javascript" src="js/jquery-3.3.1.min.js"></script>
<script type="text/javascript" src="js/OpenVigilance_Task.js"></script>
</body>
</html>
/* ------------------------------------------------------------------------------------------------------------------
Copyright (C) 2018 by William Paul Liggett (junktext@junktext.com)
This Source Code Form is subject to the terms of the Mozilla Public License (MPL), v. 2.0.
If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/.
------------------------------------------------------------------------------------------------------------------ */
@font-face {
/* TeX Gyre Adventor can be used as a replacement for ITC Avant Garde Gothic
The ITC font was designed by Herb Lubalin and Tom Carnase in 1970. */
font-family: TeX_Gyre_Adventor_Bold;
src: url("../media/fonts/qag2.003otf/texgyreadventor-bold.otf");
}
h1 {
font-size: 14pt;
text-align: center;
}
/* Background image container to have the random letter to be centered vertically. */
.container {
position: relative;
}
#background-smaller-circles {
margin: auto;
display: block;
z-index: -1; /* Causes the image to go beneath the random O, D, and backwards D letters. */
}
.letter_o, .letter_d {
/* Ensures that the backwards D and the regular O and D characters are using the same scaling. */
-moz-transform: scale(1, 1);
-webkit-transform: scale(1, 1);
-o-transform: scale(1, 1);
-ms-transform: scale(1, 1);
transform: scale(1, 1);
}
.letter_o {
display: inline; /* Either: none or inline */
}
.letter_d {
display: inline; /* Either: none or inline */
}
.letter_backwards_d {
/* Technique by: Duopixel (2015) [https://stackoverflow.com/a/5409373/5513567] */
/* And by: enigment (2016) [inline-block fix] */
/* License: CC By-SA 3.0 [https://creativecommons.org/licenses/by-sa/3.0/] */
-moz-transform: scale(-1, 1);
-webkit-transform: scale(-1, 1);
-o-transform: scale(-1, 1);
-ms-transform: scale(-1, 1);
transform: scale(-1, 1);
display: inline-block; /* Either: none or inline-block */
}
.random_letter {
font-family: TeX_Gyre_Adventor_Bold;
font-size: 38pt; /* The older academic paper used 24pt Avant Garde, but they said it resulted in 8x6mm dimensions. So, this 38pt font that replaces Avant Garde has these same dimensions on a 1360x768 resolution. */
position: absolute;
left: 0;
top: 40%; /* Not using 50% as specified by the W3C, since it doesn't result in the exact vertical center for some reason. [https://www.w3.org/Style/Examples/007/center.en.html#text] */
width: 100%;
text-align: center;
transform: translate(0, -50%); /* As recommended by the W3C for centering vertically. [https://www.w3.org/Style/Examples/007/center.en.html#text] */
color: #eaeaea; /* Via GIMP's color picker from the academic paper dated for Summer 2000. */
}
/* Used to add or remove this hidden class to hide or show the random letters. */
.hidden {
display: none;
}
\ No newline at end of file
/* ------------------------------------------------------------------------------------------------------------------
Copyright (C) 2018 by William Paul Liggett (junktext@junktext.com)
This Source Code Form is subject to the terms of the Mozilla Public License (MPL), v. 2.0.
If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/.
------------------------------------------------------------------------------------------------------------------ */
;(function(window, $) {
$(document).ready(function() {
// Hides any random letters when the document first loads up.
$("div.random_letter").addClass("hidden");
$("span.letter_o").addClass("hidden");
$("span.letter_d").addClass("hidden");
$("span.letter_backwards_d").addClass("hidden");
// Unhides the main <div> for the random_letter now.
$("div.random_letter").removeClass("hidden");
});
// Function by Mozilla Contributors, Feb 2018
// Source: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/random
// License: CC By-SA 2.5 [http://creativecommons.org/licenses/by-sa/2.5/]
//
// Usage: getRandomInt(3)); // Output: 0, 1 or 2
function getRandomInt(max) {
return Math.floor(Math.random() * Math.floor(max));
}
function changeRandomLetter() {
var random_int = getRandomInt(3);
// Letter: O
if(random_int === 0) {
$("span.letter_o").removeClass("hidden");
// Hides the letter D.
var letter_d_hidden = $("span.letter_d").hasClass("hidden");
if(letter_d_hidden === false) {
$("span.letter_d").addClass("hidden");
}
// Hides the letter backwards D.
var letter_backwards_d_hidden = $("span.letter_backwards_d").hasClass("hidden");
if(letter_backwards_d_hidden === false) {
$("span.letter_backwards_d").addClass("hidden");
}
}
// Letter: D
else if(random_int === 1) {
$("span.letter_d").removeClass("hidden");
// Hides the letter O.
var letter_o_hidden = $("span.letter_o").hasClass("hidden");
if(letter_o_hidden === false) {
$("span.letter_o").addClass("hidden");
}
// Hides the letter backwards D.
var letter_backwards_d_hidden = $("span.letter_backwards_d").hasClass("hidden");
if(letter_backwards_d_hidden === false) {
$("span.letter_backwards_d").addClass("hidden");
}
}
// Letter: Backwards D
else {
$("span.letter_backwards_d").removeClass("hidden");
// Hides the letter D.
var letter_d_hidden = $("span.letter_d").hasClass("hidden");
if(letter_d_hidden === false) {
$("span.letter_d").addClass("hidden");
}
// Hides the letter O.
var letter_o_hidden = $("span.letter_o").hasClass("hidden");
if(letter_o_hidden === false) {
$("span.letter_o").addClass("hidden");
}
}
}
// 57.5 events per minute. An event is a random letter change.
setInterval(changeRandomLetter, (57.5/60)*1000);
})(window, jQuery);
This diff is collapsed.
This diff is collapsed.
%%% This is a preliminary version, barring acceptance from the
%%% LaTeX Project Team and other feedback, of the GUST Font Source
%%% License. This license is for use with free fonts distributed
%%% with source code.
%%%
%%% For the most recent version of this license see
%%% http://www.gust.org.pl/projects/e-foundry/licenses/GUST-FONT-SOURCE-LICENSE.txt/view
%%% or
%%% http://tug.org/fonts/licenses/GUST-FONT-SOURCE-LICENSE.txt
%
% This work may be distributed and/or modified under the conditions
% of the LaTeX Project Public License, either version 1.3a of this
% license or (at your option) any later version, provided that the
% following additional clauses are observed:
%
% 1) Due to the nature of fonts, clause 6a of the LaTeX Project Public
% License, version 1.3a, does not apply. A later version of the
% LaTeX Project Public License may number or word this clause
% differently; it is the substance that is important.
% 2) It is requested, but not legally required, that derived works be
% distributed only after changing the names of the fonts comprising
% this work and given in the accompanying file MANIFEST.txt, and
% that the files comprising the Work, as listed in MANIFEST.txt also
% be given new names. Any exceptions to this request are also given
% in MANIFEST.txt.
%
% The latest version of the LaTeX Project Public License is in
% http://www.latex-project.org/lppl.txt and version 1.3a or later
% is part of all distributions of LaTeX version 2004/10/01 or later.
The GUST Font Source License mentions that the font may be distributed under the
LaTeX Project Public License, which this license has been approved by the Open
Source Initiative (OSI) as a valid open source software license.
https://opensource.org/licenses/alphabetical
https://opensource.org/licenses/LPPL-1.3c
This diff is collapsed.
file.reference.Vigilance_Task-source=.
files.encoding=UTF-8
source.folder=${file.reference.Vigilance_Task-source}
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://www.netbeans.org/ns/project/1">
<type>org.netbeans.modules.web.clientproject</type>
<configuration>
<data xmlns="http://www.netbeans.org/ns/clientside-project/1">
<name>JTX: Vigilance Task</name>
</data>
</configuration>
</project>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment