mirror of
https://github.com/jbcr/core.git
synced 2026-04-26 18:18:03 +02:00
Eliminate blank spaces in "New" menu
This commit is contained in:
@@ -1,89 +0,0 @@
|
||||
<template>
|
||||
<div
|
||||
class="admin__toolbar--body"
|
||||
:class="contrast ? 'is-light' : 'is-dark'"
|
||||
role="toolbar"
|
||||
>
|
||||
<div class="toolbar--item is-brand">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 91 79">
|
||||
<g fill-rule="evenodd">
|
||||
<path
|
||||
d="M22.4439 78.14003L0 38.98236 22.75 0l45.19015.17305L90.3848 39.33448 67.63857 78.32135l-45.18714-.17305-.00752-.00827zm4.97036-7.58863l.00588.00667 35.31413.13936 17.77638-31.39679L62.96997 7.76328l-35.31649-.13935L9.87415 39.01708 27.41426 70.5514z"
|
||||
/>
|
||||
<path
|
||||
fill-rule="nonzero"
|
||||
d="M31.58678 31.6h7.52066v15.04762h-7.52066z"
|
||||
/>
|
||||
<path
|
||||
fill-rule="nonzero"
|
||||
d="M37.5657 35.3619h22.56198v7.52381H37.5657z"
|
||||
/>
|
||||
</g>
|
||||
</svg>
|
||||
<ul class="toolbar--menu">
|
||||
<li><a href="https://bolt.cm/" target="_blank">bolt.cm</a></li>
|
||||
<li>
|
||||
<a href="https://docs.bolt.cm/" target="_blank">{{
|
||||
labels['about.bolt_documentation']
|
||||
}}</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="toolbar--item is-new">
|
||||
<i class="fas fa-magic mr-2"></i>{{ labels['action.create_new'] }}
|
||||
<ul class="toolbar--menu">
|
||||
<li v-for="(item, index) in createMenu" :key="index">
|
||||
<a :href="item.link_new">{{ item.singular_name }}</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="toolbar--item is-site">
|
||||
<i class="fas fa-globe-americas mr-2"></i>{{ siteName }}
|
||||
<ul class="toolbar--menu">
|
||||
<li>
|
||||
<a href="/" target="_blank">{{ labels['action.visit_site'] }}</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="toolbar--item is-profile">
|
||||
<i class="fas fa-user mr-2"></i>{{ labels['general.greeting'] }}
|
||||
<ul class="toolbar--menu">
|
||||
<li>
|
||||
<a href="/bolt/profile-edit">{{ labels['action.edit_profile'] }}</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="/bolt/logout">{{ labels['action.logout'] }}</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
const tinycolor = require('tinycolor2');
|
||||
|
||||
export default {
|
||||
name: 'AdminToolbar',
|
||||
props: ['siteName', 'menu', 'labels'],
|
||||
data: () => ({
|
||||
label: {},
|
||||
}),
|
||||
computed: {
|
||||
contrast() {
|
||||
const color = getComputedStyle(document.body).getPropertyValue(
|
||||
'--admin-toolbar',
|
||||
);
|
||||
const test = tinycolor(color);
|
||||
return test.isLight();
|
||||
},
|
||||
createMenu() {
|
||||
return this.menu.filter(item => {
|
||||
return (
|
||||
(item.contentType !== null && !item.singleton) ||
|
||||
(item.singleton && (item.submenu === null || item.submenu.length < 1))
|
||||
);
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
@@ -21,7 +21,7 @@
|
||||
</g>
|
||||
</svg>
|
||||
<ul class="toolbar--menu">
|
||||
<li><a href="https://bolt.cm/" target="_blank">bolt.cm</a></li>
|
||||
<li><a href="https://bolt.cm/" target="_blank">Visit Bolt.cm</a></li>
|
||||
<li>
|
||||
<a href="https://docs.bolt.cm/" target="_blank">{{
|
||||
labels['about.bolt_documentation']
|
||||
@@ -38,12 +38,9 @@
|
||||
</ul>
|
||||
</div>
|
||||
<div class="toolbar--item is-site">
|
||||
<i class="fas fa-globe-americas mr-2"></i>{{ siteName }}
|
||||
<ul class="toolbar--menu">
|
||||
<li>
|
||||
<a href="/" target="_blank">{{ labels['action.visit_site'] }}</a>
|
||||
</li>
|
||||
</ul>
|
||||
<a href="/" target="_blank">
|
||||
<i class="fas fa-globe-americas mr-2"></i>{{ labels['action.visit_site'] }}: {{ siteName }}
|
||||
</a>
|
||||
</div>
|
||||
<div class="toolbar--item is-profile">
|
||||
<i class="fas fa-user mr-2"></i>{{ labels['general.greeting'] }}
|
||||
@@ -73,7 +70,7 @@ export default {
|
||||
createMenu() {
|
||||
return this.menu.filter(item => {
|
||||
return (
|
||||
(item.contentType !== null && !item.singleton) ||
|
||||
(item.contentType !== null && !item.singleton && item.singular_name) ||
|
||||
(item.singleton && (item.submenu === null || item.submenu.length < 1))
|
||||
);
|
||||
});
|
||||
|
||||
@@ -59,7 +59,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
&.is-site,
|
||||
&.is-new,
|
||||
&.is-profile {
|
||||
.toolbar--menu {
|
||||
left: auto;
|
||||
@@ -67,7 +67,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
&.is-site {
|
||||
&.is-new {
|
||||
margin-left: auto;
|
||||
}
|
||||
|
||||
|
||||
+2
-3
@@ -28,7 +28,7 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@babel/polyfill": "^7.4.0",
|
||||
"@vue/cli-service": "^3.5.1",
|
||||
"@vue/cli-service": "^3.5.3",
|
||||
"axios": "^0.18.0",
|
||||
"baguettebox.js": "^1.11.0",
|
||||
"bootstrap": "^4.3.1",
|
||||
@@ -37,7 +37,6 @@
|
||||
"jquery": "^3.3.1",
|
||||
"moment": "^2.24.0",
|
||||
"no-scroll": "^2.1.1",
|
||||
"npm-check-updates": "^3.1.1",
|
||||
"popper.js": "^1.14.7",
|
||||
"register-service-worker": "^1.6.2",
|
||||
"simplemde": "^1.11.2",
|
||||
@@ -60,7 +59,7 @@
|
||||
"@babel/plugin-transform-runtime": "^7.4.0",
|
||||
"@babel/polyfill": "^7.4.0",
|
||||
"@babel/preset-env": "^7.4.2",
|
||||
"@symfony/webpack-encore": "^0.24.0",
|
||||
"@symfony/webpack-encore": "^0.26.0",
|
||||
"@vue/test-utils": "^1.0.0-beta.29",
|
||||
"ajv-keywords": "^3.4.0",
|
||||
"autoprefixer": "^9.5.0",
|
||||
|
||||
Reference in New Issue
Block a user