Compare commits

..

No commits in common. "e5c7bdedc106101a6d224b07ca3666158d6179aa" and "836d3ecc65f662cddf8b4fbae17e4284ad5dc311" have entirely different histories.

17 changed files with 3 additions and 9519 deletions

5
.gitignore vendored
View File

@ -2,6 +2,7 @@
composer.phar
/vendor/
# ---> NPM modules (mainly for Gulp.js)
node_modules/
# Commit your application's lock file https://getcomposer.org/doc/01-basic-usage.md#commit-your-composer-lock-file-to-version-control
# You may choose to ignore a library lock file http://getcomposer.org/doc/02-libraries.md#lock-file
# composer.lock

View File

@ -1,37 +0,0 @@
$nav-bar-height: 50px;
body{
padding: $nav-bar-height 0 0;
background: lightgrey;
}
#nav-bar{
position: fixed;
top: 0;
left: 0;
width: 100%;
height: $nav-bar-height;
background: #212121;
box-shadow: 0 2px 1px rgba(0, 0, 0, .25);
.nav-bar-left{
float: left;
}
ul{
list-style: none;
li{
display: inline-block;
}
}
.nav-link a{
color: teal;
transition: all 230ms ease-in-out;
&:hover{
color: green;
}
}
}

View File

@ -1,4 +0,0 @@
#!/bin/sh
# start a local instance of the app using PHP's built-in webserver
php -S localhost:8080 -t public/ public/index.php

View File

@ -1,24 +0,0 @@
{
"name": "bitgoblin/overseer",
"description": "Self-hosted inventory tracking web app",
"type": "project",
"license": "BSD-2-Clause",
"autoload": {
"psr-4": {
"BitGoblin\\Overseer\\": "src/"
}
},
"authors": [
{
"name": "Gregory Ballantine",
"email": "gballantine@bitgoblin.tech"
}
],
"minimum-stability": "stable",
"require": {
"slim/slim": "^4.10",
"slim/psr7": "^1.5",
"php-di/php-di": "^6.4",
"slim/twig-view": "^3.3"
}
}

1387
composer.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -1,17 +0,0 @@
const gulp = require('gulp');
const { watch } = require('gulp');
const sass = require('gulp-sass')(require('sass'));
// compile
function styles(cb) {
return gulp.src('./assets/styles/**/*.scss')
.pipe(sass({outputStyle: 'compressed'}).on('error', sass.logError))
.pipe(gulp.dest('./public/css'));
cb();
}
// by default, watch files
exports.default = function() {
// compile sass stylesheets
watch('assets/styles/**/*.scss', styles);
};

7882
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -1,25 +0,0 @@
{
"name": "overseer",
"version": "0.1.0",
"description": "Self-hosted inventory tracker",
"main": "index.js",
"scripts": {
"gulp": "gulp",
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
"type": "git",
"url": "gitea@git.metaunix.net:BitGoblin/overseer.git"
},
"keywords": [
"inventory",
"tracking"
],
"author": "Gregory Ballanine <gballantine@bitgoblin.tech>",
"license": "BSD-2-Clause",
"devDependencies": {
"gulp": "^4.0.2",
"gulp-sass": "^5.1.0",
"sass": "^1.55.0"
}
}

View File

@ -1,5 +0,0 @@
# rewrite rules
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^ index.php [QSA,L]

View File

@ -1 +0,0 @@
body{padding:50px 0 0;background:#d3d3d3}#nav-bar{position:fixed;top:0;left:0;width:100%;height:50px;background:#212121;box-shadow:0 2px 1px rgba(0,0,0,.25)}#nav-bar .nav-bar-left{float:left}#nav-bar ul{list-style:none}#nav-bar ul li{display:inline-block}#nav-bar .nav-link a{color:teal;transition:all 230ms ease-in-out}#nav-bar .nav-link a:hover{color:green}

View File

@ -1,24 +0,0 @@
<?php
// if we're looking for static files in dev, return false so they can be served.
if (PHP_SAPI == 'cli-server') {
$url = parse_url($_SERVER['REQUEST_URI']);
$file = __DIR__ . $url['path'];
// check the file types, only serve standard files
if (preg_match('/\.(?:png|js|jpg|jpeg|gif|css)$/', $file)) {
// does the file exist? If so, return it
if (is_file($file))
return false;
// file does not exist. return a 404
header($_SERVER['SERVER_PROTOCOL'].' 404 Not Found');
printf('"%s" does not exist', $_SERVER['REQUEST_URI']);
return false;
}
}
require_once __DIR__ . '/../src/app.php';
$app->run();

View File

@ -1,19 +0,0 @@
<?php
namespace BitGoblin\Overseer\Controllers;
use Psr\Container\ContainerInterface;
class Controller {
protected $container;
public function __construct(ContainerInterface $container) {
$this->container = $container;
}
public function get(string $name) {
return $this->container->get($name);
}
}

View File

@ -1,16 +0,0 @@
<?php
namespace BitGoblin\Overseer\Controllers;
use Psr\Http\Message\ResponseInterface as Response;
use Psr\Http\Message\ServerRequestInterface as Request;
use Slim\Views\Twig;
class HomeController extends Controller {
public function getIndex(Request $request, Response $response): Response {
$view = Twig::fromRequest($request);
return $view->render($response, 'index.twig');
}
}

View File

@ -1,25 +0,0 @@
<?php
use DI\Container;
use Slim\Factory\AppFactory;
use Slim\Views\Twig;
use Slim\Views\TwigMiddleware;
require __DIR__ . '/../vendor/autoload.php';
// Create new container object and add our config object to it
$container = new Container();
// Set container to create App with on AppFactory
AppFactory::setContainer($container);
$app = AppFactory::create();
// create Twig instance
$twig = Twig::create('views', ['cache' => false]);
// add Twig-View Middleware
$app->add(TwigMiddleware::create($app, $twig));
// load routes
require_once __DIR__ . '/routes.php';
// app starts in public/index.php

View File

@ -1,7 +0,0 @@
<?php
use Psr\Http\Message\ResponseInterface as Response;
use Psr\Http\Message\ServerRequestInterface as Request;
// index GET route - this page should welcome the user and direct them to the available actions
$app->get('/', '\\BitGoblin\\Overseer\\Controllers\\HomeController:getIndex')->setName('index');

View File

@ -1,12 +0,0 @@
{% extends 'layout.twig' %}
{% block content %}
<!-- page header -->
<header class="row">
<div class="columns twelve">
<h1>Welcome to Overseer!</h1>
</div>
</header>
{% endblock %}

View File

@ -1,32 +0,0 @@
<!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>{% block title %}{% endblock %} | Overseer</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.2.0/css/all.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/skeleton/2.0.4/skeleton.min.css">
<link rel="stylesheet" href="/css/gargoyle.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.1/jquery.min.js"></script>
<script src="/js/drake.js"></script>
</head>
<body>
<!-- global navigation -->
<nav id="nav-bar">
<div class="nav-bar-left">
<ul>
<li class="site-logo">Overseer</li>
<li class="nav-link"><a href="/">Home</a></li>
<li class="nav-link"><a href="/search">Search</a></li>
<li class="nav-link"><a href="/add">Add Item</a></li>
</ul>
</div>
</nav>
<!-- main content -->
<div id="main-content" class="container">
{% block content %}{% endblock %}
</div>
</body>
</html>