Add version info

pull/5514/head
Cagatay Civici 2024-04-02 17:50:57 +03:00
parent 85e8609c68
commit ccd26159fb
3 changed files with 11 additions and 29 deletions

View File

@ -189,7 +189,6 @@
border: 1px solid var(--border-color); border: 1px solid var(--border-color);
box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1); box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
transform-origin: top; transform-origin: top;
width: 8rem;
ul { ul {
padding: 0; padding: 0;
@ -210,24 +209,12 @@
border-radius: 6px; border-radius: 6px;
width: 100%; width: 100%;
overflow: hidden; overflow: hidden;
color: var(--text-color);
white-space: nowrap;
&:hover { &:hover {
background-color: var(--hover-background); background-color: var(--hover-background);
} }
span:first-child {
font-weight: bold;
color: var(--high-contrast-text-color);
}
span:last-child {
margin-left: 0.5rem;
color: var(--text-color);
white-space: nowrap;
display: block;
overflow: hidden;
text-overflow: ellipsis;
}
} }
} }
} }

View File

@ -12,13 +12,13 @@ export default {
code: { code: {
basic: ` basic: `
# Using npm # Using npm
npm install primevue npm install primevue@4.0.0-beta.1
# Using yarn # Using yarn
yarn add primevue yarn add primevue@4.0.0-beta.1
# Using pnpm # Using pnpm
pnpm add primevue pnpm add primevue@4.0.0-beta.1
` `
} }
}; };

View File

@ -61,7 +61,7 @@
</div> </div>
<ul class="topbar-items"> <ul class="topbar-items">
<li> <li v-if="false">
<div id="docsearch"></div> <div id="docsearch"></div>
</li> </li>
<li> <li>
@ -101,7 +101,7 @@
style="max-width: 8rem" style="max-width: 8rem"
class="topbar-item version-item" class="topbar-item version-item"
> >
<span class="version-text">{{ versions[0].version }}</span> <span class="version-text">{{ versions[0].name }}</span>
<span class="version-icon pi pi-angle-down"></span> <span class="version-icon pi pi-angle-down"></span>
</button> </button>
@ -109,8 +109,7 @@
<ul> <ul>
<li v-for="version in versions" :key="version.version" role="none"> <li v-for="version in versions" :key="version.version" role="none">
<a :href="version.url"> <a :href="version.url">
<span>{{ version.name }}</span> <span>PrimeVue {{ version.name }}</span>
<span>{{ version.version }}</span>
</a> </a>
</li> </li>
</ul> </ul>
@ -129,8 +128,7 @@
<script> <script>
import AppConfigurator from '@/layouts/AppConfigurator'; import AppConfigurator from '@/layouts/AppConfigurator';
import EventBus from '@/layouts/AppEventBus'; import EventBus from '@/layouts/AppEventBus';
import pkg from '@/package.json'; //import docsearch from '@docsearch/js';
import docsearch from '@docsearch/js';
export default { export default {
emits: ['menubutton-click'], emits: ['menubutton-click'],
@ -146,17 +144,14 @@ export default {
versions: [ versions: [
{ {
name: 'v4', name: 'v4',
version: pkg.version,
url: 'https://v4.primevue.org' url: 'https://v4.primevue.org'
}, },
{ {
name: 'v3', name: 'v3',
version: '@latest',
url: 'https://www.primevue.org' url: 'https://www.primevue.org'
}, },
{ {
name: 'v2', name: 'v2',
version: '@latest',
url: 'https://www.primefaces.org/primevue-v2' url: 'https://www.primefaces.org/primevue-v2'
} }
] ]
@ -167,7 +162,7 @@ export default {
mounted() { mounted() {
this.bindScrollListener(); this.bindScrollListener();
docsearch({ /*docsearch({
container: '#docsearch', container: '#docsearch',
appId: '01CMUF4W4R', appId: '01CMUF4W4R',
indexName: 'primevue', indexName: 'primevue',
@ -188,7 +183,7 @@ export default {
return item; return item;
}); });
} }
}); });*/
}, },
beforeUnmount() { beforeUnmount() {
if (this.scrollListener) { if (this.scrollListener) {