diff --git a/ccm-sci-bundle/web/themes/foundry/conf/css-files.xml b/ccm-sci-bundle/web/themes/foundry/conf/css-files.xml index 54f1ac1c7..16a7a821b 100644 --- a/ccm-sci-bundle/web/themes/foundry/conf/css-files.xml +++ b/ccm-sci-bundle/web/themes/foundry/conf/css-files.xml @@ -7,9 +7,10 @@ admin.css + bootstrap/css/bootstrap.min.css public.css public.css - + \ No newline at end of file diff --git a/ccm-sci-bundle/web/themes/foundry/doc/foundry-documentation.xml b/ccm-sci-bundle/web/themes/foundry/doc/foundry-documentation.xml index a658f9a56..d902a12e2 100644 --- a/ccm-sci-bundle/web/themes/foundry/doc/foundry-documentation.xml +++ b/ccm-sci-bundle/web/themes/foundry/doc/foundry-documentation.xml @@ -34,7 +34,7 @@ section-title="Coding style" static="devel/coding-style.html"/> + + + + ]> The documentation system of Foundry @@ -6,8 +9,110 @@

The documentation system of Foundry

-
- Placeholder -
- +
+

Overview

+

+ Foundry comes with a documentation system which creates the reference documentations + for template tags and helper functions on the fly. The documentation system – + which you using at the moment by the way – consists of three parts: +

+
    +
  • + An index.jsp file in the doc directory which invokes the + XSL transformer. Using an JSP here has the advantage that the behaviour is similar + to an index.html. +
  • +
  • + Some XSL templates. +
  • +
  • + And the documentation itself which consists of some XML files, some static texts + and the documentation in the other templates. +
  • +
+

+ The general structure of the documentation is defined by the + doc/foundry-documentation.xml file. This file is the entry point for the + XSL processor. The chapters of the documentation are defined by the + foundry:doc-chapter elements. The sections of the chapters are defined using + foundry:doc-section elements. The section which use static texts have + a static. The value of the static attribute is the name of the + file to include from the doc/static-texts directory. These files are normal + HTML files in XML syntax. They must have a main element. Only the content + of the main element is included into the documentation. +

+

+ Sections which are generated on the fly from the XSL files of Foundry have a + generate attribute. The generate attribute controls which + documentations appear in the section. +

+ +

Documentation inside XSL templates

+

+ Templates, functions and global variables are documented using the + foundry:doc element which is placed in the XSL directly before the element + to document. The foundry:doc element has two mandatory attributes. The + section elements is used to control in which section the documentation + appears. The second attribute is the type attribute. This attribute is + used to format the documentation. The possible values are: +

+
+
template-tag
+
+ The following XSL template is a tag which can be used in the layout templates. +
+
env-var
+
+ The following xsl:variable or xsl:param defines + a global variable. +
+
function
+
+ The following xsl:function is a helper function which can be used + in the implementation of template tags. +
+
function-template
+
+ The following xsl:template is a helper template. +
+
+

+ A foundry:doc element can have to following child elements: +

+
+
foundry:doc-desc
+
+ A text describing the template, function or variable. The must be structured + using HTML elements like p, even it is only a single paragraph. + Otherwise the text is not copied into the documentation. Look at one of the + XSL files of Foundry for an example. +
+
foundry:doc-attributes
+
+ Surrounds the documentation for attributes which can be used on a template tag. + The individual attributes are documented by foundry:doc-attribute + elements. The foundry:doc-attribute has a mandatory attribute + name which contains the name of the attribute. The documentation of + the attribute must be enclosed in HTML elements. Look at one of the + XSL files of Foundry for an example. +
+
foundry:doc-parameters
+
+ Surrounds the documentation for parameters which can be used on a function. + The individual parameters are documented by foundry:doc-parameter + elements. The foundry:doc-parameter has a mandatory parameter + name which contains the name of the parameter. The documentation of + the parameter must be enclosed in HTML elements. Look at one of the + XSL files of Foundry for an example. +
+
foundry:doc-see-also
+
+ Contains links to other parts of the documentation or the external resources. + The links are defined using foundry:doc-link attributes. Each + foundry:doc-link has a href attribute which the link. + The description of the link is the content of the element. +
+
+
+ \ No newline at end of file diff --git a/ccm-sci-bundle/web/themes/foundry/doc/static-texts/devel/foundry-structure.html b/ccm-sci-bundle/web/themes/foundry/doc/static-texts/devel/foundry-structure.html index 9885a266a..b61d2e38d 100644 --- a/ccm-sci-bundle/web/themes/foundry/doc/static-texts/devel/foundry-structure.html +++ b/ccm-sci-bundle/web/themes/foundry/doc/static-texts/devel/foundry-structure.html @@ -7,7 +7,179 @@

