From 6b362552efd3f0065625d4a92b2445d628322314 Mon Sep 17 00:00:00 2001 From: Jimmi08 Date: Sun, 25 Aug 2019 22:15:51 +0200 Subject: [PATCH] bootstrap3 theme HTML layout --- .../layouts/jumbotron_full_layout.html | 8 + .../layouts/jumbotron_home_layout.html | 70 ++ .../jumbotron_sidebar_right_layout.html | 56 ++ .../layouts/modern_business_home_layout.html | 112 +++ e107_themes/bootstrap3/theme.html | 95 +++ e107_themes/bootstrap3/theme.php | 685 +++--------------- e107_themes/bootstrap3/theme_shortcodes.php | 64 +- 7 files changed, 509 insertions(+), 581 deletions(-) create mode 100644 e107_themes/bootstrap3/layouts/jumbotron_full_layout.html create mode 100644 e107_themes/bootstrap3/layouts/jumbotron_home_layout.html create mode 100644 e107_themes/bootstrap3/layouts/jumbotron_sidebar_right_layout.html create mode 100644 e107_themes/bootstrap3/layouts/modern_business_home_layout.html create mode 100644 e107_themes/bootstrap3/theme.html diff --git a/e107_themes/bootstrap3/layouts/jumbotron_full_layout.html b/e107_themes/bootstrap3/layouts/jumbotron_full_layout.html new file mode 100644 index 000000000..6db95a7cf --- /dev/null +++ b/e107_themes/bootstrap3/layouts/jumbotron_full_layout.html @@ -0,0 +1,8 @@ + {SETSTYLE=default} +
+ {ALERTS} + {MENU=1} + {---} + +
+
diff --git a/e107_themes/bootstrap3/layouts/jumbotron_home_layout.html b/e107_themes/bootstrap3/layouts/jumbotron_home_layout.html new file mode 100644 index 000000000..e996a857d --- /dev/null +++ b/e107_themes/bootstrap3/layouts/jumbotron_home_layout.html @@ -0,0 +1,70 @@ + + +
+ {ALERTS} +
+ + {SETSTYLE=jumbotron} + + {WMESSAGE=force} + + {SETSTYLE=default} +
+ + {MENU=1} + + {---} + +
+
+ +
+ {SETSTYLE=col-md-4} + {MENU=2} + {MENU=3} + {MENU=4} +
+ +
+ {SETSTYLE=col-md-4} + {MENU=5} + {MENU=6} + {MENU=7} +
+ {SETSTYLE=default} +
+
+
+ {MENU=8} +
+
+ {MENU=9} +
+
+ +
+
+ {MENU=10} +
+ +
+ {MENU=11} +
+
+ +
+
+ {MENU=12} +
+ +
+ {MENU=13} +
+
+ +
+
+ {MENU=14} +
+
+
diff --git a/e107_themes/bootstrap3/layouts/jumbotron_sidebar_right_layout.html b/e107_themes/bootstrap3/layouts/jumbotron_sidebar_right_layout.html new file mode 100644 index 000000000..e071e6935 --- /dev/null +++ b/e107_themes/bootstrap3/layouts/jumbotron_sidebar_right_layout.html @@ -0,0 +1,56 @@ + {SETSTYLE=default} +
+ {ALERTS} +
+
+ + {---} + +
+ +
+ +
+
+ {SETSTYLE=default} +
+
+
+ {MENU=2} +
+
+ {MENU=3} +
+
+ +
+
+ {MENU=4} +
+ +
+ {MENU=5} +
+
+ +
+
+ {MENU=6} +
+ +
+ {MENU=7} +
+
+ +
+
+ {MENU=8} +
+
+
+
+
diff --git a/e107_themes/bootstrap3/layouts/modern_business_home_layout.html b/e107_themes/bootstrap3/layouts/modern_business_home_layout.html new file mode 100644 index 000000000..f6e7d59bf --- /dev/null +++ b/e107_themes/bootstrap3/layouts/modern_business_home_layout.html @@ -0,0 +1,112 @@ + + {SETSTYLE=none} + + {FEATUREBOX} + +
+ {ALERTS} + + {MENU=10} + +
+ +
+
+ +
+ {SETSTYLE=col-md-4} + {CMENU=jumbotron-menu-1} + {CMENU=jumbotron-menu-2} + {CMENU=jumbotron-menu-3} +
+
+
+ +{SETSTYLE=default} + +
+
+
+
+ {WMESSAGE} +
+
+
+ +
+ + + +
+ +
+ +
+
+

