diff --git a/src/WebAPI/ClientApp/public/top_players.webp b/src/WebAPI/ClientApp/public/top_players.webp new file mode 100644 index 0000000..cfae68d Binary files /dev/null and b/src/WebAPI/ClientApp/public/top_players.webp differ diff --git a/src/WebAPI/ClientApp/src/components/Home.css b/src/WebAPI/ClientApp/src/components/Home.css index 040962f..ee4579c 100644 --- a/src/WebAPI/ClientApp/src/components/Home.css +++ b/src/WebAPI/ClientApp/src/components/Home.css @@ -19,4 +19,4 @@ display: flex; justify-content: space-between; align-items: center; - } \ No newline at end of file + } diff --git a/src/WebAPI/ClientApp/src/components/Home.js b/src/WebAPI/ClientApp/src/components/Home.js index 23e5ccd..8cb26bd 100644 --- a/src/WebAPI/ClientApp/src/components/Home.js +++ b/src/WebAPI/ClientApp/src/components/Home.js @@ -137,12 +137,15 @@ export function Home() { { caption: 'User signing up for DataClash', src: '/comic/registration.jpeg', }, ]} /> -

Top Clans by Regions

- +

Top Clans by Regions

+
-
+
-

Top Players by Wars

+

+ + Top Players by Wars +

Select a war @@ -158,29 +161,29 @@ export function Home() {
-

Completed Challenges

+

Completed Challenges

-

Most Popular Cards by Clans

- - - Select a clan - - - {clanName.map((name, index) => ( - setSelectedClanName(name)}> - {name} - - ))} - - -
-
- -

Most Gifted Cards by Region

+

Most Popular Cards by Clans

+ + + Select a clan + + + {clanName.map((name, index) => ( + setSelectedClanName(name)}> + {name} + + ))} + + + +
+ +

Most Gifted Cards by Region

- + ) diff --git a/src/WebAPI/ClientApp/src/components/HomeTable.css b/src/WebAPI/ClientApp/src/components/HomeTable.css index 69c41ed..088607d 100644 --- a/src/WebAPI/ClientApp/src/components/HomeTable.css +++ b/src/WebAPI/ClientApp/src/components/HomeTable.css @@ -15,22 +15,57 @@ * You should have received a copy of the GNU General Public License * along with sep3cs. If not, see . */ +table { + width: 100%; + border-collapse: collapse; + background-color: #c3dff7; - table { - width: 100%; - border-collapse: collapse; - } - - thead { - background-color: #f2f2f2; - } - - th, td { - text-align: center; - padding: 10px; - border: 1px solid #ddd; - } - - tr:nth-child(even) { - background-color: #f2f2f2; - } \ No newline at end of file + margin-top: 20px; + margin-bottom: 20px; + border-radius: 20px; +} +tr { + transition: transform .2s; /* Animation */ + } + + tr:hover { + transform: scale(1.05); /* (105% zoom - Note: if the zoom is too large, it will go outside of the viewport) */ + } + +thead { + background-color: #63a5b5; +} + +th, +td { + text-align: center; + padding: 10px; + +} + +.table-title { + font-family: Arial; +} + +.table-image { + transition: transform .2s; /* Animation */ + } + + .table-image:hover { + transform: scale(1.5); /* (150% zoom - Note: if the zoom is too large, it will go outside of the viewport) */ + } + +.table-image { + margin-right: 10px; + width: 150px; + height: 150px; + border: 1px solid #000000; + border-radius: 15%; + max-width: 100%; + height: auto; +} + +.tableContainer { + margin-top: 40px; + margin-bottom: 40px; +} \ No newline at end of file diff --git a/src/WebAPI/ClientApp/src/components/HomeTable.js b/src/WebAPI/ClientApp/src/components/HomeTable.js index 5053abd..46ae75d 100644 --- a/src/WebAPI/ClientApp/src/components/HomeTable.js +++ b/src/WebAPI/ClientApp/src/components/HomeTable.js @@ -18,39 +18,38 @@ import React from 'react'; import './HomeTable.css'; function convertToTableFormat(columns, data) { - return data.map(item => { - let obj = {}; - columns.forEach((column, index) => { - obj[column] = item[index]; - }); - return obj; - }); + return data.map(item => { + let obj = {}; + columns.forEach((column, index) => { + obj[column] = item[index]; + }); + return obj; + }); } const Table = ({ columns, data }) => { - const tableData = convertToTableFormat(columns, data); + const tableData = convertToTableFormat(columns, data); - return ( -
- - - - {columns.map((column, index) => ( - - ))} - - - - {tableData.map((row, index) => ( - - {columns.map((column, index) => ( - - ))} - - ))} - -
Top Players in Wars
{column}
{row[column]}
- ); + return ( + + + + {columns.map((column, index) => ( + + ))} + + + + {tableData.map((row, index) => ( + + {columns.map((column, index) => ( + + ))} + + ))} + +
{column}
{row[column]}
+ ); }; export default Table;