1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-04 21:57:51 +02:00

Merge pull request #3938 from Jimmi08/master

bootstrap3 theme HTML layout
This commit is contained in:
Cameron
2019-08-30 14:56:30 -07:00
committed by GitHub
7 changed files with 509 additions and 581 deletions

View File

@@ -0,0 +1,8 @@
{SETSTYLE=default}
<div class="container">
{ALERTS}
{MENU=1}
{---}
</div>
<div class="container">

View File

@@ -0,0 +1,70 @@
<!-- Main jumbotron for a primary marketing message or call to action -->
<div class="container">
{ALERTS}
</div>
{SETSTYLE=jumbotron}
{WMESSAGE=force}
{SETSTYLE=default}
<div class="container">
{MENU=1}
{---}
</div>
<div class="container">
<!-- Example row of columns -->
<div class="row">
{SETSTYLE=col-md-4}
{MENU=2}
{MENU=3}
{MENU=4}
</div>
<div class="row">
{SETSTYLE=col-md-4}
{MENU=5}
{MENU=6}
{MENU=7}
</div>
{SETSTYLE=default}
<div class="row" >
<div>
<div class="col-lg-6">
{MENU=8}
</div>
<div class="col-lg-6">
{MENU=9}
</div>
</div>
<div>
<div class="col-sm-12 col-lg-4">
{MENU=10}
</div>
<div class="col-sm-12 col-lg-8">
{MENU=11}
</div>
</div>
<div>
<div class="col-sm-12 col-lg-8">
{MENU=12}
</div>
<div class="col-sm-12 col-lg-4">
{MENU=13}
</div>
</div>
<div >
<div class="col-lg-12">
{MENU=14}
</div>
</div>
</div>

View File

@@ -0,0 +1,56 @@
{SETSTYLE=default}
<div class="container">
{ALERTS}
<div class="row">
<div class="col-xs-12 col-md-8">
{---}
</div>
<div id="sidebar" class="col-xs-12 col-md-4">
{SETSTYLE=menu}
{MENU=1}
</div>
</div>
</div>
<div class="container">
{SETSTYLE=default}
<div class="row" >
<div>
<div class="col-lg-6">
{MENU=2}
</div>
<div class="col-lg-6">
{MENU=3}
</div>
</div>
<div>
<div class="col-sm-12 col-lg-4">
{MENU=4}
</div>
<div class="col-sm-12 col-lg-8">
{MENU=5}
</div>
</div>
<div>
<div class="col-sm-12 col-lg-8">
{MENU=6}
</div>
<div class="col-sm-12 col-lg-4">
{MENU=7}
</div>
</div>
<div >
<div class="col-lg-12">
{MENU=8}
</div>
</div>
</div>
</div>
<div class="container">

View File

@@ -0,0 +1,112 @@
<!-- Main jumbotron for a primary marketing message or call to action -->
{SETSTYLE=none}
{FEATUREBOX}
<div class="container">
{ALERTS}
<!-- Start Menu 1 -->
{MENU=10}
<!-- End Menu 1 -->
</div>
<div class="section">
<div class="container">
<!-- Example row of columns -->
<div class="row">
{SETSTYLE=col-md-4}
{CMENU=jumbotron-menu-1}
{CMENU=jumbotron-menu-2}
{CMENU=jumbotron-menu-3}
</div>
</div>
</div>
{SETSTYLE=default}
<div class="section-colored text-center">
<div class="container">
<div class="row">
<div class="col-lg-12">
{WMESSAGE}
</div>
</div><!-- /.row -->
</div><!-- /.container -->
</div><!-- /.section-colored -->
<div class="section">
<div class="container">
<div class="row">
<div class="col-lg-12 text-center">
<h2>Display Some Work on the Home Page Portfolio</h2>
<hr>
</div>
{SETSTYLE=portfolio}
{SETIMAGE: w=400&h=400&crop=1}
{GALLERY_PORTFOLIO: placeholder=1&limit=6}
</div><!-- /.row -->
</div><!-- /.container -->
</div><!-- /.section -->
{SETSTYLE=none}
<div class="section-colored">
<div class="container">
<div class="row">
{CMENU=feature-menu-1}
</div>
</div><!-- /.container -->
</div><!-- /.section-colored -->
<div class="section">
<div class="container">
<div class="row">
{CMENU=feature-menu-2}
</div>
</div><!-- /.container -->
</div><!-- /.section -->
<div class="container">
<div class="row well">
{CMENU=feature-menu-3}
</div><!-- /.row -->
</div><!-- /.container -->
<div class="container">
{---}

