Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minor design update #211

Merged
merged 6 commits into from
Jan 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion frontend/nuxt.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -140,9 +140,15 @@ module.exports = {
enforce: 'pre',
test: /\.md$/,
loader: 'raw-loader',
exclude: /(node_modules)/,
exclude: /(node_modules)/
});
},
babel: { compact: true },
hotMiddleware: {
client: {
// turn off client overlay when errors are present
overlay: false
}
}
},
};
30,161 changes: 30,161 additions & 0 deletions frontend/package-lock.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
"sass": "^1.55.0",
"sass-loader": "10.1.1",
"v-tooltip": "^2.0.2",
"vue-cookie": "^1.1.4",
"vue-loading-overlay": "^3.3.4",
"vue-markdown": "^2.2.4",
"vue-plyr": "^7.0.0",
Expand Down
7 changes: 7 additions & 0 deletions frontend/src/assets/styles/widget/_config-tabs.scss
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,13 @@
}

.nav-pills .nav-item:nth-child(2) {
border: 1px solid #cfcfcf;
border-left: none;
border-radius: none;
overflow: hidden;
}

.nav-pills .nav-item:nth-child(3) {
border: 1px solid #cfcfcf;
border-left: none;
border-radius: 0 0.25rem 0.25rem 0;
Expand Down
37 changes: 37 additions & 0 deletions frontend/src/assets/styles/widget/_search-input.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,43 @@
* SPDX-License-Identifier: AGPL-3.0-or-later
*/

#widget-sorting {
border-bottom: 2px solid #000;

&.active {
color: $secondary !important;
border-bottom: 2px solid $secondary !important;
}

.filter-text {
font-size: 24px;
font-weight: bold;
}

.filter-text-light {
font-size: 24px;
white-space:nowrap;
overflow:hidden;
text-overflow: ellipsis;
}
@media (max-width: 576px) {
border-bottom: 1px solid #000;

&.active {
border-bottom: 1px solid $secondary !important;
}

.filter-text {
font-size: 14px;
font-weight: normal;
}

.filter-text-light {
font-size: 14px;
}
}
}

#widget-tags {
border-bottom: 2px solid #000;

Expand Down
158 changes: 79 additions & 79 deletions frontend/src/components/detail-bottom-bar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,60 +7,38 @@ SPDX-License-Identifier: AGPL-3.0-or-later
<template>
<div class="bottom-bar-container d-flex justify-content-center">
<div class="bottom-bar d-inline-flex justify-content-center">
<nuxt-link
class="bottom-bar-button d-flex justify-content-center align-items-center text-uppercase"
:to="toFullscreen" target="_blank"
>
<img :src="require('static/icons/ic_max_preview.svg')" class="p-1" />
<div class="bottom-bar-button-text p-1">open in new tab</div>
</nuxt-link>
<nuxt-link
v-if="selectedView === 'editing'"
class="bottom-bar-button selected d-flex justify-content-center align-items-center text-uppercase"
:to="toDetails"
>
<img :src="require('static/icons/ic_min_editing.svg')" class="p-1" />
<div class="bottom-bar-button-text p-1">minimize editing</div>
</nuxt-link>
<nuxt-link
v-else
class="bottom-bar-button d-flex justify-content-center align-items-center text-uppercase"
:to="toFullscreenEditing"
>
<img :src="require('static/icons/ic_max_editing.svg')" class="p-1" />
<div class="bottom-bar-button-text p-1">fullscreen editing</div>
</nuxt-link>
<div
id="copy-code"
class="bottom-bar-button d-flex justify-content-center align-items-center text-uppercase"
@click="copyCode"
>
<img :src="require('static/icons/ic_copy.svg')" class="p-1" />
<div class="bottom-bar-button-text p-1">copy code</div>
</div>
<b-popover
id="popover"
target="copy-code"
:show.sync="showPopover"
triggers="click"
placement="top"
>
Copied to clipboard
</b-popover>
<div
class="bottom-bar-button d-flex justify-content-center align-items-center text-uppercase"
@click="createCodeSandbox"
>
<img :src="require('static/icons/codesandbox.svg')" class="p-1" />
<div class="bottom-bar-button-text p-1">open codesandbox</div>
</div>
<div
class="bottom-bar-button d-flex justify-content-center align-items-center text-uppercase"
@click="$emit('updatePreview')"
>
<img :src="require('static/icons/ic_update.svg')" class="p-1" />
<div class="bottom-bar-button-text p-1">update preview</div>
</div>
<nuxt-link
class="bottom-bar-button d-flex justify-content-center align-items-center text-uppercase"
:to="toFullscreen" target="_blank"
>
<img :src="require('static/icons/ic_max_preview.svg')" class="p-1" />
<div class="bottom-bar-button-text p-1">open in new tab</div>
</nuxt-link>

