Skip to content

Commit

Permalink
Merge pull request #33 from emost22/main
Browse files Browse the repository at this point in the history
fix(about, project, recruitment, footer, contact): fix link to open on a new page
  • Loading branch information
emost22 authored Jul 13, 2023
2 parents 1f60a80 + 50f6de8 commit a9548f0
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 8 deletions.
2 changes: 1 addition & 1 deletion components/about/review/card.vue
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const ReviewCard = defineComponent({
},
methods: {
onClick: function () {
window.location.href = this.href;
window.open(this.href);
},
},
});
Expand Down
4 changes: 2 additions & 2 deletions components/footer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
:key="sponsor.idx"
class="sponsorItem"
>
<a :href="sponsor.href">
<a :href="sponsor.href" target="_blank">
<span>{{ sponsor.name }}</span>
</a>
</section>
Expand All @@ -26,7 +26,7 @@
</div>
<div class="sns">
<ul v-for="item in items" v-show="item.visible" :key="item.idx">
<a :href="item.href">
<a :href="item.href" target="_blank">
<img :src="icon(item)" :alt="item.name" />
</a>
</ul>
Expand Down
4 changes: 2 additions & 2 deletions components/project/project/card.vue
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
@click="onClickLink(link)"
@click.stop=""
>
<a :href="link">
<a :href="link" target="_blank">
{{ platform }}
</a>
</div>
Expand Down Expand Up @@ -59,7 +59,7 @@ const ProjectCard = defineComponent({
methods: {
...mapActions({ showDetail: "project/showDetail" }),
onClickLink(href) {
window.location.href = href;
window.open(href);
},
scrollToId(id) {
document.getElementById(id).scrollIntoView();
Expand Down
1 change: 1 addition & 0 deletions components/project/project/detail.vue
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
:key="platform"
class="link-item"
:href="link"
target="_blank"
>
{{ platform }}
</a>
Expand Down
1 change: 1 addition & 0 deletions components/recruitment/banner.vue
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
class="box"
:button-name="box.name"
:href="`${box.link}`"
:is-new-page=true
/>
</article>
</div>
Expand Down
10 changes: 9 additions & 1 deletion components/recruitment/linkButton.vue
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,18 @@ export default defineComponent({
type: String,
require: false,
},
isNewPage: {
type: Boolean,
require: true,
}
},
methods: {
onClick: function () {
location.href = this.href;
if (this.isNewPage) {
window.open(this.href);
} else {
location.href = this.href;
}
},
},
});
Expand Down
4 changes: 2 additions & 2 deletions pages/contact.vue
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,11 @@ export default defineComponent({
handleClick: (action) => () => {
switch (action) {
case "kakao": {
window.location.href = "https://pf.kakao.com/_xdxmnnj";
window.open("https://pf.kakao.com/_xdxmnnj");
break;
}
case "facebook": {
window.location.href = "https://www.facebook.com/Nexterspage";
window.open("https://www.facebook.com/Nexterspage");
break;
}
case "gmail": {
Expand Down
1 change: 1 addition & 0 deletions pages/recruitment.vue
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
class="faqBox"
:button-name="`FAQ 바로가기`"
:href="`/contact#faq`"
:is-new-page=false
/>
</div>
</div>
Expand Down

0 comments on commit a9548f0

Please sign in to comment.