-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
150 additions
and
55 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,49 +1,89 @@ | ||
.instagram-feed-container { | ||
display: grid; | ||
grid-template-columns: repeat(4, 1fr); | ||
grid-gap: 1em; | ||
.item { | ||
position: relative; | ||
overflow: hidden; | ||
a { | ||
display: block; | ||
text-decoration: none; | ||
padding: 0; | ||
margin: 0; | ||
border: 0; | ||
} | ||
img { | ||
max-width: 100%; | ||
.profile { | ||
display: flex; | ||
align-items: center; | ||
margin-bottom: 1rem; | ||
|
||
.pic { | ||
width: 33%; | ||
max-width: 120px; | ||
padding-right: 2rem; | ||
a { | ||
display: block; | ||
} | ||
img { | ||
max-width: 100%; | ||
border-radius: 100%; | ||
border: 1px solid lightgray; | ||
} | ||
} | ||
.info { | ||
display: flex; | ||
justify-content: center; | ||
width: 100%; | ||
font-size: 16px; | ||
color: white; | ||
position: absolute; | ||
bottom: 0; | ||
transform: translateY(25px); | ||
transition: transform .3s ease-in-out; | ||
.likes, .comments { | ||
margin: 0 10px; | ||
flex: 1; | ||
.username, .full_name { | ||
&:first-child { | ||
margin-top: 0; | ||
} | ||
} | ||
.stats { | ||
display: flex; | ||
div { | ||
margin-right: 1rem; | ||
&:last-child { | ||
margin-right: 0; | ||
} | ||
} | ||
} | ||
} | ||
.overlay { | ||
position: absolute; | ||
width: 100%; | ||
height: 100%; | ||
background: rgb(30, 30, 30); | ||
opacity: 0; | ||
transition: opacity .2s ease-in-out; | ||
} | ||
&:hover { | ||
} | ||
|
||
.feed { | ||
display: grid; | ||
grid-template-columns: repeat(4, 1fr); | ||
grid-gap: 1em; | ||
.item { | ||
position: relative; | ||
overflow: hidden; | ||
a { | ||
display: block; | ||
text-decoration: none; | ||
padding: 0; | ||
margin: 0; | ||
border: 0; | ||
} | ||
img { | ||
max-width: 100%; | ||
} | ||
.info { | ||
transform: translateY(-10px); | ||
display: flex; | ||
justify-content: center; | ||
width: 100%; | ||
font-size: 16px; | ||
color: white; | ||
position: absolute; | ||
bottom: 0; | ||
transform: translateY(25px); | ||
transition: transform .3s ease-in-out; | ||
.likes, .comments { | ||
margin: 0 10px; | ||
} | ||
} | ||
.overlay { | ||
opacity: .2; | ||
position: absolute; | ||
width: 100%; | ||
height: 100%; | ||
background: rgb(30, 30, 30); | ||
opacity: 0; | ||
transition: opacity .2s ease-in-out; | ||
} | ||
&:hover { | ||
.info { | ||
transform: translateY(-10px); | ||
} | ||
.overlay { | ||
opacity: .2; | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,47 @@ | ||
<div id="instagram-feed" class="instagram-feed-container" :style="'grid-template-columns: repeat(' + settings.columns + ', 1fr); grid-gap: ' + settings.gap + ';'"> | ||
<div class="item" v-for="item, index in media" v-if="index < settings.count"> | ||
<div id="instagram-feed" class="instagram-feed-container"> | ||
|
||
<a :href="'https://www.instagram.com/p/' + item.node.shortcode + '/'" target="_blank"> | ||
<div class="profile" v-if="user && settings.profile"> | ||
<div class="pic" v-if="settings.profile_pic"> | ||
<a :href="'https://www.instagram.com/' + user.username + '/'" target="_blank"> | ||
<img :src="user.profile_pic_url_hd" :alt="user.username"> | ||
</a> | ||
</div> | ||
<div class="info"> | ||
<h2 class="username" v-if="settings.profile_username"> | ||
<a :href="'https://www.instagram.com/' + user.username + '/'">{{ user.username }}</a> | ||
</h2> | ||
<h4 class="full_name" v-if="settings.profile_full_name">{{ user.full_name }}</h4> | ||
<div class="stats" v-if="settings.profile_stats"> | ||
<div><strong>{{ user.edge_owner_to_timeline_media.count }}</strong> posts</div> | ||
<div><strong>{{ user.edge_followed_by.count }}</strong> followers</div> | ||
<div><strong>{{ user.edge_follow.count }}</strong> following</div> | ||
</div> | ||
<div class="biography" v-if="settings.profile_biography">{{ user.biography }}</div> | ||
<div class="external_url" v-if="settings.profile_external_url"><a :href="user.external_url" target="_blank">{{ user.external_url }}</a></div> | ||
</div> | ||
</div> | ||
|
||
<div class="overlay"></div> | ||
<div class="feed" :style="'grid-template-columns: repeat(' + settings.columns + ', 1fr); grid-gap: ' + settings.gap + ';'"> | ||
<div class="item" v-for="item, index in media" v-if="index < settings.count"> | ||
|
||
<img :src="item.node.thumbnail_src" alt=""> | ||
<a :href="'https://www.instagram.com/p/' + item.node.shortcode + '/'" target="_blank"> | ||
|
||
<div class="info" v-if="settings.likes || settings.comments"> | ||
<div class="likes" v-if="settings.likes"> | ||
<font-awesome-icon icon="heart" /> {{ item.node.edge_liked_by.count }} | ||
</div> | ||
<div class="comments" v-if="settings.comments"> | ||
<font-awesome-icon icon="comment" /> {{ item.node.edge_media_to_comment.count }} | ||
<div class="overlay"></div> | ||
|
||
<img :src="item.node.thumbnail_src" alt=""> | ||
|
||
<div class="info" v-if="settings.likes || settings.comments"> | ||
<div class="likes" v-if="settings.likes"> | ||
<font-awesome-icon icon="heart" /> {{ item.node.edge_liked_by.count }} | ||
</div> | ||
<div class="comments" v-if="settings.comments"> | ||
<font-awesome-icon icon="comment" /> {{ item.node.edge_media_to_comment.count }} | ||
</div> | ||
</div> | ||
</div> | ||
|
||
</a> | ||
</a> | ||
|
||
</div> | ||
</div> | ||
|
||
</div> |