Skip to content

Commit

Permalink
Merge pull request #104 from DFTBA-Shalom/main
Browse files Browse the repository at this point in the history
Change featured action for Fax Day
  • Loading branch information
YummyOreo authored May 14, 2024
2 parents a940272 + e20ba3b commit 7938034
Show file tree
Hide file tree
Showing 6 changed files with 48 additions and 17 deletions.
11 changes: 8 additions & 3 deletions action.html
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,14 @@ <h1 class="break-anywhere">Take <span class="red">Action</span></h1>
<p>
Join the fight for accessible and affordable testing! We'll keep this page updated with current actions, theme days and other campaigns, contact information, templates, graphics, and more!
</p>
<p class="featured" style="margin-top: 1.4em;">
<strong>FEATURED ACTION:</strong> US residents, contact your senators and ask them to support an historic increase in funding to end TB! Use <a href="https://act.pih.org/tb-funding-2024" target="_blank">this activism tool</a> to call or email and learn more!
</p>
<div class="featured" style="margin-top: 1.4em;">
<!-- featured Action Start -->
<img src="img/fax.svg" alt="Fax Icon" class="action-icon" style="margin-bottom: 0"><strong class="larger">FAX DAY</strong>
<br>
<div style="height: 0.5em;"></div>
Tell Danaher to put #PeopleOverProfits, and fax some facts! Fax important TB facts to their office at +1-202-828-0860. Check out the <a href="https://docs.google.com/document/d/e/2PACX-1vQiLFKZf5wygXGUG2uaCeRbGLLgo6UP2wi8k2HhZYGxMoJ3d_PwV4apJ9S2bLB_lbVtb-wzxkVDKVU5/pub" target="_blank">Fax Day Guide</a> for resources to help with sending and writing your fax!
<!-- featured Action End -->
</div>
</div>
<div id="petition-wrapper" style="margin: 2em 0;">
<div class="wrapper-full">
Expand Down
1 change: 1 addition & 0 deletions img/fax.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
23 changes: 16 additions & 7 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,14 @@ <h1>
</div>
</div>
<div class="wrapper wrapper-columns featured-columns">
<p>
<strong>FEATURED ACTION:</strong> US residents, contact your senators and ask them to support an historic increase in funding to end TB! Use <a href="https://act.pih.org/tb-funding-2024" target="_blank">this activism tool</a> to call or email and learn more!