Display Some Work on the Home Page Portfolio

+
+
+ + {SETSTYLE=portfolio} + {SETIMAGE: w=400&h=400&crop=1} + {GALLERY_PORTFOLIO: placeholder=1&limit=6} + +
+ +
+ +
+ + + +{SETSTYLE=none} + +
+ +
+ +
+ + {CMENU=feature-menu-1} + +
+ +
+ +
+ + + +
+ +
+ +
+ + {CMENU=feature-menu-2} + +
+ +
+ +
+ + + +
+ +
+ + {CMENU=feature-menu-3} + +
+ +
+ + + + + + +
+ {---} diff --git a/e107_themes/bootstrap3/theme.html b/e107_themes/bootstrap3/theme.html new file mode 100644 index 000000000..da386b4ab --- /dev/null +++ b/e107_themes/bootstrap3/theme.html @@ -0,0 +1,95 @@ + + +{---MODAL---} + + + + +{---HEADER---} + + +{---LAYOUT---} + + +
+
+{SETSTYLE=default} +
+
+
+ +
+
+ {MENU=100} +
+
+ {MENU=101} +
+
+ +
+
+ {MENU=102} +
+ +
+ {MENU=103} +
+
+ +
+
+ {MENU=104} +
+
+ +
+
+ {MENU=105} + {NAVIGATION=footer} + {MENU=106} +
+
+ {XURL_ICONS: size=2x} + {BOOTSTRAP_USERNAV: placement=bottom&dir=up} +
+
+ +
+
+ {MENU=107} +
+
+ +
+
+ {SITEDISCLAIMER} +
+
+ +
+
+
+ + +{---FOOTER---} + + + + diff --git a/e107_themes/bootstrap3/theme.php b/e107_themes/bootstrap3/theme.php index ab99eb719..0d9fbdf74 100644 --- a/e107_themes/bootstrap3/theme.php +++ b/e107_themes/bootstrap3/theme.php @@ -56,579 +56,124 @@ define('OTHERNEWS2_LIMIT', 3); // Limit to 3. define('COMMENTOFFSTRING', ''); define('PRE_EXTENDEDSTRING', '
'); - -/** - * @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 "\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 '
-
'; - if(!empty($caption)) - { - echo '

'.$caption.'

'; - } - echo ' - '.$text.' -
-
'; - return; - } - - if($style == 'col-md-4' || $style == 'col-md-6' || $style == 'col-md-8') - { - echo '
'; - - if(!empty($caption)) - { - echo '

'.$caption.'

