Homepage card styling added

This commit is contained in:
Lucas Patenaude
2024-04-11 06:59:14 -06:00
parent 1beb9b1881
commit c348ff051f
5 changed files with 36 additions and 16 deletions

View File

@@ -9,7 +9,6 @@
font-family: 'Scottsdale-Italic'; font-family: 'Scottsdale-Italic';
display: inline-block; /* Ensure the width is based on content */ display: inline-block; /* Ensure the width is based on content */
border-bottom: 1.5px solid #999696; /* Adjust the color and thickness as needed */ border-bottom: 1.5px solid #999696; /* Adjust the color and thickness as needed */
} }
/* Position cards in the center of the screen */ /* Position cards in the center of the screen */
@@ -24,9 +23,7 @@
width: 500px; /* Set width of the banner to 100% of viewport width */ width: 500px; /* Set width of the banner to 100% of viewport width */
height: 150px; height: 150px;
margin: 20px; margin: 20px;
text-align: center; /* Center the content horizontally */ text-align: center; /* Center the content horizontally */
background: linear-gradient(to right, white, rgb(245, 245, 245), rgb(227, 227, 227)); /* Gradient from white to gray */ background: linear-gradient(to right, white, rgb(245, 245, 245), rgb(227, 227, 227)); /* Gradient from white to gray */
padding: 10px; /* Adjust padding as needed */ padding: 10px; /* Adjust padding as needed */
position: relative; /* Needed for absolute positioning */ position: relative; /* Needed for absolute positioning */
@@ -36,21 +33,24 @@
cursor: pointer; /* Change cursor to pointer on hover */ cursor: pointer; /* Change cursor to pointer on hover */
box-shadow: 0px 3px 4px rgba(0, 0, 0, 0.4); box-shadow: 0px 3px 4px rgba(0, 0, 0, 0.4);
/* Counter skew contents to keep inner content straight*/ display: flex; /* Use flexbox for layout */
#card-contents { justify-content: center; /* Center content horizontally */
transform: skewX(20deg); /* Counter-skew the content to maintain its appearance */ align-items: center; /* Center content vertically */
}
} }
/* Counter skew contents to keep inner content straight*/
#card-contents {
display: flex; /* Use flexbox for layout */
align-items: center; /* Align items vertically */
transform: skewX(20deg); /* Skew the banner to create a triangular side */
}
#league-card:hover { #league-card:hover {
transform: skewX(-20deg) scale(1.05); /* Increase scale on hover to make it pop */ transform: skewX(-20deg) scale(1.05); /* Increase scale on hover to make it pop */
box-shadow: 0 0 20px rgba(0, 0, 0, 0.3); /* Add box-shadow on hover for depth effect */ box-shadow: 0 0 20px rgba(0, 0, 0, 0.3); /* Add box-shadow on hover for depth effect */
} }
#league-card::after { #league-card::after {
content: ''; content: '';
position: absolute; position: absolute;
@@ -60,3 +60,21 @@
width: 1%; /* Width of the red strip */ width: 1%; /* Width of the red strip */
background-color: red; /* Red color */ background-color: red; /* Red color */
} }
#logo {
width: 30%; /* Set width for logo */
max-height: 100px;
max-width: 120px;
margin-left: 20px;
}
.title-wrapper {
width: 70%; /* Set width for title wrapper */
}
#title-logo {
max-height: 80px;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

View File

@@ -12,7 +12,7 @@
<!-- Homepage Scripts --> <!-- Homepage Scripts -->
<script src="/js/homepage/redirect-to-league-url.js"></script> <script src="/js/homepage/redirect-to-league-url.js"></script>
<script src="/js/homepage/generate-league-routes.js"></script> <script src="/routes/league-pages/generate-league-routes.js"></script>
</footer> </footer>

View File

@@ -1,7 +1,9 @@
<div class="banner"> <div class="banner">
<div class="content" id="card-contents"> <div class="content" id="card-contents">
<img src={{logo}} height="120"> <img id="logo" src={{logo}}>
<img src={{title}} height="80"> <div class="title-wrapper">
{{flag}} <img id="title-logo" src={{title}}>
{{flag}}
</div>
</div> </div>
</div> </div>