Skip to content

Commit d123362

Browse files
committed
fix merge conflict
2 parents 3b0bbd1 + e9e6667 commit d123362

36 files changed

+624
-340
lines changed

.vitepress/config.ts

Lines changed: 1 addition & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -642,21 +642,7 @@ export default defineConfigWithTheme<Config>({
642642
},
643643
build: {
644644
minify: 'terser',
645-
chunkSizeWarningLimit: Infinity,
646-
rollupOptions: {
647-
output: {
648-
chunkFileNames: 'assets/chunks/[name].[hash].js',
649-
manualChunks(id, ctx) {
650-
if (id.includes('gsap')) {
651-
return 'gsap'
652-
}
653-
if (id.includes('dynamics.js')) {
654-
return 'dynamics'
655-
}
656-
return moveToVendor(id, ctx)
657-
}
658-
}
659-
}
645+
chunkSizeWarningLimit: Infinity
660646
},
661647
json: {
662648
stringify: true
@@ -667,59 +653,3 @@ export default defineConfigWithTheme<Config>({
667653
reactivityTransform: true
668654
}
669655
})
670-
671-
const cache = new Map<string, boolean>()
672-
673-
/**
674-
* This is temporarily copied from Vite - which should be exported in a
675-
* future release.
676-
*
677-
* @TODO when this is exported by Vite, VitePress should ship a better
678-
* manual chunk strategy to split chunks for deps that are imported by
679-
* multiple pages but not all.
680-
*/
681-
function moveToVendor(id: string, { getModuleInfo }: any) {
682-
if (
683-
id.includes('node_modules') &&
684-
!/\.css($|\\?)/.test(id) &&
685-
staticImportedByEntry(id, getModuleInfo, cache)
686-
) {
687-
return 'vendor'
688-
}
689-
}
690-
691-
function staticImportedByEntry(
692-
id: string,
693-
getModuleInfo: any,
694-
cache: Map<string, boolean>,
695-
importStack: string[] = []
696-
): boolean {
697-
if (cache.has(id)) {
698-
return cache.get(id) as boolean
699-
}
700-
if (importStack.includes(id)) {
701-
// circular deps!
702-
cache.set(id, false)
703-
return false
704-
}
705-
const mod = getModuleInfo(id)
706-
if (!mod) {
707-
cache.set(id, false)
708-
return false
709-
}
710-
711-
if (mod.isEntry) {
712-
cache.set(id, true)
713-
return true
714-
}
715-
const someImporterIs = mod.importers.some((importer: string) =>
716-
staticImportedByEntry(
717-
importer,
718-
getModuleInfo,
719-
cache,
720-
importStack.concat(id)
721-
)
722-
)
723-
cache.set(id, someImporterIs)
724-
return someImporterIs
725-
}

.vitepress/theme/components/SponsorsGroup.vue

Lines changed: 23 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,4 @@
11
<script lang="ts">
2-
// shared data across instances so we load only once
3-
let data = $ref<SponsorData>()
4-
const base = `https://sponsors.vuejs.org`
5-
</script>
6-
7-
<script setup lang="ts">
8-
import { onMounted, onUnmounted } from 'vue'
9-
102
interface Sponsor {
113
url: string
124
img: string
@@ -22,6 +14,16 @@ interface SponsorData {
2214
bronze: Sponsor[]
2315
}
2416
17+
// shared data across instances so we load only once
18+
let data = $ref<SponsorData>()
19+
let pending = false
20+
21+
const base = `https://sponsors.vuejs.org`
22+
</script>
23+
24+
<script setup lang="ts">
25+
import { onMounted, onUnmounted } from 'vue'
26+
2527
const { tier, placement = 'aside' } = defineProps<{
2628
tier: keyof SponsorData
2729
placement?: 'aside' | 'page' | 'landing'
@@ -32,17 +34,21 @@ let visible = $ref(false)
3234
3335
onMounted(async () => {
3436
// only render when entering view
35-
const observer = new IntersectionObserver((entries) => {
36-
if (entries[0].isIntersecting) {
37-
visible = true
38-
observer.disconnect()
39-
}
40-
}, { rootMargin: '0px 0px 300px 0px' })
37+
const observer = new IntersectionObserver(
38+
(entries) => {
39+
if (entries[0].isIntersecting) {
40+
visible = true
41+
observer.disconnect()
42+
}
43+
},
44+
{ rootMargin: '0px 0px 300px 0px' }
45+
)
4146
observer.observe(container)
4247
onUnmounted(() => observer.disconnect())
4348
4449
// load data
45-
if (!data) {
50+
if (!pending) {
51+
pending = true
4652
data = await (await fetch(`${base}/data.json`)).json()
4753
}
4854
})
@@ -76,7 +82,8 @@ onMounted(async () => {
7682
v-if="placement !== 'page' && tier !== 'special'"
7783
href="/sponsor/"
7884
class="sponsor-item action"
79-
>Your logo</a>
85+
>Your logo</a
86+
>
8087
</div>
8188
</template>
8289

.vitepress/theme/components/VueJobs.vue

Lines changed: 23 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -42,31 +42,20 @@ onMounted(async () => {
4242
<div class="vuejobs-container" v-if="openings.length">
4343
<div class="vj-item" v-for="(job, n) in openings" :key="n">
4444
<a class="vj-job-title" :href="job.link" target="_blank">
45-
<p>
46-
{{ job.title }}
47-
<svg
48-
xmlns="http://www.w3.org/2000/svg"
49-
aria-hidden="true"
50-
focusable="false"
51-
height="24px"
52-
viewBox="0 0 24 24"
53-
width="24px"
54-
class="vt-link-icon"
55-
>
56-
<path d="M0 0h24v24H0V0z" fill="none"></path>
57-
<path
58-
d="M9 5v2h6.59L4 18.59 5.41 20 17 8.41V15h2V5H9z"
59-
></path>
60-
</svg>
61-
</p>
45+
<img :src="job.company_logo" alt="" class="vj-company-logo" />
46+
<div>
47+
<p>
48+
{{ job.title }}
49+
</p>
6250

63-
<p class="vj-job-info">
64-
{{ job.company }}
65-
<span v-if="job.salary">·</span>
66-
{{ job.salary }}
67-
<span>·</span>
68-
{{ job.location }}
69-
</p>
51+
<p class="vj-job-info">
52+
{{ job.company }}
53+
<!-- <span v-if="job.salary">·</span> -->
54+
<!-- {{ job.salary }} -->
55+
<span>·</span>
56+
{{ job.location }}
57+
</p>
58+
</div>
7059
</a>
7160
</div>
7261
</div>
@@ -75,9 +64,9 @@ onMounted(async () => {
7564

7665
<style scoped>
7766
.vuejobs-container {
78-
background-color: var(--vt-c-bg-soft);
79-
padding: 5px 15px;
8067
border-radius: 2px;
68+
background-color: var(--vt-c-bg-soft);
69+
padding: 3px 10px;
8170
}
8271
.vj-item {
8372
padding: 10px 0 10px 0;
@@ -92,19 +81,26 @@ onMounted(async () => {
9281
.vuejobs-container a {
9382
line-height: 16px;
9483
transition: color 0.2s ease;
95-
display: inline-block;
9684
}
9785
.vuejobs-container a:hover {
9886
color: var(--vt-c-brand);
9987
}
10088
.vj-job-title {
10189
font-size: 12px;
10290
color: var(--vt-c-text-1);
91+
display: flex;
92+
flex-direction: row;
10393
}
10494
.vj-job-info {
10595
font-size: 11px;
10696
color: var(--vt-c-text-2);
10797
margin-top: 2px;
10898
line-height: 12px;
10999
}
100+
.vj-company-logo {
101+
width: 30px;
102+
height: 30px;
103+
margin-bottom: 10px;
104+
margin-right: 10px;
105+
}
110106
</style>

.vitepress/theme/styles/inline-demo.css

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
.vt-doc a[href^="https://sfc.vuejs.org"]:before {
2-
content: "▶";
1+
.vt-doc a[href^="https://sfc.vuejs.org"]:before
2+
{
3+
content: '▶';
34
width: 20px;
45
height: 20px;
56
display: inline-block;
@@ -11,8 +12,8 @@
1112
border: 2px solid var(--vt-c-green);
1213
margin-right: 8px;
1314
margin-left: 4px;
14-
line-height: 16px;
15-
padding-left: 4px;
15+
line-height: 15px;
16+
padding-left: 4.5px;
1617
font-size: 11px;
1718
}
1819

README.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
# vuejs.org
22

3-
This is the WIP branch of the brand new vuejs.org. **The content is under heavy updates and re-organization so please refrain from submitting PRs to this branch until we have removed this notice.**
4-
53
## Contributing
64

75
This site is built with [VitePress](https://github.com/vuejs/vitepress) and depends on [@vue/theme](https://github.com/vuejs/vue-theme). Site content is written in Markdown format located in `src`. For simple edits, you can directly edit the file on GitHub and generate a Pull Request.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
"@vue/theme": "^1.0.1",
1111
"dynamics.js": "^1.1.5",
1212
"gsap": "^3.9.0",
13-
"vitepress": "^0.21.6",
14-
"vue": "^3.2.28"
13+
"vitepress": "^0.22.2",
14+
"vue": "^3.2.31"
1515
},
1616
"devDependencies": {
1717
"@types/markdown-it": "^12.2.3",

0 commit comments

Comments
 (0)