コード例 #1
0
		<link rel="stylesheet" type="text/css" href="styles/styles.css?v=1.01">
		<meta name="viewport" content="width=device-width, initial-scale=1">
		<meta name="robots" content="noindex">
		<title>Alex & Dora</title>
	</head>
	<body>
		<?php 
// Set up recommendations section-
$recommendations_div = [new UIDiv([new UILink(new UISpan([], ['glyphicon', 'fa', 'fa-picture-o'], 'attractions'), '#recommendations', 'switchPane(this);'), new UILink(new UISpan([], ['glyphicon', 'fa', 'fa-bed'], 'hotels'), '#recommendations', 'switchPane(this);'), new UILink(new UISpan([], ['glyphicon', 'fa', 'fa-cutlery'], 'restaurants'), '#recommendations', 'switchPane(this);'), new UILink(new UISpan([], ['glyphicon', 'fa', 'fa-glass'], 'bars'), '#recommendations', 'switchPane(this);'), new UILink(new UISpan([], ['glyphicon', 'fa', 'fa-sun-o'], 'beaches'), '#recommendations', 'switchPane(this);')], 'icons')];
$arr = ['Attractions' => ['Pelion Train' => (object) ['image' => 'attractions/pellion_train.jpg', 'website' => 'http://www.trainose.gr/en/tourism-culture/train-and-recreation/the-pelion-train/', 'location' => 'https://goo.gl/maps/891ZQx59BdK2'], 'Agios Nikolaos Cathedral' => (object) ['image' => 'attractions/cathedral.jpg', 'website' => 'http://www.ag-nikolaos.itgo.com/', 'location' => 'https://goo.gl/maps/VmGJbGbQVi52'], 'Brickworks Museum' => (object) ['image' => 'attractions/rooftile-museum.jpg', 'website' => 'http://www.piop.gr/en/diktuo-mouseiwn/Mouseio-Plinthokeramopoieias-Tsalapata/to-mouseio.aspx', 'location' => 'https://goo.gl/maps/iBsPqppo2Pw'], 'Open Air Cinema' => (object) ['image' => 'attractions/open_air.jpg', 'website' => 'http://exoraistiki.gr/', 'location' => 'https://goo.gl/maps/CRHcZ9FGSoH2'], 'Archaelogical Museum' => (object) ['image' => 'attractions/archaeology.jpg', 'website' => 'http://odysseus.culture.gr/h/1/eh151.jsp?obj_id=3271', 'location' => 'https://goo.gl/maps/2AvnuCqs8wH2'], 'Pelion Gastronomy' => (object) ['image' => 'attractions/gastronomy.jpg', 'website' => 'http://www.peliongastronomy.gr/', 'location' => 'https://goo.gl/maps/9JbETHxwF5U2'], 'Pelion Mountain' => (object) ['image' => 'attractions/mountain.jpg', 'website' => 'http://www.discoverpelio.com/', 'location' => 'https://goo.gl/maps/wAtaeK6mwx92'], 'Meteora' => (object) ['image' => 'attractions/meteora.jpg', 'website' => 'https://www.visitmeteora.travel/', 'location' => 'https://goo.gl/maps/wmsowztHhc32']], 'Hotels' => ['Archontika Karamarlis' => (object) ['image' => 'hotels/archontika_karamarlis.jpg', 'website' => 'http://www.archontikakaramarlis.gr', 'location' => 'https://goo.gl/maps/xiqKJbFJqvM2'], 'Park Hotel' => (object) ['image' => 'hotels/park_hotel.jpg', 'website' => 'http://amhotels.gr/parkhotel_en.html', 'location' => 'https://goo.gl/maps/x7G7z5qAqXQ2'], 'Six Keys' => (object) ['image' => 'hotels/6keys.jpg', 'website' => 'http://www.sixkeys.gr', 'location' => 'https://goo.gl/maps/jR6jWuDoSSR2'], 'Xenia Palace' => (object) ['image' => 'hotels/xenia_hotel.jpg', 'website' => 'http://www.domotel.gr/hotel/4/Xenia-Volos', 'location' => 'https://goo.gl/maps/ZimNLNVHHSQ2'], 'Melanthi Mansion' => (object) ['website' => 'http://www.melanthi.gr', 'location' => 'https://goo.gl/maps/kNpzepr5C432', 'image' => 'hotels/melanthi.jpg'], 'Valeni Boutique Hotel' => (object) ['website' => 'http://www.valeni.gr', 'location' => 'https://goo.gl/maps/ceyTCm5nUGr', 'image' => 'hotels/valeni.jpg'], 'Portaria Hotel' => (object) ['website' => 'http://www.portariahotel.gr', 'image' => 'hotels/portaria.jpg', 'location' => 'https://goo.gl/maps/H6xxtEPdRBs'], 'Kritsa Hotel' => (object) ['website' => 'http://www.hotel-kritsa.gr', 'location' => 'https://goo.gl/maps/9JbETHxwF5U2', 'image' => 'hotels/kritsa.jpg']], 'Restaurants' => ['Tsipouradiko Iolkos' => (object) ['image' => 'restaurants/ouzeri_iolkos.jpg', 'website' => 'http://ouzeri-iolkos.gr/iolkos/', 'location' => 'https://goo.gl/maps/bTZwJd23hVx'], 'Six Keys' => (object) ['image' => 'bars/6keys.jpg', 'website' => 'http://www.sixkeys.gr', 'location' => 'https://goo.gl/maps/jR6jWuDoSSR2'], 'Plagios' => (object) ['image' => 'restaurants/plagios.jpg', 'website' => 'https://www.facebook.com/pages/Plagios/188661704504240', 'location' => 'https://goo.gl/maps/zszgxbJTgfN2'], 'Tsipouradiko Papadis' => (object) ['image' => 'restaurants/papadis.jpg', 'website' => 'http://www.papadis.gr', 'location' => 'https://goo.gl/maps/Vm3ZkkZGjzR2'], 'Ortansies' => (object) ['image' => 'restaurants/ortansies.jpg', 'location' => 'https://goo.gl/maps/QEe4dtdFCFD2', 'website' => 'http://www.ortansies.com/'], 'Kritsa Gastronomy' => (object) ['website' => 'http://www.peliongastronomy.gr/', 'image' => 'restaurants/kritsa.jpg', 'location' => 'https://goo.gl/maps/9JbETHxwF5U2']], 'Bars' => ['Elli’s Chocolaterie' => (object) ['image' => 'bars/chocolaterie.jpg', 'website' => 'https://www.facebook.com/%CE%95%CE%9B%CE%9B%CE%97s-Chocolaterie-Viennoise-335577223300599/'], 'H&auml;agen Dazs' => (object) ['image' => 'bars/haagen_dazs.jpg', 'website' => 'https://www.facebook.com/Haagen-Dazs-Volou-404229046427443', 'location' => 'https://goo.gl/maps/wLR8UU2utit'], 'Dodoni Ice Cream' => (object) ['image' => 'bars/dodoni.jpg', 'website' => 'http://www.dodoni.com.gr/index.php/en/', 'location' => 'https://goo.gl/maps/MYS88wVuzQ42'], 'Six Keys' => (object) ['image' => 'bars/6keys.jpg', 'website' => 'http://www.sixkeys.gr', 'location' => 'https://goo.gl/maps/jR6jWuDoSSR2'], 'Amaryllis Cafe' => (object) ['image' => 'bars/amaryllis.jpg', 'location' => 'https://goo.gl/maps/FhN7SD7G1yq', 'website' => 'https://www.facebook.com/pages/Amaryllis-Cafe-Bistrot/217681478428163'], 'Park Hotel Roof Bar' => (object) ['image' => 'bars/roofbar.jpg', 'website' => 'http://amhotels.gr/parkhotel_en.html', 'location' => 'https://goo.gl/maps/x7G7z5qAqXQ2']], 'Beaches' => ['Agios Ioannis' => (object) ['image' => 'beaches/agios_ioannis.jpg', 'location' => 'https://goo.gl/maps/a7jtjWu6gHT2'], 'Milopotamos' => (object) ['image' => 'beaches/mylopotamos.jpg', 'location' => 'https://goo.gl/maps/YWJPewr9Dtt'], 'Papa Nero' => (object) ['image' => 'beaches/papa_nero.jpg', 'location' => 'https://goo.gl/maps/MQ5HBaRqHJN2'], 'Horefto' => (object) ['image' => 'beaches/horefto.jpg', 'location' => 'https://goo.gl/maps/SW5RznsSzTL2'], 'Fakistra' => (object) ['image' => 'beaches/fakistra.jpg', 'location' => ''], 'Damouchari' => (object) ['image' => 'beaches/damouchari.jpg', 'location' => 'https://goo.gl/maps/wkME28RmAh12'], 'Mourtias' => (object) ['image' => 'beaches/mourtia.jpg', 'location' => 'https://goo.gl/maps/NhHZmvTQ7pN2'], 'Katigiorgis' => (object) ['image' => 'beaches/katigiorgis.jpg', 'location' => 'https://goo.gl/maps/pudTgdJiPin'], 'Platanias' => (object) ['image' => 'beaches/platanias.jpg', 'location' => 'https://goo.gl/maps/219NuMJzKF72'], 'Potistika' => (object) ['image' => 'beaches/potistika.jpg', 'location' => 'https://goo.gl/maps/BdYWX6UnBKy']]];
foreach ($arr as $group => $recommendation) {
    $classes = ['recommendations_option', 'recommendations_' . strtolower($group), 'row'];
    if ($group !== 'Attractions') {
        array_push($classes, 'do_not_show');
    }
    $slider = new UIDiv([], 'slick-slider');
    foreach ($recommendation as $name => $data) {
        $div = new UIDiv([new UIImage(isset($data->image) ? 'img/recommendations/' . $data->image : ''), new UIHeading(3, $name)], 'recommendation');
        $locations_links = new UIDiv([], 'locations-links');
        if (isset($data->website)) {
            $locations_links->addContent(new UILink(new UISpan([], ['glyphicon', 'fa', 'fa-mouse-pointer', 'website-link']), $data->website, '', '_blank'));
        }
        if (isset($data->location)) {
            $locations_links->addContent(new UILink(new UISpan([], ['glyphicon', 'fa', 'fa-map-marker', 'maps-link']), $data->location, '', '_blank'));
        }
        $div->addContent($locations_links);
        $slider->addContent(new UIDiv([$div]));
    }
    $div = new UIDiv([new UIHeading(2, $group), $slider], $classes);
    array_push($recommendations_div, $div);
}
コード例 #2
0
ファイル: UINav.class.php プロジェクト: Oliver-Binns/phpUI
 /**
  * Returns the HTML string for this object
  * @return string HTML string
  */
 public function __toString()
 {
     $html = '<nav' . parent::__toString() . '>';
     $this->addClasses();
     $list = $this->left_links;
     $list .= $this->right_links;
     if ($this->collapse) {
         $list = new UIDiv($list, ['collapse navbar-collapse']);
         $list->setId($this->getId() . '-collapse');
         $collapse_button = '<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#' . $this->getId() . '-collapse">';
         for ($i = 0; $i < 3; $i++) {
             $collapse_button .= new UISpan([], ['icon-bar']);
         }
         $collapse_button .= '</button>';
     }
     $html .= new UIDiv([new UIDiv([isset($collapse_button) ? $collapse_button : '', $this->brand_name], 'navbar-header'), $list], 'container-fluid');
     $html .= '</nav>';
     return $html;
 }
