generated from ab-noori/React-Template
-
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.
- Loading branch information
Showing
5 changed files
with
268 additions
and
271 deletions.
There are no files selected for viewing
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,132 +1,131 @@ | ||
table { | ||
width: 98%; | ||
margin: 1%; | ||
border-collapse: collapse; | ||
width: 98%; | ||
margin: 1%; | ||
border-collapse: collapse; | ||
} | ||
|
||
th, | ||
td { | ||
padding: 0.5rem; | ||
text-align: center; | ||
border-bottom: 1px solid #ddd; | ||
} | ||
|
||
/* Added CSS for striped effect on table headers */ | ||
thead th { | ||
background-color: #f2f2f2; | ||
} | ||
|
||
td { | ||
cursor: pointer; | ||
} | ||
|
||
th:nth-child(1), | ||
td:nth-child(1), | ||
th:nth-child(2), | ||
td:nth-child(2) { | ||
text-align: left; | ||
} | ||
|
||
td img { | ||
width: 20px; | ||
margin: 0 10px 0 0; | ||
} | ||
|
||
tr:nth-child(even) { | ||
background-color: #f2f2f2; | ||
} | ||
|
||
tr:hover { | ||
background-color: #eaeaea; | ||
} | ||
|
||
thead th:first-child { | ||
border-bottom: none; | ||
} | ||
|
||
/* Rest of the CSS for responsive layout */ | ||
@media screen and (max-width: 768px) { | ||
/* Adjust the table layout for smaller screens */ | ||
table { | ||
font-size: 12px; | ||
display: block; | ||
overflow-x: auto; | ||
padding: 5px; | ||
} | ||
|
||
th, | ||
td { | ||
padding: 0.5rem; | ||
text-align: center; | ||
border-bottom: 1px solid #ddd; | ||
|
||
thead { | ||
display: none; | ||
} | ||
|
||
th:nth-child(1), | ||
td:nth-child(1), | ||
th:nth-child(2), | ||
td:nth-child(2) { | ||
text-align: left; | ||
tbody { | ||
display: flex; | ||
justify-content: space-between; | ||
flex-wrap: wrap; | ||
} | ||
|
||
/* Remove Rank column in mobile view */ | ||
tr { | ||
display: flex; | ||
flex-direction: column; | ||
width: 50%; | ||
justify-content: space-between; | ||
} | ||
|
||
|
||
/* Increase image size */ | ||
td img { | ||
width: 20px; | ||
margin: 0 10px 0 0; | ||
width: 50px; | ||
margin: 0; | ||
} | ||
|
||
th { | ||
display: none; | ||
} | ||
|
||
td { | ||
cursor: pointer; | ||
position: relative; | ||
padding-left: 60%; | ||
white-space: nowrap; | ||
overflow: hidden; | ||
text-overflow: ellipsis; | ||
border-bottom: 1px solid #ddd; | ||
padding-bottom: 10px; | ||
} | ||
|
||
td::before { | ||
position: absolute; | ||
top: 0.5rem; | ||
left: 0.5rem; | ||
content: attr(data-label); | ||
font-weight: bold; | ||
} | ||
|
||
tr:nth-child(even) { | ||
background-color: #f2f2f2; | ||
|
||
/* Alternate row colors */ | ||
tbody tr:nth-child(4n), | ||
tbody tr:nth-child(4n + 1) { | ||
background-color: #e0dfdf; | ||
} | ||
|
||
tr:hover { | ||
background-color: #eaeaea; | ||
|
||
tbody tr:nth-child(4n + 2), | ||
tbody tr:nth-child(4n + 3) { | ||
background-color: #ececec; | ||
} | ||
/* Added CSS for striped effect on table headers */ | ||
thead th { | ||
background-color: #f2f2f2; | ||
|
||
th:nth-child(1), | ||
td:nth-child(1) { | ||
display: none; | ||
} | ||
|
||
thead th:first-child { | ||
border-bottom: none; | ||
|
||
th:nth-child(2), | ||
td:nth-child(2) { | ||
display: flex; | ||
justify-content: center; | ||
padding: 10px 0; | ||
font-size: 0; | ||
} | ||
|
||
/* Rest of the CSS for responsive layout */ | ||
@media screen and (max-width: 768px) { | ||
/* Adjust the table layout for smaller screens */ | ||
table { | ||
font-size: 12px; | ||
display: block; | ||
overflow-x: auto; | ||
padding: 5px; | ||
} | ||
|
||
thead { | ||
display: none; | ||
} | ||
|
||
tbody { | ||
display: flex; | ||
justify-content: space-between; | ||
flex-wrap: wrap; | ||
} | ||
|
||
/* Remove Rank column in mobile view */ | ||
tr { | ||
display: flex; | ||
flex-direction: column; | ||
width: 50%; | ||
justify-content: space-between; | ||
} | ||
|
||
/* Increase image size */ | ||
td img { | ||
width: 50px; | ||
margin: 0; | ||
} | ||
|
||
th { | ||
display: none; | ||
} | ||
|
||
td { | ||
position: relative; | ||
padding-left: 60%; | ||
white-space: nowrap; | ||
overflow: hidden; | ||
text-overflow: ellipsis; | ||
border-bottom: 1px solid #ddd; | ||
padding-bottom: 10px; | ||
} | ||
|
||
td:before { | ||
position: absolute; | ||
top: 0.5rem; | ||
left: 0.5rem; | ||
content: attr(data-label); | ||
font-weight: bold; | ||
} | ||
|
||
/* Alternate row colors */ | ||
tbody tr:nth-child(4n), | ||
tbody tr:nth-child(4n + 1) { | ||
background-color: #e0dfdf; | ||
} | ||
|
||
tbody tr:nth-child(4n + 2), | ||
tbody tr:nth-child(4n + 3) { | ||
background-color: #ececec; | ||
} | ||
|
||
th:nth-child(1), | ||
td:nth-child(1) { | ||
display: none; | ||
} | ||
|
||
th:nth-child(2), | ||
td:nth-child(2) { | ||
display: flex; | ||
justify-content: center; | ||
padding: 10px 0; | ||
font-size: 0; | ||
} | ||
|
||
/* Hover effect for mobile view */ | ||
tbody tr:hover { | ||
background-color: #c9c9c9; | ||
} | ||
|
||
/* Hover effect for mobile view */ | ||
tbody tr:hover { | ||
background-color: #c9c9c9; | ||
} | ||
} |
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,73 +1,73 @@ | ||
.details-view { | ||
margin: 0; | ||
padding: 1rem; | ||
display: flex; | ||
flex-direction: column; | ||
margin: 0; | ||
padding: 1rem; | ||
display: flex; | ||
flex-direction: column; | ||
align-items: center; | ||
text-align: center; | ||
} | ||
|
||
.details-view ul { | ||
margin: 0; | ||
padding: 0; | ||
width: 90%; | ||
border-radius: 15px; | ||
background-color: rgb(212, 245, 234); | ||
} | ||
|
||
.details-view li { | ||
padding: 10px 0; | ||
display: flex; | ||
flex-wrap: nowrap; | ||
justify-content: space-around; | ||
list-style-type: none; | ||
transition: background-color 0.3s; /* Adding a transition for smooth effect */ | ||
} | ||
|
||
.details-view span.label { | ||
text-align: left; | ||
width: 30%; | ||
font-weight: bold; | ||
color: #333; | ||
} | ||
|
||
.details-view span.value { | ||
text-align: left; | ||
width: 10%; | ||
color: #333; | ||
} | ||
|
||
.details-view li:nth-child(even) { | ||
background-color: #f2f2f2; | ||
} | ||
|
||
/* Hover effect */ | ||
.details-view li:hover { | ||
background-color: #e0e0e0; /* Change the background color on hover */ | ||
} | ||
|
||
@media screen and (max-width: 768px) { | ||
.details-view { | ||
padding: 1rem 0.4rem; | ||
align-items: center; | ||
text-align: center; | ||
} | ||
|
||
.details-view ul { | ||
margin: 0; | ||
padding: 0; | ||
width: 90%; | ||
border-radius: 15px; | ||
background-color: rgb(212, 245, 234); | ||
width: 95%; | ||
align-items: center; | ||
} | ||
|
||
.details-view li { | ||
padding: 10px 0; | ||
display: flex; | ||
flex-wrap: nowrap; | ||
align-items: center; | ||
justify-content: space-around; | ||
list-style-type: none; | ||
transition: background-color 0.3s; /* Adding a transition for smooth effect */ | ||
} | ||
|
||
.details-view span.label { | ||
text-align: left; | ||
width: 30%; | ||
font-weight: bold; | ||
color: #333; | ||
width: 50%; | ||
white-space: nowrap; | ||
} | ||
|
||
.details-view span.value { | ||
text-align: left; | ||
width: 10%; | ||
color: #333; | ||
} | ||
|
||
.details-view li:nth-child(even) { | ||
background-color: #f2f2f2; | ||
} | ||
|
||
/* Hover effect */ | ||
.details-view li:hover { | ||
background-color: #e0e0e0; /* Change the background color on hover */ | ||
} | ||
|
||
@media screen and (max-width: 768px) { | ||
.details-view { | ||
padding: 1rem 0.4rem; | ||
align-items: center; | ||
} | ||
|
||
.details-view ul { | ||
width: 95%; | ||
align-items: center; | ||
} | ||
|
||
.details-view li { | ||
align-items: center; | ||
justify-content: space-around; | ||
} | ||
|
||
.details-view span.label { | ||
width: 50%; | ||
white-space: nowrap; | ||
} | ||
.details-view span.value { | ||
width: 35%; | ||
} | ||
width: 35%; | ||
} | ||
} |
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,5 +1,5 @@ | ||
.copyright { | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
} | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
} |
Oops, something went wrong.