The overall structure of foundry

- Placeholder +

Top level structure

+

+ Foundry supports two kinds of themes: Parent themes and child themes. Parent themes + are also called master themes. + Normally there + should be only one parent theme in a CCM installation at /themes/foundry. + All other themes should be child themes. An example for a child theme should also be + installed at /themes/foundry-base. +

+

+ A complete Foundry theme (a parent theme) contains of the following directories: +

+
+
conf
+
+ Configuration files for the theme. +
+
doc
+
+ The documentation of Foundry. The document you reading at the moment is + generated using these files. +
+
fonts
+
+ Webfonts used in the theme. +
+
foundry
+
+ The directory contains the XSL files which contain the logic part of Foundry. +
+
images
+
+ Static images for the theme. +
+
libs
+
+ Additional JavaScript libraries, for example jQuery plugins. +
+
scripts
+
+ Custom JavaScripts +
+
styles
+
+ CSS files +
+
templates
+
+ The layout templates +
+
texts
+
+ Static texts for the theme +
+
user
+
+ Custom extensions. Not supported yet. +
+
+

+ A child theme has only the directories which contain files which the designer needs + to change. These are: +

+
    +
  • conf
  • +
  • fonts
  • +
  • images
  • +
  • libs
  • +
  • scripts
  • +
  • styles
  • +
  • templates
  • +
  • texts
  • +
+

+ The foundry directory contains the following files and directories: +

+
+
fonts
+
Webfonts used internally, for example for the Content Center.
+
images
+
Images used internally.
+
lib
+
The XSL files from Foundry.
+
scripts
+
Java Scripts used internally.
+
styles
+
CSS files for internal templates like the Content Center
+
templates
+
Internal templates for example for the Content Center.
+
texts
+
Internal texts
+
main.xsl
+
+ Entry point. The start.xsl in the base directory acts only as + entry point for the XSL processor and delegates all work to the + main.xsl. +
+
lib.xsl
+
+ A simple import file which imports the XSL files from the lib directory. +
+
+

+ The main.xsl file contains the xsl:output element + which tells the XSL processor that we want to create HTML. There is only two + XSL templates in the main.xsl file along with some helper functions. + This first template is the entry point for CCM and + matches the bebop:page element which is the root element of the + data tree XML created by CCM. The template processes the + conf/templates.xsl file calls the XSL templates for parsing the + layout templates. +

+

+ The second templates is the entry point for the documentation system Foundry. +

+ +

The lib directory

+

+ The lib is the core part of Foundry and contains the following + sub directories and files: +

+
+
bebop
+
+ XSL files for creating the backend UI. The XSL files were taken from Mandalay + and have only been adapted to work inside Foundry. +
+
search
+
XSL files for the various search applications.
+
template-tags
+
+ XSL files implementing the tags which can be used in the templates. +
+
template-tags
+
+ This directory contains the XSL files which implement the tags which can be used + in the layout templates. +
+
bebop.xsl
+
+ Imports the files from the bebop directory. +
+
global-vars.xsl
+
+ These file is very important. It defines various global variables like the + theme-prefix or the context-prefix variables. A + complete list can be found in the + reference part. +
+
search.xsl
+
Import file for the XSL files in the search directory.
+
template-parser.xsl
+
+ This file contains the XSL templates for parsing the layout templates. +
+
template-tags.xsl
+
+ Import file for the XSL files in the template-tags directory. +
+
utils.xsl
+
+ Helper functions. A complete list is available in the + reference part. +
+
+ +

Template tags

+

+ The template-tags directory contains the XSL file which are + implementing the tags which can be used in the layout templates. For a complete + list please refer to the + Template Tags Reference in the user manual. +