コード例 #3
0
ファイル: index.php プロジェクト: Oliver-Binns/Oliver-Binns
					    I am halfway through my degree- Computer Science (with Year in Industry) at the University of York, which I am due to graduate from in 2018.<br><br>
					    I\'m currently working on some really exciting projects which you can find out more about below, but I am also currently available to hire on a contracted freelance-basis.
					    You can look through my full portfolio on this website and, if interested, get in touch via any of the methods available at the bottom of the page.')], 'text')], ['col-xs-12', 'col-sm-6'])]), 'row');
?>
		    </div>
	    </section>
        <section id='beach-photo'>
        </section>
        <section id='project'>
            <div class='container'>
	            <div class='slick-slider'>
                <?php 
$projects = json_decode(file_get_contents('projects.json'));
foreach ($projects as $project) {
    echo "<div>";
    $project_view = new UIDiv([], ['project']);
    $project_view->addContent(new UIImage("img/project-images/{$project->img}.png", 'preview'));
    $project_view->addContent(new UIHeading(3, $project->title));
    //echo links
    foreach ($project->links as $link) {
        $project_view->addContent(new UILink(new UIImage("img/project-icons/{$link->type}.png", 'icon'), $link->link, '', '_blank'));
    }
    //echo list
    $project_view->addContent(new UIList($project->list));
    echo $project_view;
    echo '</div>';
}
?>
	            </div>
            </div>
        </section>