File: D:/web/vintagedoorknobs/inc-template-home - Copy (2).asp
<%
' (SS,14/8/14) Bootstrap version
' (SS,28/11/14) added call to sub CustomShowHolidayNotice
' (SS,2/3/15) improvement news section, to only show up to a certain a point to avoid getting too long. Added a link to More News.
' (SS,14/8/17) modified to add lazy loading feature see https://stackoverflow.com/questions/27675968/lazy-load-not-work-in-bootstrap-carousel
' src changed to data-lazy-load-src (except first image) and javascript added to get the image later
' see https://stackoverflow.com/questions/27675968/lazy-load-not-work-in-bootstrap-carousel
' (SS,21/11/17) carousel improvements, including breaking down to separate ShowHomeCarouselItem routine
' These changes were original made on 5/5/16 to CIRC, now applied here
' (SS,13/05/21) Added Trustpilot reviews via ShowRecentReviews 10, "TP"
' (SS,5/5/16) added following class to store temporary values used by this unit/module, currently just carousel count
Class TemplateHome
Private FCarouselCount
Private Sub Class_Initialize()
FCarouselCount = 0
End Sub
Private Sub Class_Terminate()
End Sub
Public Property Get IsFirstCarousel()
IsFirstCarousel = FCarouselCount = 1
End Property
Public Sub IncCarouselCount
FCarouselCount = FCarouselCount + 1
End Sub
End Class
Dim oTemplateHome
Sub ShowPage_home
Set oTemplateHome = New TemplateHome ' (SS,5/5/16)
' (SS,6/1/21) added lockdown / coronavirus / open message just before main banner
%>
<div class="row">
<div class="container-no" style="margin-top: -10px">
<div class="col-md-12">
<div>
<div class="alert alert-info text-center" style="margin-bottom: 10px">
Despite the latest lockdown, we are open and taking orders online as usual.
<br>Please see <a href="products.asp?page=coronavirus">Coronavirus Notice</a> for latest updates.
</div>
</div>
<div id="myCarousel" class="carousel slide" data-ride="carousel" data-interval="3000">
<div class="carousel-inner">
<%
ShowHomeCarouselStart
ShowHomeCarouselItem "victorian-door-knobs.jpg", "products.asp?cat=Vintage+Door+Knobs&subcat=Victorian+Door+Knobs", "Victorian door knobs", "View Victorian door knobs"
ShowHomeCarouselItem "vintage-ironmongery.jpg", "products.asp?cat=Vintage+Door+Hardware", "Vintage door hardware", "View vintage door hardware"
ShowHomeCarouselItem "beehive-door-knobs.jpg", "products.asp?cat=Vintage+Door+Knobs&subcat=Beehive+Door+Knobs", "Beehive door knobs", "View beehive door knobs"
ShowHomeCarouselItem "vintage-key-hole-covers.jpg", "products.asp?cat=Vintage+Keyhole+Covers", "Vintage keyhole covers", "View vintage keyhole covers"
ShowHomeCarouselItem "vintage-coat-hooks.jpg", "products.asp?cat=Vintage+Door+Hardware&subcat=Coat+Hooks", "Vintage coat hooks", "View vintage coat hooks"
ShowHomeCarouselItem "vintage-letter-plate-and-knockers.jpg", "products.asp?cat=Vintage+Door+Hardware&subcat=Letter+Plates+%26+Door+Knockers", "Vintage letter plate and knockers", "View letter plates and knockers"
ShowHomeCarouselItem "banner-radiators-4.jpg", "https://www.castironradiatorcentre.co.uk", "Cast iron radiators, valves & accessories", "Visit Cast Iron Radiator Centre"
ShowHomeCarouselItem "banner-yard1.jpg", "https://www.coventry-demolition.co.uk", "Reclaimed period & reproduction building materials", "Visit Coventry Demolition"
ShowHomeCarouselEnd
%>
</div>
<a class="left carousel-control" href="#myCarousel" role="button" data-slide="prev"><span class="glyphicon glyphicon-chevron-left"></span></a>
<a class="right carousel-control" href="#myCarousel" role="button" data-slide="next"><span class="glyphicon glyphicon-chevron-right"></span></a>
</div><!-- /.carousel -->
</div> <!-- col -->
</div> <!-- container -->
<div class="container">
<div class="row">
<div class="col-lg-6 col-md-6 col-sm-6 col-adjust-left">
<%=GetWebText("HOME")%>
</div>
<div class="col-lg-6 col-md-6 col-sm-6 col-adjust-right">
<div class="panel panel-default" style="margin-top: 10px; margin-bottom: 0px">
<div class="panel-heading"><h2>Why Choose Vintage Door Knob Centre?</h2></div>
<div class="panel-body" style="padding-top: 5px">
<ul class="usp2">
<li>Leading supplier of vintage door knobs</li>
<li>Exclusive traditional & antique designs</li>
<li>High quality products at trade prices</li>
<li>30 day return policy</li>
<li>Overnight courier shipping</li>
<li>Great customer reviews</li>
<li><strong>Up to 20% automatic discount on bulk orders</strong></li>
</ul>
</div>
</div>
</div>
</div>
</div>
<%CustomShowHolidayNotice "H", 0%>
<div class="row" style="margin-top:10px">
<div class="col-lg-12 col-md-12 col-sm-12">
<div class="container">
<%CustomShowDiscountMessage("H")%>
</div>
</div>
</div>
<%ShowHighlights%>
<div class="container">
<div class="row">
<div class="col-lg-6 col-md-6">
<div class="panel panel-default">
<div class="panel-heading"><h3>Latest Vintage Door Knob Centre News</h3></div>
<div class="panel-body">
<%
' (SS,2/3/15) added following to get the news before the <!--END OF LATEST NEWS--> point
' also added link to moew news
Dim LNews, LPos
LNews = GetWebText("News")
LPos = InStr(LNews, "<!--END OF LATEST NEWS-->")
If LPos > 0 Then
LNews = Mid(LNews, 1, LPos - 1)
End If
Response.Write LNews
%>
<div id="latest-news-footer">
<a href="<%=GetPageLink("news")%>">More News</a>
</div>
<div class="clear"></div>
</div>
</div>
</div>
<div class="col-lg-6 col-md-6">
<%If TrustpilotReviewsVisible Then%>
<div class="panel panel-default">
<div class="panel-heading"><h3>Latest Trustpilot Reviews</h3></div>
<div class="panel-body">
<% ShowRecentReviews 10, "TP" %>
</div>
</div>
<%End If%>
<div class="panel panel-default">
<div class="panel-heading"><h3>Latest Vintage Door Knob Centre Reviews</h3></div>
<div class="panel-body">
<%
' (SS,13/5/21) changed ShowRecentReviewsV2 to ShowRecentReviews 10, ""
ShowRecentReviews 10, "" %>
</div>
</div>
</div>
</div>
</div>
<%=GetWebText("HomeFooter")%>
</div> <!-- row -->
<%
' (SS,5/5/16) destroy the object created at the start
Set oTemplateHome = Nothing
End Sub
' (SS,5/5/16)
Sub ShowHomeCarouselStart
End Sub
' if empty then not used e.g. no caption or button show
Sub ShowHomeCarouselItem(AImageFile, AURL, AImageCaption, AButtonCaption)
Dim LActive, LGlyphArrow
oTemplateHome.IncCarouselCount
If oTemplateHome.IsFirstCarousel Then
LActive = "active "
Else
LActive = ""
End If
' (SS,16/6/17) replaced <i> with <span>
If Left(AURL, 7) = "http://" Or Left(AURL, 8) = "https://" Then
LGlyphArrow = " <span class=""glyphicon glyphicon-chevron-right""></span>"
Else
LGlyphArrow = ""
End If
' (SS,6/11/17) removed h3 tag from carousel-caption, because there's no h2 or h1 before it, i.e. not the ideal way to use a h3 tag
%>
<div class="item <%=LActive%>itp-carousel">
<a href="<%=AURL%>">
<img src="banner/<%=AImageFile%>" alt="<%=AImageCaption%>">
</a>
<div class="carousel-caption">
<%If AImageCaption <> "" Then%>
<a class="carousel-caption-text" href="<%=AURL%>">
<%=AImageCaption%>
</a>
<%End If%>
<%If AButtonCaption <> "" Then%>
<a class="btn btn-lg btn-primary btn-strong btn-carousel hidden-xs" href="<%=AURL%>" role="button"><%=AButtonCaption + LGlyphArrow%></a>
<%End If%>
</div>
</div>
<%
End Sub
Sub ShowHomeCarouselEnd
End Sub
%>