View File

@@ -0,0 +1,95 @@
<body id="page-top" class="{LAYOUT_ID}" {BODY_ONLOAD} >
{---MODAL---}
<div class="navbar navbar-inverse navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="{SITEURL}">{BOOTSTRAP_BRANDING}</a>
</div>
<div class="navbar-collapse collapse {BOOTSTRAP_NAV_ALIGN}">
{NAVIGATION=main}
{BOOTSTRAP_USERNAV: placement=top}
</div><!--/.navbar-collapse -->
</div>
</div>
<!--- Optional custom header template controlled by theme_shortcodes -->
{---HEADER---}
<!-- Page Content -->
{---LAYOUT---}
<!-- Footer -->
<hr>
</div> <!-- /container -->
{SETSTYLE=default}
<footer>
<div class="container">
<div class="row">
<div>
<div class="col-lg-6">
{MENU=100}
</div>
<div class="col-lg-6">
{MENU=101}
</div>
</div>
<div>
<div class="col-sm-12 col-lg-4">
{MENU=102}
</div>
<div class="col-sm-12 col-lg-8">
{MENU=103}
</div>
</div>
<div >
<div class="col-lg-12">
{MENU=104}
</div>
</div>
<div>
<div class="col-lg-6">
{MENU=105}
{NAVIGATION=footer}
{MENU=106}
</div>
<div class="col-lg-6 text-right">
{XURL_ICONS: size=2x}
{BOOTSTRAP_USERNAV: placement=bottom&dir=up}
</div>
</div>
<div>
<div class="col-lg-12">
{MENU=107}
</div>
</div>
<div>
<div id="sitedisclaimer" class="col-lg-12 text-center">
<small >{SITEDISCLAIMER}</small>
</div>
</div>
</div> <!-- /row -->
</div> <!-- /container -->
</footer>
<!--- Optional custom footer template controlled by theme_shortcodes -->
{---FOOTER---}
<!-- Javascripts and other information are automatically added below here -->
</body> <!-- This tag is not necessary and is ignored and replaced. Left here only as a reference -->

View File

