-->
`;
const embedded = createRawHtml(rawHtml);
embedded.appendChild(appendScript("https://platform.twitter.com/widgets.js"));
return embedded;
}
function processSingleContentElement(contentElement) {
switch (contentElement.displayType) {
case 'section': return contentElement.elements.map(it => processSingleContentElement(it));
case 'paragraph': return createSimpleTextElement(contentElement.text);
case 'header': return createSimpleTextElement(contentElement.text, 'h' + contentElement.level);
case 'image': return createImage(contentElement);
case 'twitter': return createTwitter(contentElement);
case 'youtube': return createYoutube(contentElement);
default: return createSimpleTextElement(JSON.stringify(contentElement));
}
}
function fillContentIntoElement(createdElement, htmlEl) {
try {
console.log(createdElement, htmlEl);
if (createdElement.length) {
createdElement.forEach(ch => htmlEl.appendChild(ch));
} else {
htmlEl.appendChild(createdElement);
}
} catch (e) {
console.error(e.message);
}
}
function fillContent(contentElementsList, htmlElements) {
const contentElements = Array.from(contentElementsList);
console.log(contentElements);
const lastElementIndex = htmlElements.length - 1;
htmlElements.forEach((htmlEl, index) => {
htmlEl.innerHTML = '';
if(contentElements.length > index) {
if(index === lastElementIndex) {
contentElements.slice(index).forEach(ce => fillContentIntoElement(processSingleContentElement(ce),htmlEl))
} else {
const createdElement = processSingleContentElement(contentElements[index]);
fillContentIntoElement(createdElement, htmlEl);
}
}
});
}
function createSlides(slides) {
const templateWrapper = document.getElementById('slide-template');
const template = templateWrapper.content.querySelector(".slide-template");
return slides.map((it, index) => {
const cloned = template.cloneNode(true);
const contentPlaceholders = cloned.querySelectorAll(".content-placeholder");
fillContent(it.elements, contentPlaceholders)
if (infiniteLayout) {
cloned.querySelectorAll(".adslot").forEach(slot => {
slot.id = slot.id + '_' + index;
});
}
return cloned;
});
}
var slides = [{"elements":[{"text":"Diabetes:\nTypes and How It Affects People","level":2,"displayType":"header"},{"elements":[{"text":"Diabetes\nis a complicated condition that affects millions of people throughout the\nworld. Diabetes is a metabolic condition in which high blood glucose levels\ncause heart disease, stroke, kidney failure, foot ulcers, and eye impairment.\nDiabetes prevalence rates are currently exceptionally high in several nations\nthroughout the world.","level":0,"displayType":"paragraph"},{"text":"Diabetes\nhas been classified into several types, including type 1, type 2, type 3,\nneonatal, and gestational.","level":0,"displayType":"paragraph"},{"text":"Type\n1 diabetes is an autoimmune illness, which means that your body fights itself.\nIn this situation, the insulin-producing cells in your pancreas are destroyed.\nType 1 diabetes affects up to 10% of diabetics. It is often diagnosed in\nchildren and young adults.","level":0,"displayType":"paragraph"},{"text":"Type\n2 diabetes occurs when your body either does not produce enough insulin or when\nyour cells do not respond adequately to insulin. This is the most prevalent\nkind of diabetes. Type 2 diabetes affects up to 95% of diabetics. It commonly\naffects persons in their forties and fifties.","level":0,"displayType":"paragraph"},{"text":"Prediabetes\nis the stage before Type 2 diabetes. Your blood glucose levels are greater than\nusual, but not high enough to be identified as having Type 2 diabetes.","level":0,"displayType":"paragraph"},{"text":"Gestational\ndiabetes occurs in certain pregnant women. Gestational diabetes normally\ndisappears after pregnancy. However, if you have gestational diabetes, you\nare more likely to acquire Type 2 diabetes later in life.","level":0,"displayType":"paragraph"},{"text":"The\nmajority of diabetic patients lead full lives. It does not have to be a\nhindrance. However, diabetes has an impact on your way of living, such as how\nyou eat and exercise. It also has an impact on your professional and personal\nlife.","level":0,"displayType":"paragraph"},{"text":"If\nyou have type 2 diabetes, you are most likely already working with a doctor and\na diabetic care team to keep your blood sugar levels in check. Medication,\nblood sugar monitoring, dietary changes, and other measures may be part of your\ntreatment plan. However, because type 2 diabetes is a progressive disease, the\ntreatment options that initially worked may no longer be as successful as they\nonce were.","level":0,"displayType":"paragraph"},{"text":"This\nimplies that persons with diabetes may find it increasingly difficult to manage\ntheir health over time and may need to take additional medicines as the disease\nadvances.","level":0,"displayType":"paragraph"},{"text":"That\nis when healthy living habits come into play. It is often feasible to prevent\ndiabetes from advancing by maintaining a healthy weight, eating nutritious food, and exercising on a regular basis. Here are a few lifestyle adjustments\nto consider.","level":0,"displayType":"paragraph"}],"displayType":"section"},{"imageUrl":"/static/5244c5ab-7a8b-4657-a35d-b7dbc83beb01.jpeg","caption":"Pexels","displayType":"image"}]},{"elements":[{"text":"1. Healthy\nEating","level":2,"displayType":"header"},{"elements":[{"text":"Because\nthere is no single \"diabetic diet\" that meets all needs, it is\ncritical to work directly with a nutritionist and doctor to customize your\ndiet. Making appropriate food selections and limiting portion size are two ways\nto focus on eating well. Select low-fat dairy and lean meats. Sugary and fatty\nmeals should be avoided. Remember that carbs are converted into sugar, so limit\nyour carbohydrate consumption.","level":0,"displayType":"paragraph"}],"displayType":"section"},{"imageUrl":"/static/d3a9ce10-bad7-4751-99e3-4f8eb5735664.jpeg","caption":"Pexels","displayType":"image"}]},{"elements":[{"text":"2. Quit\nSmoking","level":2,"displayType":"header"},{"elements":[{"text":"Diabetes\nincreases your risk of developing heart disease, eye disease, stroke, kidney\ndisease, blood vessel disease, nerve damage, and foot difficulties. If you\nsmoke, your chances of developing these issues become significantly greater.\nSmoking might also make it more difficult to exercise. Consult your doctor\nabout quitting methods.","level":0,"displayType":"paragraph"}],"displayType":"section"},{"imageUrl":"/static/2840618e-9bfc-48aa-b295-29f82c95816d.jpeg","caption":"Unsplash","displayType":"image"}]},{"elements":[{"text":"3. Regular\nExercise","level":2,"displayType":"header"},{"elements":[{"text":"Get\nat least 150 minutes of moderate activity every week, such as walking, riding,\nor swimming. This will help you in losing weight and keeping it off, as well as\nkeep your heart healthy. Distribute your workout across multiple days per\nweek. Avoid going more than two days without exercising. Add resistance\nworkouts to your program if you do not have any serious health issues that\nlimit your activity.","level":0,"displayType":"paragraph"}],"displayType":"section"},{"imageUrl":"/static/246d1e53-089f-4c4c-aad5-232921360bb0.jpeg","caption":"Pexels","displayType":"image"}]},{"elements":[{"text":"4. Regular\nCheckups","level":2,"displayType":"header"},{"elements":[{"text":"It's\neasy to live in denial or postpone dealing with your health after receiving a\ndiagnosis. However, the longer you wait, the more difficult it will be to get\nstarted. You should see your doctor at least twice a year. Diabetes increases\nyour chances of developing heart disease. So learn your cholesterol, blood\npressure, and average blood sugar. Every year, have a complete eye exam.\nConsult a foot doctor to rule out issues such as foot ulcers and nerve damage.","level":0,"displayType":"paragraph"}],"displayType":"section"},{"imageUrl":"/static/802d0d0a-e8aa-4387-b99c-bc3fd5474578.jpeg","caption":"Pexels","displayType":"image"}]},{"elements":[{"text":"5. Controlled\nDrinking","level":2,"displayType":"header"},{"elements":[{"text":"To\ncompensate for declining blood sugar levels, the liver generally releases\nstored sugar. However, if your liver is busy metabolizing alcohol, your blood\nsugar level may not receive the necessary boost from your liver. Alcohol can\ncause low blood sugar levels quickly after consumption and for up to 24 hours\nthereafter. So, if you decide to drink, don't go overboard.","level":0,"displayType":"paragraph"}],"displayType":"section"},{"imageUrl":"/static/5f7e2bca-028d-4268-b9aa-68ee7fc98820.jpeg","caption":"Pexels","displayType":"image"}]},{"elements":[{"text":"6. Managing\nStress","level":2,"displayType":"header"},{"elements":[{"text":"When\nyou're stressed, the chemicals your body creates in reaction to the stress may\ncause your blood sugar to rise. Furthermore, if you're under a lot of stress,\nit may be more difficult to stick to your typical diabetes care routine.\nIdentify the source of your stress. Find strategies to relax, such as deep\nbreathing, yoga, or relaxing pastimes.","level":0,"displayType":"paragraph"}],"displayType":"section"},{"imageUrl":"/static/00d66224-96c4-462f-8db2-b3690e6c4072.jpeg","caption":"Unsplash","displayType":"image"}]},{"elements":[{"text":"7. Make\na Sleep Routine","level":2,"displayType":"header"},{"elements":[{"text":"Your\nsleeping patterns can have an impact on many aspects of your health, including\nyour weight, immune system, and even how well your brain functions. However, it\nalso plays an important function in blood sugar regulation (or glucose). Try to\nobtain at least 7 hours of sleep each night to keep your blood sugar in check.\nIf you work at night or on rotating shifts, try to keep regular eating and\nsleep schedules, even on your days off, if possible.","level":0,"displayType":"paragraph"}],"displayType":"section"},{"imageUrl":"/static/89f79142-bd7a-40a7-8db4-1e5398ed06cf.jpeg","caption":"Pexels","displayType":"image"}]}];
var slide_index = parseInt(0);
var slide_json = createSlides(slides);
var initial_slide = slide_index;
var initial_url = location.pathname + location.search;
var base_url = '/living-with-diabetes-what-changes-you-need-make-in-your-lifestyle';
var next_gallery = '/spoiled-pets';
var first_load = true;
var has_scrolled = false;
var title = "Living With Diabetes: What Changes You Need Make In Your Lifestyle";
var path = base_url
var utm_campaign, utm_subid, utm_source, utm_content, utm_term = 'n/a';
// try {
// var url = new URL(window.location.href);
// utm_campaign = encodeURIComponent(url.searchParams.get("utm_campaign"));
// utm_source = encodeURIComponent(url.searchParams.get("utm_source"));
// utm_content = encodeURIComponent(url.searchParams.get("utm_content"));
// utm_term = encodeURIComponent(url.searchParams.get("utm_term"));
// utm_medium = encodeURIComponent(url.searchParams.get("utm_medium"));
// if (utm_content && utm_campaign){
// var googletag = googletag || {};
// googletag.cmd = googletag.cmd || [];
// googletag.cmd.push(function() {
// googletag.pubads().setTargeting("utm_subid", utm_term);
// googletag.pubads().setTargeting("utm_subid_c", utm_campaign);
// });
// }
// } catch (e) {
// }