Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Staging #36

Open
wants to merge 51 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
884eccd
add git ignore file
m4v15 Nov 14, 2017
0e1f136
add license
m4v15 Nov 14, 2017
6a6b5d2
add package files
m4v15 Nov 14, 2017
f578cc1
add public files
m4v15 Nov 14, 2017
0de9a59
add elm files
m4v15 Nov 14, 2017
60c569b
add responses and states
m4v15 Nov 15, 2017
bbd0025
refactor states and lines
m4v15 Nov 15, 2017
d4e5f25
adds basic styling to chat bot
Jen-Harris Nov 15, 2017
66642c9
add start of flow chart logic
m4v15 Nov 15, 2017
6678fbd
Merge pull request #19 from InFact-coop/styling
m4v15 Nov 15, 2017
0728ab4
Merge branch 'STAGING' into initial-code
m4v15 Nov 15, 2017
479bb39
Merge pull request #17 from InFact-coop/initial-code
Jen-Harris Nov 15, 2017
5473cfb
adds styling to closing button
Jen-Harris Nov 15, 2017
fb79e79
adds entry button to the chat and toggles between entry and exit
Jen-Harris Nov 15, 2017
c0af45c
adds unlock background image to the page
Jen-Harris Nov 15, 2017
05105d4
add waiting ...
m4v15 Nov 15, 2017
0375a6c
modularise view
m4v15 Nov 15, 2017
08c9d47
Merge pull request #22 from InFact-coop/more-logic
Jen-Harris Nov 15, 2017
5d541ed
Merge pull request #20 from InFact-coop/exit-button
m4v15 Nov 15, 2017
4fb2c87
adds fixed header and reduces space above buttons
Jen-Harris Nov 16, 2017
3845d42
Merge pull request #25 from InFact-coop/styling-tweaks
m4v15 Nov 16, 2017
035a442
add links
m4v15 Nov 16, 2017
d9533b1
Merge branch 'STAGING' into add-links
m4v15 Nov 16, 2017
cfa99be
add styling
m4v15 Nov 16, 2017
5b4b453
Merge pull request #26 from InFact-coop/add-links
m4v15 Nov 16, 2017
3550032
adds styling to intro page and toggles between pages
Jen-Harris Nov 16, 2017
2dd60c1
Merge branch 'STAGING' into intro-page
Jen-Harris Nov 16, 2017
4afca8d
add all the states to have the full conversation with the bot
m4v15 Nov 16, 2017
2fb7d03
scroll as the conversation happens
m4v15 Nov 16, 2017
1c0e66a
Merge pull request #27 from InFact-coop/intro-page
m4v15 Nov 16, 2017
f22c8e4
Merge branch 'STAGING' into full-flow
m4v15 Nov 16, 2017
d6126c1
Update style.css
m4v15 Nov 16, 2017
a22511e
Merge branch 'STAGING' into full-flow
m4v15 Nov 16, 2017
2080448
Merge branch 'STAGING' into scroooolll
m4v15 Nov 16, 2017
78dcf8c
adds new image of "lucy" and quote of her story
Jen-Harris Nov 16, 2017
0277ff5
make jen's recommended changes
m4v15 Nov 16, 2017
dcb2316
Merge pull request #31 from InFact-coop/unlock-quote
m4v15 Nov 16, 2017
d94e803
Merge branch 'STAGING' into full-flow
m4v15 Nov 16, 2017
61ad82c
Merge pull request #29 from InFact-coop/full-flow
Jen-Harris Nov 16, 2017
121b527
Merge branch 'full-flow' into scroooolll
m4v15 Nov 16, 2017
fd3ac98
Merge branch 'STAGING' into scroooolll
m4v15 Nov 16, 2017
d07c62a
scroll with thinking and add animation
m4v15 Nov 16, 2017
df73381
Merge pull request #30 from InFact-coop/scroooolll
m4v15 Nov 16, 2017
7123837
add silly animations
m4v15 Nov 16, 2017
2f3e2e9
bounce icon
m4v15 Nov 16, 2017
40de83d
adds a min height to elm landing page and welcome page to prevent los…
Jen-Harris Nov 17, 2017
56d490a
simplify animation
m4v15 Nov 17, 2017
b1d61c8
Merge pull request #32 from InFact-coop/animations
Jen-Harris Nov 17, 2017
37d690a
fixes google typo
Jen-Harris Nov 17, 2017
2b1da99
Merge branch 'STAGING' of https://github.com/InFact-coop/Unlock into …
Jen-Harris Nov 17, 2017
feeee57
Merge pull request #33 from InFact-coop/typo-fix
Jen-Harris Nov 17, 2017
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# elm-package generated files
elm-stuff
# elm-repl generated files
repl-temp-*

