Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
<!DOCTYPE html>
<html lang="en">
<head>
<link
rel="stylesheet"
href="https://pro.fontawesome.com/releases/v5.10.0/css/all.css"
integrity="sha384-AYmEC3Yw5cVb3ZcuHtOA93w35dYTsvhLPVnYs9eStHfGJvOvKxVfELGroGkvsg+p"
crossorigin="anonymous"
/>
<meta charset="UTF-8" />
<link rel="icon" href="/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
Expand Down
2 changes: 1 addition & 1 deletion src/App.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<template>
<div class="app">
<Tweet />
<Tweet v-for="(tweet, index) in tweets" :key="index" :tweet ="tweet" />
</div>
</template>

Expand Down
12 changes: 12 additions & 0 deletions src/components/Actions.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<template>
<div class="actions">
<i class="far fa-comment"></i>
<i class="fas fa-retweet"></i>
<i class="far fa-heart"></i>
<i class="fas fa-share"></i>
</div>
</template>

<script setup>

</script>
9 changes: 9 additions & 0 deletions src/components/Message.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<template>
<p class="message">{{ message }}</p>
</template>

<script setup>
defineProps({
message: String
});
</script>
9 changes: 9 additions & 0 deletions src/components/ProfileImage.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<template>
<img :src="image" class="profile" alt="profile" />
</template>

<script setup>
defineProps({
image: String
});
</script>
9 changes: 9 additions & 0 deletions src/components/Timestamp.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<template>
<span class="timestamp">{{ time }}</span>
</template>

<script setup>
defineProps({
time: String
});
</script>
44 changes: 20 additions & 24 deletions src/components/Tweet.vue
Original file line number Diff line number Diff line change
@@ -1,33 +1,29 @@
<script setup>
import ProfileImage from "./ProfileImage.vue";
import Timestamp from "./Timestamp.vue";
import User from "./User.vue";
import Message from "./Message.vue";
import Actions from "./Actions.vue";

const props = defineProps({
tweet: Object,
});
</script>

<template>
<div class="tweet">
<img
src="https://i.imgur.com/9yw1Fyw.jpg"
class="profile"
alt="profile"
/>

<ProfileImage :image="props.tweet.user.image" />
<div class="body">
<div class="top">
<span class="user">
<span class="name">Ironhack</span>
<span class="handle">@ironhack</span>
</span>

<span class="timestamp">Nov 30, 2020</span>
<User :userData="props.tweet.user" />
<Timestamp :time="props.tweet.timestamp" />
</div>

<p class="message">
On December 7th, we will be hosting a #webinar that will introduce you
to #SQL! Are you ready? 🚀
</p>

<div class="actions">
<!-- Font Awesome icons -->
<i class="far fa-comment"></i>
<i class="fas fa-retweet"></i>
<i class="far fa-heart"></i>
<i class="fas fa-share"></i>
</div>
<Message :message="props.tweet.message" />


<Actions />

</div>

<i class="fas fa-ellipsis-h"></i>
Expand Down
12 changes: 12 additions & 0 deletions src/components/User.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<template>
<span class="user">
<span class="name">{{ userData.name }}</span>
<span class="handle">@{{ userData.handle }}</span>
</span>
</template>

<script setup>
defineProps({
userData: Object
});
</script>
Loading