\ No newline at end of file diff --git a/ccm-sci-bundle/web/themes/foundry/doc/static-texts/devel/tutorial-content-types.html b/ccm-sci-bundle/web/themes/foundry/doc/static-texts/devel/tutorial-content-types.html index 382ebb92d..ba05f42bc 100644 --- a/ccm-sci-bundle/web/themes/foundry/doc/static-texts/devel/tutorial-content-types.html +++ b/ccm-sci-bundle/web/themes/foundry/doc/static-texts/devel/tutorial-content-types.html @@ -5,9 +5,45 @@ -

Tutorial: Adding support for Content types

+

Adding support for Content types

- Placeholder +

+ To enable Foundry to output a Content Item of specific content type two things must be + available: One or more layout template associated with the content type and appropriate + template tags to display to informations of the content item from the data tree. +

+

+ Foundry provides a general tag show-property + which can be used to output properties of a content type. For simple types this maybe + sufficent. The name of the property can + be found out from the XML output which can be viewed by adding the parameter + output=xml to an URL. +

+

+ For more complex types or if the value of the property should be formatted in a special + way it is maybe necessary to implement some new template tags. Tags which part of the + official distribution of Foundry are found in the + foundry/lib/template-tags/content-items directory. Custom extensions can + be put into the user directory (not supported yet). +

+

+ For each content type there should be a separate file named after the content type. + A relatively simple example is the NewsItem type. In this case the + date of the news needs some formatting. The news.xsl file provides the tag + news-date which allows the template author to choose the format of the + date. +

+

+ A more complex example is the MultiPartArticle type. The type needs some + templates for creating the menu with the sections etc. The tags for are evaluating the + data tree and creating the menu. +

+

+ One important rule is that the template tags should not create any HTML. They should + only provided the necessary informations and output the values of properties. HTML is + only generated by the HTML tags provided by Foundry. A template tag for a content type + may enclose several HTML elements which are used to define the HTML output. +

\ No newline at end of file diff --git a/ccm-sci-bundle/web/themes/foundry/doc/static-texts/overview.html b/ccm-sci-bundle/web/themes/foundry/doc/static-texts/overview.html index 7746d3ffc..1f97f6217 100644 --- a/ccm-sci-bundle/web/themes/foundry/doc/static-texts/overview.html +++ b/ccm-sci-bundle/web/themes/foundry/doc/static-texts/overview.html @@ -17,6 +17,10 @@ by CCM. The templates for defining the HTML are almost plain HTML (in XML syntax) with some additional elements which provide the data to display.

+

+ Please note that Foundry requires an XSL 2 processor. The only one available in CCM + is Saxon HE. To use Foundry you must configure CCM to use Saxon HE as XSL processor. +

\ No newline at end of file diff --git a/ccm-sci-bundle/web/themes/foundry/doc/static-texts/user/css-files.html b/ccm-sci-bundle/web/themes/foundry/doc/static-texts/user/css-files.html index e102015f7..726e96d24 100644 --- a/ccm-sci-bundle/web/themes/foundry/doc/static-texts/user/css-files.html +++ b/ccm-sci-bundle/web/themes/foundry/doc/static-texts/user/css-files.html @@ -7,7 +7,61 @@

CSS files

- Placeholder +

+ The system for loading CSS files is similar to the system for finding layout + templates. Which CSS files are loaded for a page is determined by the + conf/css-files.xml. The root element of this file is an + css-files element. This element has multiple application + child elements. Each application has an mandatory attribute + name which contains the name of the application for which the CSS files + named in the element are loaded. There should be also an default + element which determines the CSS files to load when no matching + application element is found. +

+

+ The name of an application is generated as follows: +

+
    +
  • + If the data tree contains an application attribute the value of + this attribute is used as name of the current application. +
  • +
  • + If there is no application but an class attribute the + value of the class attribute is used as name of the current + application. +
  • +
  • + If there is no application and no class attribute + the name of the current application is set to none. +
  • +
+

+ Each application element and the default element + in css-files.xml can contain multiple css-file element. + Each of the css-file elements defines a single XML to load. +

+

+ The css-file element has two optional attributes: +

