Fyll inn telefonnummer eller e-post, så varsler vi mottaker for deg. Fyller du inn begge – så sender vi på begge.
Del via gavelenke
Hvis du ikke oppgir mottakerens telefonnummer eller e-postadresse, vil du motta en gavelenke som du kan dele via Slack, Teams, eller din foretrukne plattform.
Fysisk overlevering
Gavelenken kan lastes ned og skrives ut for personlig overlevering. Mottakeren skanner en QR-kode for å åpne gavekortet.
Kom i gang med Glede
Gi gavekortet som kan brukes overalt — i butikk og på nett!
Privacy is important to us, so you have the option of disabling certain types of storage that may not be necessary for the basic functioning of the website. Blocking categories may impact your experience on the website. More information
Oops! Something went wrong while submitting the form.
(function () {
const DEBUG = false;
const log = (...a) => DEBUG && console.log('[weglot-ui]', ...a);
const normalize = (code) => {
if (!code) return '';
code = String(code).toLowerCase();
if (code.includes('-')) code = code.split('-')[0]; // en-US -> en
if (code === 'nb') code = 'no'; // Bokmål -> 'no'
if (code === 'se') code = 'sv'; // common slip
return code;
};
// We cache a template per language so we can rebuild the list
let TEMPLATES = { inner: {}, outer: {} };
function cacheTemplates(wrapper) {
// Grab any [lang] blocks (from toggle OR list) and store inner/outer
wrapper.querySelectorAll('[lang]').forEach(el => {
const lang = normalize(el.getAttribute('lang'));
if (!lang) return;
if (!TEMPLATES.inner[lang]) TEMPLATES.inner[lang] = el.innerHTML;
if (!TEMPLATES.outer[lang]) TEMPLATES.outer[lang] = el.outerHTML;
});
log('cached templates', TEMPLATES);
}
function updateSwitcher(currentLang) {
currentLang = normalize(currentLang);
const wrappers = document.querySelectorAll('.wg-element-wrapper.sw6');
if (wrappers.length === 0) { log('no wrappers'); return; }
else {
wrappers.forEach(wrapper => {
const toggle = wrapper.querySelector('.wg-dropdown-toggle');
const list = wrapper.querySelector('.wg-dd-1-list');
if (!toggle || !list) { log('missing toggle/list'); return; }
// Ensure templates are cached (first run on this page load)
if (!TEMPLATES.inner.no || !TEMPLATES.inner.sv || !TEMPLATES.inner.en) {
cacheTemplates(wrapper);
}
// If any template still missing, bail (structure not as expected)
if (!TEMPLATES.inner.no || !TEMPLATES.inner.sv || !TEMPLATES.inner.en) {
log('incomplete templates'); return;
}
// 1) Set TOGGLE visual (attribute + optional state class + content)
toggle.setAttribute('lang', currentLang);
toggle.classList.remove('is-no','is-sv','is-en');
toggle.classList.add(`is-${currentLang}`);
toggle.innerHTML = TEMPLATES.inner[currentLang];
// 2) Rebuild LIST to contain ONLY the two other languages (fresh each time)
const ALL = ['no','sv','en'];
const others = ALL.filter(l => l !== currentLang);
// Build a clean list using the captured OUTER html so structure/classes match
const htmlA = TEMPLATES.outer[others[0]];
const htmlB = TEMPLATES.outer[others[1]];
// Clear and insert exactly two items
list.innerHTML = '';
// Insert via range to keep outerHTML intact
const r1 = document.createRange();
r1.selectNode(list);
list.appendChild(r1.createContextualFragment(htmlA));
const r2 = document.createRange();
r2.selectNode(list);
list.appendChild(r2.createContextualFragment(htmlB));
// Optional: normalize classes on list items too
list.querySelectorAll('[lang]').forEach(el => {
const l = normalize(el.getAttribute('lang'));
el.classList.remove('is-no','is-sv','is-en');
el.classList.add(`is-${l}`);
});
log('updated → current:', currentLang, 'others:', others);
}
)
}
}
// Event delegation (survives DOM swaps)
document.addEventListener('click', function (e) {
const link = e.target.closest('.wg-element-wrapper.sw6 [lang]');
if (!link) return;
e.preventDefault();
const lang = normalize(link.getAttribute('lang'));
// Trigger Weglot switch (subdomain setups will reload; path setups will not)
document.cookie = "glede_locale=" + lang + "; path=/; domain=.glede.app; max-age=31536000";
Weglot.switchTo(lang);
// Do NOT call update here for subdomain setups; page will reload anyway.
});
// Run AFTER Weglot has rendered (important on subdomain reload)
function runAfterWeglotReady() {
const run = () => {
const lang = normalize(Weglot.getCurrentLang());
// Wait one frame to let Weglot paint its switcher nodes
requestAnimationFrame(() => updateSwitcher(lang));
};
Weglot.on('initialized', run);
// If already initialized (script included late), run immediately
if (Weglot.getCurrentLang && Weglot.getCurrentLang()) run();
// For path-based projects (no reload), update visuals after change
Weglot.on('languageChanged', (newLang) => {
updateSwitcher(newLang)
});
}
// Boot when DOM is ready
if (document.readyState === 'loading') {
document.addEventListener('DOMContentLoaded', runAfterWeglotReady);
} else {
runAfterWeglotReady();
}
})();