Skip to content
This repository has been archived by the owner on Feb 22, 2023. It is now read-only.

Combine layouts into a single default #599

Merged
merged 1 commit into from
Jan 14, 2022
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
24 changes: 15 additions & 9 deletions src/layouts/default.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,25 @@
</main>
</div>
</template>

<script>
import iframeHeight from '~/mixins/iframe-height'
import { useContext } from '@nuxtjs/composition-api'

import { NAV } from '~/constants/store-modules'
import VHeader from '~/components/VHeader/VHeader.vue'

import { useContext } from '@nuxtjs/composition-api'
import MigrationNotice from '~/components/MigrationNotice.vue'
import TranslationStatusBanner from '~/components/TranslationStatusBanner.vue'

const embeddedPage = {
name: 'embedded',
components: { VHeader, TranslationStatusBanner },
layout: 'embedded',
import iframeHeight from '~/mixins/iframe-height'
import { NAV } from '~/constants/store-modules'

const defaultLayout = {
name: 'default',
components: {
VHeader,
MigrationNotice,
TranslationStatusBanner,
},
layout: 'default',
mixins: [iframeHeight],
head() {
return this.$nuxtI18nHead({ addSeoAttributes: true, addDirAttribute: true })
Expand All @@ -34,5 +40,5 @@ const embeddedPage = {
}
},
}
export default embeddedPage
export default defaultLayout
</script>
43 changes: 0 additions & 43 deletions src/layouts/with-nav-search.vue

This file was deleted.

1 change: 0 additions & 1 deletion src/pages/about.vue
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,6 @@
<script>
const AboutPage = {
name: 'about-page',
layout: 'with-nav-search',
}

export default AboutPage
Expand Down
1 change: 0 additions & 1 deletion src/pages/audio/_id.vue
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ import { MEDIA } from '~/constants/store-modules'
const AudioDetailPage = {
name: 'AudioDetailPage',
mixins: [iframeHeight],
layout: 'with-nav-search',
data() {
return {
thumbnailURL: null,
Expand Down
1 change: 0 additions & 1 deletion src/pages/extension.vue
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ import feature3 from '~/assets/screenshots/extension_feat_3.png'
const AboutPage = {
name: 'about-page',
components: { ExtensionBrowsers },
layout: 'with-nav-search',
data() {
const features = [
{ key: 'search', image: feature1 },
Expand Down
1 change: 0 additions & 1 deletion src/pages/feedback.vue
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ const suggestionForm =

export const FeedbackPage = {
name: 'feedback-page',
layout: 'with-nav-search',
data() {
return {
activeTab: 0,
Expand Down
1 change: 0 additions & 1 deletion src/pages/image/_id.vue
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ import VPhotoDetails from '~/components/ImageDetails/VPhotoDetails.vue'
const PhotoDetailPage = {
name: 'PhotoDetailPage',
components: { RelatedImages, VPhotoDetails },
layout: 'with-nav-search',
data() {
return {
breadCrumbURL: '',
Expand Down
1 change: 0 additions & 1 deletion src/pages/meta-search.vue
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,6 @@
<script>
export default {
name: 'MetaSearchPage',
layout: 'with-nav-search',
}
</script>

Expand Down
1 change: 0 additions & 1 deletion src/pages/search-help.vue
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,6 @@
<script>
const SearchHelpPage = {
name: 'search-help-page',
layout: 'with-nav-search',
methods: {
providerSearchLink(providerCode) {
return `https://search.creativecommons.org/search?q=provider%3A%20"${providerCode}"`
Expand Down
1 change: 0 additions & 1 deletion src/pages/sources.vue
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,6 @@ const ARABIC_NUMERAL_LOCALES = ['ar', 'fa', 'ur', 'ckb', 'ps']

const SourcePage = {
name: 'source-page',
layout: 'with-nav-search',
data() {
return {
sort: {
Expand Down