Skip to content

Commit ea1f68b

Browse files
author
Nick Hwang
committed
Update docs
1 parent b5f7149 commit ea1f68b

16 files changed

Lines changed: 89 additions & 38 deletions

File tree

.hsdoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: "Tether"
22
description: "Marrying DOM elements for life"
3+
domain: "tether.io"
34
source: "coffee/*.coffee"
45
examples: "**/*.md"
5-
assets: "{deps/*,*.js,*.coffee,css/*.css,docs/css/*.css,docs/js/*,js,docs/welcome/*,examples/*}"
6-
domain: "tether.io"
6+
assets: "{dist/js/*.js,dist/css/*.css,docs/css/*.css,docs/js/*,js,docs/welcome/*,examples/*}"

docs/intro.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
<script src="tether.js"></script>
2-
<script src="js/markAttachment.js"></script>
1+
<script src="dist/js/tether.js"></script>
2+
<script src="docs/js/markAttachment.js"></script>
33
<script src="docs/js/intro.js"></script>
44
<link rel="stylesheet" href="docs/css/intro.css"></link>
55

docs/js/markAttachment.js

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
/* globals Tether */
2+
3+
'use strict';
4+
5+
Tether.modules.push({
6+
initialize: function initialize() {
7+
var _this = this;
8+
9+
this.markers = {};
10+
11+
['target', 'element'].forEach(function (type) {
12+
var el = document.createElement('div');
13+
el.className = _this.getClass('' + type + '-marker');
14+
15+
var dot = document.createElement('div');
16+
dot.className = _this.getClass('marker-dot');
17+
el.appendChild(dot);
18+
19+
_this[type].appendChild(el);
20+
21+
_this.markers[type] = { dot: dot, el: el };
22+
});
23+
},
24+
25+
position: function position(_ref) {
26+
var manualOffset = _ref.manualOffset;
27+
var manualTargetOffset = _ref.manualTargetOffset;
28+
29+
var offsets = {
30+
element: manualOffset,
31+
target: manualTargetOffset
32+
};
33+
34+
for (var type in offsets) {
35+
var offset = offsets[type];
36+
for (var side in offset) {
37+
var val = offset[side];
38+
var notString = typeof val !== 'string';
39+
if (notString || val.indexOf('%') === -1 && val.indexOf('px') === -1) {
40+
val += 'px';
41+
}
42+
43+
if (this.markers[type].dot.style[side] !== val) {
44+
this.markers[type].dot.style[side] = val;
45+
}
46+
}
47+
}
48+
49+
return true;
50+
}
51+
});

docs/welcome/browser-demo.html

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@
1010
<script type="text/javascript">try{Typekit.load();}catch(e){}</script>
1111

1212
<!-- Drop themes -->
13-
<link rel="stylesheet" href="/tether/css/tether-theme-arrows-dark.css" />
13+
<link rel="stylesheet" href="/dist/css/tether-theme-arrows-dark.css" />
1414

1515
<!-- Browser demo styles -->
16-
<link rel="stylesheet" href="/tether/docs/welcome/css/browser-demo.css" />
16+
<link rel="stylesheet" href="/docs/welcome/css/browser-demo.css" />
1717
</head>
1818
<body>
1919
<div class="browser-demo">
@@ -66,11 +66,11 @@
6666
</div>
6767

6868
<!-- Tether javascript -->
69-
<script src="/tether/tether.min.js"></script>
69+
<script src="/dist/js/tether.min.js"></script>
7070

7171
<!-- Welcome docs javascript -->
72-
<script src="/tether/docs/welcome/js/log.js"></script>
73-
<script src="/tether/docs/welcome/js/jquery.js"></script>
74-
<script src="/tether/docs/welcome/js/drop.js"></script>
72+
<script src="/docs/welcome/js/log.js"></script>
73+
<script src="/docs/welcome/js/jquery.js"></script>
74+
<script src="/docs/welcome/js/drop.js"></script>
7575
</body>
7676
</html>

docs/welcome/index.html

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@
1010
<script type="text/javascript">try{Typekit.load();}catch(e){}</script>
1111

1212
<!-- Tether themes -->
13-
<link rel="stylesheet" href="/tether/css/tether-theme-arrows-dark.css" />
13+
<link rel="stylesheet" href="/dist/css/tether-theme-arrows-dark.css" />
1414

1515
<!-- Welcome docs styles -->
16-
<link rel="stylesheet" href="/tether/docs/welcome/css/prism.css" />
17-
<link rel="stylesheet" href="/tether/docs/welcome/css/welcome.css" />
16+
<link rel="stylesheet" href="/docs/welcome/css/prism.css" />
17+
<link rel="stylesheet" href="/docs/welcome/css/welcome.css" />
1818

