Skip to content

Commit

Permalink
styling
Browse files Browse the repository at this point in the history
  • Loading branch information
vkotyak committed Sep 8, 2019
1 parent ed59f4c commit 5e4ae05
Show file tree
Hide file tree
Showing 3 changed files with 60 additions and 13 deletions.
22 changes: 22 additions & 0 deletions 1/footer.html
@@ -1,4 +1,26 @@
</div>

<footer class="page-footer">
<div class="container">
<div class="row">
<div class="col l6 s12">
<p>&copy; Copyleft</p>
</div>
</div>
</div>
</footer>

<script
src="https://code.jquery.com/jquery-3.4.1.slim.min.js"
integrity="sha256-pasqAKBDmFT4eHoN2ndd6lN370kFiGUFyTiUHWhU7k8="
crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/js/materialize.min.js"></script>
<script>
$(document).ready(function(){
$('select').formSelect();

});
</script>
</body>

</html>
14 changes: 13 additions & 1 deletion 1/header.html
Expand Up @@ -4,7 +4,19 @@
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>example</title>
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Roboto:300,400,700&display=swap&subset=cyrillic" rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/css/materialize.min.css">
</head>

<body>
<body>
<header class="page-footer">
<div class="container">
<div class="row">
<div class="col l6 s12">
<h1 class="title">ATM search</h1>
</div>
</div>
</div>
</header>
<div class="container">
37 changes: 25 additions & 12 deletions 1/view.php
Expand Up @@ -3,28 +3,41 @@
class View {

public function makeForm(){
$html = '';
$html .= '<form action="" method="POST">
<select name="town">
<option value="-"> </option>
<option value="Кировоград">Кропивницький</option>
<option value="Днепропетровск">Дніпро</option>
</select>
<input type="submit" value="Знайти">
</form>';
$html = '<div class="row">';
$html .= '<form action="" method="POST" class="col s12">
<fieldset class="row">
<div class="input-field col s12">
<select name="town">
<option value="-"> </option>
<option value="Кировоград">Кропивницький</option>
<option value="Днепропетровск">Дніпро</option>
</select>
<label>Select town</label>
</div>
<div class="input-field col s12">
<button class="btn waves-effect waves-light" type="submit" name="action">Submit
<i class="material-icons right">send</i>
</button>
</div>
</fieldset>
</form>
</div>';
return $html;
}
public function makeResult($data,$town="") {
$html ='<h2>'.$town.'</h2>';
$html .= '<ul>';
$html = '<div class="row">';
$html .='<h2 class="header col s12">'.$town.'</h2>';
$html .= '<ul class="col s12 collection">';
foreach ($data as $atm) {
$html .='<li>';
$html .='<li class="collection-item">';
$html .=$atm['name'];
$html .=' ';
$html .=$atm['address'];
$html .='</li>';
}
$html .='</ul>';
$html .='</div>';

return $html;
}
}

0 comments on commit 5e4ae05

Please sign in to comment.