Skip to content

Commit

Permalink
Add Basic Mobile support
Browse files Browse the repository at this point in the history
  • Loading branch information
MrRowey committed Jul 24, 2024
1 parent 7fef2a4 commit 70f74d7
Show file tree
Hide file tree
Showing 5 changed files with 209 additions and 69 deletions.
94 changes: 70 additions & 24 deletions style/balance.css
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,7 @@ h6 {
font-family: "Ubuntu", sans-serif;
font-style: normal;
font-weight: normal;
}

h3 {
margin: 10px 0px;
margin: 10px 0;
}

a {
Expand All @@ -25,11 +22,11 @@ a {
}

ul {
padding: 10px 25px 10px 25px;
padding: 10px 25px;
}

li {
padding: 5px 0 5px 0;
padding: 5px 0;
list-style: none;
}

Expand All @@ -42,11 +39,11 @@ header {
}

.Grid {
padding: 10px; /* Space inside the grid container */
display: grid; /* Enable grid layout */
grid-template-columns: 1fr 3fr 0.75fr; /* Define column sizes */
gap: 20px; /* Space between grid items */
margin: 0; /* Remove default margin */
padding: 10px;
display: grid;
grid-template-columns: 1fr 3fr 0.75fr;
gap: 20px;
margin: 0;
}

.Content {
Expand Down Expand Up @@ -97,29 +94,23 @@ header {
position: sticky; /* Sticky positioning */
top: 20px; /* Distance from the top */
background: var(--IconGridBackground); /* Background color */
padding: 5px 20px 20px 20px; /* Padding */
padding: 5px 20px; /* Padding */
margin-left: 5px; /* Margin from the left */
color: var(--Text); /* Text color */
text-align: justify; /* Text alignment */
border-radius: 15px; /* Border radius */
display: grid; /* Enable grid layout */
grid-template-columns: repeat(4, 1fr); /* Four column layout */
row-gap: 5px; /* Space between rows */
column-gap: 5px; /* Space between columns */
gap: 5px; /* Space between rows */
}

/* Title in Icon Sidebar */
.IconSidebarTitle {
.IconSidebarTitle,
.IconSidebarSubtitle {
grid-column: 1 / -1; /* Spanning full width */
text-align: center; /* Centred text */
margin: 0; /* Remove default margin */
padding: 10px 0 10px 0; /* Padding */
}

.IconSidebarSubtitle {
grid-column: 1 / -1;
text-align: left;
margin: 0;
padding: 10px 0; /* Padding */
}

/* Subgrid in Icon Sidebar */
Expand Down Expand Up @@ -172,9 +163,64 @@ header {
.Stat {
border-radius: 8px;
border: lightgray 1px solid;
padding: 3px 8px 3px 8px;
padding: 3px 8px;
}

.SectionHeader {
padding: 10px 0 10px 0;
padding: 10px 0;
}

/* Responsive Design */
@media (max-width: 768px) {
.Grid {
grid-template-columns: 1fr;
gap: 15px;
}

.Sidebar {
grid-column: 1;
}

.Content {
grid-column: 1;
}

.IconSidebar {
grid-template-columns: repeat(3, 1fr);
}

.IconSidebarSubgrid {
grid-template-columns: repeat(3, 1fr);
}

.IconGrid {
grid-template-columns: 1fr;
}
}

@media (max-width: 420px) {
.Grid {
grid-template-columns: 1fr;
gap: 10px;
}

.Sidebar {
grid-column: 1;
}

.Content {
grid-column: 1;
}

.IconSidebar {
grid-template-columns: repeat(2, 1fr);
}

.IconSidebarSubgrid {
grid-template-columns: repeat(2, 1fr);
}

.IconGrid {
grid-template-columns: 1fr;
}
}
67 changes: 54 additions & 13 deletions style/components/button.css
Original file line number Diff line number Diff line change
@@ -1,14 +1,55 @@
button {
border-radius: 5px;
padding: 8px;
background: var(--ButtonBackground);
color: var(--ButtonText);
border: none;
text-decoration: none;
font-size: 18px;
}

button a{
color: var(--Link);
text-decoration: none;
}
border-radius: 5px;
padding: 12px 16px;
background: var(--ButtonBackground);
color: var(--ButtonText);
border: none;
text-decoration: none;
font-size: 16px;
cursor: pointer;
transition: background 0.3s ease, color 0.3 ease;
display: inline-flex;
align-items: center;
justify-content: center;
}

button a {
color: inherit;
text-decoration: none;
}

/* Hover and active states */
button:hover {
background: var(
--ButtonHoverBackground,
darken(var(--ButtonBackground), 10%)
);
}

button:active {
background: var(
--ButtonActiveBackground,
darken(var(--ButtonBackground), 20%)
);
}

/* Focus styles for accessibility */
button:focus {
outline: 2px solid var(--ButtonFocusOutline, #000);
outline-offset: 2px;
}

/* Responsive design */
@media (max-width: 768px) {
button {
font-size: 14px; /* Adjust font size for medium screens */
padding: 10px 14px; /* Adjust padding for medium screens */
}
}

@media (max-width: 420px) {
button {
font-size: 12px; /* Adjust font size for small screens */
padding: 8px 12px; /* Adjust padding for small screens */
}
}
30 changes: 28 additions & 2 deletions style/components/card.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,38 @@
.Card {
background: var(--Card);
border-radius: 1em;
padding: 5px 15px;
padding: 10px 20px;
margin: 20px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
color: var(--Text);
display: flex;
flex-direction: column;
}

.Card img {
margin-right: 15px;
margin-bottom: 15px;
max-width: 100%;
height: auto;
border-radius: 0.5em;
}

/* Responsive design */
@media (max-width: 768px) {
.Card {
padding: 8px 16px; /* Adjust padding for medium screens */
margin: 15px; /* Adjust margin for medium screens */
box-shadow: 0 0 8px rgba(0, 0, 0, 0.4); /* Slightly lighter shadow */
}
}

@media (max-width: 420px) {
.Card {
padding: 6px 12px; /* Adjust padding for small screens */
margin: 10px; /* Adjust margin for small screens */
box-shadow: 0 0 6px rgba(0, 0, 0, 0.3); /* Lighter shadow for smaller screens */
}

.Card img {
margin-bottom: 10px; /* Adjust spacing below the image */
}
}
87 changes: 57 additions & 30 deletions style/components/images.css
Original file line number Diff line number Diff line change
@@ -1,44 +1,71 @@
.ImageSlider {
position: relative;
display: inline-block;
line-height: 0;
border-radius: 1em;
position: relative;
display: block;
overflow: hidden;
border-radius: 1em;
max-width: 100%;
}

.ImageSlider > div {
border-right: 2px solid #00000099;
position: absolute;
top: 0;
left: 0;
width: 25px;
max-width: 100%;
overflow: hidden;
resize: horizontal;
border-right: 2px solid rgba(0, 0, 0, 0.6);
position: absolute;
top: 0;
left: 0;
width: 30px;
max-width: 100%;
overflow: hidden;
resize: horizontal;
z-index: 1;
}

.ImageSlider > div:before {
content: "";
position: absolute;
right: 0;
bottom: 0;
width: 13px;
height: 13px;
padding: 5px;
background: linear-gradient(-45deg, white 50%, transparent 0);
background-clip: content-box;
cursor: ew-resize;
filter: drop-shadow(0 0 10px black);
content: "";
position: absolute;
right: 0;
bottom: 0;
width: 16px;
height: 16px;
padding: 5px;
background: linear-gradient(-45deg, white 50%, transparent 0);
background-clip: content-box;
cursor: ew-resize;
filter: drop-shadow(0 0 10px rgba(0, 0, 0, 0.6));
}

.ImageSlider img {
border-radius: 1em;
user-select: none;
max-width: 730px;
display: block;
border-radius: 1em;
user-select: none;
width: 100%;
height: auto;
}

.ImageShowcase {
width: 100%;
height: 100%;
object-fit: cover;
border-radius: 15px;
width: 100%;
height: auto;
object-fit: cover;
border-radius: 15px;
}

/* Responsive design */
@media (max-width: 768px) {
.ImageSlider > div {
width: 25px; /* Smaller handle for medium screens */
}

.ImageSlider > div:before {
width: 14px; /* Adjusted handle size */
height: 14px; /* Adjusted handle size */
}
}

@media (max-width: 420px) {
.ImageSlider > div {
width: 20px; /* Smaller handle for small screens */
}

.ImageSlider > div:before {
width: 12px; /* Adjusted handle size */
height: 12px; /* Adjusted handle size */
}
}
Empty file removed style/components/video.css
Empty file.

0 comments on commit 70f74d7

Please sign in to comment.