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
3 changes: 2 additions & 1 deletion src/App.vue
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
<template>
<div class="app">
<Tweet />
<Tweet v-for="(tweet, index) in tweets" :key="index" :tweet="tweet" />
</div>
</template>

<script setup>
import { ref } from 'vue';
import Tweet from './components/Tweet.vue';


const tweets = ref([
{
Expand Down
17 changes: 17 additions & 0 deletions src/components/Actions.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<script setup>
const props = defineProps({
actions: String,
});
</script>

<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>
<style></style>
12 changes: 12 additions & 0 deletions src/components/Message.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<script setup>
const props = defineProps({
message: String,
});
</script>

<template>

<p class="message"> {{ props.message }} </p>

</template>
<style></style>
17 changes: 17 additions & 0 deletions src/components/ProfileImage.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<script setup>
const props = defineProps({
image: String,

});

</script>


<template>
<img :src="props.image"
class="profile"
alt="profile"
/>
</template>

<style></style>
12 changes: 12 additions & 0 deletions src/components/TimeStamp.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<script setup>
const props = defineProps({
timestamp: String,
});
</script>

<template>

<span class="timestamp"> {{ props.timestamp }} </span>

</template>
<style></style>
40 changes: 18 additions & 22 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 User from './User.vue';
import TimeStamp from './TimeStamp.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 :user="props.tweet.user" />
<Timestamp :timestamp="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>
<Message :message="props.tweet.message" />
<Actions />

<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>

</div>

<i class="fas fa-ellipsis-h"></i>
Expand Down
13 changes: 13 additions & 0 deletions src/components/User.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<script setup>
const props = defineProps({
user: String,
});
</script>

<template>
<span class="user">
<span class="name">{{ props.user.name }}</span>
<span class="handle">@{{ props.user.handle }}</span>
</span>
</template>
<style></style>
Loading