|
|
|
CATEGORIES = { |
|
"AFFORDABLE HOUSING AND HOMELESSNESS": """ |
|
- National Low Income Housing Coalition: [Visit Site](https://nlihc.org) |
|
- National Alliance to End Homelessness: [Visit Site](https://endhomelessness.org) |
|
- National Coalition for the Homeless: [Visit Site](https://nationalhomeless.org) |
|
- Department of Housing and Urban Development: [Visit Site](https://hud.gov) |
|
""", |
|
"AGING": """ |
|
- Administration for Community Living Data and Research: [Visit Site](https://acl.gov/aging-and-disability-in-america/data-and-research) |
|
""", |
|
"ARTS": """ |
|
- The Research Center for Arts and Culture: [Visit Site](https://artsandcultureresearch.org) |
|
- Americans for the Arts: [Visit Site](https://americansforthearts.org) |
|
""", |
|
"CHILDREN AND POVERTY": """ |
|
- National Center for Children in Poverty: [Visit Site](https://nccp.org) |
|
- Children’s Defense Fund: [Visit Site](https://childrensdefense.org) |
|
- Save the Children: [Visit Site](https://savethechildren.org) |
|
""", |
|
"EDUCATION": """ |
|
- National Center for Education Statistics: [Visit Site](https://nces.ed.gov) |
|
""", |
|
"ENERGY ASSISTANCE": """ |
|
- Low Income Home Energy Assistance Program: [Visit Site](https://liheapch.acf.hhs.gov) |
|
""", |
|
"ENVIRONMENT": """ |
|
- Stanford Geospacial Center (GIS data online): [Visit Site](https://library.stanford.edu/libraries/stanford-geospatial-center) |
|
- Environmental Protection Agency: [Visit Site](https://epa.gov) |
|
""", |
|
"HEALTH": """ |
|
- Center for Disease Control and Prevention: [Visit Site](https://cdc.gov) |
|
- Trust for America’s Health – States in Detail: [Visit Site](https://www.tfah.org/states/) |
|
""", |
|
"HUNGER": """ |
|
- Action Against Hunger: [Visit Site](https://actionagainsthunger.org/the-hunger-crisis/world-hunger-facts) |
|
- Bread for the World: [Visit Site](https://bread.org) |
|
""", |
|
"INTERNATIONAL": """ |
|
- United Nations Statistics Division: [Visit Site](https://unstats.un.org/UNSDWebsite) |
|
""", |
|
"LIVING WAGE": """ |
|
- Economic Policy Institute: [Visit Site](https://epi.org) |
|
- Global Living Wage Coalition: [Visit Site](https://www.globallivingwage.org) |
|
- Bureau of Labor Statistics: [Visit Site](https://bls.gov) |
|
""", |
|
"POVERTY": """ |
|
- U.S. Department of Health and Human Services Poverty Guidelines: [Visit Site](https://aspe.hhs.gov/poverty) |
|
- Center on Poverty and Community Development: [Visit Site](https://case.edu/socialwork/povertycenter) |
|
- National Poverty Center: [Visit Site](https://fordschool.umich.edu/research-centers-departments/national-poverty-center) |
|
""", |
|
"UNITED STATES": """ |
|
- IssueLab: [Visit Site](https://issuelab.org) |
|
- US Census Bureau: [Visit Site](https://census.gov) |
|
- The Urban Institute: [Visit Site](https://urban.org) |
|
""", |
|
"YOUTH": """ |
|
- Youth Risk Behavioral Surveillance System: [Visit Site](https://www.cdc.gov/yrbs/index.html) |
|
""" |
|
} |
|
|
|
|
|
CSS = """ |
|
.custom-textarea { |
|
width: 100%; |
|
height: 300px; |
|
border: 1px solid #ccc; |
|
padding: 10px; |
|
font-size: 16px; |
|
line-height: 1.5; |
|
} |
|
|
|
mark { |
|
background-color: #ffcccc; /* Faded red */ |
|
} |
|
""" |
|
|
|
|
|
|
|
JS = """ |
|
document.addEventListener('DOMContentLoaded', function() { |
|
// Listen for changes in the textarea |
|
let textarea = document.getElementById('highlighted_textarea'); |
|
textarea.addEventListener('input', function() { |
|
// Reapply the highlighting (simple implementation) |
|
let content = textarea.innerText; |
|
let highlightedContent = content; |
|
for (let highlightText of window.highlightTexts) { |
|
highlightedContent = highlightedContent.replace( |
|
new RegExp(escapeRegExp(highlightText), 'g'), |
|
`<mark>${highlightText}</mark>` |
|
); |
|
} |
|
textarea.innerHTML = highlightedContent; |
|
}); |
|
}); |
|
|
|
function escapeRegExp(string) { |
|
return string.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'); // $& means the whole matched string |
|
} |
|
""" |
|
|