svelte examples app
Example 1: svelte website example
<script>
export let aboutData = {};
const { HEADING, TITLE, IMAGE_URL, WHY_CHOOSE_US_LIST } = aboutData;
</script>
<section id="about-us" class="section grey-bgcolor">
<div class="container">
<h2 class="title text-center">{HEADING}</h2>
<div class="row section-body">
<div class="col-md-6">
<h3 class="about-title">{TITLE}</h3>
<ul>
{#each WHY_CHOOSE_US_LIST as list}
<li>{list}</li>
{/each}
</ul>
</div>
<div class="col-md-6">
<img src={IMAGE_URL} alt="" class="img-fluid" />
</div>
</div>
</div>
</section>
<style>
.about-title {
margin-top: 8%;
margin-bottom: 20px;
}
section ul li {
margin: 10px 0;
}
section ul {
padding-left: 23px;
}
</style>
Example 2: svelte website example
<script>
export let testimonialData = {};
const { HEADING, TESTIMONIAL_LIST } = testimonialData;
</script>
<section id="testimonials" class="section">
<div class="container">
<h2 class="title text-center">{HEADING}</h2>
<div class="row offset-1 section-body">
{#each TESTIMONIAL_LIST as list}
<div class="col-md-5 testimonial">
<p>{list.DESCRIPTION}</p>
<img src={list.IMAGE_URL} alt="" />
<p class="user-details">
<b>{list.NAME}</b>
<br />
{list.DESIGNATION}
</p>
</div>
{/each}
</div>
</div>
</section>
<style>
.testimonial {
border-left: 4px solid #0072ff80;
margin-top: 10px;
margin-bottom: 10px;
}
.testimonial img {
height: 60px;
width: 60px;
border-radius: 50%;
margin: 0 10px;
}
.user-details {
display: inline-block;
font-size: 12px;
}
</style>