Professional IT & Network Device Disposal Project
We've worked with Ace IT Relocation for many years and have consistently received an exceptionally professional service…
/* ===== Ultra-compact black review card ===== */
#tpMini{ width:100%; max-width: 360px; }
#tpMini .tp-mini-card{
background: rgba(31,31,31,1);
border: 3px solid #00A3FF;
border-radius: 10px;
padding: 8px 10px 8px;
box-shadow: 0 12px 30px rgba(31,31,31,0.92);
box-sizing: border-box;
}
/* Top row */
#tpMini .tp-mini-top{
display:flex;
align-items:flex-start;
gap:8px;
margin: 0;
}
/* Avatar */
#tpMini .tp-mini-avatar{
width:26px;
height:26px;
border-radius:50%;
display:flex;
align-items:center;
justify-content:center;
font-weight:700;
font-size:11px;
background: rgba(255,255,255,0.12);
color:#fff;
flex:0 0 auto;
}
/* Meta */
#tpMini .tp-mini-meta{ flex:1 1 auto; min-width:0; }
#tpMini .tp-mini-name{
font-weight:700;
font-size:12px;
line-height:1.1;
margin: 0;
}
#tpMini .tp-mini-sub{
font-size:10px;
opacity:.75;
margin-top:0;
line-height:1;
}
/* Right column (logo only now) */
#tpMini .tp-mini-right{
flex:0 0 auto;
display:flex;
align-items:flex-start;
justify-content:flex-end;
line-height:0;
}
/* Logo link */
#tpMini .tp-top-logo-link{
display:block;
width: 120px;
height: 20px;
line-height:0;
text-decoration:none;
}
#tpMini .tp-top-logo-img{
width:100%;
height:100%;
object-fit: contain;
object-position: right top;
display:block;
}
/* Stars row with arrows on the right */
#tpMini .tp-rating-row{
margin-top:0; /* keep it tight */
display:flex;
align-items:center;
justify-content:space-between; /* stars left, arrows right */
gap:8px;
}
/* Trustpilot-style rating blocks */
#tpMini .tp-rating{
display:flex;
gap:3px;
align-items:center;
}
#tpMini .tp-starbox{
width:14px;
height:14px;
border-radius:2px;
background:#00B67A;
display:flex;
align-items:center;
justify-content:center;
}
#tpMini .tp-starshape{
font-size:11px;
line-height:1;
color:#fff;
transform: translateY(-0.5px);
}
#tpMini .tp-starbox.is-empty{
background: rgba(255,255,255,0.18);
}
#tpMini .tp-starbox.is-empty .tp-starshape{
color: rgba(255,255,255,0.45);
}
/* Arrows */
#tpMini .tp-mini-top-nav{
display:flex;
gap:5px;
align-items:center; /* keeps them vertically centred */
}
#tpMini .tp-btn{
width:26px;
height:20px;
border-radius:9px;
border: 0 !important;
background: rgba(0,0,0,0.45);
color:#fff;
cursor:pointer;
display:flex;
align-items:center;
justify-content:center;
padding:0;
line-height:1;
font-size:16px;
}
/* Title */
#tpMini .tp-mini-title{
margin-top:6px;
font-weight:700;
font-size:11px;
line-height:1.2;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
/* Body: EXACTLY 2 lines preview (no scroll) + same grey as sub */
#tpMini .tp-mini-body{
margin-top:4px;
font-size:11px;
line-height:1.25;
opacity:.75; /* <<< matches GB • 2 reviews */
overflow: hidden !important;
display: -webkit-box !important;
-webkit-box-orient: vertical !important;
-webkit-line-clamp: 2 !important;
line-clamp: 2 !important;
max-height: calc(2 * 1.25em) !important;
padding-right: 0 !important;
}
/* Ensure white text everywhere */
#tpMini, #tpMini *{ color:#fff; }
(function(){
function initTPMini(){
const root = document.getElementById("tpMini");
if (!root) return;
const reviews = [
{
initials: "DL",
name: "David Little",
sub: "GB • 2 reviews",
stars: 5,
title: "Professional IT & Network Device Disposal Project",
body: "We've worked with Ace IT Relocation for many years and have consistently received an exceptionally professional service. Their team is organised, careful and reliable…"
},
{
initials: "T",
name: "Taylor",
sub: "GB • 1 review",
stars: 5,
title: "Fantastic experience from start to finish",
body: "Clear communication, punctual, secure handling of kit and a smooth move overall. Would absolutely recommend…"
},
{
initials: "J",
name: "Josh",
sub: "GB • 1 review",
stars: 5,
title: "Super professional",
body: "Ace IT Relocation were thorough, efficient and clearly know data centre environments. Great team…"
}
];
const elAvatar = root.querySelector("#tpAvatar");
const elName = root.querySelector("#tpName");
const elSub = root.querySelector("#tpSub");
const elTitle = root.querySelector("#tpTitle");
const elBody = root.querySelector("#tpBody");
const elStars = root.querySelector("#tpStars");
const btnPrev = root.querySelector("#tpPrev");
const btnNext = root.querySelector("#tpNext");
const card = root.querySelector(".tp-mini-card");
if (!elAvatar || !elName || !elSub || !elTitle || !elBody || !elStars || !btnPrev || !btnNext) return;
let i = 0;
let timer = null;
const AUTO_MS = 8000;
function setStars(n){
const boxes = elStars.querySelectorAll(".tp-starbox");
boxes.forEach((b, idx) => (idx < n) ? b.classList.remove("is-empty") : b.classList.add("is-empty"));
elStars.setAttribute("aria-label", `${n} out of 5 stars`);
elStars.dataset.stars = n;
}
function render(idx){
const r = reviews[idx];
elAvatar.textContent = r.initials;
elName.textContent = r.name;
elSub.textContent = r.sub;
elTitle.textContent = r.title;
elBody.textContent = r.body;
setStars(r.stars);
}
function next(){
i = (i + 1) % reviews.length;
render(i);
}
function prev(){
i = (i - 1 + reviews.length) % reviews.length;
render(i);
}
function startAuto(){
stopAuto();
timer = setInterval(next, AUTO_MS);
}
function stopAuto(){
if (timer) clearInterval(timer);
timer = null;
}
function resetAuto(){
startAuto();
}
btnPrev.addEventListener("click", function(){ prev(); resetAuto(); });
btnNext.addEventListener("click", function(){ next(); resetAuto(); });
if (card){
card.addEventListener("mouseenter", stopAuto);
card.addEventListener("mouseleave", startAuto);
}
render(i);
startAuto();
}
if (document.readyState === "loading") {
document.addEventListener("DOMContentLoaded", initTPMini);
} else {
initTPMini();
}
})();