<div
class="bottom-bar-button d-flex justify-content-center align-items-center text-uppercase"
@click="handleScroll('chooseRightSidebarTab',0)"
>
<img :src="require('static/icons/ic_max_editing.svg')" class="p-1" />
<div class="bottom-bar-button-text p-1">configure</div>
</div>

<div
class="bottom-bar-button d-flex justify-content-center align-items-center text-uppercase"
@click="handleScroll('chooseRightSidebarTab',1)"
>
<img :src="require('static/icons/ic_copy.svg')" class="p-1" />
<div class="bottom-bar-button-text p-1">share</div>
</div>

<div
class="bottom-bar-button d-flex justify-content-center align-items-center text-uppercase"
@click="handleScroll('chooseRightSidebarTab',2)"
>
<img :src="require('static/icons/information-outline.svg')" class="p-1" />
<div class="bottom-bar-button-text p-1">about</div>
</div>

</div>
</div>
</template>
Expand All @@ -76,8 +54,6 @@ export default {
},
data() {
return {
showPopover: false,
intervalId: 0,
id: this.$route.params.id,
version: this.$route.params.version,
};
Expand Down Expand Up @@ -108,19 +84,19 @@ export default {
});
}
},
toFullscreenEditing() {
if (this.version) {
return this.localePath({
name: 'webcomponent-id-version-fullscreen-editing',
params: { id: this.id, version: this.version },
});
} else {
return this.localePath({
name: 'webcomponent-id-fullscreen-editing',
params: { id: this.id },
});
}
},
// toFullscreenEditing() {
// if (this.version) {
// return this.localePath({
// name: 'webcomponent-id-version-fullscreen-editing',
// params: { id: this.id, version: this.version },
// });
// } else {
// return this.localePath({
// name: 'webcomponent-id-fullscreen-editing',
// params: { id: this.id },
// });
// }
// },
toDetails() {
if (this.version) {
return this.localePath({
Expand All @@ -136,17 +112,41 @@ export default {
},
},
methods: {
copyCode() {
clearInterval(this.intervalId);
this.showPopover = true;
this.intervalId = setInterval(
function () {
this.showPopover = false;
}.bind(this),
3000
);
this.$emit('copyCode');
changeTabIndex(tabIndex) {
this.$emit('changeTabIndex',tabIndex,true);
},
handleScroll(anchorId,tabIndex) {
this.changeTabIndex(tabIndex)

const anchor = document.querySelector(`#${anchorId}`)
if (anchor) {
window.scrollTo({
top: anchor.getBoundingClientRect().top + window.pageYOffset
})
}
},
// copyLink() {
// clearInterval(this.intervalId);
// this.showPopover = true;
// this.intervalId = setInterval(
// function () {
// this.showPopover = false;
// }.bind(this),
// 3000
// );
// this.$emit('copyCode');
// },
// copyCode() {
// clearInterval(this.intervalId);
// this.showEmbedPopover = true;
// this.intervalId = setInterval(
// function () {
// this.showEmbedPopover = false;
// }.bind(this),
// 3000
// );
// this.$emit('copyCode');
// },
async createCodeSandbox() {
await this.$store.dispatch('loader/startLoading');

Expand Down
Loading
Loading