From c1b0be3b53120681c6177057d986d2b07fdfe93c Mon Sep 17 00:00:00 2001 From: Michaelwucoc <110759450+Michaelwucoc@users.noreply.github.com> Date: Mon, 5 Jan 2026 09:48:48 +0800 Subject: [PATCH 1/3] fix: Improve styling for the last commit badge in index.html for better user experience --- voting_rights_timeline/index.html | 150 ++++++++++++++++++++++++++++++ 1 file changed, 150 insertions(+) create mode 100644 voting_rights_timeline/index.html diff --git a/voting_rights_timeline/index.html b/voting_rights_timeline/index.html new file mode 100644 index 0000000..bb38e33 --- /dev/null +++ b/voting_rights_timeline/index.html @@ -0,0 +1,150 @@ + + +
+ + +A Timeline of the 5 Most Important Voting Rights Milestones in American History
+ +A Timeline of the 5 Most Important Voting Rights Milestones in American History
+Explore the transformative moments that expanded democracy and voting rights in America. Each milestone represents a significant step toward a more inclusive and representative democracy.
This timeline showcases the 5 most important changes to voting rights in U.S. history. These milestone events progressively expanded voting rights for American citizens, making democracy more inclusive and just.
" + "text": "This timeline showcases the 5 most important changes to voting rights in U.S. history. These milestone events progressively expanded voting rights for American citizens, making democracy more inclusive and just.
The right to vote is the foundation of any democracy. Throughout American history, courageous individuals and movements have fought to expand this fundamental right to all citizens.
" + }, + "background": { + "color": "#ffffff" } }, "events": [ { "start_date": { - "year": "1870" + "year": "1870", + "month": "3", + "day": "30" }, "text": { "headline": "Fifteenth Amendment Ratified - African American Men Gain Voting Rights", - "text": "Year: 1870
Description: The Fifteenth Amendment prohibited the federal and state governments from denying a citizen the right to vote based on race, color, or previous condition of servitude. This was the first time in U.S. history that voting rights were explicitly protected by a constitutional amendment, opening the door to voting for African American men.
Who: U.S. Congress, African American citizens, abolitionists
" + "text": "Description: The Fifteenth Amendment prohibited the federal and state governments from denying a citizen the right to vote based on race, color, or previous condition of servitude. This was the first time in U.S. history that voting rights were explicitly protected by a constitutional amendment, opening the door to voting for African American men.
\"The right of citizens of the United States to vote shall not be denied or abridged by the United States or by any State on account of race, color, or previous condition of servitude.\"" }, "media": { - "url": "https://upload.wikimedia.org/wikipedia/commons/thumb/c/cf/15th-amendment-celebration-1870.jpg/1471px-15th-amendment-celebration-1870.jpg?20060725233918", + "url": "https://assets.teenvogue.com/photos/5e30b8f03a76710009d66b5a/16:9/w_2560%2Cc_limit/15th%2520amendment%2520og%2520history%2520black%2520vote%2520teen%2520vogue.jpg", "caption": "Celebration of the Fifteenth Amendment - 1870", - "credit": "Wikimedia Commons" + "credit": "Teenvogue.com" + }, + "background": { + "color": "#ffffff" } }, { "start_date": { - "year": "1920" + "year": "1920", + "month": "8", + "day": "18" }, "text": { "headline": "Nineteenth Amendment Ratified - Women Gain Voting Rights", - "text": "
— Fifteenth Amendment, Section 1
Year: 1920
Description: The Nineteenth Amendment prohibited voting discrimination based on sex, granting women the right to vote. This was a major victory for the women's suffrage movement, ending decades of struggle for women's voting rights and making the United States one of the first countries in the world to grant women the right to vote.
Who: Susan B. Anthony, Elizabeth Cady Stanton, Alice Paul, National American Woman Suffrage Association
" + "text": "Description: The Nineteenth Amendment prohibited voting discrimination based on sex, granting women the right to vote. This was a major victory for the women's suffrage movement, ending decades of struggle for women's voting rights and making the United States one of the first countries in the world to grant women the right to vote.
\"The right of citizens of the United States to vote shall not be denied or abridged by the United States or by any State on account of sex.\"" }, "media": { - "url": "https://upload.wikimedia.org/wikipedia/commons/4/4d/Emmeline_Pankhurst_addresses_crowd.jpg", + "url": "https://www.nps.gov/bepa/learn/images/SuffragePicketing1az.jpg", "caption": "Women's Suffrage Movement Protest", - "credit": "Wikimedia Commons" + "credit": " National Woman's Party" + }, + "background": { + "color": "#ffffff" } }, { "start_date": { - "year": "1964" + "year": "1964", + "month": "1", + "day": "23" }, "text": { "headline": "Twenty-Fourth Amendment Ratified - Poll Tax Abolished", - "text": "
— Nineteenth Amendment, Section 1
Year: 1964
Description: The Twenty-Fourth Amendment prohibited the use of poll taxes (head taxes) as a voting requirement in federal elections. Poll taxes were one of the main tools used by Southern states to prevent African Americans from voting. The abolition of poll taxes was an important victory for the civil rights movement.
Who: President John F. Kennedy, President Lyndon B. Johnson, civil rights activists
" + "text": "Description: The Twenty-Fourth Amendment prohibited the use of poll taxes (head taxes) as a voting requirement in federal elections. Poll taxes were one of the main tools used by Southern states to prevent African Americans from voting. The abolition of poll taxes was an important victory for the civil rights movement.
\"The right of citizens of the United States to vote in any primary or other election... shall not be denied or abridged... by reason of failure to pay any poll tax or other tax.\"" }, "media": { - "url": "https://upload.wikimedia.org/wikipedia/commons/thumb/b/b2/PollTaxRecieptJefferson1917.JPG/819px-PollTaxRecieptJefferson1917.JPG", + "url": "https://th-thumbnailer.cdn-si-edu.com/eZqz6Dx_Qf4TKoKOhGL67QEZuzY=/1072x720/filters:no_upscale()/https://tf-cmsv2-smithsonianmag-media.s3.amazonaws.com/filer/2a/ae/2aae5f93-d68f-4f3e-93cc-78dec0043224/2012_104_001-web-resize.jpg", "caption": "Poll Tax Receipt - Used to restrict voting rights before 1964", "credit": "Wikimedia Commons" + }, + "background": { + "color": "#ffffff" } }, { "start_date": { - "year": "1965" + "year": "1965", + "month": "8", + "day": "6" }, "text": { "headline": "Voting Rights Act Passed - Prohibits Racial Discrimination in Voting", - "text": "
— Twenty-Fourth Amendment, Section 1
Year: 1965
Description: The Voting Rights Act was one of the most important legislative achievements of the civil rights movement. The act prohibited all forms of voting discrimination, including literacy tests and other barriers used to prevent African Americans from voting. The act also required certain states with a history of discrimination to obtain federal approval before changing their voting laws.
Who: President Lyndon B. Johnson, Martin Luther King Jr., John Lewis, civil rights activists
" + "text": "Description: The Voting Rights Act was one of the most important legislative achievements of the civil rights movement. The act prohibited all forms of voting discrimination, including literacy tests and other barriers used to prevent African Americans from voting. The act also required certain states with a history of discrimination to obtain federal approval before changing their voting laws.
\"This act flows from a clear and simple wrong. Its only purpose is to right that wrong. Millions of Americans are denied the right to vote because of their color. This law will ensure them the right to vote.\"" }, "media": { - "url": "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQxIZpOvMCGkt2qP95p1TnZ5ENJwZznJPVGCw&s", + "url": "https://static.politico.com/c3/fe/61c0bf3042ca8f7ecb4c841e64cd/lbj-voting-rights-ap.jpg", "caption": "President Lyndon B. Johnson signing the Voting Rights Act - August 6, 1965", - "credit": "Wikimedia Commons" + "credit": "AP" + }, + "background": { + "color": "#ffffff" } }, { "start_date": { - "year": "1971" + "year": "1971", + "month": "7", + "day": "1" }, "text": { "headline": "Twenty-Sixth Amendment Ratified - Voting Age Lowered to 18", - "text": "
— President Lyndon B. Johnson, August 6, 1965
Year: 1971
Description: The Twenty-Sixth Amendment lowered the voting age from 21 to 18. This change was primarily a response to the argument during the Vietnam War that 'if 18-year-olds can be drafted to serve in the military, they should be able to vote.' The amendment was ratified in record time, granting millions of young Americans the right to vote.
Who: President Richard Nixon, young activists, student organizations
" + "text": "Description: The Twenty-Sixth Amendment lowered the voting age from 21 to 18. This change was primarily a response to the argument during the Vietnam War that 'if 18-year-olds can be drafted to serve in the military, they should be able to vote.' The amendment was ratified in record time, granting millions of young Americans the right to vote.
\"The right of citizens of the United States, who are eighteen years of age or older, to vote shall not be denied or abridged by the United States or by any State on account of age.\"" }, "media": { - "url": "https://upload.wikimedia.org/wikipedia/commons/thumb/5/5b/Greater_coat_of_arms_of_the_United_States.svg/330px-Greater_coat_of_arms_of_the_United_States.svg.png", + "url": "https://static.politico.com/97/28/e58e0fab4bc6beb63d0c58356e93/nixon-amendment-ap.jpg", "caption": "Twenty-Sixth Amendment Certification Ceremony - 1971", - "credit": "Wikimedia Commons" + "credit": "Charles Tasnadi" + }, + "background": { + "color": "#ffffff" + } + }, + { + "start_date": { + "year": "1865" + }, + "text": { + "headline": "Frederick Douglass on Voting Rights", + "text": "
— Twenty-Sixth Amendment, Section 1
\"Slavery is not abolished until the black man has the ballot.\"" + }, + "background": { + "color": "#ffffff" + } + }, + { + "start_date": { + "year": "1873" + }, + "text": { + "headline": "Susan B. Anthony on Women's Rights", + "text": "
— Frederick Douglass, 1865
\"Men, their rights, and nothing more; women, their rights, and nothing less.\"" + }, + "background": { + "color": "#ffffff" + } + }, + { + "start_date": { + "year": "1963" + }, + "text": { + "headline": "Martin Luther King Jr. on the Ballot", + "text": "
— Susan B. Anthony, 1873
\"Give us the ballot and we will no longer have to worry the federal government about our basic rights.\"" + }, + "background": { + "color": "#ffffff" + } + }, + { + "start_date": { + "year": "1965", + "month": "3", + "day": "7" + }, + "text": { + "headline": "Bloody Sunday - Selma to Montgomery March", + "text": "
— Martin Luther King Jr., 1957
\"We must use time creatively, in the knowledge that the time is always ripe to do right.\"" + }, + "background": { + "color": "#ffffff" + } + }, + { + "start_date": { + "year": "1970" + }, + "text": { + "headline": "The Slogan That Changed Voting Age", + "text": "
— Martin Luther King Jr., on the Selma marches
\"Old enough to fight, old enough to vote.\"" + }, + "background": { + "color": "#ffffff" + } + }, + { + "start_date": { + "year": "1848" + }, + "text": { + "headline": "Elizabeth Cady Stanton on Democracy", + "text": "
— Popular slogan during the Vietnam War era, 1970
\"The right is ours. Have it we must. Use it we will.\"" + }, + "background": { + "color": "#ffffff" } } ] }; window.timeline = new TL.Timeline('timeline-embed', timelineData); + + // 强制设置所有文字为黑色 + setTimeout(function() { + var timelineElement = document.getElementById('timeline-embed'); + if (timelineElement) { + var allTextElements = timelineElement.querySelectorAll('*'); + allTextElements.forEach(function(el) { + var style = window.getComputedStyle(el); + // 只修改文字元素,跳过图片、按钮等 + if (el.tagName && ['P', 'SPAN', 'DIV', 'H1', 'H2', 'H3', 'H4', 'H5', 'H6', 'STRONG', 'EM', 'BLOCKQUOTE', 'LI', 'TD', 'TH'].includes(el.tagName)) { + if (style.color && style.color !== 'rgb(0, 0, 0)' && style.color !== '#000' && style.color !== '#000000') { + el.style.color = '#000 !important'; + } + } + }); + } + }, 1000); + + // 监听TimelineJS3的slidechange事件,确保每次切换时文字都是黑色 + if (window.timeline) { + window.timeline.on('change', function() { + setTimeout(function() { + var timelineElement = document.getElementById('timeline-embed'); + if (timelineElement) { + var textElements = timelineElement.querySelectorAll('.tl-slide-text-content, .tl-slide-headline, .tl-slide-description, .tl-slide-credit, .tl-slide-caption, .tl-text-content, .tl-headline, .tl-text, .tl-credit, .tl-caption'); + textElements.forEach(function(el) { + el.style.color = '#000'; + var children = el.querySelectorAll('*'); + children.forEach(function(child) { + if (['P', 'SPAN', 'DIV', 'STRONG', 'EM', 'BLOCKQUOTE'].includes(child.tagName)) { + child.style.color = '#000'; + } + }); + }); + } + }, 100); + }); + }
— Elizabeth Cady Stanton, Seneca Falls Convention, 1848