Skip to content

Commit b2f685c

Browse files
author
DNZ\darius
committed
Merge branch 'develop' of https://github.com/CastleCSS/castlecss-docs into develop
# Conflicts: # dist/css/styles.min.css # dist/css/styles.min.css.map
2 parents f12de68 + d0f49eb commit b2f685c

22 files changed

+179
-185
lines changed

dist/about.html

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -138,26 +138,23 @@ <h2>What makes CastleCSS different?</h2>
138138
$(function () {
139139
navOpen();
140140

141-
// window.onscroll = function(e) {
142-
// offSetManager();
143-
// }
141+
window.onscroll = function(e) {
142+
offSetManager();
143+
}
144144
});
145145

146146
function offSetManager(){
147147

148148
var yOffset = 110;
149149
var currYOffSet = window.pageYOffset;
150+
var menuHeight = $('.doc-menu').height();
151+
var windowHeight = $(window).height();
150152

151-
if(yOffset < currYOffSet) {
153+
if((yOffset < currYOffSet) && (menuHeight < windowHeight)) {
152154
$('.nav-wrap').addClass('fixed');
155+
} else if(yOffset > currYOffSet){
156+
$('.nav-wrap').removeClass('fixed');
153157
}
154-
else {
155-
156-
if(currYOffSet < yOffset){
157-
$('.nav-wrap').removeClass('fixed');
158-
}
159-
}
160-
161158
}
162159

163160
function navOpen() {

dist/buttons.html

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ <h1>Buttons</h1>
130130
</div>
131131
<h2 class="ta-center ta-left-b3">Example buttons with icons</h2>
132132
<p class="alert">
133-
Note: You need the castlecss-buttons and castlecss-icons packages or the <a href="https://github.com/CastleCSS/castlecss-boilerplate" target="_blank">castlecss-boilerplate</a> to combine icons and buttons.
133+
Note: You need both the castlecss-buttons and castlecss-icons packages or the <a href="https://github.com/CastleCSS/castlecss-boilerplate" target="_blank">castlecss-boilerplate</a> to combine icons and buttons.
134134
</p>
135135
<div class="block p pt-2x" style="background: #eee;">
136136
<div class="g mb-3x">
@@ -162,26 +162,23 @@ <h2 class="ta-center ta-left-b3">Example buttons with icons</h2>
162162
$(function () {
163163
navOpen();
164164

165-
// window.onscroll = function(e) {
166-
// offSetManager();
167-
// }
165+
window.onscroll = function(e) {
166+
offSetManager();
167+
}
168168
});
169169

170170
function offSetManager(){
171171

172172
var yOffset = 110;
173173
var currYOffSet = window.pageYOffset;
174+
var menuHeight = $('.doc-menu').height();
175+
var windowHeight = $(window).height();
174176

175-
if(yOffset < currYOffSet) {
177+
if((yOffset < currYOffSet) && (menuHeight < windowHeight)) {
176178
$('.nav-wrap').addClass('fixed');
179+
} else if(yOffset > currYOffSet){
180+
$('.nav-wrap').removeClass('fixed');
177181
}
178-
else {
179-
180-
if(currYOffSet < yOffset){
181-
$('.nav-wrap').removeClass('fixed');
182-
}
183-
}
184-
185182
}
186183

187184
function navOpen() {

dist/css/styles.min.css

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

dist/css/styles.min.css.map

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

dist/grid.html

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -771,26 +771,23 @@ <h4>Push examples</h4>
771771
$(function () {
772772
navOpen();
773773

774-
// window.onscroll = function(e) {
775-
// offSetManager();
776-
// }
774+
window.onscroll = function(e) {
775+
offSetManager();
776+
}
777777
});
778778

779779
function offSetManager(){
780780

781781
var yOffset = 110;
782782
var currYOffSet = window.pageYOffset;
783+
var menuHeight = $('.doc-menu').height();
784+
var windowHeight = $(window).height();
783785

784-
if(yOffset < currYOffSet) {
786+
if((yOffset < currYOffSet) && (menuHeight < windowHeight)) {
785787
$('.nav-wrap').addClass('fixed');
788+
} else if(yOffset > currYOffSet){
789+
$('.nav-wrap').removeClass('fixed');
786790
}
787-
else {
788-
789-
if(currYOffSet < yOffset){
790-
$('.nav-wrap').removeClass('fixed');
791-
}
792-
}
793-
794791
}
795792

796793
function navOpen() {

dist/icons.html

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ <h2 class="ta-center ta-left-b3">Example social icons</h2>
161161

162162
<h2 class="ta-center ta-left-b3">Example buttons with icons</h2>
163163
<p class="alert">
164-
Note: You need the castlecss-buttons and castlecss-icons packages or the <a href="https://github.com/CastleCSS/castlecss-boilerplate" target="_blank">castlecss-boilerplate</a> to combine icons and buttons.
164+
Note: You need both the castlecss-buttons and castlecss-icons packages or the <a href="https://github.com/CastleCSS/castlecss-boilerplate" target="_blank">castlecss-boilerplate</a> to combine icons and buttons.
165165
</p>
166166
<div class="block p pt-2x" style="background: #eee;">
167167
<div class="g mb-3x">
@@ -194,26 +194,23 @@ <h2 class="ta-center ta-left-b3">Example buttons with icons</h2>
194194
$(function () {
195195
navOpen();
196196

197-
// window.onscroll = function(e) {
198-
// offSetManager();
199-
// }
197+
window.onscroll = function(e) {
198+
offSetManager();
199+
}
200200
});
201201

202202
function offSetManager(){
203203

204204
var yOffset = 110;
205205
var currYOffSet = window.pageYOffset;
206+
var menuHeight = $('.doc-menu').height();
207+
var windowHeight = $(window).height();
206208

207-
if(yOffset < currYOffSet) {
209+
if((yOffset < currYOffSet) && (menuHeight < windowHeight)) {
208210
$('.nav-wrap').addClass('fixed');
211+
} else if(yOffset > currYOffSet){
212+
$('.nav-wrap').removeClass('fixed');
209213
}
210-
else {
211-
212-
if(currYOffSet < yOffset){
213-
$('.nav-wrap').removeClass('fixed');
214-
}
215-
}
216-
217214
}
218215

219216
function navOpen() {

dist/index.html

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ <h1>CastleCSS Framework</h1>
108108
<a class="btn mb-2x" href="installation.html"><i class="fa fa-thumbs-up"></i> Get started</a>
109109
<a href="https://github.com/castlecss/castlecss-boilerplate" class="btn-theme03" aria-label="Watch castlecss/castlecss-boilerplate on GitHub" target="_blank"><i class="fa fa-github"></i> Watch on github</a>
110110
<a href="https://github.com/castlecss/castlecss-boilerplate/archive/master.zip" class="btn-theme02" aria-label="Download castlecss/castlecss-boilerplate on GitHub" target="_blank"><i class="fa fa-cloud-download"></i> Download boilerplate</a>
111-
<p class="b3_hide">Or watch the <a class="open-documentation" href="?">documentation</a></p>
111+
<p class="hide-b3">Or watch the <a class="open-documentation" href="?">documentation</a></p>
112112
</div>
113113
</div>
114114
</div>
@@ -122,26 +122,23 @@ <h1>CastleCSS Framework</h1>
122122
$(function () {
123123
navOpen();
124124

125-
// window.onscroll = function(e) {
126-
// offSetManager();
127-
// }
125+
window.onscroll = function(e) {
126+
offSetManager();
127+
}
128128
});
129129

130130
function offSetManager(){
131131

132132
var yOffset = 110;
133133
var currYOffSet = window.pageYOffset;
134+
var menuHeight = $('.doc-menu').height();
135+
var windowHeight = $(window).height();
134136

135-
if(yOffset < currYOffSet) {
137+
if((yOffset < currYOffSet) && (menuHeight < windowHeight)) {
136138
$('.nav-wrap').addClass('fixed');
139+
} else if(yOffset > currYOffSet){
140+
$('.nav-wrap').removeClass('fixed');
137141
}
138-
else {
139-
140-
if(currYOffSet < yOffset){
141-
$('.nav-wrap').removeClass('fixed');
142-
}
143-
}
144-
145142
}
146143

147144
function navOpen() {

dist/installation.html

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ <h2>Install packages seperately</h2>
195195
<p>Already have a CastleCSS project and want to add a module or just want to add 1 part of CastleCSS? Just include the core and any addon you want.</p>
196196
<div class="g">
197197

198-
<div id="core" class="b0_12 b5_12">
198+
<div id="core" class="b0_12 b5_12 eq">
199199
<div class="block block-invert p-3x pt-2x">
200200
<h2>Core</h2>
201201
<p>
@@ -230,7 +230,7 @@ <h3>What's included?</h3>
230230
</p>
231231
</div>
232232
</div>
233-
<div id="buttons" class="b0_12 b5_12">
233+
<div id="buttons" class="b0_12 b5_12 eq">
234234
<div class="block block-invert p-3x pt-2x">
235235
<h2>Buttons</h2>
236236
<p>
@@ -255,7 +255,7 @@ <h3>What's included?</h3>
255255
</p>
256256
</div>
257257
</div>
258-
<div id="notifications" class="b0_12 b5_12">
258+
<div id="notifications" class="b0_12 b5_12 eq">
259259
<div class="block block-invert p-3x pt-2x">
260260
<h2>Notifications</h2>
261261
<p>
@@ -279,7 +279,7 @@ <h3>What's included?</h3>
279279
</p>
280280
</div>
281281
</div>
282-
<div id="icons" class="b0_12 b5_12">
282+
<div id="icons" class="b0_12 b5_12 eq">
283283
<div class="block block-invert p-3x pt-2x">
284284
<h2>Icons</h2>
285285
<p>
@@ -317,26 +317,23 @@ <h3>What's included?</h3>
317317
$(function () {
318318
navOpen();
319319

320-
// window.onscroll = function(e) {
321-
// offSetManager();
322-
// }
320+
window.onscroll = function(e) {
321+
offSetManager();
322+
}
323323
});
324324

325325
function offSetManager(){
326326

327327
var yOffset = 110;
328328
var currYOffSet = window.pageYOffset;
329+
var menuHeight = $('.doc-menu').height();
330+
var windowHeight = $(window).height();
329331

330-
if(yOffset < currYOffSet) {
332+
if((yOffset < currYOffSet) && (menuHeight < windowHeight)) {
331333
$('.nav-wrap').addClass('fixed');
334+
} else if(yOffset > currYOffSet){
335+
$('.nav-wrap').removeClass('fixed');
332336
}
333-
else {
334-
335-
if(currYOffSet < yOffset){
336-
$('.nav-wrap').removeClass('fixed');
337-
}
338-
}
339-
340337
}
341338

342339
function navOpen() {

dist/mixins.html

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -169,26 +169,23 @@ <h3>Transform mixin</h3>
169169
$(function () {
170170
navOpen();
171171

172-
// window.onscroll = function(e) {
173-
// offSetManager();
174-
// }
172+
window.onscroll = function(e) {
173+
offSetManager();
174+
}
175175
});
176176

177177
function offSetManager(){
178178

179179
var yOffset = 110;
180180
var currYOffSet = window.pageYOffset;
181+
var menuHeight = $('.doc-menu').height();
182+
var windowHeight = $(window).height();
181183

182-
if(yOffset < currYOffSet) {
184+
if((yOffset < currYOffSet) && (menuHeight < windowHeight)) {
183185
$('.nav-wrap').addClass('fixed');
186+
} else if(yOffset > currYOffSet){
187+
$('.nav-wrap').removeClass('fixed');
184188
}
185-
else {
186-
187-
if(currYOffSet < yOffset){
188-
$('.nav-wrap').removeClass('fixed');
189-
}
190-
}
191-
192189
}
193190

194191
function navOpen() {

dist/notifications.html

Lines changed: 21 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -112,22 +112,26 @@ <h1>Notifications / alerts</h1>
112112
<p>Overwrite colors using your own <a href="variables.html">variable.scss</a> or overwrite all notifications/alerts with your own notifications.scss file.</p>
113113
</div>
114114
<div class="block">
115-
<div class="alert mb">Alert</div>
116-
<div class="alert-positive mb">Positive alert</div>
117-
<div class="alert-negative mb">Negative alert</div>
115+
<div class="alert mb">Friendly alert with a <a href="#">link</a></div>
116+
<div class="alert-positive mb">Positive alert with a <a href="#">link</a></div>
117+
<div class="alert-warning mb">Alert with a warning and a <a href="#">link</a></div>
118+
<div class="alert-negative mb">Negative alert and a <a href="#">link</a></div>
118119
<pre class="brush: xml;">
119-
<div class="alert">Alert</div>
120-
<div class="alert-positive">Positive alert</div>
121-
<div class="alert-negative">Negative alert</div></pre>
120+
<div class="alert">...</div>
121+
<div class="alert-warning">...</div>
122+
<div class="alert-positive">...</div>
123+
<div class="alert-negative">...</div></pre>
122124
</div>
123125
<div class="block">
124126
<div class="notify mb">Notification</div>
125127
<div class="notify-positive mb">Positive notification</div>
128+
<div class="notify-warning mb">Warning notification</div>
126129
<div class="notify-negative mb">Negative notificiation</div>
127130
<pre class="brush: xml;">
128-
<div class="notify">Notification</div>
129-
<div class="notify-positive">Positive notification</div>
130-
<div class="notify-negative">Negative notificiation</div></pre>
131+
<div class="notify">...</div>
132+
<div class="notify-warning">...</div>
133+
<div class="notify-positive">...</div>
134+
<div class="notify-negative">...</div></pre>
131135
</div>
132136
</div>
133137
</div>
@@ -141,26 +145,23 @@ <h1>Notifications / alerts</h1>
141145
$(function () {
142146
navOpen();
143147

144-
// window.onscroll = function(e) {
145-
// offSetManager();
146-
// }
148+
window.onscroll = function(e) {
149+
offSetManager();
150+
}
147151
});
148152

149153
function offSetManager(){
150154

151155
var yOffset = 110;
152156
var currYOffSet = window.pageYOffset;
157+
var menuHeight = $('.doc-menu').height();
158+
var windowHeight = $(window).height();
153159

154-
if(yOffset < currYOffSet) {
160+
if((yOffset < currYOffSet) && (menuHeight < windowHeight)) {
155161
$('.nav-wrap').addClass('fixed');
162+
} else if(yOffset > currYOffSet){
163+
$('.nav-wrap').removeClass('fixed');
156164
}
157-
else {
158-
159-
if(currYOffSet < yOffset){
160-
$('.nav-wrap').removeClass('fixed');
161-
}
162-
}
163-
164165
}
165166

166167
function navOpen() {

0 commit comments

Comments
 (0)