Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed home page layout #401

Merged
merged 1 commit into from
Jun 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
146 changes: 30 additions & 116 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,21 @@
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="stylesheet" href="style.css" />
<link rel="stylesheet" href="style.css" />
<link rel="stylesheet" href="styles/default.style.css">
<link rel="stylesheet" href="styles/index.style.css" />
<script defer src="./js/edge.js"></script>
<script defer src="./js/box.js"></script>
<script defer src="./js/board.js"></script>
<script defer src="./js/game.js"></script>
<script defer src="./js/validation.js"></script>
<link rel="shortcut icon" href="./favicon.ico" type="image/x-icon" />
<link rel="shortcut icon" href="./favicon.ico" type="image/x-icon" />
<!-- JavaScript files -->
<script defer src="./js/index.js"></script>
<!-- Logo of the game -->
<link rel="icon" href="favicon.ico?" type="image/x-icon">
<link rel="shortcut icon" href="favicon.ico?" type="image/x-icon">
con" href="./favicon.ico" type="image/x-icon">
<title>Dots & Boxes Game</title>
</head>

Expand All @@ -20,7 +28,7 @@
<source src="./assets/default.mp4" type="video/mp4" />
</video>
<div class="whole-background">
<nav class="navbar">
<nav class="navbarr">
<div class="logo">
<a href="#">Dots & Boxes ⚄</a>
</div>
Expand All @@ -32,7 +40,8 @@
</ul>
</nav>
<div class="form">
<h1 class="heading">▂ ▄ ▅ ▆ ▇ █ MAXIMISE BOXES!! █ ▇ ▆ ▅ ▄ ▂</h1>
<!-- <h1 class="heading">▂ ▄ ▅ ▆ ▇ █ MAXIMISE BOXES!! █ ▇ ▆ ▅ ▄ ▂</h1> -->
<h1 class="heading">▂ ▄ █ MAXIMISE BOXES!! █ ▄ ▂</h1>
<h3 class="instructions-heading">Instructions</h3>
<p class="instructions">
1. Select the number of rows, columns and players. <br />
Expand All @@ -56,63 +65,34 @@ <h3 class="instructions-heading">Instructions</h3>
</select>
</div>
<div class="form-item">
<label for="rows"
>Rows : <span class="details">(between 5 and 30)</span></label
>
<label for="rows">Rows : <span class="details">(between 5 and 30)</span></label>
<input type="number" id="rows" min="5" max="30" value="6" />
<p
id="rows-error"
class="error-message"
style="display: none; color: red"
>
Rows should be between 5 and 30
</p>

</div>
<br />

<div class="form-item">
<label for="columns"
>Columns :
<span class="details">(between 5 and 30)</span></label
>
<label for="columns">Columns : <span class="details">(between 5 and 30)</span></label>
<input type="number" id="columns" min="5" max="30" value="6" />
<p
id="columns-error"
class="error-message"
style="display: none; color: red"
>
Columns should be between 5 and 30
</p>

</div>
<br />

<div class="form-item">
<label for="players-count"
>Players : <span class="details">(between 2 and 6)</span></label
>
<input
type="number"
id="players-count"
min="2"
max="6"
value="2"
/>
<p
id="players-error"
class="error-message"
style="display: none; color: red"
>
Players should be between 2 and 6
</p>
<label for="players-count">Players : <span class="details">(between 2 and 6)</span></label>
<input type="number" id="players-count" min="2" max="6" value="2" />
</div>
<br />

<div class="button-container">
<button class="start-btn button">START</button>

<a href="./game.html" target="_self" class="start-btn" id="start-btn" aria-label="START">
START
</a>
<button class="reset-btn button">RESET</button>
</div>
</div>
</div>
</div>
<p class="author">
Created with ❤️ by <a target="_blank" href="#">Chrome Gaming</a>
Created with ❤️ by <a href="#">Chrome Gaming</a>
</p>
</div>
<div class="flex">
Expand Down Expand Up @@ -162,75 +142,9 @@ <h3 class="instructions-heading">Instructions</h3>
<meta name="viewport" content="width=device-width, initial-scale=1" />

<!-- Stylesheet -->
<link rel="stylesheet" href="styles/default.style.css">
<link rel="stylesheet" href="styles/index.style.css" />

<!-- JavaScript files -->
<script defer src="./js/index.js"></script>

<!-- Logo of the game -->
<link rel="icon" href="favicon.ico?" type="image/x-icon">
<link rel="shortcut icon" href="favicon.ico?" type="image/x-icon">
con" href="./favicon.ico" type="image/x-icon">

<title>Dots & Boxes Game</title>
</head>

<!-- Setting Page -->

<body>
<h1 class="heading"
style="font-family: 'Lucida Sans', 'Lucida Sans Regular', 'Lucida Grande', 'Lucida Sans Unicode', Geneva, Verdana, sans-serif;">
▁ ▂ ▄ ▅ ▆ ▇ █ <b>&nbsp;MAXIMISE BOXES!!&nbsp;</b> █ ▇ ▆ ▅ ▄ ▂ ▁
</h1>

