mkraposhin / C5P

Home Page:https://mkraposhin.github.io/C5P/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

C++ - powered personal page (C5P)

The repository contains the source code for a personal site.

The source code is licensed under GNU GPLv3

GENERAL IDEA

Main purpose of the project is management of a personal site using CGI technology and C++ language. The program is divided into three parts:

  1. CGI executable file (folder executables);
  2. classes that produce HTML content (folder classes);
  3. pages of the site itself (folder pages).

Site class provides on demand HTML text for CGI via std::ostream by requesting Document's class virtual method print.

An object of Document class owns:

  • an instance of Head class that contains HTML header;
  • an instance of Page class that contains HTML body.

Each page (Document implementation) of a site is responsible to fill contents of header and body elements. Instances of Head and Page classes should own objects that represent their nested HTML elements. Therefore, each class, which represents HTML element should have means to transfer it's ownership or to create copy of itself.

Classes Head and Page inherit from Compound to ensure ownership of nested HTML elements.

Child classes of Document (such as Contacts, Home, Education, etc) create HTML elements or corresponding web pages and pass their copies to corresponding Page instances.

Supports

  • Basic HTML element, .e.g. <a>, <p>, <div>, <jscript>, <meta>, <button>, <image>, <header>, etc.
  • Simple CSS classes.
  • Markdown language via external libraries.

USES

  1. C++ STL library
  2. Maddy for Markdown rendering
  3. CgiCC for CGI requests
  4. MD4C for Markdown 2 HTML rendering (fast version)

DEMO

You can play demo http://kraposhin.online

About

https://mkraposhin.github.io/C5P/


Languages

Language:C++ 96.8%Language:CMake 3.2%