Skip to content

Commit

Permalink
fix: 링크가 있는 경우에만 추가하기
Browse files Browse the repository at this point in the history
  • Loading branch information
mcauto committed Oct 23, 2021
1 parent 5b27f6f commit 3654830
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
17 changes: 10 additions & 7 deletions .script/make_projects.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
if f"https://drive.google.com/uc?export=view&id={_thumbnail}"
else ""
)
projects.append({
project = {
"idx": idx,
"app_name": app_name,
"thumbnail": thumbnail,
Expand All @@ -26,12 +26,15 @@
"members": [member.strip() for member in _members.split(",")],
"description": description,
"ppt": ppt,
"link":{
"android":android_link,
"ios":ios_link,
"web":web_link
}
})
"link":{}
}
if android_link:
project["link"] = android_link
if ios_link:
project["ios_link"] = ios_link
if web_link:
project["web_link"] = web_link
projects.append(project)

for idx, project in enumerate(projects):
with open(f"./content/projects/{idx}.json", mode="w", encoding="utf-8") as f:
Expand Down
2 changes: 1 addition & 1 deletion components/project/project/card.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<nuxt-link :to="`project#${project.idx}`">
<img class="thumbnail" :src="thumbnail" />
<p class="name">{{ project.app_name }}</p>
<p class="time">{{ project.th }} | {{ project.year }}</p>
<p class="time">{{ project.th }}th | {{ project.year }}</p>
</nuxt-link>
<div class="links">
<a
Expand Down

0 comments on commit 3654830

Please sign in to comment.