Skip to content
This repository has been archived by the owner on Jul 16, 2024. It is now read-only.

Commit

Permalink
[CHORE] reword Ads to Sponsors, could not achieve objective of #40
Browse files Browse the repository at this point in the history
  • Loading branch information
Shion1305 committed May 6, 2022
1 parent 8c1432d commit d4deded
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 17 deletions.
6 changes: 3 additions & 3 deletions src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -30,17 +30,17 @@ function getLatestSlides() {
);
}
function getLatestAds() {
function getLatestSponsors() {
client.get({
endpoint: 'ads'
}).then((data) => {
store.commit('setAds', data.contents);
store.commit('setSponsors', data.contents);
}
);
}
onMounted(() => {
getLatestAds();
getLatestSponsors();
getLatestUpdate();
window.onload = () => {
const loader = document.getElementById('loader');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const access = async function (id) {
}
</script>
<template>
<swiper v-if="store.state.ads.length!==0" :autoplay="{
<swiper v-if="store.state.sponsors.length!==0" :autoplay="{
delay: 4500,
disableOnInteraction: false,
}" :breakpoints="{
Expand All @@ -50,9 +50,9 @@ const access = async function (id) {
:slidesPerGroup="2"
:slidesPerView="2"
:spaceBetween="10"
class="adsSwiper">
class="sponsorsSwiper">

<swiper-slide v-for="ad in randomList(store.state.ads)" :key="ad.id">
<swiper-slide v-for="ad in randomList(store.state.sponsors)" :key="ad.id">
<a :href="`${ad.url}`" rel="noopener noreferrer"
target="_blank"
v-on:click="access(`${ad.sponsor}`)"><img
Expand Down
6 changes: 3 additions & 3 deletions src/store/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@ import {createStore} from 'vuex'
export default createStore({
state: {
slides: [{slide: {url: "/image/loading.png"}}],
ads: [{image: {url: "/image/loading1.png"}}],
sponsors: [{image: {url: "/image/loading1.png"}}],
updates: []
},
getters: {},
mutations: {
setSlide(state, newSlides) {
state.slides = newSlides;
},
setAds(state, newAds) {
state.ads = newAds;
setSponsors(state, newSponsors) {
state.sponsors = newSponsors;
},
setUpdates(state, newUpdates) {
state.updates = newUpdates;
Expand Down
8 changes: 4 additions & 4 deletions src/views/AboutView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {Autoplay, Navigation} from "swiper";
import "swiper/css";
import "swiper/css/navigation";
import "swiper/css/autoplay";
import AdsBlock from "@/components/AdsBlock";
import SponsorBlock from "@/components/SponsorBlock";
import {event} from 'vue-gtag';
function getShuffledImages() {
Expand Down Expand Up @@ -34,8 +34,8 @@ useMeta({title: '清陵祭とは', description: "「22清陵祭」を開催す
</script>

<template>
<div class="ads fadeUp">
<AdsBlock/>
<div class="sponsor_block fadeUp">
<SponsorBlock/>
</div>
<div class="about-head-wrapper">
<div class="about-head fadeUp">
Expand Down Expand Up @@ -97,7 +97,7 @@ useMeta({title: '清陵祭とは', description: "「22清陵祭」を開催す
</div>
</template>
<style lang="scss" scoped>
.ads {
.sponsor_block {
animation-delay: 2.1s;
}
Expand Down
8 changes: 4 additions & 4 deletions src/views/HomeView.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<script setup>
import CarouselView from "@/components/CarouselView";
import AdsBlock from "@/components/AdsBlock";
import SponsorBlock from "@/components/SponsorBlock";
import TwitterTimeline from "@/components/TwitterTimeline";
import UpdateElement from "@/components/UpdateElement";
import store from "@/store";
Expand All @@ -22,8 +22,8 @@ useMeta({title: '', description: '横浜国立大学オンライン大学祭「2
<CarouselView id="carousel" class="fadeUp" style="animation-delay: 0.5s"/>
</div>
<div class="content-frame">
<div class="ads-area fadeUp">
<AdsBlock/>
<div class="sponsor-area fadeUp">
<SponsorBlock/>
</div>
<div class="fadeUp events_search_block">
<div class="section_title">
Expand Down Expand Up @@ -125,7 +125,7 @@ useMeta({title: '', description: '横浜国立大学オンライン大学祭「2
align-items: center;
}
.ads-area {
.sponsor-area {
width: fit-content;
display: flex;
flex-direction: row;
Expand Down

0 comments on commit d4deded

Please sign in to comment.