<div class="settings">
<div class="form">
<h3 class="instructions-heading">Instructions :</h3>

<ol class="instructions">
<li>Select the number of rows, columns and players.</li><br>
<li>The player who has maximum number of boxes on board is the winner.</li><br>
<li>Players will switch after every turn. But the player who has filled the last box, will get one
extra chance consecutively.</li>
</ol>

</div>


<!-- Form page -->
<div class="form">
<div>
<h3>What size of Board do you want?</h3>
</div>

<div class="form-item">
<label for="rows">Rows : <span class="details">(between 5 and 30)</span></label>
<input type="number" id="rows" min="5" max="30" value="6" />
</div>

<div class="form-item">
<label for="columns">Columns : <span class="details">(between 5 and 30)</span></label>
<input type="number" id="columns" min="5" max="30" value="6" />
</div>

<div class="form-item">
<label for="players-count">Players : <span class="details">(between 2 and 6)</span></label>
<input type="number" id="players-count" min="2" max="6" value="2" />
</div>


<a href="./game.html" target="_self" class="start-btn" id="start-btn" aria-label="START">
START
</a>


</div>
</div>
<div class="author">
<p>Created with ❤️ by <a target="_blank" href="#">Chrome Gaming</a></p>
</div>

</body>
</head>

</html>

</html>
48 changes: 36 additions & 12 deletions style.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
/* Default settings */

:root {
--border-color: #e5e5e5;
--edge-length: 100%;
Expand Down Expand Up @@ -29,18 +27,33 @@ a {
}

.author {
position: absolute;
font-size: 1.5rem;
bottom: 1%;
position: fixed;
bottom: 0;
left:0;
text-align: center;
width: 100%;
color:#fff;
color:#000;
background-color: white;
transition: all 0.3s ease;
}
.author:hover{
color:Black;

}

/* .setting p a{
margin-top: 0.1rem;
border-radius: 4px;
padding: 0.2rem;
font-weight: bold;
background: #333;
color: #ef1414;
cursor: pointer;
letter-spacing: 2px;
text-align: center;
} */


.author a{
color:black;
}
Expand Down Expand Up @@ -326,8 +339,14 @@ h1 {
font-size: 20px;
padding-left: 3%;
padding-right: 3%;
font-weight: bolder;
}
#players-count
{
margin-bottom: 10px;
}


.settings .form-item {
display: flex;
flex-direction: column;
Expand Down Expand Up @@ -526,14 +545,15 @@ h1 {
.settings .form-item select{
border-radius: 3px;
padding: 0.4rem 0.2rem;

letter-spacing: 2px;
font-weight: bold;
font-size: large;
}

select{

background: rgb(70, 70, 70);
color:#ffffff
}

#myVideo,
Expand Down Expand Up @@ -616,6 +636,7 @@ select {

.whole-background {
display: flex;
margin-top: 10%;
flex-direction: row;
gap: 1rem;
background-color: rgba(231, 181, 55, 0.979);
Expand Down Expand Up @@ -644,6 +665,7 @@ select {
.start-btn,
.reset-btn {
flex: 1;
margin-top: 10%;
}

.error-message {
Expand All @@ -668,7 +690,7 @@ input[type=number] {
.button {
margin-top: 20px;
padding: 10px 10px;
background: #333;
background: rgb(50, 81, 50);
color: #fff;
text-align: center;
border-radius: 5px;
Expand All @@ -689,6 +711,7 @@ input[type=number] {
padding-bottom: 10px;
width: 100%;
font-size: 1.5rem;
padding: 0;
}


Expand Down Expand Up @@ -784,7 +807,7 @@ input[type=number] {



.navbar {
.navbarr {
display: flex;
justify-content: space-between;
align-items: center;
Expand All @@ -802,13 +825,14 @@ input[type=number] {
text-decoration: none;
font-size: 35px;
font-weight: bolder;
color: black;
color: rgb(23, 13, 13);
}

.nav-links {
list-style: none; /* Removes default bullet points from list items */
margin: 0;
padding: 0;
padding: 0;

}

.nav-links li {
Expand Down Expand Up @@ -873,4 +897,4 @@ input[type=number] {
margin: 10px 0;
}

}
}
8 changes: 4 additions & 4 deletions styles/index.style.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
body {
position: relative;
font-family: monospace;
/* font-family: monospace; */
background-color: #fdfdfd;
background-size: 8px 8px, 8px 8px;
background-position: center, center;
Expand Down Expand Up @@ -73,7 +73,7 @@ h1::-webkit-scrollbar {

.settings .form-item .details {
font-style: italic;
color: #999;
color: #070707;
font-size: 15px;

}
Expand Down Expand Up @@ -106,7 +106,7 @@ h1::-webkit-scrollbar {
word-spacing: -1.8px;
}

.author {
/* .author {
position: sticky;
bottom: 0;
text-align: center;
Expand All @@ -115,4 +115,4 @@ h1::-webkit-scrollbar {
font-size: 1.2rem;
background-color: white;
box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.1);
}
} */