Skip to content

Commit

Permalink
feat(design): display cover art and tags
Browse files Browse the repository at this point in the history
  • Loading branch information
adrienjoly committed Jun 10, 2018
1 parent 9e57e03 commit dc2fe77
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 2 deletions.
1 change: 1 addition & 0 deletions _layouts/default.html
Expand Up @@ -7,6 +7,7 @@
<link rel="shortcut icon" type="image/png" href="/icon.png"/>
{% seo %}
<link rel="stylesheet" href="{{ "/assets/css/style.css?v=" | append: site.github.build_revision | relative_url }}"> <!-- github-pages style -->
<link rel="stylesheet" href="{{ "/index.css?v=" | append: site.github.build_revision | relative_url }}">
</head>
<body>
<div class="container-lg px-3 my-5 markdown-body">
Expand Down
33 changes: 33 additions & 0 deletions index.css
@@ -0,0 +1,33 @@
* {
box-sizing: border-box;
}

article {
display: inline-block;
width: 320px;
height: 420px;
padding: 8px;
overflow: hidden;
}

article img {
width: 320px;
height: 320px;
}

.markdown-body article p {
margin-bottom: 0;
}

.release-date {
color: gray;
font-size: 90%;
}

.tag {
color: white;
background-color: lightgray;
border-radius: 12px;
font-size: 90%;
padding: 2px 8px;
}
16 changes: 14 additions & 2 deletions index.md
Expand Up @@ -3,6 +3,18 @@ title: My Albums
---

{% for album in site.data.albums %}
- [{{ album.title }}, by {{ album.artist }}]({{ album.url }})<br/>
<small style="color:gray;">{{ album.release_date | date: "%b %-d, %Y" }}</small>
<article>
<a href="{{ album.url }}">
<img src="{{ album.img }}" alt="{{ album.title }} {{ album.artist }}"/>
<p>{{ album.title }}</p>
</a>
<p>by {{ album.artist }}</p>
{% if album.tags %}
{% for tag in album.tags %}
<span class="tag">{{ tag }}</span>
{% endfor %}
{% else %}
<span class="release-date">{{ album.release_date | date: "%b %-d, %Y" }}</span>
{% endif %}
</article>
{% endfor %}

0 comments on commit dc2fe77

Please sign in to comment.