Skip to content

Commit

Permalink
fix(footer): sns icon visible 추가 (#52)
Browse files Browse the repository at this point in the history
* fix(footer): sns icon visible 추가

* fix(about): about 구글 드라이브 연동 수정

* [bot] update files

* feat(footer): sns visible 추가

* [bot] update files

Co-authored-by: GitHub Action <[email protected]>
  • Loading branch information
mcauto and actions-user authored Nov 14, 2021
1 parent c53cd5c commit 7105fbf
Show file tree
Hide file tree
Showing 11 changed files with 18 additions and 13 deletions.
7 changes: 4 additions & 3 deletions .script/make_content.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def make_about(
f.write(json.dumps(about, ensure_ascii=False, indent=2))

for idx, review in enumerate(reviews[1:]):
author, th, title, href, _ = review
author, th, title, href = review
_review = {
"id": idx,
"author": author,
Expand Down Expand Up @@ -109,10 +109,11 @@ def make_project(data: Dict[str, Any]) -> None:
def make_footer(data: Dict[str, Any]) -> None:
sns_items = []
for idx, row in enumerate(data[1:]):
name, href, _black, _white = row
name, href, _black, _white, _visible = row
black = f"https://drive.google.com/uc?export=view&id={_black}"
white = f"https://drive.google.com/uc?export=view&id={_white}"
sns_items.append({"idx":idx, "name": name, "href": href, "black": black, "white": white})
visible = bool(_visible)
sns_items.append({"idx":idx, "name": name, "href": href, "black": black, "white": white, "visible": visible})

for idx, sns in enumerate(sns_items):
with open(f"./content/footers/sns/{idx}.json", mode="w", encoding="utf-8") as f:
Expand Down
2 changes: 1 addition & 1 deletion _content/data.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion components/footer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<div class="footer">
<div class="leftArea">
<div class="sns">
<ul v-for="item in items" :key="item.idx">
<ul v-for="item in items" v-show="item.visible" :key="item.idx">
<a :href="item.href">
<img :src="icon(item)" :alt="item.name" />
</a>
Expand Down
3 changes: 2 additions & 1 deletion content/footers/sns/0.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@
"name": "facebook",
"href": "https://www.facebook.com/Nexterspage/",
"black": "https://drive.google.com/uc?export=view&id=1b5802BwIntqOi0VuLYki8U9g_TGkvVaV",
"white": "https://drive.google.com/uc?export=view&id=18MRxjDn8WiN_XTEYBwr6uEqsWx1nimOA"
"white": "https://drive.google.com/uc?export=view&id=18MRxjDn8WiN_XTEYBwr6uEqsWx1nimOA",
"visible": true
}
3 changes: 2 additions & 1 deletion content/footers/sns/1.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@
"name": "github",
"href": "https://github.com/Nexters",
"black": "https://drive.google.com/uc?export=view&id=1rAcylaEBtOxM0vH3Nif2bWmmgRFLBbFV",
"white": "https://drive.google.com/uc?export=view&id=10aiYvwFvn0a56efLOd_DKR118c3yJYlc"
"white": "https://drive.google.com/uc?export=view&id=10aiYvwFvn0a56efLOd_DKR118c3yJYlc",
"visible": true
}
3 changes: 2 additions & 1 deletion content/footers/sns/2.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@
"name": "instagram",
"href": "https://www.instagram.com/team_nexters/",
"black": "https://drive.google.com/uc?export=view&id=1r6Klu6_8tQFyEWoVA_C5Do7uauoFa0ZR",
"white": "https://drive.google.com/uc?export=view&id=1FALUvLgbpC0ac-j0asPZllFh3VV4VJnO"
"white": "https://drive.google.com/uc?export=view&id=1FALUvLgbpC0ac-j0asPZllFh3VV4VJnO",
"visible": true
}
3 changes: 2 additions & 1 deletion content/footers/sns/3.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@
"name": "medium",
"href": "https://medium.com/teamnexters",
"black": "https://drive.google.com/uc?export=view&id=1VObJf1R3hrlKVhd_1nG6hkcOFowWUH-Y",
"white": "https://drive.google.com/uc?export=view&id=1F7D0MCy_0ob6NdTX5jIymoEVerbrDDGF"
"white": "https://drive.google.com/uc?export=view&id=1F7D0MCy_0ob6NdTX5jIymoEVerbrDDGF",
"visible": true
}
2 changes: 1 addition & 1 deletion layouts/base.vue
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ import Footer from "~/components/footer.vue";
.only(["headers"])
.fetch();
const items = await this.$content("footers/sns")
.only(["idx", "name", "href", "black", "white"])
.only(["idx", "name", "href", "black", "white", "visible"])
.fetch();
const { copyrights } = await this.$content("footers/copyrights")
.only(["copyrights"])
Expand Down
2 changes: 1 addition & 1 deletion layouts/default.vue
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import { Component, Vue } from "nuxt-property-decorator";
.only(["headers"])
.fetch();
const items = await this.$content("footers/sns")
.only(["idx", "name", "href", "black", "white"])
.only(["idx", "name", "href", "black", "white", "visible"])
.fetch();
const { copyrights } = await this.$content("footers/copyrights")
.only(["copyrights"])
Expand Down
2 changes: 1 addition & 1 deletion layouts/main.vue
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ import background from "~/assets/css/export.scss";
])
.fetch();
const items = await this.$content("footers/sns")
.only(["idx", "name", "href", "black", "white"])
.only(["idx", "name", "href", "black", "white", "visible"])
.fetch();
const { copyrights } = await this.$content("footers/copyrights")
.only(["copyrights"])
Expand Down
2 changes: 1 addition & 1 deletion layouts/recruitment.vue
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ import { Component, Vue } from "nuxt-property-decorator";
])
.fetch();
const items = await this.$content("footers/sns")
.only(["idx", "name", "href", "black", "white"])
.only(["idx", "name", "href", "black", "white", "visible"])
.fetch();
const { copyrights } = await this.$content("footers/copyrights")
.only(["copyrights"])
Expand Down

0 comments on commit 7105fbf

Please sign in to comment.