</p>
<div>
<!-- featured Action Start -->
<img src="img/fax.svg" alt="Fax Icon" class="action-icon" style="margin-bottom: 0"><strong class="larger">FAX DAY</strong>
<br>
<div style="height: 0.5em;"></div>
Tell Danaher to put #PeopleOverProfits, and fax some facts! Fax important TB facts to their office at +1-202-828-0860. Check out the <a href="https://docs.google.com/document/d/e/2PACX-1vQiLFKZf5wygXGUG2uaCeRbGLLgo6UP2wi8k2HhZYGxMoJ3d_PwV4apJ9S2bLB_lbVtb-wzxkVDKVU5/pub" target="_blank">Fax Day Guide</a> for resources to help with sending and writing your fax!
<!-- featured Action End -->
</div>
<div class="buttons">
<a class="button" href="action.html">More actions</a>
<a class="button button-subtle" href="action.html#list">Newsletter signup</a>
Expand Down Expand Up @@ -142,9 +146,14 @@ <h2 class="action-head">Take <span class="red">Action</span>:</h2>
</ul>
</div>
<div class="join-right">
<p class="featured">
<strong>FEATURED ACTION:</strong> US residents, contact your senators and ask them to support an historic increase in funding to end TB! Use <a href="https://act.pih.org/tb-funding-2024" target="_blank">this activism tool</a> to call or email and learn more!
</p>
<div class="featured">
<!-- featured Action Start -->
<img src="img/fax.svg" alt="Fax Icon" class="action-icon" style="margin-bottom: 0"><strong class="larger">FAX DAY</strong>
<br>
<div style="height: 0.5em;"></div>
Tell Danaher to put #PeopleOverProfits, and fax some facts! Fax important TB facts to their office at +1-202-828-0860. Check out the <a href="https://docs.google.com/document/d/e/2PACX-1vQiLFKZf5wygXGUG2uaCeRbGLLgo6UP2wi8k2HhZYGxMoJ3d_PwV4apJ9S2bLB_lbVtb-wzxkVDKVU5/pub" target="_blank">Fax Day Guide</a> for resources to help with sending and writing your fax!
<!-- featured Action End -->
</div>
<a class="button button-centered" href="action.html">More actions and templates</a>
</div>
</div>
Expand Down
10 changes: 5 additions & 5 deletions style.css
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ aside.wrapper-full p:last-child, .milestone p:last-child {
margin-top: 8px;
margin-bottom: 8px;
}
p.larger, li.larger, a.larger {
p.larger, li.larger, a.larger, strong.larger {
font-size: 1.2em;
}
.action p.larger {
Expand Down Expand Up @@ -271,10 +271,10 @@ button, .button{

/* FEATURED */

p.featured {
div.featured {
display: block;
background-color: #DDDDDD;
text-align: center;
/* text-align: center; */
padding: 20px 25px;
margin: 0 1em .6em;
font-size: 1.2em;
Expand Down Expand Up @@ -565,7 +565,7 @@ aside.wrapper-full {
margin: 1em 2em;
vertical-align: top;
}
.action .action-icon {
.action-icon {
height: 1.5em;
vertical-align: bottom;
margin-right: .5em;
Expand Down Expand Up @@ -989,7 +989,7 @@ h2.action-head {
#join li {
font-size: 1.5em;
}
#join p.larger, #join li.larger {
#join p.larger, #join li.larger, #join strong.larger {
font-size: 1.75em;
}
ul {
Expand Down
7 changes: 6 additions & 1 deletion update-action/featured-action.html
Original file line number Diff line number Diff line change
@@ -1 +1,6 @@
US residents, contact your senators and ask them to support an historic increase in funding to end TB! Use <a href="https://act.pih.org/tb-funding-2024" target="_blank">this activism tool</a> to call or email and learn more!
<!-- featured Action Start -->
<img src="img/fax.svg" alt="Fax Icon" class="action-icon" style="margin-bottom: 0"><strong class="larger">FAX DAY</strong>
<br>
<div style="height: 0.5em;"></div>
Tell Danaher to put #PeopleOverProfits, and fax some facts! Fax important TB facts to their office at +1-202-828-0860. Check out the <a href="https://docs.google.com/document/d/e/2PACX-1vQiLFKZf5wygXGUG2uaCeRbGLLgo6UP2wi8k2HhZYGxMoJ3d_PwV4apJ9S2bLB_lbVtb-wzxkVDKVU5/pub" target="_blank">Fax Day Guide</a> for resources to help with sending and writing your fax!
<!-- featured Action End -->
13 changes: 12 additions & 1 deletion update-action/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,18 @@ function replaceContent(files, leadingPath, prefixLength) {

// featured action
if (featuredActionFiles.includes(file.name)) {
content = content.replaceAll(/<strong>FEATURED ACTION:<\/strong>.*$/gm, "<strong>FEATURED ACTION:</strong> " + featuredAction)
const startText = "<!-- featured Action Start -->";
const endText = "<!-- featured Action End -->";
let startFeaturedAction = content.indexOf(startText, 0);
let endFeaturedAction = content.indexOf(endText, 0);
while (startFeaturedAction != -1 && endFeaturedAction != -1) {
featuredActionContentReplace = addIndent(startText, content, featuredAction)

content = content.substring(0, startFeaturedAction) + featuredActionContentReplace + content.substring(endFeaturedAction + endText.length)
startFeaturedAction = content.indexOf(startText, startFeaturedAction + featuredActionContentReplace.length);
endFeaturedAction = content.indexOf(endText, endFeaturedAction + featuredActionContentReplace.length);
}

}
fs.writeFile(leadingPath + file.name, content, () => { })
}
Expand Down

0 comments on commit 7938034

Please sign in to comment.