1
0
mirror of https://github.com/e107inc/e107.git synced 2025-03-14 01:19:44 +01:00

Bootstrap 5 template tweaks.

This commit is contained in:
Cameron 2022-04-06 14:21:35 -07:00
parent 214fcea1cd
commit 16354b3da0
10 changed files with 40 additions and 41 deletions

View File

@ -626,7 +626,7 @@ class news_shortcodes extends e_shortcode
function sc_news_author_avatar($parm=null)
{
if(!empty($this->news_item['user_id']) && !empty($this->news_item['user_image']))
if((!empty($this->news_item['user_id']) && !empty($this->news_item['user_image'])) || !empty($parm['placeholder']))
{
return e107::getParser()->toAvatar($this->news_item, $parm);
}

View File

@ -85,7 +85,7 @@ $CONTACT_TEMPLATE['menu'] = '
// Shortcode wrappers.
$CONTACT_WRAPPER['form']['CONTACT_IMAGECODE'] = "<div class='control-group form-group'><label for='code-verify'>{CONTACT_IMAGECODE_LABEL}</label> {---}";
$CONTACT_WRAPPER['form']['CONTACT_IMAGECODE_INPUT'] = "{---}</div>";
$CONTACT_WRAPPER['form']['CONTACT_IMAGECODE_INPUT'] = "<span class='m-2'>{---}</span></div>";
$CONTACT_WRAPPER['form']['CONTACT_EMAIL_COPY'] = "<div class='control-group form-group'>{---}{LAN=CONTACT_07}</div>";
$CONTACT_WRAPPER['form']['CONTACT_PERSON'] = "<div class='control-group form-group'><label for='contactPerson'>{LAN=CONTACT_14}</label>{---}</div>";
@ -95,26 +95,26 @@ $CONTACT_WRAPPER['form']['CONTACT_PERSON'] = "<div class='control-group form-
$CONTACT_TEMPLATE['form'] = "
<form action='".e_SELF."' method='post' id='contactForm' class='mt-5' >
{CONTACT_PERSON}
<div class='control-group form-group'><label for='contactName'>{LAN=CONTACT_03}</label>
<div class='control-group form-group mb-3'><label for='contactName'>{LAN=CONTACT_03}</label>
{CONTACT_NAME}
</div>
<div class='control-group form-group'><label for='contactEmail'>{LAN=CONTACT_04}</label>
<div class='control-group form-group mb-3'><label for='contactEmail'>{LAN=CONTACT_04}</label>
{CONTACT_EMAIL}
</div>
<div class='control-group form-group'><label for='contactSubject'>{LAN=CONTACT_05}</label>
<div class='control-group form-group mb-3'><label for='contactSubject'>{LAN=CONTACT_05}</label>
{CONTACT_SUBJECT}
</div>
{CONTACT_EMAIL_COPY}
<div class='control-group form-group'><label for='contactBody'>{LAN=CONTACT_06}</label>
<div class='control-group form-group mb-3'><label for='contactBody'>{LAN=CONTACT_06}</label>
{CONTACT_BODY}
</div>
{CONTACT_IMAGECODE}
{CONTACT_IMAGECODE_INPUT}
<div class='form-group'><label for='gdpr'>{LAN=CONTACT_24}</label>
<div class='form-group mb-3'><label for='gdpr'>{LAN=CONTACT_24}</label>
<div class='checkbox'>
<label>{CONTACT_GDPR_CHECK} {LAN=CONTACT_21}</label>
<div class='help-block'>{CONTACT_GDPR_LINK}</div>
@ -123,7 +123,7 @@ $CONTACT_TEMPLATE['form'] = "
<div class='form-group'>
<div class='form-group mb-3'>
{CONTACT_SUBMIT_BUTTON}
</div>
</form>";

View File

@ -46,7 +46,7 @@ $PAGE_TEMPLATE['default']['body'] = '
<div class="clear"><!-- --></div>
{CPAGERATING}
{CPAGEEDIT}
<span class="m-3">{CPAGEEDIT}</span>
';

View File

@ -193,13 +193,13 @@ class gallery_shortcodes extends e_shortcode
return e107::getUrl()->create('gallery');
}
function sc_gallery_cat_thumb($parm = '')
function sc_gallery_cat_thumb($parm = null)
{
$parms = eHelper::scParams($parm);
$w = vartrue($parms['w']) ? $parms['w'] : 300; // 260;
$h = vartrue($parms['h']) ? $parms['h'] : 200; // 180;
$w = !empty($parms['w']) ? $parms['w'] : 300; // 260;
$h = !empty($parms['h']) ? $parms['h'] : 200; // 180;
$att = 'aw=' . $w . '&ah=' . $h . '&x=1'; // 'aw=190&ah=150';
$class = isset($parms['class']) ? $parms['class'] : 'img-responsive img-fluid';
$url = e107::getUrl()->create('gallery/index/list', $this->var);
@ -209,7 +209,7 @@ class gallery_shortcodes extends e_shortcode
}
$text = "<a class='thumbnail' href='" . $url . "'>";
$text .= "<img class='img-responsive img-fluid' data-src='holder.js/" . $w . "x" . $h . "' src='" . e107::getParser()->thumbUrl($this->var['media_cat_image'], $att) . "' alt='' />";
$text .= "<img class='".$class."' data-src='holder.js/" . $w . "x" . $h . "' src='" . e107::getParser()->thumbUrl($this->var['media_cat_image'], $att) . "' alt='' />";
$text .= "</a>";
return $text;
}

