Search bar

This commit is contained in:
Mathieu Sanchez 2019-06-06 17:35:13 +09:00
parent 809781f5b1
commit 3d7d3c3174
5 changed files with 108 additions and 20 deletions

View File

@ -1,21 +1,25 @@
<!--The content below is only a placeholder and can be replaced.-->
<div style="text-align:center">
<h1>
Welcome to {{ title }}!
</h1>
<img width="300" alt="Angular Logo" src="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNTAgMjUwIj4KICAgIDxwYXRoIGZpbGw9IiNERDAwMzEiIGQ9Ik0xMjUgMzBMMzEuOSA2My4ybDE0LjIgMTIzLjFMMTI1IDIzMGw3OC45LTQzLjcgMTQuMi0xMjMuMXoiIC8+CiAgICA8cGF0aCBmaWxsPSIjQzMwMDJGIiBkPSJNMTI1IDMwdjIyLjItLjFWMjMwbDc4LjktNDMuNyAxNC4yLTEyMy4xTDEyNSAzMHoiIC8+CiAgICA8cGF0aCAgZmlsbD0iI0ZGRkZGRiIgZD0iTTEyNSA1Mi4xTDY2LjggMTgyLjZoMjEuN2wxMS43LTI5LjJoNDkuNGwxMS43IDI5LjJIMTgzTDEyNSA1Mi4xem0xNyA4My4zaC0zNGwxNy00MC45IDE3IDQwLjl6IiAvPgogIDwvc3ZnPg==">
<div class="main-container">
<div class="center-container">
<h1>PQ-Man</h1>
<div class="search-bar">
<input placeholder="Your Sport Recherche" type="text"/>
<div class="search-button">
<i class="material-icons">search</i>
</div>
</div>
</div>
</div>
<h2>Here are some links to help you start: </h2>
<ul>
<li>
<h2><a target="_blank" rel="noopener" href="https://angular.io/tutorial">Tour of Heroes</a></h2>
</li>
<li>
<h2><a target="_blank" rel="noopener" href="https://angular.io/cli">CLI Documentation</a></h2>
</li>
<li>
<h2><a target="_blank" rel="noopener" href="https://blog.angular.io/">Angular blog</a></h2>
</li>
</ul>
<router-outlet></router-outlet>

View File

@ -0,0 +1,68 @@
@text-color: #37474f;
@border-color: rgba(183, 183, 183, .3);
.main-container {
width: 100%;
height: 100%;
align-items: center;
display: flex;
justify-content: center;
.center-container {
margin: auto;
width: 100%;
max-width: 680px;
min-width: 300px;
padding: 0 .8em 200px .8em;
box-sizing: border-box;
h1 {
text-align: center;
font-size: 6em;
margin: 0.3em 0;
color: @text-color;
@media screen and ( max-width: 450px ) {
font-size: 3.5em;
}
}
.search-bar {
width: 100%;
display: flex;
box-sizing: border-box;
padding: 10px 0 10px 20px;
border: 1px solid @border-color;
-webkit-border-radius: 25px;
border-radius: 25px;
font: normal 20px/normal Verdana, Geneva, sans-serif;
color: @text-color;
-o-text-overflow: clip;
text-overflow: clip;
background: rgba(255, 255, 255, 1);
height: 52px;
input[type=text] {
vertical-align: top;
width: calc(100% - 30px);
height: 28px;
border: none;
}
input[type=text]:focus {
outline: none;
}
.search-button {
border-left: 1px solid @border-color;
padding: 0 10px;
.material-icons {
font-size: 30px;
color: @text-color;
}
}
}
}
}

View File

@ -7,6 +7,9 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" type="image/x-icon" href="favicon.ico">
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Russo+One&display=swap" rel="stylesheet">
</head>
<body>
<app-root></app-root>

View File

@ -4,9 +4,9 @@ import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
import { AppModule } from './app/app.module';
import { environment } from './environments/environment';
if (environment.production) {
if ( environment.production ) {
enableProdMode();
}
platformBrowserDynamic().bootstrapModule(AppModule)
.catch(err => console.error(err));
platformBrowserDynamic().bootstrapModule( AppModule )
.catch( err => console.error( err ) );

View File

@ -1 +1,14 @@
/* You can add global styles to this file, and also import other style files */
html {
height: 100%;
width: 100%;
background-color: #f7f7f7;
font-family: 'Russo One', sans-serif;
}
body {
height: 100%;
width: 100%;
margin: 0;
}