Code Monkey home page Code Monkey logo

my-website's Introduction

My Website

This is the code for my personal website https://tebe.ch which is built with Mithril.js and FlightPHP.

The design is heavily inspired by:

Install

git clone https://github.com/tbreuss/my-website.git
cd my-website
npm install
composer install

Add Database

Create a MySQL database with the following schema.

CREATE TABLE `article` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`format` enum('html','markdown') DEFAULT NULL,
`title` varchar(100) DEFAULT NULL,
`slug` varchar(50) DEFAULT NULL,
`abstract` tinytext,
`content` text,
`reading_time` int(11) DEFAULT NULL,
`created_at` datetime DEFAULT NULL,
`updated_at` datetime DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;


CREATE TABLE `photo` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`type` tinyint(3) unsigned NOT NULL DEFAULT '0',
`name` varchar(500) NOT NULL DEFAULT '',
`description` varchar(500) DEFAULT NULL,
`photodate` date DEFAULT NULL,
`abstract` varchar(500) NOT NULL DEFAULT '',
`extension` varchar(10) DEFAULT NULL,
`panorama` tinyint(1) unsigned NOT NULL DEFAULT '0',
`loop` tinyint(1) unsigned NOT NULL DEFAULT '0',
`counter` int(11) unsigned NOT NULL DEFAULT '0',
`opened` timestamp NULL DEFAULT NULL,
`deleted` timestamp NULL DEFAULT NULL,
`created` timestamp NULL DEFAULT NULL,
`modified` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `name` (`name`(255)),
KEY `counter` (`counter`),
KEY `created` (`created`),
KEY `modified` (`modified`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE `page` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`format` enum('html','markdown') DEFAULT NULL,
`title` varchar(100) DEFAULT NULL,
`slug` varchar(50) DEFAULT NULL,
`content` text,
`created_at` datetime DEFAULT NULL,
`updated_at` datetime DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `slug` (`slug`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

Add Configuration

Copy backend/config/example.php to backend/config/main.php and edit settings

Run

Frontend

npm run start

Backend

php -S localhost:9999 -t web/

Open http://localhost:9999 in your browser.

my-website's People

Contributors

dependabot[bot] avatar tbreuss avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.