Skip to content

Commit

Permalink
CSS improvements. formatting and externalized demo styles.
Browse files Browse the repository at this point in the history
Edit, related to usablica#37
  • Loading branch information
afshinm committed Mar 19, 2013
2 parents 8c0b160 + 6eadc4a commit f6385d9
Show file tree
Hide file tree
Showing 4 changed files with 127 additions and 114 deletions.
69 changes: 37 additions & 32 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
Intro.js
========
# Intro.js

Better introductions for websites and features with a step-by-step guide for your projects.
> Better introductions for websites and features with a step-by-step guide for your projects.
##How to use

## How to use
Intro.js can be added to your site in three simple steps:

**1)** Include `intro.js` and `introjs.css` (or the minified version for production) in your page.

**2)** Add `data-intro` and `data-step` to your HTML elements.

For example:

```html
<a href='http://google.com/' data-intro='Hello step one!' data-step='1'></a>
````
Expand All @@ -19,54 +21,57 @@ For example:
introJs().start();
````

Optionally, pass one parameter to `introJs` function to limit the presentation section, for example `introJs(".introduction-farm").start();` runs the introduction only for elements with `class='introduction-farm'`.
Optionally, pass one parameter to `introJs` function to limit the presentation section.

**For example** `introJs(".introduction-farm").start();` runs the introduction only for elements with `class='introduction-farm'`.

<p align="center"><img src="http://usablica.github.com/intro.js/img/introjs-demo.jpg"></p>

##Using with:

###Rails
## Using with:

### Rails
If you are using the rails asset pipeline you can use the [introjs-rails](https://github.com/heelhook/intro.js-rails) gem.

###Yii framework
### Yii framework
You can simply use this project for Yii framework: https://github.com/moein7tl/Yii-IntroJS

##Roadmap
## Roadmap
- More browser compatibility
- Adding ability to define tooltip position in each step, `top`, `left,` `right` and `bottom`
- Fix overlay layer bug while using it in wide monitors and `document` object
- Change `Next` and `Skip` buttons
- Add complete introduction callback

##History

###v0.1.0 - March 16, 2013
First version
## Release History
* 2013-03-16 v0.1.0 First commit.

## Author
**Afshin Mehrabani**

##Main Contributors
- [Afshin Mehrabani](http://afshinm.name/)
+ [https://github.com/afshinm](https://github.com/afshinm)
- [http://afshinm.name/](http://afshinm.name/)

other contributors: https://github.com/usablica/intro.js/contributors
[Other contributors](https://github.com/usablica/intro.js/graphs/contributors)

##Support/Discussion

## Support/Discussion
- [Google Group](https://groups.google.com/d/forum/introjs)

##License

Copyright (C) 2012 Afshin Mehrabani ([email protected])
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.

## License
> Copyright (C) 2012 Afshin Mehrabani ([email protected])

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.
36 changes: 36 additions & 0 deletions example/css/demo.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
body {
padding-top: 20px;
font-family: "Myriad Pro", Verdana, Arial, Tahoma;
padding-bottom: 40px;
}

/* Custom container */
.container-narrow {
margin: 0 auto;
max-width: 700px;
}
.container-narrow > hr {
margin: 30px 0;
}

/* Main marketing message and sign up button */
.jumbotron {
margin: 60px 0;
text-align: center;
}
.jumbotron h1 {
font-size: 72px;
line-height: 1;
}
.jumbotron .btn {
font-size: 21px;
padding: 14px 24px;
}

/* Supporting marketing content */
.marketing {
margin: 60px 0;
}
.marketing p + h4 {
margin-top: 28px;
}
47 changes: 5 additions & 42 deletions example/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,50 +7,13 @@
<meta name="description" content="Intro.js -Better introductions for websites and features with a step-by-step guide for your projects.">
<meta name="author" content="Afshin Mehrabani (@afshinmeh) in usabli.ca group">

<!-- Le styles -->
<link href="css/bootstrap.css" rel="stylesheet">
<!-- styles -->
<link href="css/bootstrap.min.css" rel="stylesheet">
<link href="css/demo.css" rel="stylesheet">

<!-- Add IntroJs style -->
<link href="../introjs.css" rel="stylesheet">
<style type="text/css">
body {
padding-top: 20px;
font-family: "Myriad Pro", Verdana, Arial, Tahoma;
padding-bottom: 40px;
}

/* Custom container */
.container-narrow {
margin: 0 auto;
max-width: 700px;
}
.container-narrow > hr {
margin: 30px 0;
}

/* Main marketing message and sign up button */
.jumbotron {
margin: 60px 0;
text-align: center;
}
.jumbotron h1 {
font-size: 72px;
line-height: 1;
}
.jumbotron .btn {
font-size: 21px;
padding: 14px 24px;
}

/* Supporting marketing content */
.marketing {
margin: 60px 0;
}
.marketing p + h4 {
margin-top: 28px;
}
</style>
<link href="css/bootstrap-responsive.css" rel="stylesheet">

<link href="css/bootstrap-responsive.min.css" rel="stylesheet">
</head>

<body>
Expand Down
89 changes: 49 additions & 40 deletions introjs.css
Original file line number Diff line number Diff line change
@@ -1,113 +1,122 @@
.introjs-overlay {
position: absolute;
z-index: 999999;
background-color:rgb(0, 0, 0);
background-color: #000;
opacity: 0;
-webkit-transition: all 0.3s ease-out;
-moz-transition: all 0.3s ease-out;
-o-transition: all 0.3s ease-out;
-ms-transition: all 0.3s ease-out;
transition: all 0.3s ease-out;
-moz-transition: all 0.3s ease-out;
-ms-transition: all 0.3s ease-out;
-o-transition: all 0.3s ease-out;
transition: all 0.3s ease-out;
}

.introjs-showElement {
z-index: 9999999;
position: relative;
z-index: 9999999;
}

.introjs-helperLayer {
background-color: rgba(255, 255, 255, 0.9);
z-index: 9999998;
position: absolute;
z-index: 9999998;
background-color: rgba(255,255,255,.9);
border: 1px solid rgba(0,0,0,.5);
border-radius: 4px;
border: 1px solid rgba(0, 0, 0, 0.5);
box-shadow: 0px 2px 15px rgba(0,0,0,0.4);
box-shadow: 0 2px 15px rgba(0,0,0,.4);
-webkit-transition: all 0.3s ease-out;
-moz-transition: all 0.3s ease-out;
-o-transition: all 0.3s ease-out;
-ms-transition: all 0.3s ease-out;
transition: all 0.3s ease-out;
-moz-transition: all 0.3s ease-out;
-ms-transition: all 0.3s ease-out;
-o-transition: all 0.3s ease-out;
transition: all 0.3s ease-out;
}

.introjs-helperNumberLayer {
position: absolute;
top: -16px;
left: -16px;
z-index: 9999999999 !important;
width: 20px;
padding: 2px;
background: #ff3019; /* Old browsers */
background: -moz-linear-gradient(top, #ff3019 0%, #cf0404 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#ff3019), color-stop(100%,#cf0404)); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(top, #ff3019 0%,#cf0404 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, #ff3019 0%,#cf0404 100%); /* Opera 11.10+ */
background: -ms-linear-gradient(top, #ff3019 0%,#cf0404 100%); /* IE10+ */
background: linear-gradient(to bottom, #ff3019 0%,#cf0404 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ff3019', endColorstr='#cf0404',GradientType=0 ); /* IE6-9 */ color: white;
position: absolute;
border-radius: 50%;
font-family: Arial, verdana, tahoma;
font-size: 13px;
font-weight: bold;
color: white;
text-align: center;
width: 20px;
text-shadow: 1px 1px 1px rgba(0,0,0,.3);
background: #ff3019; /* Old browsers */
background: -webkit-linear-gradient(top, #ff3019 0%, #cf0404 100%); /* Chrome10+,Safari5.1+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #ff3019), color-stop(100%, #cf0404)); /* Chrome,Safari4+ */
background: -moz-linear-gradient(top, #ff3019 0%, #cf0404 100%); /* FF3.6+ */
background: -ms-linear-gradient(top, #ff3019 0%, #cf0404 100%); /* IE10+ */
background: -o-linear-gradient(top, #ff3019 0%, #cf0404 100%); /* Opera 11.10+ */
background: linear-gradient(to bottom, #ff3019 0%, #cf0404 100%); /* W3C */
border: 3px solid white;
box-shadow: 0px 2px 5px rgba(0,0,0,0.4);
text-shadow: 1px 1px 1px rgba(0,0,0,0.3);
filter: progid:DXImageTransform.Microsoft.Shadow(direction=135,strength=2,color=ff0000);
left: -16px;
top: -16px;
border-radius: 50%;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff3019', endColorstr='#cf0404', GradientType=0); /* IE6-9 */
filter: progid:DXImageTransform.Microsoft.Shadow(direction=135, strength=2, color=ff0000); /* IE10 text shadows */
box-shadow: 0 2px 5px rgba(0,0,0,.4);
}

.introjs-arrow {
border: 5px solid white;
content:'';
position: absolute;
}
.introjs-arrow.top{
.introjs-arrow.top {
top: -10px;
border-top-color:transparent;
border-right-color:transparent;
border-bottom-color:white;
border-left-color:transparent;
}
.introjs-arrow.right{
.introjs-arrow.right {
right: -10px;
top: 10px;
border-top-color:transparent;
border-right-color:transparent;
border-bottom-color:transparent;
border-left-color:white;
}
.introjs-arrow.bottom{
.introjs-arrow.bottom {
bottom: -10px;
border-top-color:white;
border-right-color:transparent;
border-bottom-color:transparent;
border-left-color:transparent;
}
.introjs-arrow.left{
.introjs-arrow.left {
left: -10px;
top: 10px;
border-top-color:transparent;
border-right-color:white;
border-bottom-color:transparent;
border-left-color:transparent;
}

.introjs-tooltip {
position: absolute;
padding: 10px;
background-color: white;
border-radius: 3px;
box-shadow: 0px 1px 10px rgba(0,0,0,0.4);
box-shadow: 0 1px 10px rgba(0,0,0,.4);
-webkit-transition: all 0.1s ease-out;
-moz-transition: all 0.1s ease-out;
-o-transition: all 0.1s ease-out;
-ms-transition: all 0.1s ease-out;
transition: all 0.1s ease-out;
-moz-transition: all 0.1s ease-out;
-ms-transition: all 0.1s ease-out;
-o-transition: all 0.1s ease-out;
transition: all 0.1s ease-out;
}

.introjs-tooltipbuttons {
font-size: 10px;
text-align: right;
}

.introjs-tooltipbuttons .introjs-skipbutton {
margin-right: 5px;
color: gray;
}

.introjs-tooltipbuttons .introjs-nextbutton {
font-size: 11px;
font-weight: bold;
color: #2071d3;
font-size: 11px;
}

0 comments on commit f6385d9

Please sign in to comment.