View File

@ -12,24 +12,26 @@
$GALLERY_TEMPLATE['list']['caption'] = LAN_PLUGIN_GALLERY_TITLE;
$GALLERY_TEMPLATE['list']['start'] = '{GALLERY_BREADCRUMB}
<div class="row gallery">
<div class="row gallery gx-3">
';
$GALLERY_TEMPLATE['list']['item'] = '
<div class="span2 col-xs-6 col-md-3">
<div class="thumbnail">
{GALLERY_THUMB=w=300&h=200}
<div class="span2 col-xs-6 col-md-4">
<div class="card h-100 thumbnail">
{GALLERY_THUMB: w=300&h=200&class=card-img-top img-fluid img-responsive}
<div class="card-footer">
<h5>{GALLERY_CAPTION}</h5>
</div>
</div>
</div>
';
$GALLERY_TEMPLATE['list']['end'] = '
</div>
<div class="center">
<div class="center mt-3">
<div class="gallery-list-nextprev">{GALLERY_NEXTPREV}</div>
<div class="gallery-list-back">
<a class="btn btn-default btn-secondary" href="{GALLERY_BASEURL}">' . LAN_BACK . '</a>
<a class="btn btn-default btn-secondary" href="{GALLERY_BASEURL}">{LAN=BACK}</a>
</div>
</div>
';
@ -38,14 +40,16 @@ $GALLERY_TEMPLATE['list']['end'] = '
$GALLERY_TEMPLATE['cat']['caption'] = LAN_PLUGIN_GALLERY_TITLE;
$GALLERY_TEMPLATE['cat']['start'] = '{GALLERY_BREADCRUMB}
<div class="row gallery-cat">
<div class="row gallery-cat gx-3">
';
$GALLERY_TEMPLATE['cat']['item'] = '
<div class="span3 col-xs-6 col-md-3">
<div>
{GALLERY_CAT_THUMB}
<h3>{GALLERY_CAT_TITLE}</h3>
<div class="span3 col-xs-6 col-md-4">
<div class="card h-100">
{GALLERY_CAT_THUMB: w=300&h=200&class=card-img-top img-fluid img-responsive}
<div class="card-footer">
<h5>{GALLERY_CAT_TITLE}</h5>
</div>
</div>
</div>
';

View File

@ -85,7 +85,7 @@
<div class="card-footer p-4 pt-0 bg-transparent border-top-0">
<div class="d-flex align-items-end justify-content-between">
<div class="d-flex align-items-center">
{NEWS_AUTHOR_AVATAR: class=rounded-circle me-3&w=40&h=40&crop=1}
{NEWS_AUTHOR_AVATAR: class=rounded-circle me-3&w=40&h=40&crop=1&placeholder=1}
<div class="small">
<div class="fw-bold">{NEWS_AUTHOR}</div>
<div class="text-muted">{NEWS_DATE=short}</div>

View File

@ -24,7 +24,7 @@ $SIGNIN_TEMPLATE['signin'] = '
{SIGNIN_IMAGECODE_NUMBER}
{SIGNIN_IMAGECODE_BOX}
<div class="checkbox">
<div class="checkbox my-2">
<label class="string optional" for="bs3-autologin"><input style="margin-right: 10px;" type="checkbox" name="autologin" id="bs3-autologin" value="1">
{LAN=LAN_LOGINMENU_6}</label>
</div>

