forked from fr/deguapp
		
	some design improvments
This commit is contained in:
		
							
								
								
									
										28
									
								
								frontend/css/_general.css
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										28
									
								
								frontend/css/_general.css
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,28 @@
 | 
				
			|||||||
 | 
					*{
 | 
				
			||||||
 | 
						padding: 0;
 | 
				
			||||||
 | 
						margin: 0;
 | 
				
			||||||
 | 
						box-sizing: border-box;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					body {
 | 
				
			||||||
 | 
						font-family: OpenSans;
 | 
				
			||||||
 | 
						padding: 0 0.5rem;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					.flex {
 | 
				
			||||||
 | 
						display: flex;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					.f-row {
 | 
				
			||||||
 | 
						display: flex;
 | 
				
			||||||
 | 
						flex-direction: row;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					.f-col {
 | 
				
			||||||
 | 
						display: flex;
 | 
				
			||||||
 | 
						flex-direction: column;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					footer {
 | 
				
			||||||
 | 
						display: none;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
							
								
								
									
										0
									
								
								frontend/css/_variables.css
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										0
									
								
								frontend/css/_variables.css
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,3 @@
 | 
				
			|||||||
 | 
					.main-wrapper h1 {
 | 
				
			||||||
 | 
						text-align: center;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										8
									
								
								frontend/css/nav.css
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										8
									
								
								frontend/css/nav.css
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,8 @@
 | 
				
			|||||||
 | 
					.nav-wrapper {
 | 
				
			||||||
 | 
						justify-content: space-between;
 | 
				
			||||||
 | 
						padding: 1rem 0.5rem;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					a {
 | 
				
			||||||
 | 
						color: black;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
							
								
								
									
										
											BIN
										
									
								
								frontend/img/tabornici_logo.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								frontend/img/tabornici_logo.png
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| 
		 After Width: | Height: | Size: 188 KiB  | 
@@ -11,7 +11,9 @@
 | 
				
			|||||||
	
 | 
						
 | 
				
			||||||
	// Date Time Zone
 | 
						// Date Time Zone
 | 
				
			||||||
	date_default_timezone_set('Europe/Prague');
 | 
						date_default_timezone_set('Europe/Prague');
 | 
				
			||||||
	$API_URL = "http://localhost:6060"
 | 
						$API_URL = "http://localhost:6060";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						$LOGGEDIN = !false;
 | 
				
			||||||
?>
 | 
					?>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<!DOCTYPE html>
 | 
					<!DOCTYPE html>
 | 
				
			||||||
@@ -20,22 +22,34 @@
 | 
				
			|||||||
		<title>DeguApp</title>
 | 
							<title>DeguApp</title>
 | 
				
			||||||
		<meta charset="UTF-8">
 | 
							<meta charset="UTF-8">
 | 
				
			||||||
		<meta name="viewport" content="width=device-width, initial-scale=1">
 | 
							<meta name="viewport" content="width=device-width, initial-scale=1">
 | 
				
			||||||
		<link href="home.css" rel="stylesheet">
 | 
							<link href="/css/_general.css" rel="stylesheet">
 | 
				
			||||||
 | 
							<link href="/css/_variables.css" rel="stylesheet">
 | 
				
			||||||
 | 
							<link href="/css/nav.css" rel="stylesheet">
 | 
				
			||||||
 | 
							<link href="/css/home.css" rel="stylesheet">
 | 
				
			||||||
 | 
							<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
 | 
				
			||||||
 | 
							<link href="https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,400;0,500;0,700;1,400;1,500;1,700&display=swap" rel="stylesheet">
 | 
				
			||||||
	</head>
 | 
						</head>
 | 
				
			||||||
	<body>
 | 
						<body>
 | 
				
			||||||
		<header>
 | 
							<header class="f-row nav-wrapper">
 | 
				
			||||||
			<div class="flex-left">
 | 
								<div class="">
 | 
				
			||||||
				<a href="/">DeguApp</a>
 | 
									<a href="/">DeguApp</a>
 | 
				
			||||||
			</div>
 | 
								</div>
 | 
				
			||||||
			<div class="flex-left">
 | 
								<div class="">
 | 
				
			||||||
 | 
								<?php
 | 
				
			||||||
 | 
								if(!$LOGGEDIN) {
 | 
				
			||||||
 | 
								?>
 | 
				
			||||||
				<a href="/login">Přihlásit se</a>
 | 
									<a href="/login">Přihlásit se</a>
 | 
				
			||||||
				<a href="/signup">Registrace</a>
 | 
									<a href="/signup">Registrace</a>
 | 
				
			||||||
 | 
								<?php
 | 
				
			||||||
 | 
								} else{
 | 
				
			||||||
 | 
								?>
 | 
				
			||||||
				<a href="/add_beer">Přidat pivo</a>
 | 
									<a href="/add_beer">Přidat pivo</a>
 | 
				
			||||||
				<a href="/add_review">Přidat recenzi</a>
 | 
									<a href="/add_review">Přidat recenzi</a>
 | 
				
			||||||
 | 
								<?php } ?>
 | 
				
			||||||
			</div>
 | 
								</div>
 | 
				
			||||||
		</header>
 | 
							</header>
 | 
				
			||||||
		<section class="main-wrapper">
 | 
							<section class="main-wrapper">
 | 
				
			||||||
			<h1>DeguApp</h1>
 | 
								<!-- routing shits -->
 | 
				
			||||||
			<?php
 | 
								<?php
 | 
				
			||||||
				$R = new Router();
 | 
									$R = new Router();
 | 
				
			||||||
				$R->route('GET', '/', 'home');
 | 
									$R->route('GET', '/', 'home');
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -0,0 +1,5 @@
 | 
				
			|||||||
 | 
					<h1>DeguApp</h1>
 | 
				
			||||||
 | 
					<center>
 | 
				
			||||||
 | 
						<img src="/img/tabornici_logo.png" alt="tabornici logo" width="60%">
 | 
				
			||||||
 | 
					</center>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										51
									
								
								frontend/pages/login/login.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										51
									
								
								frontend/pages/login/login.php
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,51 @@
 | 
				
			|||||||
 | 
					<?php
 | 
				
			||||||
 | 
						$API_URL = "http://localhost:6060"
 | 
				
			||||||
 | 
					?>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					<link rel="stylesheet" href="/css/add.css">
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					<form class="form_add">
 | 
				
			||||||
 | 
						<label for="email">E-mail:</label>
 | 
				
			||||||
 | 
						<input type="email" name="email" id="email">
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						<label for="password">Heslo:</label>
 | 
				
			||||||
 | 
						<input type="password" name="password" id="password">
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						<button id="submit" class="btn-send">Přihlásit se</button>
 | 
				
			||||||
 | 
					</form>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					<script>
 | 
				
			||||||
 | 
						const btn = document.querySelector('.btn-send')
 | 
				
			||||||
 | 
						console.log(btn)
 | 
				
			||||||
 | 
						btn.addEventListener('click', (e) => {
 | 
				
			||||||
 | 
							e.preventDefault()
 | 
				
			||||||
 | 
							send()
 | 
				
			||||||
 | 
						})
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						function send() {
 | 
				
			||||||
 | 
							let form = new FormData(document.querySelector("form"));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							let body = JSON.stringify(Object.fromEntries(form))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							//fetch('<?php echo $API_URL;?>/api/v1/user/add', {
 | 
				
			||||||
 | 
							//	credentials: 'include',
 | 
				
			||||||
 | 
							//	headers: {
 | 
				
			||||||
 | 
							//		'Content-Type': 'application/json',
 | 
				
			||||||
 | 
							//	},
 | 
				
			||||||
 | 
							//	method: 'POST',
 | 
				
			||||||
 | 
							//	body: body,
 | 
				
			||||||
 | 
							//})
 | 
				
			||||||
 | 
								.then(res => {
 | 
				
			||||||
 | 
									console.log(res)
 | 
				
			||||||
 | 
									console.log(res.json())
 | 
				
			||||||
 | 
									
 | 
				
			||||||
 | 
								})
 | 
				
			||||||
 | 
								.then(data => {
 | 
				
			||||||
 | 
									console.log(data)
 | 
				
			||||||
 | 
								})
 | 
				
			||||||
 | 
								.catch(err => {
 | 
				
			||||||
 | 
									console.log(err)
 | 
				
			||||||
 | 
								})
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					</script>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		Reference in New Issue
	
	Block a user