Skip to content

Commit c44a080

Browse files
committed
Merge branch 'master' into gtm-cookies
2 parents 841b250 + bd4b8d4 commit c44a080

File tree

13 files changed

+108
-137
lines changed

13 files changed

+108
-137
lines changed

_assets/css/_styles.scss

Lines changed: 59 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -337,6 +337,37 @@ nav.TK-Nav, .PRGS-PairNav {
337337
margin-top: -95px;
338338
}
339339

340+
// Ribbon Announcement
341+
342+
.SiteRibbon-text,
343+
.SiteRibbon-CTA {
344+
display: inline;
345+
vertical-align: middle;
346+
}
347+
348+
.SiteRibbon {
349+
margin-top: -95px;
350+
top: 0;
351+
position: relative;
352+
padding: 20px 0 18px 0;
353+
font-family: FaktSlabPro,Arial,Helvetica,sans-serif;
354+
font-weight: 300;
355+
font-size: 16px;
356+
line-height: 1.2;
357+
text-align: center;
358+
z-index: 50000;
359+
color: #000;
360+
background-color: #ffda3f;
361+
362+
.container {
363+
position: relative;
364+
}
365+
366+
+ nav.TK-Nav, + .PRGS-PairNav {
367+
margin-top: 0;
368+
}
369+
}
370+
340371
/* Main Menu */
341372

342373
$text-color: #4a4e52;
@@ -1540,7 +1571,7 @@ $border-color: #d9d9d9;
15401571
}
15411572