1919
<!-- OS icons -->
2020
<link rel="stylesheet" href="http://github.hubspot.com/os-icons/os-icons.css" />
@@ -105,7 +105,7 @@ <h2>Play with Tether</h2>
105105
<div class="section-scroll-copy-inner">
106106
<p class="example-paragraph">Interact with this demo.</p>
107107
<p>&nbsp;</p>
108-
<p>To learn more, check out our <a href="/tether">documentation</a>.</p>
108+
<p>To learn more, check out our <a href="/">documentation</a>.</p>
109109
</div>
110110
</div>
111111
</td></tr></table>
@@ -119,22 +119,22 @@ <h2>Play with Tether</h2>
119119
<h1>Tether Family</h1>
120120
<h2>These projects are all powered by Tether's positioning engine.</h2>
121121
<div class="projects-list">
122-
<a href="/drop/docs/welcome" class="project">
122+
<a href="//github.hubspot.com/drop/docs/welcome" class="project">
123123
<h1>Drop</h1>
124124
<span class="os-icon drop-icon"></span>
125125
<p>Create dropdowns, popovers, and more.</p>
126126
</a>
127-
<a href="/tooltip/docs/welcome" class="project">
127+
<a href="//github.hubspot.com/tooltip/docs/welcome" class="project">
128128
<h1>Tooltip</h1>
129129
<span class="os-icon tooltip-icon"></span>
130130
<p>Stylable tooltips built on Tether.</p>
131131
</a>
132-
<a href="/select/docs/welcome" class="project">
132+
<a href="//github.hubspot.com/select/docs/welcome" class="project">
133133
<h1>Select</h1>
134134
<span class="os-icon select-icon"></span>
135135
<p>Stylable select elements built on Tether.</p>
136136
</a>
137-
<a href="/shepherd/docs/welcome" class="project">
137+
<a href="//github.hubspot.com/shepherd/docs/welcome" class="project">
138138
<h1>Shepherd</h1>
139139
<span class="os-icon shepherd-icon"></span>
140140
<p>Guide your users through a tour of your app.</p>
@@ -194,13 +194,13 @@ <h2>Help us spread the word.</h2>
194194
</td></tr></table>
195195

196196
<!-- Tether javascript -->
197-
<script src="/tether/tether.min.js"></script>
197+
<script src="/dist/js/tether.min.js"></script>
198198

199199
<!-- Welcome docs javascript -->
200-
<script src="/tether/docs/welcome/js/log.js"></script>
201-
<script src="/tether/docs/welcome/js/jquery.js"></script>
202-
<script src="/tether/docs/welcome/js/drop.js"></script>
203-
<script src="/tether/docs/welcome/js/welcome.js"></script>
200+
<script src="/docs/welcome/js/log.js"></script>
201+
<script src="/docs/welcome/js/jquery.js"></script>
202+
<script src="/docs/welcome/js/drop.js"></script>
203+
<script src="/docs/welcome/js/welcome.js"></script>
204204

205205
<!-- HubSpot analytics -->
206206
<script type="text/javascript">

examples/content-visible/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
</div>
5151
</div>
5252

53-
<script src="../../tether.js"></script>
53+
<script src="/dist/js/tether.js"></script>
5454
<script>
5555
new Tether({
5656
element: '.element',

examples/dolls/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<link rel="stylesheet" href="./dolls.css" />
2-
<script src="../../tether.js"></script>
2+
<script src="/dist/js/tether.js"></script>
33
<script src="./dolls.js"></script>
44
<body>
55
<div class="scroll">

examples/element-scroll/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -441,7 +441,7 @@
441441
}
442442
</style>
443443

444-
<script src="../../tether.js"></script>
444+
<script src="/dist/js/tether.js"></script>
445445
<script>
446446
var pointer = document.querySelector('.pointer');
447447
var scroll = document.querySelector('.scroll');

examples/enable-disable/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
<div class="pad"></div>
1818
</div>
1919

20-
<script src="../../tether.js"></script>
20+
<script src="/dist/js/tether.js"></script>
2121
<script>
2222
var tether = new Tether({
2323
element: '.element',

examples/out-of-bounds/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
<div class="element"></div>
1919
<div class="target"></div>
2020

21-
<script src="../../tether.js"></script>
21+
<script src="/dist/js/tether.js"></script>
2222
<script>
2323
new Tether({
2424
element: '.element',

0 commit comments

Comments
 (0)