-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.php
64 lines (57 loc) · 3.09 KB
/
index.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
<?php echo head(array('bodyid'=>'home')); ?>
<div id="splash">
<img src="<?php echo img('Aviation_Heritage_logo_type.svg'); ?>"/>
<!-- image source http://www.acmssearch.sl.nsw.gov.au/search/itemDetailPaged.cgi?itemID=8451 -->
</div>
<div id="content" class="container">
<div class="row">
<div class="col-sm-8 col-md-8">
<?php echo get_theme_option('Homepage Intro'); ?>
</div>
<div class="homepage item col-md-3 col-md-offset-1 col-xs-6">
<h2><?php echo __('Featured Item'); ?></h2>
<?php
$featured = get_random_featured_items(1,null);
set_current_record('item',$featured[0]);
echo link_to_item(item_image('square_thumbnail',array('title'=>metadata('item', array('Dublin Core', 'Title')))));
?>
<h4><?php echo link_to_item(metadata('item', array('Dublin Core', 'Title')), array('class'=>'permalink')); ?></h4>
<p><?php $date = metadata('item', array('Dublin Core', 'Date'));
$creator = metadata('item', array('Dublin Core', 'Creator'));
if ($date){
echo($date);
if ($creator) echo " · ";
}
echo $creator;
?></p>
<p class='featured-item-collection-link'><?php $coll = get_collection_for_item($featured[0]);
if ($coll){
echo link_to_items_browse(metadata($coll, array('Dublin Core', 'Title')).' Collection' , $browseParams = array('collection' => metadata($coll, 'id')));
}?>
</p>
</div>
<div class="homepage item col-md-3 col-md-offset-1 col-xs-6">
<h2><?php echo __('Recently Added'); ?></h2>
<?php
$recent = get_recent_items(1,false);
set_current_record('item',$recent[0]);
echo link_to_item(item_image('square_thumbnail',array('title'=>metadata('item', array('Dublin Core', 'Title')))));
?>
<h4><?php echo link_to_item(metadata('item', array('Dublin Core', 'Title')), array('class'=>'permalink')); ?></h4>
<p><?php $date = metadata('item', array('Dublin Core', 'Date'));
$creator = metadata('item', array('Dublin Core', 'Creator'));
if ($date){
echo($date);
if ($creator) echo " · ";
}
echo $creator;
?></p>
<p class='featured-item-collection-link'><?php $coll = get_collection_for_item($recent[0]);
if ($coll){
echo link_to_items_browse(metadata($coll, array('Dublin Core', 'Title')).' Collection' , $browseParams = array('collection' => metadata($coll, 'id')));
}?>
</p>
</div>
</div>
</div>
<?php echo foot(); ?>