elm.js
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2017 John Whiles

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
19 changes: 19 additions & 0 deletions elm-package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"version": "1.0.0",
"summary": "an elm boilerplate",
"repository": "https://github.com/Jwhiles/elm-boiler-plate.git",
"license": "BSD3",
"source-directories": [
"src"
],
"exposed-modules": [],
"dependencies": {
"NoRedInk/elm-decode-pipeline": "3.0.0 <= v < 4.0.0",
"andrewMacmurray/elm-delay": "2.0.2 <= v < 3.0.0",
"elm-lang/core": "5.1.1 <= v < 6.0.0",
"elm-lang/dom": "1.1.1 <= v < 2.0.0",
"elm-lang/html": "2.0.0 <= v < 3.0.0",
"elm-lang/http": "1.0.0 <= v < 2.0.0"
},
"elm-version": "0.18.0 <= v < 0.19.0"
}
5 changes: 5 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 21 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"name": "elm-boiler-plate",
"version": "1.0.0",
"description": "a boiler plate for elm projects",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"dev": "elm-live src/Main.elm --output=public/elm.js --dir=public --open --debug --pushstate",
"build": "elm-make src/Main.elm --output=public/elm.js"
},
"repository": {
"type": "git",
"url": "git+https://github.com/Jwhiles/elm-boiler-plate.git"
},
"author": "John Whiles",
"license": "ISC",
"bugs": {
"url": "https://github.com/Jwhiles/elm-boiler-plate/issues"
},
"homepage": "https://github.com/Jwhiles/elm-boiler-plate#readme"
}
16 changes: 16 additions & 0 deletions public/assets/cross.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/assets/favicon.ico
Binary file not shown.
Binary file added public/assets/infoHub.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/assets/lucy.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file added public/assets/paul.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 15 additions & 0 deletions public/assets/speechBubble.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/assets/unlock-screenshot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/assets/woman.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
89 changes: 89 additions & 0 deletions public/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>Elm Boilerplate</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<script type="text/javascript" src="elm.js"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/tachyons/4.8.1/tachyons.min.css" />
<link rel="stylesheet" href="style.css" />
<link href="https://fonts.googleapis.com/css?family=Open+Sans" rel="stylesheet">
<!-- <link rel='shortcut icon' type='image/x-icon' href='/public/favicon.ico' /> -->
</head>

<body class="unlock-image cover">
<div class="fixed bottom-0 right-0 ma4">
<div class="w480 margin-0-auto">

<!-- code to the intro page!! -->
<div id="intro-page" class="pa4 clip">
<div class = "br3 bg-white vh-50 shadow-1-ns overflow-auto-ns min-height">
<div class="h-60 mb2 tc blue-background bg-white pa3 grey-font b f4">
<p class="white ma0 fw1"> Unlock Support Centre</p>
<div class="ba b--white-30 mt2"></div>
<img class="ma2 fw1 white f5 br-100 h3 w3 dib" src="./assets/lucy.png" alt="Image of Unlock assistant">
<p class="ma0 fw1 white f5"> Lucy </p>
<p class="ma0 fw1 white f7 tracked i pa2 ml4 mr4"> “ Hi I’m Lucy! I received a caution for possession of a controlled substance (Class A) in 2009. By mid-2010, I had applied for and been granted a visa which was valid for 10 years.”</p>
<div class="ba b--white-30 mt2"></div>
<p class="ma0 fw1 white f5 mt2"> How can I help? </p>
</div>
<div>
<div class="flex flex-wrap justify-around">
<button id="show-elm" class="purple-background bn white fw1 br-50 pa2 pl3 pr3 ma2 pointer"> Travel </button>
<button class="purple-background bn white fw1 br-50 pa2 pl3 pr3 ma2"> Disclosure </button>
<button class="purple-background bn white fw1 br-50 pa2 pl3 pr3 ma2"> Insurance </button>
<button class="purple-background bn white fw1 br-50 pa2 pl3 pr3 ma2"> Sexual Offences </button>
<button class="purple-background bn white fw1 br-50 pa2 pl3 pr3 ma2"> Spent or Unspent? </button>
<button class="purple-background bn white fw1 br-50 pa2 pl3 pr3 ma2"> Google Effect </button>
<button class="purple-background bn white fw1 br-50 pa2 pl3 pr3 ma2"> Criminal Record Check </button>
</div>