@@ -56,579 +56,124 @@ define('OTHERNEWS2_LIMIT', 3); // Limit to 3.
define('COMMENTOFFSTRING', '');
define('PRE_EXTENDEDSTRING', '<br />');
/**
* @param string $caption
* @param string $text
* @param string $id : id of the current render
* @param array $info : current style and other menu data.
*/
function tablestyle($caption, $text, $id='', $info=array())
class bootstrap3_theme
{
// global $style; // no longer needed.
$style = $info['setStyle'];
echo "<!-- tablestyle: style=".$style." id=".$id." -->\n\n";
$type = $style;
if(empty($caption))
{
$type = 'box';
}
if($style == 'navdoc' || $style == 'none')
{
echo $text;
return;
}
/*
if($id == 'wm') // Example - If rendered from 'welcome message'
{
}
if($id == 'featurebox') // Example - If rendered from 'featurebox'
{
}
*/
if($style == 'jumbotron')
{
echo '<div class="jumbotron">
<div class="container">';
if(!empty($caption))
{
echo '<h1>'.$caption.'</h1>';
}
echo '
'.$text.'
</div>
</div>';
return;
}
if($style == 'col-md-4' || $style == 'col-md-6' || $style == 'col-md-8')
{
echo ' <div class="col-xs-12 '.$style.'">';
if(!empty($caption))
{
echo '<h2>'.$caption.'</h2>';
}
echo '
'.$text.'
</div>';
return;
}
if($style == 'menu')
{
echo '<div class="panel panel-default">
<div class="panel-heading">'.$caption.'</div>
<div class="panel-body">
'.$text.'
</div>
</div>';
return;
}
if($style == 'portfolio')
{
echo '
<div class="col-lg-4 col-md-4 col-sm-6">
/**
* @param string $caption
* @param string $text
* @param string $id : id of the current render
* @param array $info : current style and other menu data.
*/
function tablestyle($caption, $text, $id='', $info=array())
{
// global $style; // no longer needed.
$style = $info['setStyle'];
echo "<!-- tablestyle: style=".$style." id=".$id." -->\n\n";
$type = $style;
if(empty($caption))
{
$type = 'box';
}
if($style == 'navdoc' || $style == 'none')
{
echo $text;
return;
}
/*
if($id == 'wm') // Example - If rendered from 'welcome message'
{
}
if($id == 'featurebox') // Example - If rendered from 'featurebox'
{
}
*/
if($style == 'jumbotron')
{
echo '<div class="jumbotron">
<div class="container">';
if(!empty($caption))
{
echo '<h1>'.$caption.'</h1>';
}
echo '
'.$text.'
</div>
</div>';
return;
}
if($style == 'col-md-4' || $style == 'col-md-6' || $style == 'col-md-8')
{
echo ' <div class="col-xs-12 '.$style.'">';
if(!empty($caption))
{
echo '<h2>'.$caption.'</h2>';
}
echo '
'.$text.'
</div>';
return;
}
// default.
if(!empty($caption))
{
echo '<h2 class="caption">'.$caption.'</h2>';
}
echo $text;
return;
</div>';
return;
}
if($style == 'menu')
{
echo '<div class="panel panel-default">
<div class="panel-heading">'.$caption.'</div>
<div class="panel-body">
'.$text.'
</div>
</div>';
return;
}
if($style == 'portfolio')
{
echo '
<div class="col-lg-4 col-md-4 col-sm-6">
'.$text.'
</div>';
return;
}
// default.
if(!empty($caption))
{
echo '<h2 class="caption">'.$caption.'</h2>';
}
echo $text;
return;
}
}
// applied before every layout.
$LAYOUT['_header_'] = '
<div class="navbar navbar-inverse navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="{SITEURL}">{BOOTSTRAP_BRANDING}</a>
</div>
<div class="navbar-collapse collapse {BOOTSTRAP_NAV_ALIGN}">
{NAVIGATION=main}
{BOOTSTRAP_USERNAV: placement=top}
</div><!--/.navbar-collapse -->
</div>
</div>
';
// applied after every layout.
$LAYOUT['_footer_'] = '<hr>
</div> <!-- /container -->
{SETSTYLE=default}
<footer>
<div class="container">
<div class="row">
<div>
<div class="col-lg-6">
{MENU=100}
</div>
<div class="col-lg-6">
{MENU=101}
</div>
</div>
<div>
<div class="col-sm-12 col-lg-4">
{MENU=102}
</div>
<div class="col-sm-12 col-lg-8">
{MENU=103}
</div>
</div>
<div >
<div class="col-lg-12">
{MENU=104}
</div>
</div>
<div>
<div class="col-lg-6">
{MENU=105}
{NAVIGATION=footer}
{MENU=106}
</div>
<div class="col-lg-6 text-right">
{XURL_ICONS: size=2x}
{BOOTSTRAP_USERNAV: placement=bottom&dir=up}
</div>
</div>
<div>
<div class="col-lg-12">
{MENU=107}
</div>
</div>
<div>
<div id="sitedisclaimer" class="col-lg-12 text-center">
<small >{SITEDISCLAIMER}</small>
</div>
</div>
</div> <!-- /row -->
</div> <!-- /container -->
</footer>
';
// $LAYOUT is a combined $HEADER and $FOOTER, automatically split at the point of "{---}"
$LAYOUT['jumbotron_home'] = <<<TMPL
<!-- Main jumbotron for a primary marketing message or call to action -->
<div class="container">
{ALERTS}
</div>
{SETSTYLE=jumbotron}
{WMESSAGE=force}
{SETSTYLE=default}
<div class="container">
{MENU=1}
{---}
</div>
<div class="container">
<!-- Example row of columns -->
<div class="row">
{SETSTYLE=col-md-4}
{MENU=2}
{MENU=3}
{MENU=4}
</div>
<div class="row">
{SETSTYLE=col-md-4}
{MENU=5}
{MENU=6}
{MENU=7}
</div>
{SETSTYLE=default}
<div class="row" >
<div>
<div class="col-lg-6">
{MENU=8}
</div>
<div class="col-lg-6">
{MENU=9}
</div>
</div>
<div>
<div class="col-sm-12 col-lg-4">
{MENU=10}
</div>
<div class="col-sm-12 col-lg-8">
{MENU=11}
</div>
</div>
<div>
<div class="col-sm-12 col-lg-8">
{MENU=12}
</div>
<div class="col-sm-12 col-lg-4">
{MENU=13}
</div>
</div>
<div >
<div class="col-lg-12">
{MENU=14}
</div>
</div>
</div>
TMPL;
//TODO Add {GALLERY_PORTFOLIO} to portfolio_menu.php
$LAYOUT['modern_business_home'] = <<<TMPL
<!-- Main jumbotron for a primary marketing message or call to action -->
{SETSTYLE=none}
{FEATUREBOX}
<div class="container">
{ALERTS}
<!-- Start Menu 1 -->
{MENU=10}
<!-- End Menu 1 -->
</div>
<div class="section">
<div class="container">
<!-- Example row of columns -->
<div class="row">
{SETSTYLE=col-md-4}
{CMENU=jumbotron-menu-1}
{CMENU=jumbotron-menu-2}
{CMENU=jumbotron-menu-3}
</div>
</div>
</div>
{SETSTYLE=default}
<div class="section-colored text-center">
<div class="container">
<div class="row">
<div class="col-lg-12">
{WMESSAGE}
</div>
</div><!-- /.row -->
</div><!-- /.container -->
</div><!-- /.section-colored -->
<div class="section">
<div class="container">
<div class="row">
<div class="col-lg-12 text-center">
<h2>Display Some Work on the Home Page Portfolio</h2>
<hr>
</div>
{SETSTYLE=portfolio}
{SETIMAGE: w=400&h=400&crop=1}
{GALLERY_PORTFOLIO: placeholder=1&limit=6}
</div><!-- /.row -->
</div><!-- /.container -->
</div><!-- /.section -->
{SETSTYLE=none}
<div class="section-colored">
<div class="container">
<div class="row">
{CMENU=feature-menu-1}
</div>
</div><!-- /.container -->
</div><!-- /.section-colored -->
<div class="section">
<div class="container">
<div class="row">
{CMENU=feature-menu-2}
</div>
</div><!-- /.container -->
</div><!-- /.section -->
<div class="container">
<div class="row well">
{CMENU=feature-menu-3}
</div><!-- /.row -->
</div><!-- /.container -->
<div class="container">
{---}
TMPL;
$LAYOUT['jumbotron_full'] = '
{SETSTYLE=default}
<div class="container">
{ALERTS}
{MENU=1}
{---}
</div>
<div class="container">
';
$LAYOUT['jumbotron_sidebar_right'] = '
{SETSTYLE=default}
<div class="container">
{ALERTS}
<div class="row">
<div class="col-xs-12 col-md-8">
{---}
</div>
<div id="sidebar" class="col-xs-12 col-md-4">
{SETSTYLE=menu}
{MENU=1}
</div>
</div>
</div>
<div class="container">
{SETSTYLE=default}
<div class="row" >
<div>
<div class="col-lg-6">
{MENU=2}
</div>
<div class="col-lg-6">
{MENU=3}
</div>
</div>
<div>
<div class="col-sm-12 col-lg-4">
{MENU=4}
</div>
<div class="col-sm-12 col-lg-8">
{MENU=5}
</div>
</div>
<div>
<div class="col-sm-12 col-lg-8">
{MENU=6}
</div>
<div class="col-sm-12 col-lg-4">
{MENU=7}
</div>
</div>
<div >
<div class="col-lg-12">
{MENU=8}
</div>
</div>
</div>
</div>
<div class="container">
';
/* XXX EVERYTHING BELOW THIS POINT IS UNUSED FOR NOW */
/**
* $HEADER AND $FOOTER are deprecated.
*/
/*
$CUSTOMHEADER, CUSTOMFOOTER and $CUSTOMPAGES are deprecated.
Default custom-pages can be assigned in theme.xml
*/
/*
$LAYOUT['docs'] = <<<TMPL
<!-- Navbar
================================================== -->
<div class="navbar navbar-inverse navbar-fixed-top">
<div class="navbar-inner">
<div class="container">
<button type="button" class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="brand" href="./index.html">Bootstrap</a>
<div class="nav-collapse collapse">
{NAVIGATION=main}
</div>
</div>
</div>
</div>
<!-- Subhead
================================================== -->
<header class="jumbotron subhead" id="overview">
<div class="container">
<h1>{PAGE_CHAPTER_NAME}</h1>
<p class="lead">{PAGE_CHAPTER_DESCRIPTION}</p>
</div>
</header>
<div class="container">
<!-- Docs nav
================================================== -->
<div class="row">
<div class="span3 bs-docs-sidebar">
{SETSTYLE=navdoc}
{PAGE_NAVIGATION: template=navdocs&auto=1}
</div>
{SETSTYLE=doc}
<div class="span9">
{---}
</div>
</div>
</div>
<!-- Footer
================================================== -->
<footer class="footer">
<div class="container">
<p>{SITEDISCLAIMER}</p>
<!--
<ul class="footer-links">
<li><a href="http://blog.getbootstrap.com">Blog</a></li>
<li class="muted">&middot;</li>
<li><a href="https://github.com/twitter/bootstrap/issues?state=open">Issues</a></li>
<li class="muted">&middot;</li>
<li><a href="https://github.com/twitter/bootstrap/blob/master/CHANGELOG.md">Changelog</a></li>
</ul>
-->
</div>
</footer>
TMPL;
*/
$NEWSCAT = "\n\n\n\n<!-- News Category -->\n\n\n\n
<div style='padding:2px;padding-bottom:12px'>
@@ -651,4 +196,4 @@ $NEWSCAT_ITEM = "\n\n\n\n<!-- News Category Item -->\n\n\n\n
</td></tr></table></div>
";
?>
?>