View File

@ -63,6 +63,7 @@ ul.social-buttons li a {
}
}
/*
.list-group-item.active a {
z-index: 2;
@ -70,6 +71,7 @@ ul.social-buttons li a {
background-color: #007bff;
border-color: #007bff;
}
*/
/* fix for caret bootstrap user nav */
.profile-photo-small {
@ -89,7 +91,7 @@ ul.social-buttons li a {
@media (min-width: 768px) {
#login-template {
max-width: 500px;
max-width: 800px;
margin-right: auto;
margin-left: auto;
}
@ -100,14 +102,7 @@ ul.social-buttons li a {
margin-bottom: initial;
}
/* */
.jumbotron {
/* margin-top: 60px;*/
padding: 2rem 1rem;
/* margin-bottom: 2rem;*/
/* background-color: #e9ecef;*/
/* border-radius: .3rem;*/
}
#carousel-hero.carousel {
position: relative;

View File

@ -39,7 +39,7 @@ if(!defined('e107_INIT'))
{
e107::css('theme', THEME_STYLE);
e107::css('theme', 'style.css'); // always load style.css last.
e107::css('inline', '#carousel-hero.carousel { top: 30px; margin-bottom: 60px; }');
e107::css('inline', '#carousel-hero.carousel { margin-bottom: 80px; }');
}
/**
@ -114,7 +114,7 @@ if(!defined('e107_INIT'))
{
case 'wmessage':
echo '<div class="jumbotron"><div class="container text-center">';
echo '<div class="p-5"><div class="container text-center">';
if(!empty($caption))
{
echo '<h1 class="display-4">'.$caption.'</h1>';
@ -180,7 +180,7 @@ if(!defined('e107_INIT'))
case 'splash':
echo '<div class="container justify-content-center text-center my-5" id="'.$mode.'">
<div class="row align-items-center">
<div class="row align-items-center">
<div class="card card-signin col-md-6 offset-md-3 " id="login-template"><div class="card-body">';
if(!empty($caption))

View File

@ -10,7 +10,7 @@
<plugin name='rss_menu' url='core' />
<plugin name='social' url='core' />
<plugin name='tinymce4' url='core' />
<plugin name='gsitemap' url='core' />
<plugin name='tagcloud' url='core' />
</plugins>
<keywords>
<word>bootstrap</word>
@ -26,7 +26,6 @@
<library name="animate.css" scope="front" />
</libraries>
<stylesheets>
<css file="style.css" name="Basic" thumbnail='preview_frontend.png' scope='front' />
<css file="https://cdnjs.cloudflare.com/ajax/libs/bootswatch/5.1.3/journal/bootstrap.min.css" name="Journal" thumbnail='images/journal.png' scope='front' exclude='bootstrap' />
<css file="https://cdnjs.cloudflare.com/ajax/libs/bootswatch/5.1.3/lumen/bootstrap.min.css" name="Lumen" thumbnail='images/lumen.png' scope='front' exclude='bootstrap' />
<css file="https://cdnjs.cloudflare.com/ajax/libs/bootswatch/5.1.3/lux/bootstrap.min.css" name="Lux" thumbnail='images/lux.png' scope='front' exclude='bootstrap' />
@ -34,6 +33,7 @@
<css file="https://cdnjs.cloudflare.com/ajax/libs/bootswatch/5.1.3/quartz/bootstrap.min.css" default="true" name="Quartz" thumbnail='images/quartz.png' scope='front' exclude='bootstrap' />
<css file="https://cdnjs.cloudflare.com/ajax/libs/bootswatch/5.1.3/slate/bootstrap.min.css" name="Slate" thumbnail='images/slate.png' scope='front' exclude='bootstrap' />
<css file="https://cdnjs.cloudflare.com/ajax/libs/bootswatch/5.1.3/superhero/bootstrap.min.css" name="Superhero" thumbnail='images/superhero.png' scope='front' exclude='bootstrap' />
<css file="style.css" name="Legacy" thumbnail='preview_frontend.png' scope='front' />
</stylesheets>
<screenshots>
<image>preview_frontend.png</image>