</div>

</div>

</div>
</div>

<!-- Code to intro page ends -->

<div class= "clip center pa4 measure" id="elm-landing-pad"></div>
<button class="ball blue-background bn white br-100 w3 h3 fr shadow-1-ns grow mr4 mt3 flex justify-center" id="show-welcome"><img src="./assets/speechBubble.svg" alt="open"></button>

<button class="blue-background bn white br-100 w3 h3 fr shadow-1-ns grow mr4 mt3 flex justify-center clip" id="hide-all"><img src="./assets/cross.svg" alt="close"></button>


</div>
</div>

<script type="text/javascript">

document.getElementById("show-welcome").addEventListener('click', function() {
// remove:
document.getElementById("intro-page").classList.toggle("clip")
document.getElementById("hide-all").classList.toggle("clip")
// add:
document.getElementById("show-welcome").classList.toggle("clip")
document.getElementById("show-welcome").classList.toggle("ball")
})

document.getElementById("show-elm").addEventListener('click', function() {
// remove:
document.getElementById("elm-landing-pad").classList.toggle("clip")
// add:
document.getElementById("intro-page").classList.toggle("clip")
})

document.getElementById("hide-all").addEventListener('click', function() {
document.getElementById("intro-page").classList.add("clip")
document.getElementById("elm-landing-pad").classList.add("clip")
document.getElementById("hide-all").classList.add("clip")
document.getElementById("show-welcome").classList.remove("clip")
})

Elm.Main.embed(document.getElementById("elm-landing-pad"))
</script>
</body>

</html>
112 changes: 112 additions & 0 deletions public/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
* {
font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

::-webkit-scrollbar {
display: none;
}

.grey-font {
color: #4a4a4a;
}

.light-grey-background {
background-color: #f3efef;
}

.purple-background {
background-color: #8f5b9c;
}

.blue-background {
background-color: #2396d2;
}

.br-50 {
border-radius: 50px;
}

.margin-0-auto {
margin: 0 auto;
}

.w480 {
width: 480px;
}

.unlock-image {
background-image: url('./assets/infoHub.png');
}

.h-60 {
height: 60%;
}

.h-10 {
height: 9rem;
}

.w416 {
min-width: 416px;
}

.wrap {
word-wrap: break-word;
}

@-webkit-keyframes thinking {
50% {
color: white;
}
}

@-webkit-keyframes growBot {
0% {
transform: scale(0, 0);
/*translate(-16rem);*/
}
100% {
transform: scale(1, 1);
/*translate(0rem);*/
}
}

@-webkit-keyframes growUser {
0% {
transform: scale(0, 0);
/*translate(16rem);*/
}
100% {
transform: scale(1, 1);
/*translate(0rem);*/
}
}

.thinking {
-webkit-animation: thinking 0.8s infinite;
}

.grow_bot_speech {
-webkit-animation: growBot 0.4s;
}

.grow_user_speech {
-webkit-animation: growUser 0.4s;
}

.ball {
-webkit-animation: bounce 0.3s infinite alternate;
}

@-webkit-keyframes bounce {
from {
transform: translateY(0px);
}
to {
transform: translateY(-30px);
}
}

.min-height{
min-height: 443.5px;
}
24 changes: 24 additions & 0 deletions src/Main.elm
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
module Main exposing (..)

import Delay
import Html exposing (..)
import Models exposing (..)
import Task
import Time
import Update exposing (..)
import View exposing (..)


main : Program Never Model Msg
main =
Html.program
{ init = init
, view = view
, update = update
, subscriptions = subscriptions
}


init : ( Model, Cmd Msg )
init =
( model, Delay.after 500 Time.millisecond (ChangeState model.currentStateNumber) )
Loading