View File

@@ -20,6 +20,57 @@ class theme_shortcodes extends e_shortcode
}
/**
* Special Header Shortcode for dynamic menuarea templates.
* @shortcode {---HEADER---}
* @return string
*/
function sc_header()
{
return "<!-- Dynamic Header template -->\n";
}
/**
* Special Footer Shortcode for dynamic menuarea templates.
* @shortcode {---FOOTER---}
* @return string
*/
function sc_footer()
{
return "<!-- Dynamic Footer template -->\n";
/*
return '
<footer class="footer py-4 bg-dark text-white">
<div class="container">
<div class="content">
<div class="row">
<div class="col-md-3"> <h4>Navigation</h4>{NAVIGATION: type=main&layout=alt}
{MENUAREA=14}
</div>
<div class="col-md-3"> <h4>Follow Us</h4>{XURL_ICONS: template=footer}
{MENUAREA=15}
</div>
<div class="col-md-3">
{MENUAREA=16}
</div>
<div class="col-md-3">
{MENUAREA=17}
</div>
</div>
</div>
<hr>
<div class="container"> {NAVIGATION: type=main&layout=footer} </div>
<div class="container">
<p class="m-0 text-center text-white">{SITEDISCLAIMER}</p>
</div>
<!-- /.container -->
</div>
</footer>';*/
}
/*
function sc_news_summary()
{
@@ -295,16 +346,7 @@ class theme_shortcodes extends e_shortcode
}
}
?>