Skip to content

Commit

Permalink
feat: responsive grid layout
Browse files Browse the repository at this point in the history
  • Loading branch information
nkomarn committed Nov 28, 2023
1 parent 5ddb750 commit bed9cc6
Show file tree
Hide file tree
Showing 2 changed files with 97 additions and 51 deletions.
136 changes: 89 additions & 47 deletions css/styles.css
Original file line number Diff line number Diff line change
@@ -1,85 +1,127 @@
@import url('https://fonts.googleapis.com/css2?family=Lexend:wght@400;500&display=swap');

h3, h4 {
margin: 0 0 8px 0;
:root {
--text-color: #d3d3d3;
--text-secondary-color: #bfbfbf;
}

h3, h4, a, code {
font-family: "Lexend";
h3,
h4 {
margin: 0 0 8px 0;
}

h3, h4, a {
color: #a3a3a3;
h3,
h4,
a,
code {
font-family: "Lexend";
}

h3,
h4,
a {
color: #a3a3a3;
}

h3 {
font-weight: 600;
font-size: 1.7em;
color: #ff9040;
font-weight: 600;
font-size: 1.7em;
color: #ff9040;
}

h4 {
font-weight: 400;
font-size: 1.09em;
font-weight: 400;
font-size: 1.06em;
color: var(--text-color)
}

code {
color: #ffa340;
color: #ffa340;
}

body {
background-color: #131110;
height: 100vh;
margin: 0;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
animation: fade 2s;
background-color: #131110;
height: 100vh;
margin: 0;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
animation: fade 2s;
}

.content {
display: grid;
margin: 0 auto;
max-width: 35em;
column-gap: 2em;
row-gap: 2em;
padding: 0 2em;
}

.image {
max-height: 20em;
margin: auto;
grid-column: 1;
grid-row: 1;
}

.vote-buttons {
margin: 0 auto;
display: block;
max-width: 35em;
.buttons {
grid-column: 1;
grid-row: 2;
}

.site-button {
margin-top: 0.4em;
float: none;
color: white;
cursor: pointer;
display: inline-block;
background: #24211F;
border-radius: 0.3em;
padding: 10px;
box-shadow: 0 2px 15px 0 rgb(0 0 0 / 2%);
text-decoration: none;
transition: background 0.3s ease;
width: 1em;
text-align: center;
margin-top: 0.4em;
float: none;
color: white;
cursor: pointer;
display: inline-block;
background: #24211F;
border-radius: 0.3em;
padding: 10px;
box-shadow: 0 2px 15px 0 rgb(0 0 0 / 2%);
text-decoration: none;
transition: background 0.3s ease;
width: 1em;
text-align: center;
}

.site-button:hover {
background: #2C2926;
/* background: linear-gradient(to right, #FF4621 0%, #FF9B4F 100%); */
/* background: linear-gradient(to right, #FF4621 0%, #FF9B4F 100%); */
color: white;
}

.optional {
background: #553518;
}

.optional:hover {
background: #613d1c;
}

.streak {
background: #FF9B4F;
background: linear-gradient(to right, #FF4621 0%, #FF9B4F 100%);
background: linear-gradient(to right, #FF4621 0%, #FF9B4F 100%);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
font-weight: 600;
}

.uwu {
max-height: 20em;
float: right;
top: -4em;
left: 2em;
position: relative;
-webkit-transform: scaleX(-1);
transform: scaleX(-1);
/* responsive layout */
@media only screen and (min-width: 600px) {
.content {
grid-template-columns: repeat(2, 1fr);
}

.image {
grid-column: 2;
grid-row: 1;
}

.buttons {
grid-column: 1;
grid-row: 1;
}
}
12 changes: 8 additions & 4 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,21 @@
</head>

<body>
<div class="vote-buttons">
<img class="uwu" src="img/plsvote.gif">
<div class="content">
<img class="image" src="img/plsvote.gif">
<div class="buttons">
<h3>Vote for us!</h3>
<h4 style="color: #d4d4d4;">Each vote rewards you with a Flare and money!</h4>
<h4>Vote on all sites to increase your <span class="streak">streak</span> and earn more money for future votes!</h4>
<h4>Each vote rewards you with a Flare and money!</h4>
<br/>
<h4 style="color: var(--text-secondary-color);">Vote on at least 5 sites to increase your <span class="streak">streak</span> and earn more rewards for future votes! 💸</h4>
<br/>
<a class="site-button" href="https://minecraftservers.org/vote/562392" target="_blank">1</a>
<a class="site-button" href="https://servers-minecraft.net/server-firestarter.24916" target="_blank">2</a>
<a class="site-button" href="https://minecraft.buzz/vote/1524" target="_blank">3</a>
<a class="site-button" href="https://topminecraftservers.org/vote/7919" target="_blank">4</a>
<a class="site-button" href="https://minecraft-mp.com/server/232422/vote/" target="_blank">5</a>
<a class="optional site-button" href="https://minecraftpocket-servers.com/server/125040/vote/" target="_blank">6</a>
</div>
</div>

<script>
Expand Down

0 comments on commit bed9cc6

Please sign in to comment.