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

Code prettifier github actions + prettified the files (#12) #16

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
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
19 changes: 19 additions & 0 deletions .github/workflows/Format.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Continuous Integration

# This action works with pull requests and pushes
on:
- push

jobs:
prettier:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v2
with:
# Make sure the actual branch is checked out when running on pull requests
ref: ${{ github.head_ref }}

- name: Prettify code
uses: creyD/[email protected]
5 changes: 1 addition & 4 deletions gatsby-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,5 @@
*/

module.exports = {
plugins: [
`gatsby-plugin-sass`,
`gatsby-plugin-react-helmet`,
],
plugins: [`gatsby-plugin-sass`, `gatsby-plugin-react-helmet`],
}
15,812 changes: 0 additions & 15,812 deletions package-lock.json

This file was deleted.

7 changes: 1 addition & 6 deletions src/components/footer.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
import React from "react"

const Footer = ({ children }) => (

<footer>
2021 © Bible Before Bread
</footer>
)
const Footer = ({ children }) => <footer>2021 © Bible Before Bread</footer>

export default Footer
43 changes: 23 additions & 20 deletions src/components/form.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,28 +2,31 @@ import React from "react"
import arrow from "../../static/img/arrow.png"

const Form = () => (


<form name="subscribe" method="POST" data-netlify="true">

<p class="coming-soon"> Daily Bible Inspirations Coming Soon. </p>
<p class="enter-email"> Enter your email to stay informed. </p>

<input type="hidden" name="form-name" value="subscribe" />

<div class="fields">
<div class="email-field">
<input type="email" name="email" id="email" placeholder="[email protected]"/>
<label for="email" htmlFor="email">Your Email </label>
</div>

<button class="home-button" type="submit">
<span class="button-text">Send</span>
<img src={arrow} className="button-arrow" alt="Arrow" />
</button>
<form name="subscribe" method="POST" data-netlify="true">
<p class="coming-soon"> Daily Bible Inspirations Coming Soon. </p>
<p class="enter-email"> Enter your email to stay informed. </p>

<input type="hidden" name="form-name" value="subscribe" />

<div class="fields">
<div class="email-field">
<input
type="email"
name="email"
id="email"
placeholder="[email protected]"
/>
<label for="email" htmlFor="email">
Your Email{" "}
</label>
</div>
</form>

<button class="home-button" type="submit">
<span class="button-text">Send</span>
<img src={arrow} className="button-arrow" alt="Arrow" />
</button>
</div>
</form>
)

export default Form
11 changes: 5 additions & 6 deletions src/components/header.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,12 @@ import { Link } from "gatsby"
import logo from "../../static/img/logo-black.png"

const Header = () => (

<header>
<h1>
<Link style={{ color:`black`, textDecoration:`none` }} to="/">
<img src={logo} className='home-logo' alt="Logo" />
</Link>
</h1>
<h1>
<Link style={{ color: `black`, textDecoration: `none` }} to="/">
<img src={logo} className="home-logo" alt="Logo" />
</Link>
</h1>
</header>
)

Expand Down
1 change: 0 additions & 1 deletion src/components/layout.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import Header from "./header"
import Footer from "./footer"

const Layout = ({ children }) => (

<>
<div class="site-title">
<Header />
Expand Down
39 changes: 21 additions & 18 deletions src/components/vanta-animation.js
Original file line number Diff line number Diff line change
@@ -1,36 +1,39 @@

import React from "react"
import { useState, useEffect, useRef } from 'react'
import { useState, useEffect, useRef } from "react"

import CLOUDS from "vanta/dist/vanta.clouds.min"
// Need to load three or will get "TypeError: undefined has no properties". not completely sure why
import * as THREE from "three"
import * as THREE from "three"

const VantaCloudsAnimation = (props) => {
const VantaCloudsAnimation = props => {
const [vantaEffect, setVantaEffect] = useState(0)
const myRef = useRef(null)
useEffect(() => {
if (!vantaEffect) {
setVantaEffect(CLOUDS({
THREE, // used here to prevent "TypeError: undefined has no properties". not completely sure why
el: myRef.current,
mouseControls: true,
touchControls: true,
gyroControls: false,
minHeight: 200.00,
minWidth: 200.00,
// skyColor: 0x791de1,
speed: 1.70
}))
setVantaEffect(
CLOUDS({
THREE, // used here to prevent "TypeError: undefined has no properties". not completely sure why
el: myRef.current,
mouseControls: true,
touchControls: true,
gyroControls: false,
minHeight: 200.0,
minWidth: 200.0,
// skyColor: 0x791de1,
speed: 1.7,
})
)
}
return () => {
if (vantaEffect) vantaEffect.destroy()
}
}, [vantaEffect])
return <div className="vanta-clouds-background" ref={myRef}>
return (
<div className="vanta-clouds-background" ref={myRef}>
{/* Foreground content goes here */}
{ props.children }
</div>
{props.children}
</div>
)
}

export default VantaCloudsAnimation
25 changes: 12 additions & 13 deletions src/pages/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,32 +10,31 @@ import VantaCloudsAnimation from "../components/vanta-animation"
import "../style/index.scss"

const Home = () => (

<Layout>

<div class="home-logo" />

{/* add vanta animation, is helmet needed? */}
<Helmet>
<script src="../../static/three.r119.min.js"></script>
<script src="../../static/vanta.clouds.min.js"></script>
</Helmet>
<script src="../../static/three.r119.min.js"></script>
<script src="../../static/vanta.clouds.min.js"></script>
</Helmet>
<VantaCloudsAnimation>
<div class="home-quote">
<blockquote> "Man shall not live by bread alone, but by every word that comes from the mouth of God."</blockquote>
<img src={line} className="quote-line" alt="Logo" />
<p class="quote-verse">- Matthew 4:4</p>
</div>
<div class="home-quote">
<blockquote>
{" "}
"Man shall not live by bread alone, but by every word that comes from
the mouth of God."
</blockquote>
<img src={line} className="quote-line" alt="Logo" />
<p class="quote-verse">- Matthew 4:4</p>
</div>
</VantaCloudsAnimation>

<div className="form-container">
<Form />
<img class="form-image" src={form_image} alt="" />
</div>

</Layout>


)

export default Home
28,445 changes: 28,444 additions & 1 deletion static/three.r119.min.js

Large diffs are not rendered by default.

548 changes: 547 additions & 1 deletion static/vanta.clouds.min.js

Large diffs are not rendered by default.