1:- module(econnect_home, []).    2:- use_module(library(http/http_dispatch)).    3:- use_module(library(http/http_path)).    4:- use_module(library(http/html_write)).    5:- use_module(library(http/html_head)).    6:- use_module(library(semweb/rdf_library)).    7:- use_module(skin(cliopatria)).    8:- use_module(components(simple_search)).

Configure Econnect demo home Page

*/

   13:- use_module(applications(startpage)).   14
   15% load the RDF Manifest files to enable the datacloud generation
   16
   17:- initialization
   18	rdf_attach_library(ecdemo(rdf)),
   19	forall(rdf_library_source('ec-all', _), true).   20
   21:- html_resource(cliopatria,
   22                 [ virtual(true),
   23                   requires([ css('econnect.css'),
   24			      css('ecdemo.css')
   25                            ])
   26		 ]).   27
   28:- http_handler(cliopatria(home), home, []).
 home(+Request) is det
Override default ClioPatria homepage .
   34home(_Request) :-
   35	http_absolute_location(icons('econnect-logo-big.jpg'), LogoImg, []),
   36	format(atom(HomeStyle), 'div.ag_search { background-image: url(~w);',[LogoImg]),
   37	reply_html_page(ecdemo(search),
   38			[title('Amalgame: home'),
   39			 style(HomeStyle)
   40			],
   41			[\html_schemes_only,
   42			 style('.yui3-accordion-item-trigger { display: none;}')
   43			]).
   44
   45cliopatria:server_address -->
   46	html_requires(css('cliopatria.css')),
   47	html([	\logo,
   48		\server_address(amalgame)
   49	     ]).
   50
   51logo -->
   52	{
   53	 http_absolute_location(icons('econnect-banner.jpg'), LogoImg, [])
   54	},
   55	html(a([class(logo),
   56		id(econnectlink),
   57		target(new),
   58		href('http://www.europeanaconnect.eu/')
   59	       ],
   60	       img([src(LogoImg),
   61		    alt('EuropeanaConnect project logo')
   62		   ],[])
   63	      )
   64	    ).
   65
   66user:body(ecdemo(search), Body) -->
   67        {
   68         http_link_to_id(http_amalgame_main_page, [], BackOfficeLink)
   69        },
   70        html_requires(cliopatria),
   71        html(body(class(['yui-skin-sam', ag_search, cliopatria]),
   72                  [
   73                    div(class(ag_search),
   74                        [
   75                         \simple_search_form,
   76                         div(class(content), Body)
   77                        ]),
   78                        br(clear(all)),
   79                        div(class(footer),
   80                            \(cliopatria:server_address)
   81                        ),
   82                        div([class(backoffice)],
   83                            [a(href(BackOfficeLink), 'back office')
   84                            ])
   85                  ]))