HUSKELAPP FOR HTML-KODER
På denne siden finner man html-koder som er brukt til denne nettsiden:
HERO-BANNER-TEKST
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;500;600&display=swap" rel="stylesheet">
<div class="hero-overlay-text">
<h1>#BESTSAMMEN</h1>
<p>BEVISST - ENGASJERT - STOLT - TRYGG</p>
</div>
<style>
.hero-overlay-text {
position: absolute;
top: 70%; /* tydelig lengre ned */
left: 2%;
transform: translateY(-50%);
z-index: 10;
color: white;
max-width: 90%;
font-family: 'Inter', sans-serif;
}
/* Overskrift */
.hero-overlay-text h1 {
margin: 0;
font-weight: 600; /* mindre fet */
line-height: 0.95;
letter-spacing: -0.01em;
text-transform: uppercase;
font-size: clamp(2.2rem, 6vw, 5.5rem);
}
/* Undertekst */
.hero-overlay-text p {
margin: 10px 0 0 0;
font-weight: 400; /* mye lettere */
letter-spacing: 0.06em;
text-transform: uppercase;
font-size: clamp(0.9rem, 1.6vw, 1.8rem);
}
/* Tablet */
@media (max-width: 1024px) {
.hero-overlay-text {
top: 65%;
}
}
/* Mobil */
@media (max-width: 768px) {
.hero-overlay-text {
top: 58%; /* VIKTIG: høyere opp igjen */
left: 16px;
right: 16px;
transform: translateY(-50%);
}
.hero-overlay-text h1 {
font-size: clamp(1.8rem, 8vw, 3rem);
}
.hero-overlay-text p {
font-size: clamp(0.75rem, 3vw, 1rem);
}
}
/* Liten mobil */
@media (max-width: 480px) {
.hero-overlay-text {
top: 55%; /* enda litt opp */
}
}
</style>
Hurtigmeny-knappene
<style>
.tiller-button-strip {
width: 100%;
background: transparent !important;
padding: 20px 0;
}
.tiller-button-grid {
display: grid;
grid-template-columns: repeat(6, 1fr);
gap: 20px;
width: 100%;
margin: 0 auto;
background: transparent !important;
box-sizing: border-box;
}
.tiller-button-card {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
text-decoration: none;
background: #ffffff !important;
border: none;
color: #000000;
padding: 32px 16px;
min-height: 180px;
width: 100%;
box-sizing: border-box;
transition: all 0.25s ease;
border-radius: 24px;
}
.tiller-button-card:hover {
background: #094889 !important;
transform: translateY(-2px);
}
.tiller-button-icon {
width: 72px;
height: 72px;
margin-bottom: 16px;
color: #094889;
flex-shrink: 0;
transition: color 0.25s ease;
}
.tiller-button-card:hover .tiller-button-icon {
color: #ffffff;
}
.tiller-button-text {
font-size: 16px;
font-weight: 600;
line-height: 1.3;
text-align: center;
color: #000000;
}
@media (max-width: 1024px) {
.tiller-button-strip {
padding: 14px 0;
}
.tiller-button-grid {
grid-template-columns: repeat(3, 1fr);
gap: 8px;
}
.tiller-button-card {
min-height: 118px;
padding: 10px 10px;
border-radius: 18px;
}
.tiller-button-icon {
width: 46px;
height: 46px;
margin-bottom: 8px;
}
.tiller-button-text {
font-size: 14px;
}
}
@media (max-width: 640px) {
.tiller-button-strip {
padding: 4px 0;
}
.tiller-button-grid {
grid-template-columns: repeat(3, 1fr);
gap: 4px;
}
.tiller-button-card {
min-height: 82px;
padding: 6px 6px;
border-radius: 13px;
}
.tiller-button-icon {
width: 34px;
height: 34px;
margin-bottom: 5px;
}
.tiller-button-text {
font-size: 12px;
line-height: 1.15;
}
}
</style>
<div class="tiller-button-strip">
<div class="tiller-button-grid">
<a class="tiller-button-card" href="https://app.rubic.no/Account/Signup?organizationID=11649#/form/profile">
<svg class="tiller-button-icon" viewBox="0 0 24 24" fill="currentColor">
<path d="M3 5h18a1 1 0 0 1 .8 1.6l-9 6.75a1 1 0 0 1-1.2 0l-9-6.75A1 1 0 0 1 3 5zm18 4.25-8.4 6.3a2.5 2.5 0 0 1-3 0L3 9.25V18a1 1 0 0 0 1 1h16a1 1 0 0 0 1-1V9.25z"/>
</svg>
<div class="tiller-button-text">Innmelding</div>
</a>
<a class="tiller-button-card" href="https://www.tillerfotball.no/next/p/100820/banekalender">
<svg class="tiller-button-icon" viewBox="0 0 24 24" fill="currentColor">
<path d="M7 2a1 1 0 0 1 1 1v1h8V3a1 1 0 1 1 2 0v1h1a2 2 0 0 1 2 2v13a3 3 0 0 1-3 3H6a3 3 0 0 1-3-3V6a2 2 0 0 1 2-2h1V3a1 1 0 0 1 1-1zm12 8H5v9a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-9zM6 6a1 1 0 0 0-1 1v1h14V7a1 1 0 0 0-1-1H6z"/>
</svg>
<div class="tiller-button-text">Banekalender</div>
</a>
<a class="tiller-button-card" href="https://www.tillerfotball.no/next/p/100852/for-foreldre">
<svg class="tiller-button-icon" viewBox="0 0 24 24" fill="currentColor">
<path d="M12 12a5 5 0 1 0-5-5 5 5 0 0 0 5 5zm0 2c-4.42 0-8 2.24-8 5v1h16v-1c0-2.76-3.58-5-8-5z"/>
</svg>
<div class="tiller-button-text">For foreldre</div>
</a>
<a class="tiller-button-card" href="https://www.tillerfotball.no/next/p/100853/for-trenere">
<svg class="tiller-button-icon" viewBox="0 0 24 24" fill="currentColor">
<path d="M12 2 4.5 6v6c0 5 3.4 9.74 7.5 10 4.1-.26 7.5-5 7.5-10V6L12 2zm0 2.18L17.5 7 12 9.82 6.5 7 12 4.18zm-5.5 4.5 4.5 2.3v5.85C8.34 15.92 6.5 12.73 6.5 9.68zm6.5 8.15v-5.85l4.5-2.3c0 3.05-1.84 6.24-4.5 7.15z"/>
</svg>
<div class="tiller-button-text">For trenere</div>
</a>
<a class="tiller-button-card" href="https://www.tillerfotball.no/p/46960/sportsplan">
<svg class="tiller-button-icon" viewBox="0 0 24 24" fill="currentColor">
<path d="M3 6a2 2 0 0 1 2-2h4l2 2h8a2 2 0 0 1 2 2v1H3V6zm0 4h18v8a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-8z"/>
</svg>
<div class="tiller-button-text">Sportsplan</div>
</a>
<a class="tiller-button-card" href="https://www.tillerfotball.no/next/p/100825/ofte-stilte-sporsmal">
<svg class="tiller-button-icon" viewBox="0 0 24 24" fill="currentColor">
<path d="M12 2a10 10 0 1 0 10 10A10 10 0 0 0 12 2zm0 17a1.25 1.25 0 1 1 1.25-1.25A1.25 1.25 0 0 1 12 19zm1.35-6.6-.63.42A1.5 1.5 0 0 0 12 14h-1.5v-.38a3 3 0 0 1 1.34-2.5l.87-.58a1.77 1.77 0 0 0 .79-1.45A1.9 1.9 0 0 0 11.56 7a2 2 0 0 0-2 1.7H8.06A3.5 3.5 0 0 1 11.56 5.5 3.4 3.4 0 0 1 15 9a3.24 3.24 0 0 1-1.65 2.4z"/>
</svg>
<div class="tiller-button-text">FAQ</div>
</a>
</div>
</div>
Tittel til artikkelgrid
<h2 style="font-family:inherit; font-size:22px; font-weight:600; margin:0 0 4px 0; text-align:left;">
Siste nyheter
</h2>
Hovedside - Rubic dagsblikk kl.15-22
<style>
@media (max-width: 768px) {
.tobb-section {
display: none;
}
}
</style>
<div class="tobb-section" style="width:100%; max-width:100%;">
<h2 style="font-family:inherit; font-size:22px; font-weight:600; margin:0 0 10px 0; text-align:left;">
TOBB Arena i dag
</h2>
<div style="width:100%; height:600px; overflow:hidden;">
<iframe
width="100%"
height="1500px"
style="border:none; margin-top:-620px;"
loading="lazy">
</iframe>
</div>
</div>
Spotify - sang - preview
<style>
.spotify-player {
width: 100%;
max-width: 100%;
overflow: hidden;
}
.spotify-player iframe {
width: 100%;
height: 152px;
border: 0;
border-radius: 12px;
display: block;
}
@media (max-width: 768px) {
.spotify-player iframe {
height: 80px;
}
}
</style>
<div class="spotify-player">
<iframe
src="https://open.spotify.com/embed/track/3dRWqZekIIRaF3GXFpJv33?utm_source=generator"
allow="autoplay; clipboard-write; encrypted-media; fullscreen; picture-in-picture"
loading="lazy">
</iframe>
</div>
Sponsor-footer
<style>
.footer-sponsor-logos {
width: 100%;
max-width: 100%;
}
.footer-sponsor-grid {
display: grid;
grid-template-columns: repeat(4, 1fr);
gap: 14px;
width: 100%;
align-items: stretch;
}
.footer-sponsor-logo {
display: flex;
align-items: center;
justify-content: center;
height: 90px;
padding: 12px;
box-sizing: border-box;
background: #fff;
border-radius: 8px;
text-decoration: none;
}
.footer-sponsor-logo img {
max-width: 100%;
max-height: 60px;
width: auto;
height: auto;
display: block;
object-fit: contain;
}
@media (max-width: 768px) {
.footer-sponsor-grid {
grid-template-columns: repeat(4, 1fr);
gap: 6px;
}
.footer-sponsor-logo {
height: 54px;
padding: 5px;
border-radius: 6px;
}
.footer-sponsor-logo img {
max-height: 34px;
}
}
</style>
<div class="footer-sponsor-logos">
<div class="footer-sponsor-grid">
<a class="footer-sponsor-logo" href="https://www.tillerfotball.no/next/p/41989/samarbeidspartnere" aria-label="Melhusbanken">
<img src="https://at.cutpaste.no/next/f/4RZ7TQ7q1pBSxTD" alt="Melhusbanken">
</a>
<a class="footer-sponsor-logo" href="https://www.tillerfotball.no/next/p/41989/samarbeidspartnere" aria-label="Obs">
<img src="https://at.cutpaste.no/next/f/0gScM6ZFS3E8wec" alt="Obs">
</a>
<a class="footer-sponsor-logo" href="https://www.tillerfotball.no/next/p/41989/samarbeidspartnere" aria-label="Anton Sport">
<img src="https://at.cutpaste.no/next/f/HXmuvLN1xbnFQ93" alt="Anton Sport">
</a>
<a class="footer-sponsor-logo" href="https://www.tillerfotball.no/next/p/41989/samarbeidspartnere" aria-label="Hummel">
<img src="https://at.cutpaste.no/next/f/m2Xhc4G5s4hjIaM" alt="Hummel">
</a>
</div>
</div>
SoMe-ikoner-knapper
<style> .footer-socials { width: 100%; max-width: 100%; margin-top: 10px; } .footer-socials-grid { display: flex; justify-content: center; gap: 16px; align-items: center; } .footer-social-icon { display: flex; align-items: center; justify-content: center; width: 80px; height: 80px; padding: 10px; box-sizing: border-box; background: #fff; border-radius: 10px; text-decoration: none; } .footer-social-icon img { max-width: 100%; max-height: 52px; width: auto; height: auto; display: block; object-fit: contain; } @media (max-width: 768px) { .footer-social-icon { width: 64px; height: 64px; padding: 8px; } .footer-social-icon img { max-height: 42px; } .footer-socials-grid { gap: 12px; } } </style> <div class="footer-socials"> <div class="footer-socials-grid"> <a class="footer-social-icon" href="https://www.facebook.com/TillerFotball/" target="_blank" aria-label="Facebook"> <img src="https://at.cutpaste.no/next/f/Q71fmWTwmGOwZqX" alt="Facebook"> </a> <a class="footer-social-icon" href="https://www.instagram.com/tillerfotball1916" target="_blank" aria-label="Instagram"> <img src="https://at.cutpaste.no/next/f/EqKX3gQi1yzIwhF" alt="Instagram"> </a> </div> </div>
Kommende a-lagskamper skrivebord + mobil
<div class="tiller-kamper">
<div class="kamp-liste">Laster kamper...</div>
</div>
<style>
.tiller-kamper {
font-family: Arial, sans-serif;
max-width: 520px;
margin: 0 auto;
}
.kamp {
padding: 14px 0;
border-bottom: 1px solid #ddd;
text-align: center;
}
.dato {
font-size: 14px;
color: #555;
margin-bottom: 6px;
}
.lag {
font-size: 20px;
font-weight: bold;
margin-bottom: 6px;
}
.tid,
.bane {
font-size: 14px;
color: #333;
}
</style>
<script>
(function () {
var bokser = document.querySelectorAll(".tiller-kamper");
for (var b = 0; b < bokser.length; b++) {
start(bokser[b]);
}
function start(container) {
var liste = container.querySelector(".kamp-liste");
var kilder = [
{ url: "https://www.fotball.no/fotballdata/lag/hjem/?fiksId=124", type: "Herrer" },
{ url: "https://www.fotball.no/fotballdata/lag/hjem/?fiksId=187935", type: "Kvinner" }
];
var alleKamper = [];
var ferdig = 0;
for (var i = 0; i < kilder.length; i++) {
hent(kilder[i]);
}
function hent(kilde) {
var xhr = new XMLHttpRequest();
xhr.open("GET", kilde.url, true);
xhr.onreadystatechange = function () {
if (xhr.readyState === 4) {
ferdig++;
if (xhr.status >= 200 && xhr.status < 300) {
parse(xhr.responseText, kilde.type);
}
if (ferdig === kilder.length) {
vis();
}
}
};
xhr.send();
}
function parse(html, type) {
var doc = new DOMParser().parseFromString(html, "text/html");
var rader = doc.getElementsByTagName("tr");
for (var i = 0; i < rader.length; i++) {
var td = rader[i].getElementsByTagName("td");
if (td.length < 7) continue;
alleKamper.push({
dato: td[0].textContent.trim(),
tid: td[2].textContent.trim(),
hjem: td[3].textContent.trim(),
resultat: td[4].textContent.trim(),
borte: td[5].textContent.trim(),
bane: td[6].textContent.trim(),
datoObj: lagDato(td[0].textContent, td[2].textContent),
type: type
});
}
}
function vis() {
var iDag = new Date();
iDag.setHours(0, 0, 0, 0);
var kamper = alleKamper.filter(function (k) {
return k.datoObj && k.datoObj >= iDag && k.resultat === "-";
});
kamper.sort(function (a, b) {
return a.datoObj - b.datoObj;
});
// 🔥 Her bestemmes mobil vs desktop
var antall = window.innerWidth <= 600 ? 2 : 6;
kamper = kamper.slice(0, antall);
if (!kamper.length) {
liste.innerHTML = "Fant ingen kommende kamper.";
return;
}
var html = "";
for (var i = 0; i < kamper.length; i++) {
var k = kamper[i];
html += '<div class="kamp">';
html += '<div class="dato">' + format(k.datoObj) + '</div>';
html += '<div class="lag">' + navn(k.hjem, k.type) + ' vs ' + navn(k.borte, k.type) + '</div>';
html += '<div class="tid">Kl. ' + k.tid + '</div>';
html += '<div class="bane">' + k.bane + '</div>';
html += '</div>';
}
liste.innerHTML = html;
}
}
function navn(lag, type) {
return lag.toLowerCase().indexOf("tiller") !== -1 ? lag + " " + type : lag;
}
function lagDato(dato, tid) {
var d = dato.split(".");
var t = (tid || "00:00").split(":");
var date = new Date(d[2], d[1] - 1, d[0], t[0], t[1]);
return isNaN(date.getTime()) ? null : date;
}
function format(d) {
return d.toLocaleDateString("nb-NO", {
weekday: "long",
day: "2-digit",
month: "long",
year: "numeric"
});
}
})();
</script>