Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

CSS improvements. formatting and externalized demo styles. #37

Merged
merged 3 commits into from

2 participants

This page is out of date. Refresh to see the latest.
Showing with 130 additions and 118 deletions.
  1. +37 −32 README.md
  2. +36 −0 example/css/demo.css
  3. +5 −42 example/index.html
  4. +52 −44 introjs.css
View
69 README.md
@@ -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>
````
@@ -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 (afshin.meh@gmail.com)
-
- 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 (afshin.meh@gmail.com)
+
+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.
View
36 example/css/demo.css
@@ -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;
+}
View
47 example/index.html
@@ -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="../minified/introjs.min.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>
View
96 introjs.css
@@ -1,89 +1,97 @@
.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-tooltip:before {
+ position: absolute;
+ top: -10px;
border: 5px solid white;
- content:'';
- border-top-color:transparent;
- border-right-color:transparent;
- border-bottom-color:white;
- border-left-color:transparent;
- position: absolute;
- top: -10px;
-
+ border-top-color: transparent;
+ border-right-color: transparent;
+ border-bottom-color: white;
+ border-left-color: transparent;
+ content: '';
}
+
.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;
}
Something went wrong with that request. Please try again.