astro-accelerator 0.0.86 → 0.0.88

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.86",
2
+ "version": "0.0.88",
3
3
  "author": "Steve Fenton",
4
4
  "name": "astro-accelerator",
5
5
  "description": "A super-lightweight, accessible, SEO-friendly starter project for Astro",
@@ -24,12 +24,12 @@
24
24
  "dts": "tsc ./tests/locate-content.js ./tests/locate-navigation.js ./tests/locate-search.js --allowJs --declaration --emitDeclarationOnly"
25
25
  },
26
26
  "dependencies": {
27
- "@astrojs/mdx": "^0.18.2",
28
- "astro": "^2.2.1",
27
+ "@astrojs/mdx": "^0.19.6",
28
+ "astro": "^2.5.7",
29
29
  "astro-accelerator-utils": "^0.2.27",
30
30
  "hast-util-from-selector": "^2.0.1",
31
31
  "remark-directive": "^2.0.1",
32
- "sharp": "^0.31.3"
32
+ "sharp": "^0.32.1"
33
33
  },
34
34
  "devDependencies": {
35
35
  "@playwright/test": "^1.31.2"
@@ -931,18 +931,35 @@ pre.astro-code code {
931
931
  max-height: 0px;
932
932
  margin: 0;
933
933
  width: 100%;
934
- text-align: right;
934
+ text-align: end;
935
935
  z-index: 1;
936
936
  position: relative;
937
937
  top: -1rem;
938
938
  }
939
939
 
940
940
  .magnify-icon {
941
- border-radius: 0.2rem;
942
- stroke: var(--fore-link-alt);
943
- fill: var(--aft);
944
- background-color: transparent;
945
941
  opacity: 0;
942
+ border-radius: 0.2rem;
943
+ border: 1px solid var(--fore-link);
944
+ color: var(--fore-link);
945
+ width: 2rem;
946
+ height: 2rem;
947
+ overflow: hidden;
948
+ display: inline-block;
949
+ cursor: pointer;
950
+ }
951
+
952
+ .input-touch .magnify-icon {
953
+ opacity: 1;
954
+ }
955
+
956
+ .magnify-icon:before {
957
+ content: '↗';
958
+ font-family: var(--unicode-font);
959
+ font-size: 2rem;
960
+ line-height: 2rem;
961
+ top: -0.15em;
962
+ position: relative;
946
963
  }
947
964
 
948
965
  figure:hover .magnify-icon,
@@ -958,12 +975,6 @@ figure:focus .magnify-icon {
958
975
  opacity: 1;
959
976
  }
960
977
 
961
- @media (max-width: 860px) {
962
- .magnify-icon {
963
- opacity: 1;
964
- }
965
- }
966
-
967
978
  /* Custom Divisions */
968
979
 
969
980
  .note {
@@ -35,6 +35,7 @@
35
35
  --heading-font: Georgia, 'Times New Roman', Times, serif;
36
36
  --content-font: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
37
37
  --code-font: Consolas, 'Courier New', Courier, monospace;
38
+ --unicode-font: "Segoe UI Symbol", "Arial Unicode MS", sans-serif;
38
39
 
39
40
  --block-gap: 2rem;
40
41
  --block-radius: 0.3rem;
@@ -2,16 +2,8 @@ import { qs, qsa } from './query.js';
2
2
 
3
3
  const activeClass = 'magnify-icon';
4
4
 
5
- const clipboard = `<svg xmlns="http://www.w3.org/2000/svg" width="30" height="30" viewBox="0 0 24 24" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round">
6
- <path stroke="none" d="M0 0h24v24H0z" fill="none"/>
7
- <line x1="15" y1="8" x2="15.01" y2="8" />
8
- <rect x="4" y="4" width="16" height="16" rx="3" />
9
- <path d="M4 15l4 -4a3 5 0 0 1 3 0l5 5" />
10
- <path d="M14 14l1 -1a3 5 0 0 1 3 0l2 2" />
11
- </svg>`;
12
-
13
5
  /**
14
- * Enables copy on code blocks (<pre><code>...)
6
+ * Enables opening image in new tab
15
7
  */
16
8
  function enhanceFigures() {
17
9
  qsa(`figure > p > img`).forEach(node => {
@@ -19,7 +11,6 @@ function enhanceFigures() {
19
11
 
20
12
  const magnify = document.createElement('button');
21
13
  magnify.classList.add(activeClass);
22
- magnify.innerHTML = clipboard;
23
14
  magnify.title = 'Enlarge';
24
15
 
25
16
  const magnifyContainer = document.createElement('div');