Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
Newspaper Frontend
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lap nguyen
Newspaper Frontend
Commits
24ed1500
Commit
24ed1500
authored
Nov 22, 2022
by
Ken
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update UI
parent
5aac9137
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
48 additions
and
23 deletions
+48
-23
Newspaper.scss
src/components/Newspaper/Newspaper.scss
+36
-17
index.tsx
src/components/Newspaper/index.tsx
+5
-5
MainPage.tsx
src/pages/MainPage.tsx
+1
-1
common.scss
src/styles/common.scss
+6
-0
No files found.
src/components/Newspaper/Newspaper.scss
View file @
24ed1500
@use
"../../styles/variables"
;
@use
"../../styles/variables"
;
@import
"../../styles/mixin"
;
.newspaper
{
.newspaper
{
&
-img
{
&
-article
{
width
:
100%
;
flex-direction
:
row
;
max-height
:
400px
;
object-fit
:
cover
;
transform
:
scale
(
0
.9
);
transition
:
transform
0
.2s
linear
;
}
&
:hover
{
@include
tablet
{
cursor
:
pointer
;
flex-direction
:
column
;
}
.newspaper-img
{
&
__img
{
transform
:
scale
(
1
);
width
:
100%
;
max-height
:
400px
;
object-fit
:
cover
;
transform
:
scale
(
0
.9
);
cursor
:
pointer
;
@include
tablet
{
transform
:
scale
(
1
);
}
}
}
}
&
-
content
{
&
__
content
{
margin-top
:
40px
;
margin-top
:
40px
;
h6
{
@include
tablet
{
font-size
:
2
.5rem
;
margin-top
:
20px
;
padding-right
:
50px
;
}
h6
{
font-size
:
2
.5rem
;
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
;
}
}
}
}
src/components/Newspaper/index.tsx
View file @
24ed1500
...
@@ -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
>
...
...
src/pages/MainPage.tsx
View file @
24ed1500
...
@@ -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
}
/>
))
}
))
}
...
...
src/styles/common.scss
View file @
24ed1500
...
@@ -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
;
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment