function test_stylesheet_link_tag()
 {
     $this->assertEqual('<link href="mocked_stylesheet_directory/assets/stylesheets/source.css" media="all" rel="stylesheet" type="text/css"/>', stylesheet_link_tag("source"));
     $this->assertEqual('<link href="mocked_stylesheet_directory/assets/stylesheets/source.css" media="all" rel="stylesheet" type="text/css"/>' . "\n" . '<link href="http://welaika.com/another_source.css" media="all" rel="stylesheet" type="text/css"/>', stylesheet_link_tag("source", "http://welaika.com/another_source.css"));
     $this->assertEqual('<link href="mocked_stylesheet_directory/assets/stylesheets/source.css" media="print" rel="stylesheet" type="text/css"/>', stylesheet_link_tag("source", array("media" => "print")));
     $this->assertEqual('<link href="mocked_stylesheet_directory/assets/stylesheets/source.css" media="print" rel="stylesheet" type="text/css"/>' . "\n" . '<link href="https://welaika.com/another_source.css" media="print" rel="stylesheet" type="text/css"/>', stylesheet_link_tag("source", "https://welaika.com/another_source.css", array("media" => "print")));
 }
Exemple #2
0
function roots_get_stylesheets()
{
    $styles = '';
    $styles .= stylesheet_link_tag('/style.css', 1);
    $styles .= stylesheet_link_tag('/bootstrap.css', 1);
    if (BOOTSTRAP_RESPONSIVE) {
        $styles .= stylesheet_link_tag('/bootstrap-responsive.css', 1);
    }
    $styles .= stylesheet_link_tag('/app.css', 1);
    if (is_child_theme()) {
        $styles .= "\t<link rel=\"stylesheet\" href=\"" . get_stylesheet_uri() . "\">\n";
    }
    echo $styles;
}
Exemple #3
0
/**
 * Inserta un documento XHTML antes de una salida en buffer
 *
 * @param string $template
 */
function xhtml_template($template = 'template')
{
    print '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
	<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
	<title>Kumbia PHP Framework</title>
	<meta http-equiv="Content-type" content="text/html; charset=UTF-8" />';
    print stylesheet_link_tag("style", 'use_variables: true');
    kumbia::stylesheet_link_tags() . (print '</head>
	<body class="' . $template . '">');
    content();
    print '
	 </body>
	</html>';
}
Exemple #4
0
function roots_get_stylesheets()
{
    global $roots_options;
    $roots_css_framework = $roots_options['css_framework'];
    $styles = '';
    switch ($roots_css_framework) {
        case 'blueprint':
            $styles .= stylesheet_link_tag('/blueprint/screen.css');
            break;
        case '960gs_12':
        case '960gs_16':
            $styles .= stylesheet_link_tag('/960/reset.css');
            $styles .= stylesheet_link_tag('/960/text.css', 1);
            $styles .= stylesheet_link_tag('/960/960.css', 1);
            break;
        case '960gs_24':
            $styles .= stylesheet_link_tag('/960/reset.css');
            $styles .= stylesheet_link_tag('/960/text.css', 1);
            $styles .= stylesheet_link_tag('/960/960_24_col.css', 1);
            break;
        case '1140':
            $styles .= stylesheet_link_tag('/1140/1140.css');
            break;
        case 'adapt':
            $styles .= stylesheet_link_tag('/adapt/master.css');
            $styles .= "\t<noscript>\n";
            $styles .= stylesheet_link_tag('/adapt/mobile.css', 1);
            $styles .= "\t</noscript>\n";
            break;
        case 'foundation':
            $styles .= stylesheet_link_tag('/foundation/globals.css');
            $styles .= stylesheet_link_tag('/foundation/typography.css', 1);
            $styles .= stylesheet_link_tag('/foundation/grid.css', 1);
            $styles .= stylesheet_link_tag('/foundation/ui.css', 1);
            $styles .= stylesheet_link_tag('/foundation/forms.css', 1);
            $styles .= stylesheet_link_tag('/foundation/orbit.css', 1);
            $styles .= stylesheet_link_tag('/foundation/reveal.css', 1);
            $styles .= stylesheet_link_tag('/foundation/mobile.css', 1);
            $styles .= stylesheet_link_tag('/foundation/app.css', 1);
            break;
        case 'less':
            $styles .= stylesheet_link_tag('/less/less.css');
            break;
        case 'bootstrap':
            $styles .= stylesheet_link_tag('/bootstrap/bootstrap.css');
            break;
        case 'bootstrap_less':
            $styles .= stylesheet_link_tag_boostrap_less('/bootstrap/lib/bootstrap.less');
            break;
    }
    if (class_exists('RGForms')) {
        $styles .= "\t<link rel=\"stylesheet\" href=\"" . plugins_url() . "/gravityforms/css/forms.css\">\n";
    }
    if (is_child_theme()) {
        $styles .= stylesheet_link_tag('/style.css', 1);
        $styles .= "\t<link rel=\"stylesheet\" href=\"" . get_stylesheet_uri() . "\">\n";
    } else {
        $styles .= stylesheet_link_tag('/style.css', 1);
    }
    switch ($roots_css_framework) {
        case 'blueprint':
            $styles .= "\t<!--[if lt IE 8]>" . stylesheet_link_tag('/blueprint/ie.css', 0, false) . "<![endif]-->\n";
            break;
        case '1140':
            $styles .= "\t<!--[if lt IE 8]>" . stylesheet_link_tag('/1140/ie.css', 0, false) . "<![endif]-->\n";
            break;
        case 'foundation':
            $styles .= "\t<!--[if lt IE 9]>" . stylesheet_link_tag('/foundation/ie.css', 0, false) . "<![endif]-->\n";
            break;
    }
    echo $styles;
}
Exemple #5
0
 * It is also available through the world-wide-web at this URL:
 * http://wiki.kumbiaphp.com/Licencia
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@kumbiaphp.com so we can send you a copy immediately.
 *
 * Este archivo debe ser incluido desde un controlador
 * usando include "test/adapters.php"
 *
 * @category Kumbia
 * @package Test
 * @subpackage Flash
 * @copyright  Copyright (c) 2005-2015 Kumbia Team (http://www.kumbiaphp.com)
 * @license    http://wiki.kumbiaphp.com/Licencia     New BSD License
 */
stylesheet_link_tag('style');
ob_start();
Flash::show('cuidado', 'Kumbia puede ser adictivo.');
flash::error('Test de flash::error');
flash::notice('Test de flash::notice');
flash::success('Test de flash::success');
flash::warning('Test de flash::warning');
flash::interactive('Test de flash::interactive');
flash::kumbia_error('Test de flash::kumbia_error');
$salida = ob_get_contents();
ob_end_clean();
$correcto = '<div class="flash_show cuidado">Kumbia puede ser adictivo.</div>
<div class="flash_show error_message">Test de flash::error</div>
<div class="flash_show notice_message">Test de flash::notice</div>
<div class="flash_show success_message">Test de flash::success</div>
<div class="flash_show warning_message">Test de flash::warning</div>
Exemple #6
0
	<head>
		<meta charset="utf-8">
		<meta name="viewport" content="width=device-width, initial-scale=1.0">
		<meta name="description" content="Login">
		<meta name="author" content="">
		<meta name="csrf-token" content="<?php 
echo csrf_token();
?>
">
		<title><?php 
echo isset($title) ? $title : 'Login';
?>
</title>

		<?php 
echo stylesheet_link_tag('platform/login');
?>
		<?php 
echo javascript_include_tag('platform/backend');
?>

		<!--[if lt IE 9]>
			<script src="/assets/platform/vendors/html5shiv.js"></script>
		<![endif]-->
	</head>

	<body>

		<div class="container">

			<div class="row">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-us" lang="en-us">
  <head>
    <title>Fresh Cupcake App</title>
    <meta http-equiv="content-type" content="text/html; charset=utf-8" />
    <?php 
echo stylesheet_link_tag("master");
?>
  </head>
  <body>
    <?php 
echo $content_for_layout;
?>
  </body>
</html>
Exemple #8
0
    ?>
        <?php 
    echo javascript_include_tag($js_file);
    ?>
    <?php 
}
?>

    <?php 
echo stylesheet_link_tag('main.css');
?>
    <?php 
foreach ($this->extra['css'] as $css_file) {
    ?>
        <?php 
    echo stylesheet_link_tag($css_file);
    ?>
    <?php 
}
?>

</head>
<body>
    <div id="page">

<?php 
if (isset($this->session['user'])) {
    ?>
        <div id="userBar">
            <?php 
    echo _f('Connected as %s', array($this->session['user']));
Exemple #9
0
<?php

if (function_exists('javascript_include_tag')) {
    ?>
	<?php 
    echo javascript_include_tag("jcrop/jquery.jcrop.min");
    ?>
	<?php 
    echo javascript_include_tag("jcrop/jquery.jcrop.extras");
    ?>
	<?php 
    echo javascript_include_tag("jcrop/jquery.color");
    ?>
	<?php 
    echo stylesheet_link_tag('jcrop/jquery.jcrop');
}
/* Clase Jcrop
 * Esta clase contiene métodos para recortar imagenes.
 * 
 * Autor: Ramiro Vera(raalveco) y Carlos Lizaola(clizaola)
 * Company: Amecasoft S.A. de C.V. (México)
 * Fecha: 16/08/2011
 * 
 * NOTA: Esta clase esta diseñada para funcionar como libreria en el Kumbia PHP Spirit 1.0
 * 
 */
class JCrop
{
    public static function cortar($origen, $destino, $x, $y, $w, $h, $cuadro = true, $wf = 150, $hf = 150)
    {
        $jpeg_quality = 100;
Exemple #10
0
        assert_equal($attr, array('src="filename"', 'type="text/javascript"'));
    });
});
describe("Helpers -> content_tag", function () {
    it("returns html tag for DIV tag", function () {
        $html = content_tag("div", "Div Tag");
        assert_equal($html, "<div>Div Tag</div>");
    });
});
describe("Helpers -> stylesheet_link_tag", function () {
    it("returns css stylesheet html tag", function () {
        $tag = stylesheet_link_tag("master");
        assert_equal($tag, '<link href="/stylesheets/master.css" media="screen" rel="stylesheet" type="text/css" />');
    });
    it("merges attributes for stylesheet helper", function () {
        $tag = stylesheet_link_tag("master", array("media" => "print"));
        assert_equal($tag, '<link href="/stylesheets/master.css" media="print" rel="stylesheet" type="text/css" />');
    });
});
describe("Helpers -> javascript_include_tag", function () {
    it("create html tag for javascript tag", function () {
        $tag = javascript_include_tag("master");
        assert_equal($tag, '<script type="text/javascript" src="/javascripts/master.js"></script>');
    });
});
describe("Helpers -> image_tag", function () {
    it("returns html tag for image", function () {
        $tag = image_tag("cupcake.png");
        assert_equal($tag, '<img alt="cupcake" src="/images/cupcake.png" />');
    });
    it("it has image attributes", function () {
Exemple #11
0
    <meta name="description" content="">
    <meta name="author" content="">
    <meta name="csrf-token" content="<?php 
echo csrf_token();
?>
">

    <link rel="shortcut icon" href="/favicon.ico">

    <title><?php 
echo isset($title) ? $title : 'Codesleeve';
?>
</title>

    <?php 
echo stylesheet_link_tag('platform/backend');
?>
    <?php 
echo javascript_include_tag('platform/backend');
?>

    <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!--[if lt IE 9]>
      <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
      <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
      <![endif]-->
  </head>
  <body>
    <div class="navbar navbar-inverse navbar-fixed-top" role="navigation">
        <?php 
echo render("platform::navigation.top");
function roots_get_stylesheets()
{
    global $roots_options;
    $roots_css_framework = $roots_options['css_framework'];
    $template_uri = get_template_directory_uri();
    $styles = '';
    if ($roots_css_framework === 'blueprint') {
        $styles .= stylesheet_link_tag('/blueprint/screen.css');
    } elseif ($roots_css_framework === '960gs_12' || $roots_css_framework === '960gs_16') {
        $styles .= stylesheet_link_tag('/960/reset.css');
        $styles .= stylesheet_link_tag('/960/text.css', 1);
        $styles .= stylesheet_link_tag('/960/960.css', 1);
    } elseif ($roots_css_framework === '960gs_24') {
        $styles .= stylesheet_link_tag('/960/reset.css');
        $styles .= stylesheet_link_tag('/960/text.css', 1);
        $styles .= stylesheet_link_tag('/960/960_24_col.css', 1);
    } elseif ($roots_css_framework === '1140') {
        $styles .= stylesheet_link_tag('/1140/1140.css');
    } elseif ($roots_css_framework === 'adapt') {
        $styles .= stylesheet_link_tag('/adapt/master.css');
        $styles .= "\t<noscript>\n";
        $styles .= stylesheet_link_tag('/adapt/mobile.css', 1);
        $styles .= "\t</noscript>\n";
    } elseif ($roots_css_framework === 'less') {
        $styles .= stylesheet_link_tag('/less/less.css');
    }
    if (class_exists('RGForms')) {
        $styles .= "\t<link rel=\"stylesheet\" href=\"" . plugins_url() . "/gravityforms/css/forms.css\">\n";
    }
    $styles .= stylesheet_link_tag('/style.css', 1);
    if ($roots_css_framework === 'blueprint') {
        $styles .= "\t<!--[if lt IE 8]>" . stylesheet_link_tag('/blueprint/ie.css', 0, false) . "<![endif]-->\n";
    } elseif ($roots_css_framework === '1140') {
        $styles .= "\t<!--[if lt IE 8]>" . stylesheet_link_tag('/1140/ie.css', 0, false) . "<![endif]-->\n";
    }
    echo $styles;
}
Exemple #13
0
	<head>
		<meta charset="utf-8">
		<meta name="viewport" content="width=device-width, initial-scale=1.0">
		<meta name="description" content="Login">
		<meta name="author" content="">
		<meta name="csrf-token" content="<?php 
echo csrf_token();
?>
">
		<title><?php 
echo isset($title) ? $title : 'Login';
?>
</title>

		<?php 
echo stylesheet_link_tag('platform/pages');
?>
		<?php 
echo javascript_include_tag('platform/pages');
?>

		<!--[if lt IE 9]>
			<script src="/assets/platform/vendors/html5shiv.js"></script>
		<![endif]-->
	</head>
	<body>
		<div class="container">
			<div class="row">
				<?php 
echo render("platform::layouts.partials.messages");
?>
Exemple #14
0
?>
</h3>
<?php 
echo $description;
?>


<br />
<h2>Helpers:</h2>

<p>
  <strong>stylesheet_link_tag</strong><br />
  Include any stylesheets from the stylesheets directory:<br />
  Example: <strong>stylesheet_link_tag("master")</strong> <br />
  # => <?php 
echo htmlentities(stylesheet_link_tag("master"));
?>
</p>

<p>
  <strong>content_tag</strong><br />
 Print an html tag:<br />
 Exmaple: <strong>content_for("p", "Hello World")</strong> <br />
 # => <?php 
echo htmlentities(content_tag("p", "Hello World"));
?>
</p>

<p>
  <strong>image_tag</strong><br />
 Generates an img tag:<br />
Exemple #15
0
 /**
  *  Test stylesheet_link_tag() function
  *
  *  Test the {@link stylesheet_link_tag()} function in procedural
  *  file {@link asset_tag_helper.php}
  */
 public function testStylesheet_link_tag_function()
 {
     $this->assertEquals('<link href="/testprefix/stylesheets/foo.css"' . ' media="screen" rel="Stylesheet"' . ' type="text/css" />' . "\n", stylesheet_link_tag("foo"));
 }
Exemple #16
0
?>

<!--[if lt IE 7]>
<?php 
echo javascript_include_tag('pngfix.js', array('defer' => 'defer'));
?>
<![endif]-->

<?php 
echo stylesheet_link_tag('main.css');
echo stylesheet_link_tag('sifr.css');
?>

<!--[if IE]>
<?php 
echo stylesheet_link_tag('ie.css');
?>
<![endif]-->

<!--[if lte IE 6]>
<?php 
echo stylesheet_link_tag('ie6.css');
?>
<![endif]-->

</head>

<body>

<%= @header %>
	<link rel="Shortcut Icon" href="/public/image/favico.ico" />
	<link rel="icon" href="/public/image/favico.ico" type="image/x-icon" />
	<link rel="search" type="application/opensearchdescription+xml" href="http://<?php 
echo DOMAIN;
?>
/opensearch.xml" title="Pearfarm" /> 
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
	<meta name="google-site-verification" content="griVQ0kTz8ri_7TzrEN8bOALKwWT8g2fgbow_3GsDQM" />
	<meta name="description" content="Pearfarm is the Php community's pear hosting service. Instantly publish your pear packages and install them. Become a contributor and enhance the site with your own changes." /> 
	<meta name="keywords" content="php pear packages community code repository opensource" />
	<title><?php 
echo h(Nimble::get_title());
?>
</title>
	<?php 
echo stylesheet_link_tag('stylesheet.css', 'facebox.css');
?>
	<!--[if lt IE 7]>
	  <?php 
echo javascript_include_tag('pngfix.js');
?>
  <![endif]-->
	<?php 
echo javascript_include_tag('prototype.js', 'scriptaculous.js', 'facebox.js');
?>
	<script type='text/javascript'>
		Event.observe(window, 'load', function(){
			facebox = new Facebox({loading_image: '/public/image/facebox/loading.gif', close_image: '/public/image/facebox/closelabel.gif'});
			$('searchbox_form').observe('focus', function(){
				$('searchbox_form').clear();
			});
Exemple #18
0
<?php

if (function_exists('javascript_include_tag')) {
    ?>
	<?php 
    echo javascript_include_tag('fancybox/jquery.mousewheel-3.0.4.pack');
    ?>
	<?php 
    echo javascript_include_tag('fancybox/jquery.fancybox-1.3.4.pack');
    ?>
	<?php 
    echo stylesheet_link_tag('fancybox/jquery.fancybox-1.3.4');
}
/* Clase FancyBox
 * Esta clase contiene métodos para aplicar funcionalidades con Ajax
 * 
 * Autor: Ramiro Vera(raalveco) y Carlos Lizaola(clizaola)
 * Company: Amecasoft S.A. de C.V. (México)
 * Fecha: 12/08/2011
 * 
 * NOTA: Esta clase esta diseñada para funcionar como libreria en el Kumbia PHP Spirit 1.0
 * 
 */
/*
 * Opciones:
 * 
 *	padding = 10 					Space between FancyBox wrapper and content
 *	margin = 2						Space between viewport and FancyBox wrapper
 *	opacity = false					When true, transparency of content is changed for elastic transitions
 *	modal = false					When true, 'overlayShow' is set to 'true' and 'hideOnOverlayClick', 'hideOnContentClick', 'enableEscapeButton', 'showCloseButton' are set to 'false'
 *	cyclic = false					When true, galleries will be cyclic, allowing you to keep pressing next/back.
 public function testStylesheetLinkTag()
 {
     $this->assertDomEqual(stylesheet_link_tag('main'), '<link rel="stylesheet" type="text/css" media="screen" href="/styles/main.css" />');
     $this->assertDomEqual(stylesheet_link_tag(array('main', 'admin')), '<link rel="stylesheet" type="text/css" media="screen" href="/styles/main.css" />
         <link rel="stylesheet" type="text/css" media="screen" href="/styles/admin.css" />');
 }
Exemple #20
0
<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<title>SensysPHP | Crawling Web App Using PHP</title>
	<?php 
echo stylesheet_link_tag();
?>
    <?php 
echo javascript_include_tag();
?>
    <script>
    	$(document).ready(function(){
    		$('.ui.sidebar').sidebar('attach events','#showsidebar');
        $('.ui.dropdown').dropdown({
          on: 'hover'  
        });
        $('select.dropdown').dropdown();
        $('.ui.fullscrean.modal').modal('attach events','#upload','show');
    	});
    </script>
</head>
<body>

    <div class="ui top attached menu"><!-- Menu Atas -->
      <a class="item" id="showsidebar">
        <i class="sidebar icon"></i>
        Menu
      </a>
      <div class="right menu" id="pka">
Exemple #21
0
<?php

if (function_exists('javascript_include_tag')) {
    ?>
	<?php 
    echo javascript_include_tag("stars/jquery.ui.stars.min");
    ?>
	<?php 
    echo stylesheet_link_tag('stars/jquery.ui.stars.min');
}
/* Clase Stars
 * Esta clase contiene métodos para recortar imagenes.
 * 
 * Autor: Ramiro Vera(raalveco) y Carlos Lizaola(clizaola)
 * Company: Amecasoft S.A. de C.V. (México)
 * Fecha: 18/08/2011
 * 
 * NOTA: Esta clase esta diseñada para funcionar como libreria en el Kumbia PHP Spirit 1.0
 * 
 */
class Stars
{
    public static function rating($href, $m, $s = 0, $promedio = 0, $mensaje = "Tu voto ha sido contabilizado, Gracias!!")
    {
        $tmp = rand(0, 100000);
        $html = '<div id="stars' . $tmp . '"><select name="xyz">';
        if ($s == 5) {
            $html .= '<option value="0.20" ' . ($promedio == 0.2 ? "SELECTED" : "") . '>0.20</option>';
            $html .= '<option value="0.40" ' . ($promedio == 0.4 ? "SELECTED" : "") . '>0.40</option>';
            $html .= '<option value="0.60" ' . ($promedio == 0.6 ? "SELECTED" : "") . '>0.60</option>';
            $html .= '<option value="0.80" ' . ($promedio == 0.8 ? "SELECTED" : "") . '>0.80</option>';
Exemple #22
0
function guiabsn_get_stylesheets()
{
    echo stylesheet_link_tag('/jquery.fancybox-1.3.4.css', 1);
}
<!--[if lte IE 6]>
<html xmlns:v="urn:schemas-microsoft-com:vml">
<![endif]-->

	<head>
		<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
	<title>Geo Mashup Map</title>
		<?php 
GeoMashupRenderMap::head();
?>
    <?php 
echo javascript_include_tag('jquery.colorbox');
?>

    <?php 
echo stylesheet_link_tag('colorbox');
?>
		<style type="text/css">
			v\:* { behavior:url(#default#VML); }
			#geo-mashup {
				width:<?php 
echo GeoMashupRenderMap::map_property('width');
?>
;
				height:<?php 
echo GeoMashupRenderMap::map_property('height');
?>
;
				<?php 
if (GeoMashupRenderMap::map_property('background_color')) {
    ?>