Skip to content

Commit 3cb80ae

Browse files
author
daniel-lundin
committed
More docs, api change to attention api
1 parent 586c134 commit 3cb80ae

File tree

6 files changed

+371
-192
lines changed

6 files changed

+371
-192
lines changed

dist/snabbt.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/css/custom.css

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,12 @@
55
}
66

77
.hero {
8+
position: relative;
89
margin: auto;
910
text-align: center;
1011
}
1112
.hero h1 {
13+
position: relative;
1214
display: inline-block;
1315
text-align: center;
1416
font-size: 6rem;
@@ -23,7 +25,7 @@
2325
font-style: italic;
2426
}
2527
.hero h3 i {
26-
margin-right: 10px;
28+
margin-right: 20px;
2729
}
2830

2931
.warning {
@@ -79,3 +81,27 @@ pre {
7981
section {
8082
padding-top: 45px;
8183
}
84+
85+
table {
86+
width: 100%;
87+
}
88+
table thead td {
89+
font-weight: bold;
90+
}
91+
92+
footer {
93+
background: rgb(0, 43, 54);
94+
color: white;
95+
padding-top: 10px;
96+
}
97+
98+
/* Some utiliy classes */
99+
@media screen and (max-width:600px) {
100+
.hide-mobile {
101+
display: none;
102+
}
103+
}
104+
105+
.extra-top-margin {
106+
margin-top: 20px;
107+
}

docs/docs.js

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,25 @@ $(function() {
9999
});
100100
});
101101

102+
// Attention example
103+
$("#attention-example-1").on('click', function() {
104+
$("#attention-example-1").snabbt("attention", {
105+
rotation: [0, 0, Math.PI/2],
106+
spring_constant: 1.9,
107+
spring_deacceleration: 0.9,
108+
});
109+
});
110+
111+
// Attention example
112+
$("#attention-example-2").on('click', function() {
113+
$("#attention-example-2").snabbt("attention", {
114+
position: [50, 0, 0],
115+
spring_constant: 2.4,
116+
spring_deacceleration: 0.9,
117+
});
118+
});
119+
120+
102121

103122

104123
// Scroll spy

0 commit comments

Comments
 (0)