15421573
&.affix {
1543-
margin-top: 125px;
1574+
margin-top: 85px;
15441575
position: fixed;
15451576
top: 0;
15461577
z-index: 1015;
@@ -2708,6 +2739,10 @@ $callout-bg: #d7dfe3;
27082739

27092740
// md size
27102741
@media (min-width: 992px) {
2742+
.SiteRibbon {
2743+
font-size: 20px;
2744+
}
2745+
27112746
.live-samples .callout-tabs {
27122747
&::after {
27132748
display: none;
@@ -3193,10 +3228,18 @@ span.all-components-expanded-icon {
31933228
nav.TK-Nav {
31943229
position: sticky;
31953230
position: -webkit-sticky;
3196-
top: -40px;
3231+
top: 0;
31973232
transform: translateZ(0);
31983233
-webkit-transform: translateZ(0);
31993234
}
3235+
3236+
.SiteRibbon {
3237+
position: sticky;
3238+
3239+
+ nav.TK-Nav, + .PRGS-PairNav {
3240+
top: 64px;
3241+
}
3242+
}
32003243
}
32013244

32023245
@media (min-width: 768px) { /* Styles for width >= 768px */
@@ -3209,6 +3252,10 @@ span.all-components-expanded-icon {
32093252
display: none;
32103253
}
32113254

3255+
.scroll & {
3256+
display: none;
3257+
}
3258+
32123259
.main-menu {
32133260
float: right;
32143261
position: relative;
@@ -4631,23 +4678,24 @@ div#sidetoc {
46314678
}
46324679
}
46334680

4634-
div{
4635-
&.k-content {
4636-
&.k-state-active{
4637-
.copy-code-btn {
4638-
padding:7px 10px;
4639-
}
4681+
div {
4682+
&.k-content {
4683+
&.k-state-active {
4684+
.copy-code-btn {
4685+
padding: 7px 10px;
4686+
}
4687+
}
46404688
}
4641-
}
46424689
}
4690+
46434691
.copy-code-btn {
46444692
position: absolute;
46454693
top: 0;
46464694
right: 0;
4647-
padding:10px;
4695+
padding: 10px;
46484696
z-index: 100;
46494697

46504698
&:hover {
4651-
cursor: pointer;
4699+
cursor: pointer;
46524700
}
46534701
}

_assets/css/api.scss

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ article.api-reference {
4747
left: 14%;
4848
right: 0;
4949
background-color: #fff;
50-
top: 100px;
50+
top: 45px;
5151
height: 47px;
5252
width: 100%;
5353
max-width: 100%;
@@ -147,6 +147,13 @@ article.api-reference {
147147
}
148148
}
149149

150+
151+
@media (min-width: 1240px) {
152+
.api-breadcrumbs-container {
153+
top: 60px;
154+
}
155+
}
156+
150157
@media (min-width: 768px) and (max-width: 992px) {
151158
.links-container {
152159
margin-left: 20%;

_assets/js/api-toc.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,15 @@ $(function () {
77
e.preventDefault();
88
animateScrolling(this.hash);
99
};
10-
10+
11+
// Detect hash on page load and readjust scroll offset
12+
var initialHash = window.location.hash;
13+
if (!!initialHash) {
14+
setTimeout(function(){
15+
animateScrolling(initialHash);
16+
}, 100);
17+
}
18+
1119
$("#markdown-toc")
1220
.on("click", "a", function () {
1321
$(".section > ul").hide();

_assets/js/code-snippet.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,7 @@ $(function () {
159159

160160
var codeSampleMapper = {
161161
'C#': 'cs',
162+
'F#': 'fs',
162163
'VB.NET': 'vb',
163164
'VB': 'vb',
164165
'JavaScript': 'js',

_assets/js/feedback.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,9 +135,10 @@ $(document).ready(function () {
135135
$('.feedback .feedback-send-data-button').on('click', function () {
136136
$(feedbackProps.feedbackMoreInfoSelector).addClass('hide');
137137

138+
var endpoint = "https://baas.kinvey.com/rpc/" + kinveyAppKey + "/custom/saveFeedback"
138139
if (getFeedbackComment()) {
139140
$.ajax({
140-
url: "https://baas.kinvey.com/rpc/kid_Hk57KwIFf/custom/saveFeedback",
141+
url: endpoint,
141142
method: "POST",
142143
dataType: "json",
143144
contentType: "application/json; charset=utf-8",

_assets/js/ribbon.js

Lines changed: 0 additions & 32 deletions
This file was deleted.

_assets/js/side-nav.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ function setSideNavPosition() {
8787
var $window = $(window);
8888
var windowHeight = $window.height();
8989
var scrollFold = $window.scrollTop() + windowHeight;
90-
var topNavigationHeight = $('nav.TK-Nav').height() || ($('.PRGS-Nav').height() + $('.PRGS-Bar').height());
90+
var topNavigationHeight = $('.SiteRibbon').outerHeight() + ($('nav.TK-Nav').height() || ($('.PRGS-Nav').height() + $('.PRGS-Bar').height()));
9191
var progressBarHeight = $('aside.TK-Hat').height() || $('.PRGS-Bar').height();
9292

9393
var top = window.scrollY > 0 ? topNavigationHeight - progressBarHeight : topNavigationHeight;

_assets/js/toc.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,15 @@ $(function() {
5252
e.preventDefault();
5353
animateScrolling(this.hash);
5454
};
55-
55+
56+
// Detect hash on page load and readjust scroll offset
57+
var initialHash = window.location.hash;
58+
if (!!initialHash) {
59+
setTimeout(function(){
60+
animateScrolling(initialHash);
61+
}, 100);
62+
}
63+
5664
// animated scroll
5765
// Exclude the app inside the div.theme-preview since it's not in an <iframe/>,
5866
// leading to unwanted scrollTop when clicking on links inside the app.

_buildApi/BuildAPI/docfx-tmpl/src/styles/docfx.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ body {
1818
nav.TK-Nav {
1919
position: sticky;
2020
position: -webkit-sticky;
21-
top: -40px;
21+
top: 0;
2222
transform: translateZ(0);
2323
-webkit-transform: translateZ(0);
2424
}

_includes/announcement.html

Lines changed: 7 additions & 77 deletions
Original file line numberDiff line numberDiff line change
@@ -1,79 +1,9 @@
1-
<style>
2-
.SiteRibbon {
3-
position: relative;
4-
padding: 20px 0 18px 0;
5-
font-family: FaktSlabPro,Arial,Helvetica,sans-serif;
6-
font-weight: 300;
7-
font-size: 16px;
8-
line-height: 1.2;
9-
text-align: center;
10-
color: #000;
11-
background-color: #ffda3f;
12-
}
13-
14-
.SiteRibbon.is-hidden {
15-
display: none;
16-
}
17-
18-
.SiteRibbon .container {
19-
position: relative;
20-
}
21-
.SiteRibbon-text,
22-
.SiteRibbon-CTA {
23-
display: inline-block;
24-
vertical-align: middle;
25-
}
26-
27-
.SiteRibbon-CTA a {
28-
cursor: pointer;
29-
}
30-
31-
.SiteRibbon-x {
32-
position: absolute;
33-
top: 50%;
34-
right: 15px;
35-
width: 44px;
36-
padding: 0;
37-
border: 0;
38-
font-family: FaktSlabPro,Arial,Helvetica,sans-serif;
39-
font-weight: 300;
40-
font-size: 30px;
41-
line-height: 1.2;
42-
background: none;
43-
cursor: pointer;
44-
outline: 0;
45-
opacity: 1;
46-
margin-top: -.5em;
47-
}
48-
49-
.SiteRibbon-x:hover {
50-
opacity: .7;
51-
}
52-
53-
@media (min-width: 992px) {
54-
font-size: 20px;
55-
}
56-
</style>
57-
58-
<div class="SiteRibbon is-hidden" id="announcement">
59-
<div class="container">
60-
<div class="u-pr5">
61-
<span class="SiteRibbon-text u-fs20">
62-
Say ‘no’ to Ugly Apps. Modern UI with new React, Angular and Vue components.
63-
<a href="https://www.telerik.com/support/whats-new/kendo-ui?utm_medium=telerik&utm_source=yellow-ribbon&utm_campaign=kendo-ui-awareness-r118release"><strong>See our New Release!</strong></a>
64-
</span>
65-
</div>
66-
<button type="button" class="SiteRibbon-x">×</button>
67-
</div>
68-
</div>
69-
70-
{% javascript "ribbon" %}
71-
1+
<div class="SiteRibbon js-r1dt" style="display:none;"><div class="container">
2+
<span class="SiteRibbon-text">
3+
{{page.announcement}}
4+
</span></div></div>
725
<script>
73-
$(".SiteRibbon-x")
74-
.click(function() {
75-
$(document.documentElement).addClass("no-announcement");
76-
$(this).closest(".SiteRibbon").slideUp();
77-
});
78-
$(document.documentElement).toggleClass("no-announcement", $(".SiteRibbon").hasClass("is-hidden"));
6+
$(document).ready(function(){
7+
$('.js-r1dt').insertBefore($('#js-tlrk-nav')).end().show();
8+
});
799
</script>

0 commit comments

Comments
 (0)