-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding tailwind css and working with components.
- Loading branch information
1 parent
f263c55
commit 0f1bc7a
Showing
9 changed files
with
1,579 additions
and
79 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
module.exports = { | ||
plugins: { | ||
tailwindcss: {}, | ||
autoprefixer: {}, | ||
}, | ||
} |
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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
@tailwind base; | ||
@tailwind components; | ||
@tailwind utilities; |
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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<template> | ||
<nav class="w-full bg-gradient-to-r from from-blue-900 to-blue-400 px-4 py-2"> | ||
<a href="" class="text-white">HEROS</a> | ||
</nav> | ||
</template> | ||
|
||
<script> | ||
</script> | ||
|
||
<style> | ||
</style> |
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 |
---|---|---|
@@ -0,0 +1,67 @@ | ||
<template> | ||
<ul> | ||
<li | ||
class="flex justify-between" | ||
v-for="(hero, index) in herosArrayOfObjects" | ||
:key="hero.name" | ||
> | ||
<div> | ||
{{ hero.name }} | ||
</div> | ||
<button @click="removeHero(index)">x</button> | ||
</li> | ||
</ul> | ||
|
||
<form class="mt-10" @submit.prevent="addHero()"> | ||
<input | ||
class="border rounded" | ||
type="text" | ||
v-model="newHero" | ||
placeholder="Type a new hero here" | ||
/> | ||
<button | ||
class=" | ||
border | ||
rounded | ||
bg-gradient-to-t | ||
from-red-200 | ||
to-green-200 | ||
text-sm | ||
ml-10 | ||
" | ||
@click="newHero" | ||
> | ||
Add a new hero | ||
</button> | ||
</form> | ||
</template> | ||
|
||
<script> | ||
export default { | ||
data() { | ||
return { | ||
herosArrayOfObjects: [ | ||
{ name: "Batman" }, | ||
{ name: "Superman" }, | ||
{ name: "flash" }, | ||
], | ||
}; | ||
}, | ||
methods:{ | ||
addHero() { | ||
if (this.newHero !== "") { | ||
this.herosArrayOfObjects.push({ name: this.newHero }); | ||
this.newHero = ""; | ||
} | ||
}, | ||
removeHero(index) { | ||
this.herosArrayOfObjects = this.herosArrayOfObjects.filter( | ||
(hero, i) => i != index | ||
); | ||
}, | ||
} | ||
}; | ||
</script> | ||
|
||
<style> | ||
</style> |
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,4 +1,5 @@ | ||
import { createApp } from 'vue' | ||
import App from './App.vue' | ||
import "./assets/styles.css" | ||
|
||
createApp(App).mount('#app') |
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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
module.exports = { | ||
purge: [], | ||
darkMode: false, // or 'media' or 'class' | ||
theme: { | ||
extend: {}, | ||
}, | ||
variants: { | ||
extend: {}, | ||
}, | ||
plugins: [], | ||
} |