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

Fix submit button styling and add readme #23

Merged
merged 2 commits into from
Feb 27, 2024
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
45 changes: 45 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Publish frontend

on:
push:
branches:
- develop
- master

env:
NODE_VERSION: 16.x

jobs:
build:
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read

steps:
- uses: actions/checkout@v4

- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ vars.GH_OIDC_ROLE_ARN }}
aws-region: ${{ vars.AWS_REGION }}

- name: Use Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}

- name: Install Node requirements
run: npm i

- name: Install Python requirements
run: pip install -r requirements.txt

- name: Build and publish
env:
PUBLISH_DOCS_USERNAME: ${{ vars.PUBLISH_DOCS_USERNAME }}
PUBLISH_DOCS_PASSWORD: ${{ secrets.PUBLISH_DOCS_PASSWORD }}
run: |
SIMPLE_REF=$(echo ${GITHUB_REF#refs/heads/} | tr / -)
npm run publish-${SIMPLE_REF}
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
*node_modules
*node_modules
.idea
dist/
29 changes: 29 additions & 0 deletions README.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
= Neo4j Educator Program - Frontend

https://neo4j.com/graphacademy/edu-program[https://neo4j.com/graphacademy/edu-program^]

This repository is the frontend code for the Neo4j Educator Program website. It includes the following components:

* HTML and CSS for the landing page
** HTML for the application form
* HTML for the view-license page
* JavaScript for form validation and submission
== Updating the webpage

Updates need to be made to the code here, and not in Wordpress. Once ready to publish, push code to this repository and run the publish script, as described below.

1. Set environment variables for Wordpress to publish
[source,shell]
----
export PUBLISH_DOCS_PASSWORD="<password>"
export PUBLISH_DOCS_USERNAME="<username>"
----
2. Run script
[source,shell]
----
python publish.py --stage <stage>
----
== Accompanying repositories

The backend repository that accompanies this frontend is available at https://github.com/neo-technology/edu-api[https://github.com/neo-technology/edu-api^]. This repository contains the AWS Lambdas and Cypher queries that create, approve, and save the application.
1 change: 0 additions & 1 deletion README.md

This file was deleted.

1 change: 0 additions & 1 deletion dist/app.js

This file was deleted.

1 change: 0 additions & 1 deletion dist/license.js

This file was deleted.

6 changes: 3 additions & 3 deletions html/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ <h2 class="subheader blue lg bold">Available Downloads</h2>
<div class="column medium-12">
<div class="row application-toggle" style="margin-top: 30px;" data-equalizer="">
<div class="column medium-6">
<button id="application-toggle-button">Submit new application</button>
<button class="button medium blue" style="margin-bottom: 0px" id="application-toggle-button">Submit new application</button>
</div>
<div class="column medium-6" style="text-align: right">
<a role="button" class="button medium blue application-signout" style="margin-bottom: 0px">Sign Out</a>
Expand Down Expand Up @@ -464,7 +464,7 @@ <h2 class="subheader blue lg bold">Terms</h2>
<h2 class="subheader blue lg bold">Submit Application</h2>
<div class="row">
<div class="small-6 columns">
<button name="edu-application-button" id="edu-application-button">Submit Now</button><br>
<button name="edu-application-button" class="button medium blue" style="margin-bottom: 0px" id="edu-application-button">Submit Now</button><br>
<p>* indicates a required field</p>
</div>
<div class="columns small-6" style="text-align: right">
Expand Down Expand Up @@ -502,7 +502,7 @@ <h2 class="section_title">Schools teaching Neo4j in the classroom:</h2>
<script src="https://cdn.jsdelivr.net/npm/js-cookie@2/src/js.cookie.min.js"></script>
<script src="//neo4jsandbox.com/js/jwt-decode.min.js"></script> <!-- parse params -->
<script src="//neo4jsandbox.com/js/parse-params.js"></script> <!-- load main app -->
<script src="{{js_location}}?versionId={{js_version}}"></script>
<script src="{{js_location}}?versionId={{js_version}}" type="text/javascript"></script>
<div class="entry-links"></div>
</article>
</section><!-- #content -->
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"build": "webpack --config webpack.config.js",
"publish": "npm run build && python publish.py",
"publish-develop": "npm run build && python publish.py",
"publish-prod": "npm run build && python publish.py --stage prod"
},
"repository": {
Expand Down