Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

React dom server #1

Merged
merged 5 commits into from
Apr 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,14 @@
"chart.js": "^3.2.1",
"chokidar": "^3.3.1",
"create-react-app": "^5.0.1",
"express": "^4.18.2",
"inputmask": "^5.0.5",
"jquery": "^3.3.1",
"moment": "^2.27.0",
"moment-timezone": "^0.5.31",
"node-quill-converter": "^0.3.3",
"node-sass": "^8.0.0",
"path": "^0.12.7",
"popper.js": "^1.14.7",
"query-string": "^6.13.2",
"quill": "^1.3.7",
Expand All @@ -53,8 +55,9 @@
"yarn": "^1.13.0"
},
"devDependencies": {
"@babel/core": "^7.8.3",
"@babel/core": "^7.21.4",
"@babel/preset-env": "^7.8.3",
"@babel/register": "^7.21.0",
"@testing-library/react": "^14.0.0",
"babel-loader": "8.0.6",
"copy-webpack-plugin": "^11.0.0",
Expand Down
267 changes: 234 additions & 33 deletions public/index.html
Original file line number Diff line number Diff line change
@@ -1,48 +1,249 @@
<!DOCTYPE html>
<html lang="en">
<!--[if lt IE 9]><html class="lt-ie9"><![endif]-->
<!--[if gt IE 8]><!--><html lang="en"><!--<![endif]-->
<head>
<meta charset="utf-8" />
<link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1" />

<title data-react-helmet="true">Challenge.Gov</title>
<meta name="description" data-react-helmet="true" content="This is the description" />
<meta property="og:title" data-react-helmet="true" content="Challenge Title" />
<meta property="og:description" data-react-helmet="true" content="OG description" />
<!-- Basic Page Needs
================================================== -->
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">




<!-- Mobile Specific Metas
================================================== -->
<meta name="HandheldFriendly" content="True">
<meta name="MobileOptimized" content="320">
<meta name="viewport" content="width=device-width, initial-scale=1.0">

<!-- Title and meta description
================================================== -->


<title>Challenge.Gov</title>
<meta name="description" content="__META_DESCRIPTION__"/>
<meta name="og:title" content="__META_OG_TITLE__"/>
<meta name="og:description" content="__META_OG_DESCRIPTION__"/>
<meta name="og:image" content="__META_OG_IMAGE__"/>

<meta name="twitter:card" value="summary_large_image">
<meta name="twitter:site" content="@{site.twitter}">
<meta name="keywords" content="prize competitions, prize challenges, prize contests, public competitions, open challenges, open innovation, federal prize competitions, federal prize challenges, crowdsourcing">

<meta property="og:type" content="article">



<!-- Favicons
================================================== -->
<!-- 128x128 -->
<link rel="shortcut icon" type="image/ico" href="//www.challenge.gov/assets/uswds/img/us_flag_small.png">
<link rel="icon" type="image/png" href="//www.challenge.gov/assets/uswds/img/us_flag_small.png">

<!-- 192x192, as recommended for Android
http://updates.html5rocks.com/2014/11/Support-for-theme-color-in-Chrome-39-for-Android
-->
<link rel="icon" type="image/png" sizes="192x192" href="//www.challenge.gov/assets/uswds/img/us_flag_small.png">

<!-- 57x57 (precomposed) for iPhone 3GS, pre-2011 iPod Touch and older Android devices -->
<link rel="apple-touch-icon-precomposed" href="//www.challenge.gov/assets/uswds/img/us_flag_small.png">
<!-- 72x72 (precomposed) for 1st generation iPad, iPad 2 and iPad mini -->
<link rel="apple-touch-icon-precomposed" sizes="72x72" href="//www.challenge.gov/assets/uswds/img/us_flag_small.png">
<!-- 114x114 (precomposed) for iPhone 4, 4S, 5 and post-2011 iPod Touch -->
<link rel="apple-touch-icon-precomposed" sizes="114x114" href="//www.challenge.gov/assets/uswds/img/us_flag_small.png">
<!-- 144x144 (precomposed) for iPad 3rd and 4th generation -->
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="//www.challenge.gov/assets/uswds/img/us_flag_small.png">

<!-- CSS
================================================== -->
<!-- env: demo -->


<link rel="stylesheet" href="//www.challenge.gov/assets/styles/styles.css">
<link rel="stylesheet" href="//www.challenge.gov/assets/styles/style-2022.css">
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.8.1/css/all.css" integrity="sha384-50oBUHEmvpQ+1lW4y57PTFmhCaXp0ML5d60M1M7uH2+nqUivzIebhndOJK28anvf" crossorigin="anonymous">


</head>
<body class="page-landing-page layout-demo ">
<a class="usa-skipnav" href="#main-content">Skip to main content</a>

<meta name="twitter:card" value="summary_large_image">
<meta name="twitter:site" content="@{site.twitter}">
<meta name="keywords" content="prize competitions, prize challenges, prize contests, public competitions, open challenges, open innovation, federal prize competitions, federal prize challenges, crowdsourcing">

<meta property="og:image" content="https://www.challenge.gov/preview/gsa/challenges-and-prizes/staging/assets/images/cards/challenge-gov.png">
<meta name="twitter:image" content="https://www.challenge.gov/preview/gsa/challenges-and-prizes/staging/assets/images/cards/challenge-gov.png">
<meta property="og:type" content="article">
<div class="usa-banner">
<div class="usa-accordion">
<header class="usa-banner__header">
<div class="usa-banner__inner">
<div class="grid-col-auto">
<img class="usa-banner__header-flag" src="//www.challenge.gov/assets/uswds/img/us_flag_small.png" alt="U.S. flag">
</div>
<div class="grid-col-fill tablet:grid-col-auto">
<p class="usa-banner__header-text">An official website of the United States government</p>
<p class="usa-banner__header-action" aria-hidden="true">Here’s how you know</p>
</div>
<button class="usa-accordion__button usa-banner__button"
aria-expanded="false" aria-controls="gov-banner">
<span class="usa-banner__button-text">Here's how you know</span>
</button>
</div>
</header>
<div class="usa-banner__content usa-accordion__content" id="gov-banner">
<div class="grid-row grid-gap-lg">
<div class="usa-banner__guidance tablet:grid-col-6">
<img class="usa-banner__icon usa-media-block__img" src="//www.challenge.gov/assets/uswds/img/icon-dot-gov.svg" alt="Dot gov">
<div class="usa-media-block__body">
<p>
<strong>The .gov means it’s official.</strong>
<br>
Federal government websites often end in .gov or .mil. Before sharing sensitive information, make sure you’re on a federal government site.
</p>
</div>
</div>
<div class="usa-banner__guidance tablet:grid-col-6">
<img class="usa-banner__icon usa-media-block__img" src="//www.challenge.gov/assets/uswds/img/icon-https.svg" alt="Https">
<div class="usa-media-block__body">
<p>
<strong>The site is secure.</strong>
<br>
The <strong>https://</strong> ensures that you are connecting to the official website and that any information you provide is encrypted and transmitted securely.
</p>
</div>
</div>
</div>
</div>
</div>
</div>


<header class="usa-header usa-header--basic" role="banner">
<div class="usa-nav-container">
<div class="usa-navbar">
<div class="usa-logo" id="basic-logo">
<a href="/" title="Home" aria-label="Home">
<img src='//www.challenge.gov/assets/images/agency/challenge-logo.svg' alt="Challenge.Gov Logo" title="Challenge Gov" class="height-5 header__challenge-logo">
</a>
</div>
<button class="usa-menu-btn">Menu</button>
</div>
<nav class="usa-nav usa-header__actions">
<ul class="usa-nav__primary usa-accordion">
<li class="usa-nav__primary-item">
<a href="#active-challenges" class="menulink usa-nav__link" title="Active challenges" aria-label="Active challenges" data-anchor="active-challenges">Find a Challenge</a>
</li>
<li class="usa-nav__primary-item">
<a class="menulink usa-nav__link" href="#resources-people" title="Resources for innovators and managers" aria-label="Resources">Resources</a>
</li>
<li class="usa-nav__primary-item">
<a class="menulink usa-nav__link" href="//www.challenge.gov/events" title="Events for innovators and managers" aria-label="Events">Events</a>
</li>
<li class="usa-nav__primary-item">
<a class="menulink usa-nav__link" href="//www.challenge.gov/contact" title="Contact page with email and social links" aria-label="Contact">Contact</a>
</li>
</ul>

<a style="width: 6rem;" class="float-right usa-button usa-button--outline tablet:margin-left-2 tablet:float-right font-sans-xs" href="https://portal.challenge.gov/sign-in/new"><span style="color:#005ea2;">Login</span></a>
<a style="width: 10rem;" class="float-right usa-button usa-button tablet:margin-left-1 tablet:float-right font-sans-xs" href="https://secure.login.gov/sign_up/enter_email?request_id=6ab5f3e4-a3e5-4cb7-90a3-3a777fee8967"><span style="color: #ffffff;">Create Account</span></a>
</nav>
</div>
</header>


</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
<div class="usa-overlay"></div>


<div id="challenge-gov-react-app" data-api-url="https://challenge-portal-staging.app.cloud.gov"
data-public-url="https://react-chal.azurewebsites.net">
</div>
<!--
This HTML file is a template.
If you open it directly in the browser, you will see an empty page.

You can add webfonts, meta tags, or analytics to this file.
The build step will place the bundled scripts into the <body> tag.

To begin the development, run `npm start` or `yarn start`.
To create a production bundle, use `npm run build` or `yarn build`.
-->


<link rel="stylesheet" href="https://challenge-portal-staging.app.cloud.gov/css/public.css" crossorigin="anonymous">

<!-- <script type="text/javascript" src="https://challenge-portal-staging.app.cloud.gov/js/public.js"></script>
<script type="text/javascript" src="https://challenge-portal-staging.app.cloud.gov/js/client.js"></script> -->
<!-- <script type="text/javascript" src="priv/static/js/public.js"></script>
<script type="text/javascript" src="priv/static/js/client.js"></script> -->

</body>
</html>
<footer class="usa-footer site-footer text-white" role="contentinfo">
<div class="grid-container padding-top-15 padding-bottom-5" >
<div class="grid-row">
<div class="tablet:grid-col footer__left">
<img class="height-5 margin-bottom-2" src="//www.challenge.gov/assets/images/agency/challenge-logo-white-orange.svg" alt="Challenge Gov Logo" title="Challenge Gov" >
<hr class="border-orange margin-bottom-5" />
<div class="grid-row">
<div class="tablet:grid-col">
<ul class="add-list-reset">
<li class="margin-bottom-1"><a class="footerlink text-no-underline" href="{{ site.baseurl }}/about"><span style="text-decoration: none;">About</span></a></li>
<li class="margin-bottom-1"><a class="footerlink text-no-underline" href="{{ site.baseurl }}/contact">Contact</a></li>
<li class="margin-bottom-1"><a class="footerlink text-no-underline" href="{{ site.baseurl }}/terms">Terms of Use</a></li>
<li class="margin-bottom-1"><a class="footerlink text-no-underline" href="{{ site.baseurl }}/privacy-policy">Privacy Policy</a></li>
</ul>
</div>
<div class="tablet:grid-col">
<ul class="add-list-reset">
<li class="margin-bottom-1"><a class="footerlink text-no-underline" href="{{ site.baseurl }}/resources">Innovator Resources</a></li>
<li class="margin-bottom-1"><a class="footerlink text-no-underline" href="{{ site.baseurl }}/resources-managers">Agency Resources</a></li>
<li class="margin-bottom-1" id="js-archived-challenges"><a class="footerlink text-no-underline" href="{{ site.baseurl }}/?state=archived">Archived Challenges</a></li>
<li class="margin-bottom-1" id="active-challenges"><a class="footerlink text-no-underline" href="{{ site.baseurl }}/#active-challenges">Active Challenges</a></li>
</ul>
</div>
<div class="tablet:grid-col">
<ul class="add-list-reset">

<li class="margin-bottom-1"><a class="footerlink text-no-underline" href="https://www.gsa.gov/website-information/website-policies#privacy">GSA Privacy Policy</a></li>
<li class="margin-bottom-1"><a class="footerlink text-no-underline" href="https://www.gsa.gov/website-information/accessibility-aids">Accessibility</a></li>
<li class="margin-bottom-1"><a class="footerlink text-no-underline" href="https://www.gsa.gov/reference/freedom-of-information-act-foia">FOIA</a></li>
<li class="margin-bottom-1"><a class="footerlink text-no-underline" href="https://www.usa.gov">USA.gov</a></li>
</ul>
</div>
<div class="tablet:grid-col">
<div class="grid-row usa-footer__social_links">
<a href="https://www.twitter.com/ChallengeGov" class="margin-right-1 usa-footer__social_link" target="_blank" rel="noopener" aria-label="Twitter">
<i class="fab fa-twitter"></i>
</a>
<a href="https://www.facebook.com/ChallengeGov" class="margin-right-1 usa-footer__social_link" aria-label="Facebook">
<i class="fab fa-facebook"></i>
</a>
<a href="https://www.linkedin.com/company/challengegov/" class="margin-right-1 usa-footer__social_link" aria-label="LinkedIn">
<i class="fab fa-linkedin-in"></i>
</a>
<a href="https://github.com/GSA/Challenge_gov" class="margin-right-1 usa-footer__social_link" aria-label="GitHub">
<i class="fab fa-github"></i>
</a>
<a href="https://public.govdelivery.com/accounts/USGSATTS/signup/30826" class="margin-right-1 usa-footer__social_link" aria-label="Newsletter Signup">
<i class="fa fa-envelope" aria-hidden="true"></i>
</a>
</div>
</div>
</div>
</div>

<div class="tablet:grid-col-2 text-right">
<img src="//www.challenge.gov/assets/images/agency/challenge-logo-square-white.svg" alt="GSA Logo Square" title="GSA logo" class="height-10 footer__gsa-logo-square">
</div>
</div>
</div>
</footer>
<a href="#" class="top">Back to Top ^</a>


<!-- Digital Analytics Program roll-up, see https://analytics.usa.gov for data -->
<script id="_fed_an_ua_tag" src="https://dap.digitalgov.gov/Universal-Federated-Analytics-Min.js?agency={{site.dap_agency}}"></script>



<script>
// Explore challenges button scroll to active challenges section of react app
document.getElementById("js-explore-challenges").addEventListener("click", function(e) {
var scrollTarget = document.getElementById(e.target.getAttribute("data-anchor"))
scrollTarget.scrollIntoView()
})

// Footer archived challenges link to scroll to top of page
document.getElementById("js-archived-challenges").addEventListener("click", function(e) {
window.scrollTo(0,0)
})
</script>


<script src="//www.challenge.gov/assets/uswds/js/uswds.min.js"></script>
<script src="https://code.jquery.com/jquery-3.5.1.min.js" integrity="sha256-9/aliU8dGd2tb6OSsuzixeV4y/faTqgFtohetphbbj0=" crossorigin="anonymous"></script>

</body>
</html>

8 changes: 8 additions & 0 deletions server/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
//require("ignore-styles");

require("@babel/register")({
ignore: [/(node_modules)/],
presets: ["@babel/preset-env", "@babel/preset-react"],
});

require("./server");
Loading