kamrify commited on
Commit
6f9d983
·
1 Parent(s): 341b84c

More examples and docs

Browse files
Files changed (3) hide show
  1. demo/styles/demo.scss +1 -9
  2. index.html +26 -0
  3. src/core/element.js +8 -0
demo/styles/demo.scss CHANGED
@@ -1,14 +1,6 @@
1
  @import "./base";
2
  @import "../../src/sholo";
3
 
4
- $container-width: 500px !default;
5
- $logo-font-size: 55px !default;
6
- $button-font-size: 13px !default;
7
- $dark-button-bg: #2d2d2d !default;
8
- $dark-button-text: #ffffff !default;
9
- $light-button-bg: #f5f5f5 !default;
10
- $light-button-text: #2d2d2d !default;
11
-
12
  img.emoji {
13
  height: 1em;
14
  width: 1em;
@@ -66,7 +58,7 @@ section {
66
  padding: 10px;
67
 
68
  h1 {
69
- font-size: $logo-font-size;
70
 
71
  .emoji {
72
  font-size: 45px;
 
1
  @import "./base";
2
  @import "../../src/sholo";
3
 
 
 
 
 
 
 
 
 
4
  img.emoji {
5
  height: 1em;
6
  width: 1em;
 
58
  padding: 10px;
59
 
60
  h1 {
61
+ font-size: 55px;
62
 
63
  .emoji {
64
  font-size: 45px;
index.html CHANGED
@@ -277,11 +277,37 @@ const lastActiveElement = driver.getLastHighlightedElement();
277
  activeElement.getScreenCoordinates(); // Gets screen co-ordinates of the active element
278
  activeElement.hidePopover(); // Hide the popover
279
  activeElement.showPopover(); // Show the popover
 
 
280
  </code></pre>
281
  </div>
 
282
  </section>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
283
  </div>
284
 
 
 
285
  <script src="//twemoji.maxcdn.com/2/twemoji.min.js?2.5"></script>
286
  <script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js"></script>
287
 
 
277
  activeElement.getScreenCoordinates(); // Gets screen co-ordinates of the active element
278
  activeElement.hidePopover(); // Hide the popover
279
  activeElement.showPopover(); // Show the popover
280
+
281
+ activeElement.getNode(); // Gets the DOM Element behind this element
282
  </code></pre>
283
  </div>
284
+ <p class="top-20">You can use a variety of options to achieve whatever you may want. I have some plans on improving it further, make sure to keep an eye on the <a href="https://github.com/kamranahmedse/driver.js" target="_blank">github page</a></p>
285
  </section>
286
+ <hr class="hr__fancy">
287
+ <div class="section__example">
288
+ <h4>Contributing</h4>
289
+ <p>You can find the contribution instructions on the <a href="https://github.com/kamranahmedse/driver.js" target="_blank">github page</a>. Feel free to submit an issue, create a pull request or spread the word</p>
290
+ </div>
291
+ <hr class="hr__fancy">
292
+ <div class="section__example">
293
+ <p>A product by <a href="http://twitter.com/kamranahmedse" target="_blank">Kamran</a> produced out of boredom and frustration in cold Berlin after he gave up on trying to find a perfect solution to integrate journey introduction and overlays.</p>
294
+ <a href="https://twitter.com/kamranahmedse?ref_src=twsrc%5Etfw"
295
+ class="twitter-follow-button mr-3"
296
+ data-show-screen-name="false"
297
+ data-size="large"
298
+ target="_blank"
299
+ data-show-count="true">Follow @kamranahmedse</a>
300
+
301
+ <a class="github-button" href="https://github.com/kamranahmedse"
302
+ data-size="large"
303
+ target="_blank"
304
+ data-show-count="true"
305
+ aria-label="Follow @kamranahmedse on GitHub">Follow</a>
306
+ </div>
307
  </div>
308
 
309
+ <script async src="//platform.twitter.com/widgets.js" charset="utf-8"></script>
310
+ <script async defer src="//buttons.github.io/buttons.js"></script>
311
  <script src="//twemoji.maxcdn.com/2/twemoji.min.js?2.5"></script>
312
  <script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js"></script>
313
 
src/core/element.js CHANGED
@@ -173,6 +173,14 @@ export default class Element {
173
  }
174
  }
175
 
 
 
 
 
 
 
 
 
176
  hidePopover() {
177
  if (!this.popover) {
178
  return;
 
173
  }
174
  }
175
 
176
+ /**
177
+ * Gets the DOM Element behind this element
178
+ * @returns {Node|HTMLElement|*}
179
+ */
180
+ getNode() {
181
+ return this.node;
182
+ }
183
+
184
  hidePopover() {
185
  if (!this.popover) {
186
  return;