'; - } - - echo ' - '.$text.' -
'; - return; - - } - - if($style == 'menu') - { - echo '
-
'.$caption.'
-
- '.$text.' -
-
'; - return; - - } - - if($style == 'portfolio') - { - echo ' -
+ + /** + * @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 "\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 '
+
'; + if(!empty($caption)) + { + echo '

'.$caption.'

'; + } + echo ' + '.$text.' +
+
'; + return; + } + + if($style == 'col-md-4' || $style == 'col-md-6' || $style == 'col-md-8') + { + echo '
'; + + if(!empty($caption)) + { + echo '

'.$caption.'

'; + } + + echo ' '.$text.' -
'; - return; - } - - - - // default. - - if(!empty($caption)) - { - echo '

'.$caption.'

'; - } - - echo $text; - - - - return; - - - +
'; + return; + + } + + if($style == 'menu') + { + echo '
+
'.$caption.'
+
+ '.$text.' +
+
'; + return; + + } + + if($style == 'portfolio') + { + echo ' +
+ '.$text.' +
'; + return; + } + + + + // default. + + if(!empty($caption)) + { + echo '

'.$caption.'

'; + } + + echo $text; + + + + return; + + + + } + + } -// applied before every layout. -$LAYOUT['_header_'] = ' - - - - -'; - -// applied after every layout. -$LAYOUT['_footer_'] = '
-
-{SETSTYLE=default} -
-
-
- -
-
- {MENU=100} -
-
- {MENU=101} -
-
- -
-
- {MENU=102} -
- -
- {MENU=103} -
-
- -
-
- {MENU=104} -
-
- -
-
- {MENU=105} - {NAVIGATION=footer} - {MENU=106} -
-
- {XURL_ICONS: size=2x} - {BOOTSTRAP_USERNAV: placement=bottom&dir=up} -
-
- -
-
- {MENU=107} -
-
- -
-
- {SITEDISCLAIMER} -
-
- -
-
-
-'; - - - -// $LAYOUT is a combined $HEADER and $FOOTER, automatically split at the point of "{---}" - -$LAYOUT['jumbotron_home'] = << - -
- {ALERTS} -
- - {SETSTYLE=jumbotron} - - {WMESSAGE=force} - - {SETSTYLE=default} -
- - {MENU=1} - - {---} - -
-
- -
- {SETSTYLE=col-md-4} - {MENU=2} - {MENU=3} - {MENU=4} -
- -
- {SETSTYLE=col-md-4} - {MENU=5} - {MENU=6} - {MENU=7} -
- {SETSTYLE=default} -
-
-
- {MENU=8} -
-
- {MENU=9} -
-
- -
-
- {MENU=10} -
- -
- {MENU=11} -
-
- -
-
- {MENU=12} -
- -
- {MENU=13} -
-
- -
-
- {MENU=14} -
-
-
-TMPL; - -//TODO Add {GALLERY_PORTFOLIO} to portfolio_menu.php -$LAYOUT['modern_business_home'] = << - {SETSTYLE=none} - - {FEATUREBOX} - -
- {ALERTS} - - {MENU=10} - -
- -
-
- -
- {SETSTYLE=col-md-4} - {CMENU=jumbotron-menu-1} - {CMENU=jumbotron-menu-2} - {CMENU=jumbotron-menu-3} -
-
-
- -{SETSTYLE=default} - -
-
-
-
- {WMESSAGE} -
-
-
- -
- - - -
- -
- -
-
-

Display Some Work on the Home Page Portfolio

-
-
- - {SETSTYLE=portfolio} - {SETIMAGE: w=400&h=400&crop=1} - {GALLERY_PORTFOLIO: placeholder=1&limit=6} - -
- -
- -
- - - -{SETSTYLE=none} - -
- -
- -
- - {CMENU=feature-menu-1} - -
- -
- -
- - - -
- -
- -
- - {CMENU=feature-menu-2} - -
- -
- -
- - - -
- -
- - {CMENU=feature-menu-3} - -
- -
- - - - - - -
- {---} - - - -TMPL; - - - - - - -$LAYOUT['jumbotron_full'] = ' - - {SETSTYLE=default} -
- {ALERTS} - {MENU=1} - {---} - -
-
- - - - '; - - - -$LAYOUT['jumbotron_sidebar_right'] = ' - - {SETSTYLE=default} -
- {ALERTS} -
-
- - {---} - -
- -
- -
-
- {SETSTYLE=default} -
-
-
- {MENU=2} -
-
- {MENU=3} -
-
- -
-
- {MENU=4} -
- -
- {MENU=5} -
-
- -
-
- {MENU=6} -
- -
- {MENU=7} -
-
- -
-
- {MENU=8} -
-
-
-
-
- '; - - - - - -/* 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'] = << - - - -
-
-

{PAGE_CHAPTER_NAME}

-

{PAGE_CHAPTER_DESCRIPTION}

-
-
- - -
- - -
- -
- {SETSTYLE=navdoc} - {PAGE_NAVIGATION: template=navdocs&auto=1} -
- {SETSTYLE=doc} - -
- - - {---} - - -
-
-
- - -
-
-

{SITEDISCLAIMER}

- -
-
- - - -TMPL; - - - */ - - $NEWSCAT = "\n\n\n\n\n\n\n\n
@@ -651,4 +196,4 @@ $NEWSCAT_ITEM = "\n\n\n\n\n\n\n\n
"; -?> \ No newline at end of file +?> \ No newline at end of file diff --git a/e107_themes/bootstrap3/theme_shortcodes.php b/e107_themes/bootstrap3/theme_shortcodes.php index ed2030c81..a415330a6 100644 --- a/e107_themes/bootstrap3/theme_shortcodes.php +++ b/e107_themes/bootstrap3/theme_shortcodes.php @@ -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 "\n"; + } + + + /** + * Special Footer Shortcode for dynamic menuarea templates. + * @shortcode {---FOOTER---} + * @return string + */ + function sc_footer() + { + return "\n"; +/* + return ' + ';*/ + + } + + /* function sc_news_summary() { @@ -295,16 +346,7 @@ class theme_shortcodes extends e_shortcode } - - - - - - + } - - - - - + ?>