Commit 24ed1500 authored by Ken's avatar Ken

update UI

parent 5aac9137
@use "../../styles/variables"; @use "../../styles/variables";
@import "../../styles/mixin";
.newspaper { .newspaper {
&-img { &-article {
flex-direction: row;
@include tablet {
flex-direction: column;
}
&__img {
width: 100%; width: 100%;
max-height: 400px; max-height: 400px;
object-fit: cover; object-fit: cover;
transform: scale(0.9); transform: scale(0.9);
transition: transform 0.2s linear;
}
&:hover {
cursor: pointer; cursor: pointer;
.newspaper-img { @include tablet {
transform: scale(1); transform: scale(1);
} }
} }
&-content { &__content {
margin-top: 40px; margin-top: 40px;
@include tablet {
margin-top: 20px;
}
h6 { h6 {
font-size: 2.5rem; font-size: 2.5rem;
padding-right: 50px; padding-right: 50px;
@include tablet {
padding-right: 0;
}
}
} }
} }
...@@ -45,4 +58,10 @@ ...@@ -45,4 +58,10 @@
background-color: variables.$green-1; background-color: variables.$green-1;
} }
} }
&:last-child {
.newspaper-divider {
display: none;
}
}
} }
...@@ -10,14 +10,14 @@ const Newspaper = (props: Props) => { ...@@ -10,14 +10,14 @@ const Newspaper = (props: Props) => {
const { description, img, label } = data; const { description, img, label } = data;
return ( return (
<div className="newspaper mt-4"> <div className="newspaper">
<div className="row flex-nowrap"> <div className="row flex-nowrap newspaper-article">
<div className="col-7"> <div className="col-12 col-lg-7">
<img src={img} alt="poster" className="newspaper-img" /> <img src={img} alt="poster" className="newspaper-article__img" />
</div> </div>
<div className="col"> <div className="col">
<div className="newspaper-content"> <div className="newspaper-article__content">
<h6>{label}</h6> <h6>{label}</h6>
<p>{description}</p> <p>{description}</p>
</div> </div>
......
...@@ -43,7 +43,7 @@ const newspapers: Array<INewspaper> = [ ...@@ -43,7 +43,7 @@ const newspapers: Array<INewspaper> = [
const MainPage = () => { const MainPage = () => {
return ( return (
<main className="container"> <main className="container py-3">
{newspapers.map((newspaper) => ( {newspapers.map((newspaper) => (
<Newspaper key={newspaper.label} data={newspaper} /> <Newspaper key={newspaper.label} data={newspaper} />
))} ))}
......
...@@ -12,3 +12,9 @@ html { ...@@ -12,3 +12,9 @@ html {
-moz-box-sizing: inherit; -moz-box-sizing: inherit;
box-sizing: inherit; box-sizing: inherit;
} }
.text-ellipsis {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment