This commit adds a basic external theme support. The themes use an INI file to describe themselves and what kind of "theme engine" they use (basically what kind of TSiteTheme descendant). Currently only one theme engine is provided: StringReplace. This works by taking a simple template and replacing occurrences of strings like %%PAGETITLE%% with the proper values. The default theme as used previously and two additional themes (darkline and focus) are now provided.
This commit fixes a crashing bug with the deletion of items from itemized pages. The reference to the deleted item was kept around in the itemizedpaeeditors.pas and when the UI asked to delete another item, the previous reference was used. Now the TItemizedPageEditor listens for the itemizedpage-item-removed event to clear the reference. The implementation of this event was also bugged since the event handlers were called after the reference was cleared (so they were getting a nil object instead of the actual object).
This commit fixes a bug that occurred when creating itemized pages: the new pages were always adding new items even when the file was loaded from disk because the call to AddItem was at the constructor. Now the call is made using a new event that is fired after the user has created a new page.
…ixed bugs This commit rewrites the site generation code to use a "collection" of objects that represent the site's resources (pages and other files) with each object generating the resource it represents. The site's "source" pages (the TPage descendants) are asked to fill this collection (since a page can result in one or more html files, images and others). Also the foundation for themes is added. The themes are asked (by the html generator) to 'dress' the code. Currently only the default hardcoded theme is provided. The html viewer is temporary removed since it isn't anymore apparent which source page creates which html page resource. Finally a bunch of bugs were fixed and minor things were tweaked (such as creating by default a new item when a new itemized page is made).
This commit finishes the work on itemized pages (with "finish" here i mean that the itemized pages are now usable). Now they can be properly saved and loaded from disk and used to create pages that contains lists of stuff (items like news items, screenshots, products, etc). Also this new functionality is used to add news pages - pages that contain news items. These can be also used as blogs since all they do is to have posts with dates. A bit of extra cleanup was also made with the move of text-to-html conversion code from textpages.pas to htmlutils.pas
This commit adds a new page type, Text Pages, which can be used to insert plain text (escaped HTML). Later these text pages will also support formatters (like Markdown) and the ability to use external format processors (because i don't really feel like writing a Markdown processor...). It also adds confirmation dialogs in New, Open and Save commands for when the site has been modified. Also a few bugs were fixed with syncing page content with the editor and having the modified flag being set to True even when the site wasn't modified.