-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a help page to facilitate onboarding
- Loading branch information
Showing
9 changed files
with
199 additions
and
42 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
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
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,27 @@ | ||
body { | ||
font-family: 'Open Sans'; | ||
padding: .4em 2em; | ||
} | ||
|
||
h1 { | ||
font-family: 'Raleway'; | ||
} | ||
|
||
footer { | ||
position: absolute; | ||
bottom: 2em; | ||
right: 2em; | ||
} | ||
|
||
b { | ||
color: #6A24FA; | ||
} | ||
|
||
.step { | ||
opacity: 0; | ||
-webkit-transition: opacity .2s ease-out; | ||
} | ||
|
||
.step--0 { | ||
opacity: 1; | ||
} |
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,57 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<title>Linear help</title> | ||
<link href="../../assets/styles/font-awesome.min.css" rel="stylesheet" type="text/css"/> | ||
<link href="../../assets/styles/common.css" rel="stylesheet" type="text/css"/> | ||
<link href="help.css" rel="stylesheet" type="text/css"/> | ||
</head> | ||
<body> | ||
<div class="help-wrapper"> | ||
<div class="help-wrapper__close close"><i class="fa fa-times-circle"></i></div> | ||
|
||
<header> | ||
<h1>Welcome to Linear</h1> | ||
<p>We're thrilled to have you with us. Linear will help you achieve pixel-perfect | ||
designs without getting in your way.</p> | ||
</header> | ||
|
||
<section class="step step--0"> | ||
<p>In Linear, you work with <b>rulers</b>. Here is one. Go ahead, grab it around :-)</p> | ||
</section> | ||
|
||
<section class="step step--1"> | ||
<p>To manage your rulers, have a look at the <span class="lr">lr<span> icon in the tray bar, | ||
located on the top right corner of your screen. From there, you can create new rulers. | ||
You can create as many rulers as you want.</p> | ||
</section> | ||
|
||
<section class="step step--2"> | ||
<p>Shortcuts are really useful! To create a new ruler, press ^⌘R. To hide/show existing | ||
rulers, ^⌘T (toggle). To close a ruler, ⌘W.</p> | ||
</section> | ||
|
||
<section class="step step--3"> | ||
<p>Right-clicking on a ruler lets you duplicate it. It keeps the ruler's position and size.</p> | ||
</section> | ||
|
||
<section class="step step--4"> | ||
<p>In the settings window (available from clicking the lr icon in the tray bar,) you can change | ||
the displayed unit to either px or em.</p> | ||
</section> | ||
|
||
<section class="step step--5"> | ||
<p>Thanks for your time. We hope you enjoy using Linear!</p> | ||
</section> | ||
|
||
<footer> | ||
<div class="btn next-step"> | ||
<div class="btn__inner">Next</div> | ||
</div> | ||
</footer> | ||
|
||
</div> | ||
<script src="help.js" charset="utf-8"></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,27 @@ | ||
'use strict'; | ||
|
||
const ipc = require('electron').ipcRenderer; | ||
const remote = require('electron').remote; | ||
const browserWindow = remote.getCurrentWindow(); | ||
const dataStore = require('../../data-store'); | ||
|
||
// When the help menu is loaded, we create a ruler so the user can get a feel | ||
// of how to use them. | ||
ipc.send('create-ruler', { | ||
x: browserWindow.getPosition()[0] + 274, | ||
y: browserWindow.getPosition()[1] + 250 | ||
}); | ||
|
||
let currentStep = 0; | ||
document.querySelector('.help-wrapper__close').addEventListener('click', () => browserWindow.close()); | ||
document.querySelector('.next-step').addEventListener('click', () => { | ||
document.querySelector(`.step--${++currentStep}`).style.opacity = 1; | ||
|
||
if (currentStep === 5) { | ||
document.querySelector('.next-step .btn__inner').textContent = 'Got it!'; | ||
document.querySelector('.next-step').addEventListener('click', () => { | ||
browserWindow.close(); | ||
dataStore.saveSettings('tutorialShown', true); | ||
}); | ||
} | ||
}); |
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
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
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
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,42 @@ | ||
@font-face { | ||
font-family: 'Open Sans'; | ||
font-style: normal; | ||
font-weight: 700; | ||
src: local('Open Sans Bold'), local('OpenSans-Bold'), url(../../assets/fonts/OpenSans-Bold.ttf) format('truetype'); | ||
} | ||
|
||
@font-face { | ||
font-family: 'Open Sans'; | ||
font-style: normal; | ||
font-weight: 300; | ||
src: local('Open Sans Light'), local('OpenSans-Light'), url(../../assets/fonts/OpenSans-Light.ttf) format('truetype'); | ||
} | ||
|
||
@font-face { | ||
font-family: 'Raleway'; | ||
font-style: normal; | ||
font-weight: 300; | ||
src: local('Raleway Light'), local('Raleway-Light'), url(../../assets/fonts/Raleway-Light.ttf) format('truetype'); | ||
} | ||
|
||
.close { | ||
position: absolute; | ||
right: 1.35em; | ||
top: 1.1em; | ||
color: #888; | ||
height: 1.4em; | ||
font-size: 1.8em; | ||
cursor: pointer; | ||
} | ||
|
||
.btn { | ||
background-color: #6A24FA; | ||
padding: 1em 2em; | ||
color: white; | ||
cursor: pointer; | ||
display: inline-block; | ||
} | ||
|
||
.btn__inner { | ||
font-family: 'Open Sans'; | ||
} |