astro-accelerator 0.0.44 → 0.0.45

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.0.44",
2
+ "version": "0.0.45",
3
3
  "author": "Steve Fenton",
4
4
  "name": "astro-accelerator",
5
5
  "description": "A super-lightweight, accessible, SEO-friendly starter project for Astro",
@@ -25,8 +25,8 @@
25
25
  },
26
26
  "dependencies": {
27
27
  "@squoosh/lib": "^0.4.0",
28
- "astro": "^1.6.6",
29
- "astro-accelerator-utils": "^0.2.8",
28
+ "astro": "^1.6.13",
29
+ "astro-accelerator-utils": "^0.2.10",
30
30
  "hast-util-from-selector": "^2.0.0",
31
31
  "remark-directive": "^2.0.1"
32
32
  },
@@ -31,11 +31,11 @@ function addStickyNavigation(headerSelector, navigationSelector, navigationListS
31
31
 
32
32
  // Only enable sticky mode if the menu will fit vertically
33
33
  // && where the browser is more than 860px wide
34
- if (dimensions.navigationHeight < ((dimensions.browserHeight - dimensions.headerHeight) - buffer)
34
+ if (dimensions.navigationHeight < ((dimensions.browserHeight - Math.max(dimensions.headerHeight, site_features.stickyNav.top)) - buffer)
35
35
  && dimensions.browserWidth > 860) {
36
36
  console.log('Navigation: Sticky Mode');
37
37
  navigation.classList.add(className);
38
- const top = navigation.parentElement?.offsetTop ?? 220;
38
+ const top = site_features.stickyNav.top ?? 220;
39
39
  navigation.style.top = top + 'px';
40
40
  } else {
41
41
  console.log('Navigation: Fixed Mode');
package/src/config.ts CHANGED
@@ -30,6 +30,7 @@ const SITE: Site = {
30
30
  },
31
31
  cacheMaxAge: 200,
32
32
  featureFlags: {
33
+ stickyNav: { top: 100 },
33
34
  codeBlocks: ['copy'],
34
35
  figures: ['enlarge'],
35
36
  youTubeLinks: ['embed'],
@@ -26,7 +26,8 @@ const title = `${ socialTitle } | ${ SITE.title }`;
26
26
  <meta charset="utf-8" />
27
27
  <title>{ title }</title>
28
28
  <meta name="robots" content={ 'max-image-preview:large, ' + robots } />
29
- <meta name="viewport" content="width=device-width, initial-scale=1" />
29
+ <meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1" />
30
+ <meta name="format-detection" content="telephone=no" />
30
31
  <meta name="keywords" content={ frontmatter.keywords } />
31
32
  <meta name="description" content={ frontmatter.description } />
32
33
  <meta name="theme-color" content={ SITE.themeColor } />