Updated bootstrap to 5.0.0-beta3, and streamlined headers etc.

master
Eirik Th S 2021-04-19 11:35:40 +02:00
parent a1b22286b7
commit 2524f6ac3d
12 changed files with 49 additions and 36 deletions

4
.gitignore vendored
View File

@ -1,2 +1,4 @@
webdata/config.php
temp/
temp/
css/archive/*
js/archive/*

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,16 +1,8 @@
<?php require 'webdata/init.php'; ?><!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<?=getHtmlHeaders();?>
<title>Grocery Assist</title>
<link rel="stylesheet" href="css/bootstrap.min.css" type="text/css" />
<link rel="stylesheet" href="css/index.css" type="text/css" />
<script src="js/jquery-3.5.1.min.js"></script>
<script src="js/bootstrap.min.js"></script>
</head>
<body id="home">

6
js/bootstrap.min.js vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

6
js/popper.min.js vendored Normal file

File diff suppressed because one or more lines are too long

1
js/popper.min.js.map Normal file

File diff suppressed because one or more lines are too long

View File

@ -1,20 +1,11 @@
<?php require '../webdata/init.php'; ?><!DOCTYPE html>
<?php $rPath = "../"; require $rPath.'webdata/init.php'; ?><!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>PLAN - Grocery Assist</title>
<link rel="stylesheet" href="../css/bootstrap.min.css" type="text/css" />
<link rel="stylesheet" href="../css/index.css" type="text/css" />
<script src="../js/jquery-3.5.1.min.js"></script>
<script src="//unpkg.com/@popperjs/core@2"></script>
<script src="../js/bootstrap.min.js"></script>
<?=getHtmlHeaders($rPath);?>
<title>Plan - Grocery Assist</title>
</head>
<body id='plan'>
<?php include '../webdata/navbar.php'; ?>
<?php include $rPath.'webdata/navbar.php'; ?>
<h1 class="headline text-center">Grocery Assist</h1>
<div class="container" style="padding-top: 5px; text-align: center;">
@ -33,5 +24,4 @@
<script src='plan.js'></script>
</body>
</html>

View File

@ -311,6 +311,7 @@ $("#addStore").click(ev => {
});
$("#refreshAll").click(ev => {
$(".tooltip").remove();
stores = [];
getStores();
});

View File

@ -20,6 +20,27 @@ function database(){
return $db;
}
function checkLogin(){
function getHtmlHeaders($prepend = ""){
return "<meta charset='UTF-8'>
<meta http-equiv='X-UA-Compatible' content='IE=edge'>
<meta name='viewport' content='width=device-width, initial-scale=1.0'>
}
<link rel='stylesheet' href='".$prepend."css/bootstrap.min.css' type='text/css' />
<link rel='stylesheet' href='".$prepend."css/index.css' type='text/css' />
<script src='".$prepend."js/jquery-3.5.1.min.js'></script>
<script src='".$prepend."js/popper.min.js'></script>
<script src='".$prepend."js/bootstrap.min.js'></script>\n\n";
}
function checkLogin(){
global $user_id;
if(isset($user_id)){
return $user_id;
}
return 1;
}

View File

@ -5,7 +5,7 @@ if($activePage == "/index.php"){ $activePage = "/"; }
?><nav class="navbar navbar-expand-sm navbar-light bg-light" style="z-index: 2;">
<div class="container-fluid" style="max-width: 900px;">
<a class="navbar-brand" href="/"><img src='#' style="height: 24px;" alt='Groceries' /></a>
<a class="navbar-brand" href="<?=$projectRoot;?>/"><img src='#' style="height: 24px;" alt='Groceries' /></a>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse"
data-bs-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false"
aria-label="Toggle navigation">