Adds autofocus to search input and fixes display on mobile
This commit is contained in:
		
							parent
							
								
									efc54383bd
								
							
						
					
					
						commit
						0c551aadd5
					
				
							
								
								
									
										120
									
								
								inc/style.css
									
									
									
									
									
								
							
							
						
						
									
										120
									
								
								inc/style.css
									
									
									
									
									
								
							@ -68,63 +68,60 @@ h1 {
 | 
				
			|||||||
    font-size: 1.25rem;
 | 
					    font-size: 1.25rem;
 | 
				
			||||||
    font-weight: 800;
 | 
					    font-weight: 800;
 | 
				
			||||||
    margin: 0;
 | 
					    margin: 0;
 | 
				
			||||||
}
 | 
					 | 
				
			||||||
h1 span {
 | 
					 | 
				
			||||||
    display: flex;
 | 
					 | 
				
			||||||
    font-weight: 300;
 | 
					 | 
				
			||||||
    text-transform: lowercase;
 | 
					 | 
				
			||||||
    gap: 0.5rem;
 | 
					 | 
				
			||||||
    margin-left: 0.5rem;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
h1 span::before {
 | 
					 | 
				
			||||||
    color: #aaa;
 | 
					 | 
				
			||||||
    content: '//';
 | 
					 | 
				
			||||||
    display: block;
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    span {
 | 
				
			||||||
 | 
					        display: none;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
form {
 | 
					form {
 | 
				
			||||||
  align-items: stretch;
 | 
					    align-items: stretch;
 | 
				
			||||||
  display: flex;
 | 
					    display: flex;
 | 
				
			||||||
  justify-content: center;
 | 
					    justify-content: center;
 | 
				
			||||||
  position: relative;
 | 
					    position: relative;
 | 
				
			||||||
  width: 90%;
 | 
					    width: 90%;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
input[type="url"] {
 | 
					input[type="url"] {
 | 
				
			||||||
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'%3E%3C/circle%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'%3E%3C/line%3E%3C/svg%3E");
 | 
					    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'%3E%3C/circle%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'%3E%3C/line%3E%3C/svg%3E");
 | 
				
			||||||
  background-repeat: no-repeat;
 | 
					    background-repeat: no-repeat;
 | 
				
			||||||
  background-position: 1.25rem 50%;
 | 
					    background-position: 1.25rem 50%;
 | 
				
			||||||
  border: 0.15rem solid #1a1a1a;
 | 
					    border: 0.15rem solid #1a1a1a;
 | 
				
			||||||
  border-radius: 2rem;
 | 
					    border-radius: 2rem;
 | 
				
			||||||
  box-shadow: inset 0 0.25rem 0 0 #f0eded;
 | 
					    box-shadow: inset 0 0.25rem 0 0 #f0eded;
 | 
				
			||||||
  color: #1a1a1a;
 | 
					    color: #1a1a1a;
 | 
				
			||||||
  font-size: 1.25rem;
 | 
					    font-size: 1.25rem;
 | 
				
			||||||
  height: 3.6rem;
 | 
					    height: 3.6rem;
 | 
				
			||||||
  padding: 0 8.5rem 0 3.5rem;
 | 
					    padding: 0 8.5rem 0 3.5rem;
 | 
				
			||||||
  transition: box-shadow 150ms ease-in-out;
 | 
					    transition: box-shadow 150ms ease-in-out;
 | 
				
			||||||
  width: 100%;
 | 
					    width: 100%;
 | 
				
			||||||
}
 | 
					
 | 
				
			||||||
input[type="url"]:focus {
 | 
					    &:focus {
 | 
				
			||||||
  outline: none;
 | 
					        outline: none;
 | 
				
			||||||
  box-shadow: inset 0 0.25rem 0 0 #f0eded, 0 0 0 1px #fff, 0 0 0 0.25rem #39b9e4;
 | 
					        box-shadow: inset 0 0.25rem 0 0 #f0eded, 0 0 0 1px #fff, 0 0 0 0.25rem #39b9e4;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
button[type="submit"] {
 | 
					button[type="submit"] {
 | 
				
			||||||
  background: #fff;
 | 
					    background: #fff;
 | 
				
			||||||
  border: 0.15rem solid #1a1a1a;
 | 
					    border: 0.15rem solid #1a1a1a;
 | 
				
			||||||
  border-radius: 0 2rem 2rem 0;
 | 
					    border-radius: 0 2rem 2rem 0;
 | 
				
			||||||
  box-shadow: inset 0 0.25rem 0 0 #f0eded;
 | 
					    box-shadow: inset 0 0.25rem 0 0 #f0eded;
 | 
				
			||||||
  color: #1a1a1a;
 | 
					    color: #1a1a1a;
 | 
				
			||||||
  cursor: pointer;
 | 
					    cursor: pointer;
 | 
				
			||||||
  height: 100%;
 | 
					    height: 100%;
 | 
				
			||||||
  font-size: 1.25rem;
 | 
					    font-size: 1.25rem;
 | 
				
			||||||
  padding: 0.75rem 2rem 0.8rem 1.75rem;
 | 
					    padding: 0.75rem 1.5rem 0.8rem 1.25rem;
 | 
				
			||||||
  position: absolute;
 | 
					    position: absolute;
 | 
				
			||||||
  top: 0;
 | 
					    top: 0;
 | 
				
			||||||
  transition: background 150ms ease-in-out;
 | 
					    transition: background 150ms ease-in-out;
 | 
				
			||||||
  right: 0;
 | 
					    right: 0;
 | 
				
			||||||
}
 | 
					
 | 
				
			||||||
button[type="submit"]:hover {
 | 
					    &:hover {
 | 
				
			||||||
  background-color: #f0eded;
 | 
					        background-color: #f0eded;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    span {
 | 
				
			||||||
 | 
					        display: none;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
address {
 | 
					address {
 | 
				
			||||||
@ -387,6 +384,17 @@ caption {
 | 
				
			|||||||
  text-align: left;
 | 
					  text-align: left;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/* tablet */
 | 
				
			||||||
 | 
					@media screen and (min-width: 756px) {
 | 
				
			||||||
 | 
					    button[type="submit"] {
 | 
				
			||||||
 | 
					        padding: 0.75rem 2rem 0.8rem 1.75rem;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        span {
 | 
				
			||||||
 | 
					            display: inline;
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/* laptop */
 | 
					/* laptop */
 | 
				
			||||||
@media screen and (min-width: 1024px) {
 | 
					@media screen and (min-width: 1024px) {
 | 
				
			||||||
    menu {
 | 
					    menu {
 | 
				
			||||||
@ -394,6 +402,20 @@ caption {
 | 
				
			|||||||
    }
 | 
					    }
 | 
				
			||||||
    h1 {
 | 
					    h1 {
 | 
				
			||||||
        font-size: 1.75rem;
 | 
					        font-size: 1.75rem;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        span {
 | 
				
			||||||
 | 
					            display: flex;
 | 
				
			||||||
 | 
					            font-weight: 300;
 | 
				
			||||||
 | 
					            text-transform: lowercase;
 | 
				
			||||||
 | 
					            gap: 0.5rem;
 | 
				
			||||||
 | 
					            margin-left: 0.5rem;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            &::before {
 | 
				
			||||||
 | 
					                color: #aaa;
 | 
				
			||||||
 | 
					                content: '//';
 | 
				
			||||||
 | 
					                display: block;
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    form {
 | 
					    form {
 | 
				
			||||||
        width: 75%;
 | 
					        width: 75%;
 | 
				
			||||||
 | 
				
			|||||||
@ -29,8 +29,10 @@ include('inc/codes.php');
 | 
				
			|||||||
            </nav>
 | 
					            </nav>
 | 
				
			||||||
        </menu>
 | 
					        </menu>
 | 
				
			||||||
        <form method="post" action="/" type="application/x-www-form-urlencoded">
 | 
					        <form method="post" action="/" type="application/x-www-form-urlencoded">
 | 
				
			||||||
            <input type="url" value="<?php echo (isset($url)) ? $url : ''; ?>" placeholder="URL to check..." name="url">
 | 
					            <input type="url" value="<?php echo (isset($url)) ? $url : ''; ?>" placeholder="URL to check..." name="url" autofocus>
 | 
				
			||||||
            <button type="submit">Check</button>
 | 
					            <button type="submit">
 | 
				
			||||||
 | 
					                <span>Check </span>→
 | 
				
			||||||
 | 
					            </button>
 | 
				
			||||||
        </form>
 | 
					        </form>
 | 
				
			||||||
    </header>
 | 
					    </header>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user