+
+
media
+
+ The media type, for example screen or print for + which the CSS file is used. The value of this attribute will appear in the + media attribute of the link element which is generated in the HTML + to load the CSS file. +
+
origin
+
+ The origin of the CSS file. If not set the file is loaded from the current + theme. If set to master the file is loaded from the master theme + if the current theme is a child theme. If set to internal the + file is loaded from the internal directory for CSS files, either from the + current theme (if the current theme is a master theme) or from the Foundry + master theme installed at /themes/foundry. +
+
\ No newline at end of file diff --git a/ccm-sci-bundle/web/themes/foundry/doc/styles/foundry-doc.css b/ccm-sci-bundle/web/themes/foundry/doc/styles/foundry-doc.css index 53e8d9a4d..ec5fa7892 100644 --- a/ccm-sci-bundle/web/themes/foundry/doc/styles/foundry-doc.css +++ b/ccm-sci-bundle/web/themes/foundry/doc/styles/foundry-doc.css @@ -142,7 +142,6 @@ body { font-family: liberation_sans; - position: relative; width: 40em; margin-top: 3em; @@ -158,8 +157,7 @@ body { } main { - /*margin-top: 3em; - margin-bottom: 3em;*/ + } header, footer { @@ -206,6 +204,15 @@ footer .border-wrapper { } } +article:before, +section:before { + content: "."; + display: block; + margin-top: -3em; + height: 3em; + visibility: hidden; +} + pre, code { font-family: liberation_mono; } diff --git a/ccm-sci-bundle/web/themes/foundry/foundry/lib/template-parser.xsl b/ccm-sci-bundle/web/themes/foundry/foundry/lib/template-parser.xsl index 26312aa1c..83a4b72f4 100644 --- a/ccm-sci-bundle/web/themes/foundry/foundry/lib/template-parser.xsl +++ b/ccm-sci-bundle/web/themes/foundry/foundry/lib/template-parser.xsl @@ -36,7 +36,9 @@ Root template tags - These tags are the root elements of a layout template. +

+ These tags are the root elements of a layout template. +

diff --git a/ccm-sci-bundle/web/themes/foundry/foundry/lib/template-tags/foundry-doc-tags.xsl b/ccm-sci-bundle/web/themes/foundry/foundry/lib/template-tags/foundry-doc-tags.xsl index 015f62e44..73a70328c 100644 --- a/ccm-sci-bundle/web/themes/foundry/foundry/lib/template-tags/foundry-doc-tags.xsl +++ b/ccm-sci-bundle/web/themes/foundry/foundry/lib/template-tags/foundry-doc-tags.xsl @@ -189,20 +189,35 @@ -
-

- -

- + + + + +
+ - - - - - - -
+

+ +

+ + + + + + + + +
+ + + + + + + + @@ -424,7 +439,7 @@ - + @@ -432,7 +447,7 @@ - + diff --git a/ccm-sci-bundle/web/themes/foundry/foundry/lib/template-tags/loaders.xsl b/ccm-sci-bundle/web/themes/foundry/foundry/lib/template-tags/loaders.xsl index 407ff1bca..08bd6e41f 100644 --- a/ccm-sci-bundle/web/themes/foundry/foundry/lib/template-tags/loaders.xsl +++ b/ccm-sci-bundle/web/themes/foundry/foundry/lib/template-tags/loaders.xsl @@ -1,6 +1,7 @@ - ]> + + ]> - + diff --git a/ccm-sci-bundle/web/themes/foundry/foundry/main.xsl b/ccm-sci-bundle/web/themes/foundry/foundry/main.xsl index 85b4cd1bd..7aa44129a 100644 --- a/ccm-sci-bundle/web/themes/foundry/foundry/main.xsl +++ b/ccm-sci-bundle/web/themes/foundry/foundry/main.xsl @@ -65,50 +65,6 @@ - - diff --git a/ccm-sci-bundle/web/themes/foundry/foundry/templates/doc/foundry-documentation.xml b/ccm-sci-bundle/web/themes/foundry/foundry/templates/doc/foundry-documentation.xml index 2f1f3b001..47a3a60f5 100644 --- a/ccm-sci-bundle/web/themes/foundry/foundry/templates/doc/foundry-documentation.xml +++ b/ccm-sci-bundle/web/themes/foundry/foundry/templates/doc/foundry-documentation.xml @@ -16,7 +16,7 @@
-

The Foundry Theming Engine for LibreCCM

+

The Foundry Theme Engine for LibreCCM