Skip to content

Commit

Permalink
Updated: Final reading script prototype
Browse files Browse the repository at this point in the history
Added: Storymaker prototype
  • Loading branch information
jabbett committed Mar 11, 2024
1 parent 7167370 commit bdfc400
Show file tree
Hide file tree
Showing 11 changed files with 784 additions and 144 deletions.
95 changes: 8 additions & 87 deletions src/prototypes/script-typography/option3.html
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@
display: flex;
align-items: center;
border-radius: 100%;
/* text-transform: uppercase;*/
line-height: 1;
background-color: #999;
}
Expand All @@ -60,26 +59,9 @@
}

.script-group.say h3 { background-color: var(--color-evergreen); }
/* .script-group.do h3 { background-color: #0f3e88; }*/
.script-group.do h3 { background-color: white; }
.script-group.wait h3 { background-color: #e6ab54; }

/*.script-group h3.hear { background-color: rgb(221, 173, 99) }
.script-group h3.repeat { background-color: rgb(29, 61, 131); }*/

/* .script-group h3 {
margin-bottom: 0px;
font-weight: 600;
font-size: 0.9rem;
}

.script-group h3 img {
margin-right: 8px;
vertical-align: middle;
width: 40px;
height: 40px;
}*/

.script-group.say .text, .script-group.greeting .text {
background-color: #e6f5f2;
padding: 20px;
Expand All @@ -93,17 +75,17 @@
.script-group .text {
flex: 1;
color: #555;
/* border: 1px solid #eee;*/
padding: 10px 0;
/* padding: 20px;*/
/* border-radius: 15px;*/
border: 1px solid #eee;
padding: 20px;
border-radius: 15px;
}

.script-group.wait .text {
background-color: #fdf8ef;
padding: 20px;
border-radius: 15px;
color: black;
border: none;
}

.rich-text :not(:last-child) {
Expand Down Expand Up @@ -152,67 +134,6 @@
margin-top: 3px;
}


/* New in this prototype */


/*.hide {
display: none;
}

.script-section.complete sharpen-card {
opacity: 0.5;
}

.script-section.complete sharpen-card:hover {
opacity: 1;
}

.script-step {
display: flex;
align-items: center;
gap: 1rem;
}

.script-section + .script-section {
margin-top: var(--spacing-lg);
}

.script-step + .script-step {
margin-top: var(--spacing-md);
}

[class^="script-step-command"] {
width: 5rem;
color: white;
aspect-ratio: 1 / 1;
display: flex;
align-items: center;
border-radius: 100%;
text-transform: uppercase;
line-height: 1;
}

[class^="script-step-command"] > * {
flex: 1;
text-align: center;
}

.script-step-command--say { background-color: var(--color-evergreen); }
.script-step-command--hear { background-color: rgb(221, 173, 99) }
.script-step-command--repeat { background-color: rgb(29, 61, 131); }

[class^="script-step-content"] {
flex: 1;
}

.script-step-content--say {
font-size: var(--font-size-lg);
font-weight: bolder;
}

.script-step-content--hear { color: var(--color-gray-1); }*/

</style>
</head>

Expand Down Expand Up @@ -243,7 +164,7 @@ <h3>

<section class="script-group do">
<h3>
<!-- <div>Do</div> -->

</h3>
<div class="text rich-text">
<p>You are referring to the letter SOUND.</p>
Expand All @@ -264,7 +185,7 @@ <h3>

<section class="script-group do">
<h3>
<!-- <div>Do</div> -->

</h3>
<div class="text rich-text">
<p>Repeat the animation while reciting the instructions for forming the letter.</p>
Expand All @@ -283,7 +204,7 @@ <h3>

<section class="script-group do">
<h3>
<!-- <div>Do</div> -->

</h3>
<div class="text rich-text">
<p>Help your Learner put her finger on the dot on the model in the handwriting box.</p>
Expand All @@ -302,7 +223,7 @@ <h3>

<section class="script-group do">
<h3>
<!-- <div>Do</div> -->

</h3>
<div class="text rich-text">
<p>After your Learner has formed the entire letter, have her say its sound.</p>
Expand Down
110 changes: 110 additions & 0 deletions src/prototypes/storymaker/character.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
<!DOCTYPE html>
<html dir="ltr" lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=5.0" />
<title>Sharpen Prototype: Onboarding</title>
<link rel="stylesheet" href="/build/kezuri.css" />
<script type="module" src="/build/kezuri.esm.js"></script>
<script nomodule src="/build/kezuri.js"></script>

<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.1.1/animate.min.css" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.7.1/jquery.min.js" integrity="sha512-v2CJ7UaYy4JwqLDIrZUI/4hqeoQieOmAZNXBeQyjo21dadnwR+8ZaIJVT8EE2iyI61OV8e6M8PP2/4hpQINQ/g==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>

<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Lexend:[email protected]&display=swap" rel="stylesheet">

<link rel="stylesheet" href="storymaker.css" />
</head>
<body class="sharpen-background--white">

<div class="navbar container-fluid">
<a class="brand" href="upgrade.html"><img src="/build/assets/images/brand/sharpen_mark_evergreen.png" /></a>
</div>

<div class="sharpen-wizard-container storymaker">

<div class="story-instruction sharpen-mb-lg">
Let’s make a story!<br />
Pick a character.
</div>

<div class="story-choices">
<a href="generate.html" class="choice hide">
<sharpen-card border="none" padding="medium">
<img src="https://placehold.co/300x300" />
<div class="title">
fox
</div>
</sharpen-card>
</a>
<a href="generate.html" class="choice hide">
<sharpen-card border="none" padding="medium">
<img src="https://placehold.co/300x300" />
<div class="title">
bot
</div>
</sharpen-card>
</a>
<a href="generate.html" class="choice hide">
<sharpen-card border="none" padding="medium">
<img src="https://placehold.co/300x300" />
<div class="title">
car
</div>
</sharpen-card>
</a>
<a href="generate.html" class="choice hide">
<sharpen-card border="none" padding="medium">
<img src="https://placehold.co/300x300" />
<div class="title">
cat
</div>
</sharpen-card>
</a>
</div>

</div>


<script>

const synth = window.speechSynthesis;

function showChoice($el) {

console.log("showing choice...");

var animationClasses = "highlight animate__animated animate__bounceIn";
let utterThis = new SpeechSynthesisUtterance($el.text());
utterThis.rate = 1;
synth.speak(utterThis);

$el.removeClass("hide")
.addClass(animationClasses)
.on('animationend', function() {
$el.removeClass(animationClasses);
showChoice($el.next());
});
}

$(document).ready(function() {
console.log("starting sequence...");

var $choices = $(".choice");
$choices.addClass("hide");

let ourText = $(".story-instruction").text();
let utterThis = new SpeechSynthesisUtterance(ourText);
utterThis.rate = 0.85;
utterThis.onend = function() {
showChoice($choices.first());
}
synth.speak(utterThis);
});

</script>

</body>
</html>
89 changes: 89 additions & 0 deletions src/prototypes/storymaker/choice.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
<!DOCTYPE html>
<html dir="ltr" lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=5.0" />
<title>Sharpen Prototype: Onboarding</title>
<link rel="stylesheet" href="/build/kezuri.css" />
<script type="module" src="/build/kezuri.esm.js"></script>
<script nomodule src="/build/kezuri.js"></script>

<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.1.1/animate.min.css" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.7.1/jquery.min.js" integrity="sha512-v2CJ7UaYy4JwqLDIrZUI/4hqeoQieOmAZNXBeQyjo21dadnwR+8ZaIJVT8EE2iyI61OV8e6M8PP2/4hpQINQ/g==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>

<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Lexend:[email protected]&display=swap" rel="stylesheet">

<link rel="stylesheet" href="storymaker.css" />
</head>
<body class="sharpen-background--white">

<div class="navbar container-fluid">
<a class="brand" href="upgrade.html"><img src="/build/assets/images/brand/sharpen_mark_evergreen.png" /></a>
</div>

<div class="sharpen-wizard-container storymaker">

<div class="story-question-header">
<i class="sharpen-icon">question_mark</i>
</div>

<div class="story-options">
<a href="end.html" class="story-option hide">
<sharpen-card border="none" padding="large" class="sharpen-mb-md">
Sam ran to get the hen
</sharpen-card>
</a>

<a href="end.html" class="story-option hide">
<sharpen-card border="none" padding="large" class="sharpen-mb-md">
Sam sat on the hen
</sharpen-card>
</a>

<a href="end.html" class="story-option hide">
<sharpen-card border="none" padding="large" class="sharpen-mb-md">
Sam sat on the mat
</sharpen-card>
</a>
</div>

</div>

<script>

const synth = window.speechSynthesis;

function showChoice($el) {

var animationClasses = "highlight animate__animated animate__slideInRight";
let utterThis = new SpeechSynthesisUtterance($el.text());
utterThis.rate = 0.85;
utterThis.onend = function() {
$el.removeClass(animationClasses);
showChoice($el.next());
}
synth.speak(utterThis);

$el.removeClass("hide")
.addClass(animationClasses);
}

$(document).ready(function() {
var $options = $(".story-option");
$options.addClass("hide");

let ourText = "Now choose what happens next";
let utterThis = new SpeechSynthesisUtterance(ourText);
utterThis.rate = 0.85;
utterThis.onend = function() {
showChoice($options.first());
}
synth.speak(utterThis);
});

</script>

</body>
</html>
Loading

0 comments on commit bdfc400

Please sign in to comment.