cec-nuxt-lib 0.3.9 → 0.3.11

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/dist/module.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "cec-nuxt-lib",
3
3
  "configKey": "cec-nuxt-lib",
4
- "version": "0.3.9"
4
+ "version": "0.3.11"
5
5
  }
@@ -9,9 +9,16 @@ const path = useState('path');
9
9
  const route = useRoute();
10
10
  const baseUrl = config.app.baseURL;
11
11
 
12
+ const trimPath = (str) => str && str.replace(/\/$/, '');
13
+ let baseLength = baseUrl ? trimPath(baseUrl).split('/').length : 0;
14
+
12
15
  // Helper functions
13
16
  const makeLink = (i, routes) => {
14
- return routes.slice(0, i + 1).join('/');
17
+ i = baseUrl ? baseLength - 1 : i + 1;
18
+ if (i === 1) {
19
+ return '/';
20
+ }
21
+ return routes.slice(0, i).join('/');
15
22
  };
16
23
 
17
24
  const toTitleCase = (str) => {
@@ -29,13 +36,12 @@ const makeArr = (str) => {
29
36
  }, []);
30
37
  };
31
38
 
32
- const trimPath = (str) => str.replace(/\/$/, '');
33
-
34
39
  // Make arrays of the items in the paths
35
40
  let routeTrim = trimPath(route.path);
36
41
  let pathTrim = trimPath(path.value);
37
42
  let routes = makeArr(routeTrim);
38
43
  let paths = makeArr(pathTrim);
44
+ //console.log(routes)
39
45
 
40
46
  // Use the route path if it includes the node's path
41
47
  if (!routeTrim.toLowerCase().startsWith(pathTrim.toLowerCase())) {
@@ -139,7 +139,7 @@ const centralColumn = (props: any) => {
139
139
  if (item.column.length === 1) {
140
140
  return `
141
141
  <div class="row">
142
- <div class="col-lg-8 col-md-12 mx-auto mt-3 mb-4">${item.column[0]}</div>
142
+ <div class="col-lg-8 col-md-10 mx-auto mt-3 mb-4">${item.column[0]}</div>
143
143
  </div>
144
144
  `;
145
145
  } else if (item.column.length === 2) {
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.3.9",
2
+ "version": "0.3.11",
3
3
  "name": "cec-nuxt-lib",
4
4
  "description": "Nuxt components and assets",
5
5
  "license": "MIT",