mirror of
https://github.com/e107inc/e107.git
synced 2025-09-02 02:42:40 +02:00
Issue #3321 FontAwesome 5 support added (not CDN yet). See bootstrap4/theme.xml
This commit is contained in:
@@ -9,9 +9,6 @@ e107::meta('viewport', 'width=device-width, initial-scale=1.0');
|
||||
|
||||
e107::css("url", "https://bootswatch.com/4/slate/bootstrap.min.css" );
|
||||
|
||||
$HEADER = array();
|
||||
$FOOTER = array();
|
||||
|
||||
|
||||
|
||||
class bootstrap4_theme
|
||||
@@ -21,6 +18,8 @@ class bootstrap4_theme
|
||||
{
|
||||
global $style;
|
||||
|
||||
|
||||
|
||||
if($mode == 'wmessage')
|
||||
{
|
||||
$style = '';
|
||||
@@ -61,6 +60,16 @@ class bootstrap4_theme
|
||||
// IMPORTANT: make sure there are no characters after <<<TMPL or TMPL;
|
||||
|
||||
// DEFAULT
|
||||
$LAYOUT = array();
|
||||
|
||||
// TODO Add navigation
|
||||
$LAYOUT['_header_'] = '
|
||||
<div class="container">
|
||||
';
|
||||
|
||||
$LAYOUT['_footer_'] = '
|
||||
</div>
|
||||
';
|
||||
|
||||
$LAYOUT['default'] = <<<TMPL
|
||||
|
||||
@@ -97,9 +106,16 @@ $LAYOUT['full'] = <<<TMPL
|
||||
{SETIMAGE: w=0}
|
||||
|
||||
{---}
|
||||
|
||||
|
||||
TMPL;
|
||||
|
||||
$LAYOUT['glyphs'] = '
|
||||
|
||||
{---}
|
||||
|
||||
{THEME_BS4_GLYPHS}
|
||||
|
||||
';
|
||||
|
||||
$LAYOUT['test'] = <<<TMPL
|
||||
<div class="container">
|
||||
@@ -1490,56 +1506,3 @@ TMPL;
|
||||
|
||||
|
||||
|
||||
|
||||
// News item styling
|
||||
$NEWSSTYLE = '
|
||||
{NEWSTITLE}
|
||||
{NEWSAUTHOR}
|
||||
{NEWSDATE=short}
|
||||
{NEWSIMAGE}
|
||||
{NEWSBODY} {EXTENDED}
|
||||
|
||||
';
|
||||
|
||||
// Comment Styling
|
||||
$COMMENTSTYLE = '
|
||||
{AVATAR}
|
||||
{USERNAME}
|
||||
{REPLY}
|
||||
{TIMEDATE}
|
||||
{COMMENT}
|
||||
';
|
||||
|
||||
// news.php?cat.1
|
||||
$NEWSLISTSTYLE = '
|
||||
{NEWSTITLE}
|
||||
{NEWSDATE=short}
|
||||
{NEWSAUTHOR}
|
||||
{NEWSIMAGE}
|
||||
{NEWSBODY}
|
||||
{EXTENDED}
|
||||
{EMAILICON}
|
||||
{PRINTICON}
|
||||
{PDFICON}
|
||||
{ADMINOPTIONS}
|
||||
{NEWSCOMMENTS}
|
||||
';
|
||||
|
||||
$NEWSARCHIVE ='
|
||||
{ARCHIVE_BULLET}
|
||||
{ARCHIVE_LINK}
|
||||
{ARCHIVE_AUTHOR}
|
||||
{ARCHIVE_DATESTAMP}
|
||||
{ARCHIVE_CATEGORY}
|
||||
';
|
||||
//Render news categories on the bottom of the page
|
||||
$NEWSCAT = '
|
||||
{NEWSCATEGORY}
|
||||
{NEWSCAT_ITEM}
|
||||
';
|
||||
//Loop for news items in category
|
||||
$NEWSCAT_ITEM = '
|
||||
{NEWSTITLELINK}
|
||||
|
||||
';
|
||||
|
||||
|
@@ -14,7 +14,7 @@
|
||||
</keywords>
|
||||
<libraries>
|
||||
<library name="bootstrap" version="4" scope="all"/>
|
||||
<library name="fontawesome" scope="all"/>
|
||||
<library name="fontawesome" version="5" scope="all"/>
|
||||
</libraries>
|
||||
<stylesheets>
|
||||
<css file="style.css" name="Default"/>
|
||||
@@ -25,5 +25,6 @@
|
||||
<layout name='default' title='Default' />
|
||||
<layout name='home' title='Home' />
|
||||
<layout name='full' title='Full' />
|
||||
<layout name='glyphs' title='Glyphs (test)' />
|
||||
</layouts>
|
||||
</e107Theme>
|
@@ -13,7 +13,36 @@
|
||||
|
||||
class theme_shortcodes extends e_shortcode
|
||||
{
|
||||
function sc_theme_bs4_glyphs()
|
||||
{
|
||||
|
||||
$tp = e107::getParser();
|
||||
$ns = e107::getRender();
|
||||
|
||||
$text = "<h4>Hardcoded</h4>";
|
||||
|
||||
$text .= '<i class="fab fa-3x fa-teamspeak"></i>
|
||||
<i class="fas fa-3x fa-air-freshener"></i>
|
||||
<i class="fas fa-igloo"></i>
|
||||
';
|
||||
|
||||
$text .= "<h4>toGlyph()</h4>";
|
||||
|
||||
$arr = array(
|
||||
'fa-edit',
|
||||
'fa-check',
|
||||
'fa-cog'
|
||||
);
|
||||
|
||||
foreach($arr as $f)
|
||||
{
|
||||
$text .= $tp->toGlyph($f, array('size'=>'3x'));
|
||||
$text .= " ";
|
||||
}
|
||||
|
||||
return $ns->tablerender("Glyphs", $text);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user