Skip to content

Commit

Permalink
🎨
Browse files Browse the repository at this point in the history
  • Loading branch information
syuilo committed Oct 12, 2024
1 parent ee08e9f commit c4c69cd
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 14 deletions.
6 changes: 4 additions & 2 deletions packages/frontend/src/components/MkDateSeparatedList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -100,10 +100,12 @@ export default defineComponent({
return [el, separator];
} else {
if (props.ad && item._shouldInsertAd_) {
return [h(MkAd, {
return [h('div', {
key: item.id + ':ad',
style: 'padding: 8px; background-size: auto auto; background-image: repeating-linear-gradient(45deg, transparent, transparent 8px, var(--MI_THEME-bg) 8px, var(--MI_THEME-bg) 14px );',
}, [h(MkAd, {
prefer: ['horizontal', 'horizontal-big'],
}), el];
})]), el];
} else {
return el;
}
Expand Down
18 changes: 6 additions & 12 deletions packages/frontend/src/components/global/MkAd.vue
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,10 @@ SPDX-License-Identifier: AGPL-3.0-only
</component>
</div>
<div v-else :class="$style.menu">
<div :class="$style.menuContainer">
<div>Ads by {{ host }}</div>
<!--<MkButton class="button" primary>{{ i18n.ts._ad.like }}</MkButton>-->
<MkButton v-if="chosen.ratio !== 0" :class="$style.menuButton" @click="reduceFrequency">{{ i18n.ts._ad.reduceFrequencyOfThisAd }}</MkButton>
<button class="_textButton" @click="toggleMenu">{{ i18n.ts._ad.back }}</button>
</div>
<div>Ads by {{ host }}</div>
<!--<MkButton class="button" primary>{{ i18n.ts._ad.like }}</MkButton>-->
<MkButton v-if="chosen.ratio !== 0" :class="$style.menuButton" @click="reduceFrequency">{{ i18n.ts._ad.reduceFrequencyOfThisAd }}</MkButton>
<button class="_textButton" @click="toggleMenu">{{ i18n.ts._ad.back }}</button>
</div>
</div>
<div v-else></div>
Expand Down Expand Up @@ -123,8 +121,7 @@ function reduceFrequency(): void {

<style lang="scss" module>
.root {
background-size: auto auto;
background-image: repeating-linear-gradient(45deg, transparent, transparent 8px, var(--MI_THEME-bg) 8px, var(--MI_THEME-bg) 14px );

}

.main {
Expand Down Expand Up @@ -202,14 +199,11 @@ function reduceFrequency(): void {
}

.menu {
padding: 8px;
text-align: center;
}

.menuContainer {
padding: 8px;
margin: 0 auto;
max-width: 400px;
background: var(--MI_THEME-panel);
border: solid 1px var(--MI_THEME-divider);
}

Expand Down

0 comments on commit c4c69cd

Please sign in to comment.