Compare commits
2 Commits
films-page
...
film-compo
| Author | SHA1 | Date | |
|---|---|---|---|
| 1b36ad6a81 | |||
| c77fe19ed1 |
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<article
|
||||
class="film bg-gray-100 prose prose-sm rounded-md shadow-md transition-shadow duration-300 hover:shadow-xl mb-4 sm:m-4"
|
||||
class="film flex flex-col justify-between bg-gray-100 prose prose-sm rounded-md shadow-md transition-shadow duration-300 hover:shadow-xl mb-4 sm:m-4"
|
||||
>
|
||||
<header class="p-4 rounded-t-md">
|
||||
<h1>
|
||||
@@ -56,6 +56,19 @@ export default {
|
||||
</script>
|
||||
|
||||
<style lang="css" scoped>
|
||||
@media screen and (min-width: 640px) {
|
||||
.film {
|
||||
margin: 1rem;
|
||||
flex: 1 1 calc(50% - 2rem);
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (min-width: 1024px) {
|
||||
.film {
|
||||
flex: 1 1 calc(33% - 2rem);
|
||||
}
|
||||
}
|
||||
|
||||
header {
|
||||
background-color: #85ffbd;
|
||||
background-image: linear-gradient(45deg, #85ffbd 0%, #fffb7d 100%);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div class="flex flex-wrap">
|
||||
<div class="flex flex-wrap justify-center">
|
||||
<Film :key="film.id" v-for="film in dataSource" :film="film" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -4,7 +4,7 @@ import Header from "./";
|
||||
describe("Header", () => {
|
||||
it("should render Header instance", () => {
|
||||
const wrapper = mount(Header, { stubs: ["router-link"] });
|
||||
expect(wrapper.find("h1").text()).toBe("Ghibli");
|
||||
expect(wrapper.find("h1").text()).toBe("PeopleDoc");
|
||||
});
|
||||
|
||||
it("should redirect to Home page when clicking on brand logo", () => {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<header
|
||||
id="header"
|
||||
class="fixed top-0 left-0 w-screen bg-white h-16 px-4 py-3 shadow-md"
|
||||
class="fixed top-0 left-0 w-screen bg-white h-16 px-4 md:px-8 py-3 shadow-md flex items-center justify-between"
|
||||
>
|
||||
<router-link to="/" class="flex w-auto h-full items-center">
|
||||
<img
|
||||
@@ -9,14 +9,22 @@
|
||||
src="https://avatars2.githubusercontent.com/u/1080062?s=200&v=4"
|
||||
alt="PeopleDoc - Icon"
|
||||
/>
|
||||
<h1 class="text-2xl font-light tracking-wide">Ghibli</h1>
|
||||
<h1 class="text-2xl font-light tracking-wide">PeopleDoc</h1>
|
||||
</router-link>
|
||||
<h2 class="font-medium hidden sm:block">{{ description }}</h2>
|
||||
</header>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import pkg from "@/package.json";
|
||||
|
||||
export default {
|
||||
name: "Header"
|
||||
name: "Header",
|
||||
computed: {
|
||||
description: function() {
|
||||
return pkg.description;
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user