Skip to content

Commit 7b6b473

Browse files
revert nuxt
1 parent 0148bad commit 7b6b473

File tree

8 files changed

+2
-176
lines changed

8 files changed

+2
-176
lines changed

resources/newssite/news-nuxt/composables/provide-locale.js

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@ import { provide } from "vue";
22
import { useHead } from "#imports";
33
import { dataSource } from "../data";
44

5-
import { v4 as uuidv4 } from "uuid";
6-
75
const RTL_LOCALES = ["ar", "he", "fa", "ps", "ur"];
86
const DEFAULT_LANG = "en";
97
const DEFAULT_DIR = "ltr";
@@ -18,43 +16,10 @@ export function provideLocale() {
1816
htmlAttrs: { dir, lang },
1917
});
2018

21-
const { content } = dataSource[lang];
22-
23-
const selected = Object.create(null);
24-
Object.keys(content).forEach((key) => {
25-
const { sections } = content[key];
26-
27-
const selectedSections = [];
28-
let index = 0;
29-
30-
for (let i = 0; i < sections.length; i++) {
31-
selectedSections.push({ ...sections[index] });
32-
const numCopy = Math.floor(i / sections.length);
33-
selectedSections[i].id = `${sections[index].id}-${numCopy}`;
34-
35-
const { articles } = selectedSections[i];
36-
for (let j = 0; j < articles.length; j++) {
37-
articles[j].id = uuidv4();
38-
const { content } = articles[j];
39-
if (Array.isArray(content)) {
40-
for (let k = 0; k < content.length; k++) content[k].id = uuidv4();
41-
}
42-
}
43-
44-
index = (index + 1) % sections.length;
45-
}
46-
47-
selected[key] = {
48-
...content[key],
49-
sections: selectedSections,
50-
};
51-
});
52-
5319
const value = {
5420
lang,
5521
dir,
5622
...dataSource[lang],
57-
content: selected,
5823
};
5924

6025
provide("data", value);

resources/newssite/news-nuxt/dist/_nuxt/entry.3b7b720a.js

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

resources/newssite/news-nuxt/dist/_nuxt/entry.6023314e.js

Whitespace-only changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

resources/newssite/news-nuxt/package-lock.json

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

resources/newssite/news-nuxt/package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
},
2222
"dependencies": {
2323
"http-server": "^14.1.1",
24-
"news-site-css": "file:../news-site-css",
25-
"uuid": "^9.0.0"
24+
"news-site-css": "file:../news-site-css"
2625
}
2726
}

0 commit comments

Comments
 (0)