Skip to content

Commit 7a56151

Browse files
committed
Added BlueSky feed
1 parent d0ebdb9 commit 7a56151

File tree

3 files changed

+113
-9
lines changed

3 files changed

+113
-9
lines changed

src/components/Projects/RepoInfo.vue

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,6 @@ export default {
115115
font-size: 15px;
116116
line-height: 1.5;
117117
margin-bottom: 12px;
118-
padding-left: 44px;
119118
font-family: 'Georgia', serif;
120119
}
121120
@@ -158,10 +157,6 @@ export default {
158157
gap: 8px;
159158
}
160159
161-
.repo-description {
162-
padding-left: 0;
163-
}
164-
165160
.floral-decoration {
166161
top: 8px;
167162
right: 12px;

src/pages/Home.vue

Lines changed: 112 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,30 @@
1414
</div>
1515
</div>
1616
</div>
17-
<div class="socials">
18-
<h1>Instagram: Mostly Bread and Cats</h1>
17+
<div class="socials" v-if="blueSkyImages.length > 0">
18+
<h2>Instagram Feed: Mostly Bread and Cats</h2>
1919
<div class="elfsight-app-0eabe48e-4875-4306-ab13-e31ac1235450 instagram-feed" data-elfsight-app-lazy></div>
20+
<h2>Blue Sky Feed: Mostly Art</h2>
21+
<div class="blue-sky-feed">
22+
<div v-for="(image, index) in blueSkyImages" :key="index" class="image-container">
23+
<img
24+
:src="image.thumb"
25+
:alt="image.text || 'Blue Sky Image '+index"
26+
style="height: 350px; width: auto;"
27+
/>
28+
<div class="overlay">{{ image.text }}</div>
29+
</div>
30+
<div
31+
v-if="blueSkyImages.length !== allBlueSkyImages.length"
32+
class="load-more"
33+
@click="loadMore"
34+
@keydown="loadMore"
35+
role="button"
36+
tabindex="0"
37+
>
38+
L o a d M o r e
39+
</div>
40+
</div>
2041
</div>
2142
</div>
2243
</template>
@@ -29,6 +50,37 @@ export default {
2950
components: {
3051
HomeCanvas,
3152
},
53+
data() {
54+
return {
55+
allBlueSkyImages: [],
56+
blueSkyImages: [],
57+
};
58+
},
59+
async mounted() {
60+
const res = await fetch(
61+
'https://public.api.bsky.app/xrpc/app.bsky.feed.getAuthorFeed?actor=kabbagepatch.bsky.social',
62+
);
63+
const data = await res.json();
64+
console.log(data);
65+
this.allBlueSkyImages = data.feed
66+
.filter((item) => item.post.embed?.$type === 'app.bsky.embed.images#view')
67+
.map((item) => ({
68+
images: item.post.embed.images.map((img) => ({
69+
...img,
70+
text: item.post.record.text,
71+
})),
72+
}))
73+
.flatMap((item) => item.images);
74+
this.blueSkyImages = this.allBlueSkyImages.slice(0, 10);
75+
console.log(this.blueSkyImages);
76+
},
77+
methods: {
78+
loadMore() {
79+
const currentLength = this.blueSkyImages.length;
80+
const moreImages = this.allBlueSkyImages.slice(currentLength, currentLength + 10);
81+
this.blueSkyImages = this.blueSkyImages.concat(moreImages);
82+
},
83+
},
3284
};
3385
</script>
3486
@@ -101,6 +153,53 @@ export default {
101153
flex-direction: column;
102154
}
103155
156+
.blue-sky-feed {
157+
overflow-x: scroll;
158+
flex-wrap: nowrap;
159+
display: flex;
160+
}
161+
162+
.image-container {
163+
display: flex;
164+
}
165+
166+
.image-container img {
167+
transition: transform 0.3s ease;
168+
}
169+
170+
.overlay {
171+
position: absolute;
172+
left: 0;
173+
background: hsla(0, 0%, 0%, 0.7);
174+
color: white;
175+
display: flex;
176+
justify-content: center;
177+
align-items: center;
178+
width: 100%;
179+
padding: 2rem 0.5rem;
180+
text-align: center;
181+
opacity: 0;
182+
transition: opacity 0.3s ease;
183+
}
184+
185+
.image-container:hover .overlay {
186+
opacity: 1;
187+
}
188+
189+
.load-more {
190+
padding: 0 5px;
191+
font-size: 20px;
192+
color: hsl(292, 38%, 92%);
193+
border: 1px solid hsl(292, 38%, 92%);
194+
background: hsl(335, 99%, 68%);
195+
height: 350px;
196+
width: 100px;
197+
display: flex;
198+
justify-content: center;
199+
align-items: center;
200+
cursor: pointer;
201+
}
202+
104203
@media screen and (max-width: 1200px) {
105204
.about-container {
106205
padding-left: 5%;
@@ -134,6 +233,10 @@ export default {
134233
.about h2:nth-child(3), .about h2:nth-child(5), .about h2:nth-child(7) {
135234
margin-left: 250px;
136235
}
236+
237+
.socials h2 {
238+
font-size: 24px;
239+
}
137240
}
138241
139242
@media screen and (max-width: 600px) {
@@ -164,6 +267,11 @@ export default {
164267
.about h2:nth-child(3), .about h2:nth-child(5), .about h2:nth-child(7) {
165268
margin-left: 250px;
166269
}
270+
271+
.blue-sky-feed {
272+
scrollbar-width: none;
273+
-ms-overflow-style: none;
274+
}
167275
}
168276
169277
@media screen and (max-width: 450px) {
@@ -173,12 +281,12 @@ export default {
173281
}
174282
175283
.about h2 {
176-
margin-left: 100px;
284+
margin-left: 60px;
177285
width: 300px;
178286
}
179287
180288
.about h2:nth-child(3), .about h2:nth-child(5), .about h2:nth-child(7) {
181-
margin-left: 150px;
289+
margin-left: 120px;
182290
}
183291
}
184292
</style>

src/pages/Projects.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,7 @@ export default {
129129
<style scoped>
130130
.worklist {
131131
margin-bottom: 50px;
132+
padding: 0 20px;
132133
}
133134
134135
p {

0 commit comments

Comments
 (0)