Skip to content

Commit

Permalink
feat(theme): 使背景上方的遮罩可选 (#24)
Browse files Browse the repository at this point in the history
  • Loading branch information
ISNing authored Oct 18, 2024
1 parent f35dd5a commit e3a277c
Show file tree
Hide file tree
Showing 11 changed files with 51 additions and 11 deletions.
6 changes: 5 additions & 1 deletion theme/layouts/center.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,13 @@ const props = defineProps({
type: String,
default: undefined,
},
dim: {
type: Boolean,
default: true,
},
})
const style = computed(() => handleBackground(props.background, true))
const style = computed(() => handleBackground(props.background, props.dim))
</script>

<template>
Expand Down
6 changes: 5 additions & 1 deletion theme/layouts/cols.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ const props = defineProps({
type: String,
default: undefined,
},
dim: {
type: Boolean,
default: true,
},
cols: {
type: Number,
default: undefined,
Expand All @@ -21,7 +25,7 @@ const props = defineProps({
}
})
const style = computed(() => handleBackground(props.background, true))
const style = computed(() => handleBackground(props.background, props.dim))
const colIds = computed(() => {
const colIds: string[] = []
Expand Down
6 changes: 5 additions & 1 deletion theme/layouts/cover.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,13 @@ const props = defineProps({
// random image from a curated Unsplash collection by Anthony
default: 'https://source.unsplash.com/collection/94734566/1920x1080',
},
dim: {
type: Boolean,
default: true,
},
})
const style = computed(() => handleBackground(props.background, true))
const style = computed(() => handleBackground(props.background, props.dim))
</script>

<template>
Expand Down
6 changes: 5 additions & 1 deletion theme/layouts/default.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,13 @@ const props = defineProps({
type: String,
default: undefined,
},
dim: {
type: Boolean,
default: true,
},
})
const style = computed(() => handleBackground(props.background, true))
const style = computed(() => handleBackground(props.background, props.dim))
</script>

<template>
Expand Down
6 changes: 5 additions & 1 deletion theme/layouts/fact.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,13 @@ const props = defineProps({
type: String,
default: undefined,
},
dim: {
type: Boolean,
default: true,
},
})
const style = computed(() => handleBackground(props.background, true))
const style = computed(() => handleBackground(props.background, props.dim))
</script>

<template>
Expand Down
6 changes: 5 additions & 1 deletion theme/layouts/full.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,13 @@ const props = defineProps({
type: String,
default: undefined,
},
dim: {
type: Boolean,
default: true,
},
})
const style = computed(() => handleBackground(props.background, true))
const style = computed(() => handleBackground(props.background, props.dim))
</script>

<template>
Expand Down
2 changes: 1 addition & 1 deletion theme/layouts/fullpage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const props = defineProps({
},
})
const style = computed(() => handleBackground(props.background, true))
const style = computed(() => handleBackground(props.background, props.dim))
</script>

<style>
Expand Down
6 changes: 5 additions & 1 deletion theme/layouts/intro.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,13 @@ const props = defineProps({
type: String,
default: undefined,
},
dim: {
type: Boolean,
default: true,
},
})
const style = computed(() => handleBackground(props.background, true))
const style = computed(() => handleBackground(props.background, props.dim))
</script>

<template>
Expand Down
6 changes: 5 additions & 1 deletion theme/layouts/quote.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,13 @@ const props = defineProps({
type: String,
default: undefined,
},
dim: {
type: Boolean,
default: true,
},
})
const style = computed(() => handleBackground(props.background, true))
const style = computed(() => handleBackground(props.background, props.dim))
</script>

<template>
Expand Down
6 changes: 5 additions & 1 deletion theme/layouts/section.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,13 @@ const props = defineProps({
type: String,
default: undefined,
},
dim: {
type: Boolean,
default: true,
},
})
const style = computed(() => handleBackground(props.background, true))
const style = computed(() => handleBackground(props.background, props.dim))
</script>

<template>
Expand Down
6 changes: 5 additions & 1 deletion theme/layouts/statement.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,13 @@ const props = defineProps({
type: String,
default: undefined,
},
dim: {
type: Boolean,
default: true,
},
})
const style = computed(() => handleBackground(props.background, true))
const style = computed(() => handleBackground(props.background, props.dim))
</script>

<template>
Expand Down

0 comments on commit e3a277c

Please sign in to comment.