Skip to content

Commit

Permalink
removed avo branding made generic to local
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew Reese committed Aug 22, 2020
1 parent 9bf7f66 commit 21fc759
Show file tree
Hide file tree
Showing 57 changed files with 368 additions and 13,083 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# Avocado Nation Frontend 🥑
# Local Social Frontend 🐧

[![Netlify Status](https://api.netlify.com/api/v1/badges/83c50317-9af2-4c3c-a396-3e2b1b4a25b1/deploy-status)](https://app.netlify.com/sites/vigorous-chandrasekhar-bbd3e9/deploys)

## Local development

clone repo to your desktop via `git clone git@bitbucket.org:270b/avonation-frontend.git`
clone repo to your desktop via `git clone git@github.com:hyliancoder/local-frontend.git`

run `yarn` to populate `node_modules` folder and to create your `yarn.lock` file needed

Expand All @@ -16,21 +16,21 @@ to start the server locally you'll either need to request the `.env` file from m

run `yarn build:lambda` to get local build ready for lambda use.

once that is setup run the command `ntl dev` or `netlify dev` to run lambda functions locally and react locally in one command. \*note: if wanting to run the whole application locally, the api: `https://bitbucket.org/270b/avonation-api/` needs to be up and running first via it's [README](https://bitbucket.org/270b/avonation-api/src/master/README.md)
once that is setup run the command `ntl dev` or `netlify dev` to run lambda functions locally and react locally in one command. \*note: if wanting to run the whole application locally, the api: `https://github.com/hyliancoder/local-api/` needs to be up and running first via it's [README](https://github.com/hyliancoder/local-api/src/master/README.md)

After running the server, you can navigate to `http://localhost:8888`

## Frontend deployment to Netlify

- Push repository on Bitbucket.
- Create new site on [Netlify](https://www.netlify.com/) and connect that repository to it.
- Add environment variables to Netlify based on `frontend/.env` file, make sure to replace API and Frontend URLs, e.g. `REACT_APP_API_URL=https://avonation-api.heroku.com/graphql` and `REACT_APP_FRONTEND_URL=https://vigorous-chandrasekhar-bbd3e9.netlify.com`
- Add environment variables to Netlify based on `frontend/.env` file, make sure to replace API and Frontend URLs, e.g. `REACT_APP_API_URL=https://local-api.heroku.com/graphql` and `REACT_APP_FRONTEND_URL=https://vigorous-chandrasekhar-bbd3e9.netlify.com`

- After every change to the master branch in Bitbucket, Netlify will build and deploy frontend automatically!

### NOTE: if changing environment var on netlify you MUST redeploy to see changes!

## CSS naming conventions for avonation-frontend
## CSS naming conventions for local-frontend

- We're using the BEM standards for all new classes created.
- Please review the standards [Here](http://getbem.com/) so that we're on the same page.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "avonation-frontend",
"name": "local-frontend",
"version": "1.0.0",
"private": true,
"dependencies": {
Expand Down
6 changes: 3 additions & 3 deletions public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@
<html lang="en">

<head>
<title>The Avocado Nation</title>
<title>The Local Social</title>

<!-- Required meta tags always come first -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<link rel="icon"
href="%PUBLIC_URL%/avocado-favicon.gif"
href="%PUBLIC_URL%/local-favicon.gif"
type="image/x-icon">

<meta charset="utf-8" />
<link rel="shortcut icon" href="%PUBLIC_URL%/avocado-favicon.gif" />
<link rel="shortcut icon" href="%PUBLIC_URL%/local-favicon.gif" />
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
<meta name="theme-color" content="#000000" />
</head>
Expand Down
128 changes: 64 additions & 64 deletions src/assets/style/scss/main.scss

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions src/assets/style/scss/vendors/custom-bootstrap.css
Original file line number Diff line number Diff line change
Expand Up @@ -9808,7 +9808,7 @@ a.text-secondary:hover {
img,
pre,
tr {
page-break-inside: avoid;
page-break-inside: localid;
}
*,
::after,
Expand Down Expand Up @@ -9841,7 +9841,7 @@ a.text-secondary:hover {
}
h2,
h3 {
page-break-after: avoid;
page-break-after: localid;
}
@page {
size: a3;
Expand Down
2 changes: 1 addition & 1 deletion src/components/Avatar.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const Avatar = ({ size, image }) => (
width={100}
alt='avatar'
// className='avatar-img'
src='https://res.cloudinary.com/weare270b/image/upload/f_auto,q_auto/v1576220262/static/Image_from_iOS_1_bnaxnc.jpg'
src='https://res.cloudinary.com/hylian/image/upload/f_auto,q_auto/v1576220262/static/Image_from_iOS_1_bnaxnc.jpg'
/>
)}
</div>
Expand Down
4 changes: 2 additions & 2 deletions src/components/Comments/CommentsHeader.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ function CommentsHeader(props) {
} = props;

const [{ auth }] = useStore();
const isSelma = !auth.user ? null : auth.user.role === 'selma';
const isAdmin = !auth.user ? null : auth.user.role === 'admin';
const isOwner = !auth.user ? null : auth.user.id === author.id;
const commentDate = new Date(parseInt(createdAt));

Expand Down Expand Up @@ -87,7 +87,7 @@ function CommentsHeader(props) {
</time>
</div>
</div>
{(isAuth && isOwner) || (isAuth && isSelma) ? (
{(isAuth && isOwner) || (isAuth && isAdmin) ? (
<div className='more'>
<FontAwesomeIcon
className='olymp-three-dots-icon'
Expand Down
2 changes: 1 addition & 1 deletion src/components/Comments/CustomTextAreaWrapper.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class CustomTextAreaWrapper extends Component {
render() {
return (
<InstantSearch
indexName='production_avonation_users'
indexName='production_local_users'
searchClient={searchClient}
>
<CustomTextArea
Expand Down
2 changes: 1 addition & 1 deletion src/components/Common/Loading.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export const Loading = () => (
<div id='hellopreloader'>
<div className='preloader'>
<LazyLoadImage
src='https://res.cloudinary.com/weare270b/image/upload/f_auto,q_auto/v1575849612/static/avocado_loader_n5rjeh.gif'
src='https://res.cloudinary.com/hylian/image/upload/f_auto,q_auto/v1575849612/static/local_loader_n5rjeh.gif'
alt=''
/>
<div className='text'>Loading ...</div>
Expand Down
8 changes: 4 additions & 4 deletions src/components/Common/PostControlButton.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ function PostControlButton({
className='btn btn-control likes'
>
<LazyLoadImage
src='https://res.cloudinary.com/weare270b/image/upload/f_auto,q_auto/v1575849612/static/heart-icon_jd2hne.png'
src='https://res.cloudinary.com/hylian/image/upload/f_auto,q_auto/v1575849612/static/heart-icon_jd2hne.png'
alt=''
/>
<div className='ripple-container'></div>
Expand All @@ -45,15 +45,15 @@ function PostControlButton({
className='btn btn-control likes'
>
<LazyLoadImage
src='https://res.cloudinary.com/weare270b/image/upload/f_auto,q_auto/v1575849612/static/comments-icon_ffpa0l.png'
src='https://res.cloudinary.com/hylian/image/upload/f_auto,q_auto/v1575849612/static/comments-icon_ffpa0l.png'
alt=''
/>
<div className='ripple-container'></div>
</a>
) : (
<a href className='btn btn-control comments' onClick={toggle}>
<LazyLoadImage
src='https://res.cloudinary.com/weare270b/image/upload/f_auto,q_auto/v1575849612/static/comments-icon_ffpa0l.png'
src='https://res.cloudinary.com/hylian/image/upload/f_auto,q_auto/v1575849612/static/comments-icon_ffpa0l.png'
alt=''
/>
</a>
Expand All @@ -69,7 +69,7 @@ function PostControlButton({
className='btn btn-control likes'
>
<LazyLoadImage
src='https://res.cloudinary.com/weare270b/image/upload/f_auto,q_auto/v1575849612/static/share-icon_rkyjac.png'
src='https://res.cloudinary.com/hylian/image/upload/f_auto,q_auto/v1575849612/static/share-icon_rkyjac.png'
alt=''
/>
<div className='ripple-container'></div>
Expand Down
2 changes: 1 addition & 1 deletion src/components/CreatePost/PostFooter.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const Footer = ({ toggle }) => (
</div>
</OverlayTriggers>
<button className='btn btn-primary btn-md-2'>
Share Your Avocado Love
Share Your Local Love
</button>
</div>
);
Expand Down
2 changes: 1 addition & 1 deletion src/components/CustomeTextArea/TextAreaWrapper.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class CustomTextArea extends Component {
render() {
return (
<InstantSearch
indexName='production_avonation_users'
indexName='production_local_users'
searchClient={searchClient}
>
<TextArea
Expand Down
2 changes: 1 addition & 1 deletion src/components/Post/LoadMorePosts.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const LoadMorePosts = ({
<div className='d-flex justify-content-center my-2'>
<LazyLoadImage
className='flex'
src='https://res.cloudinary.com/weare270b/image/upload/f_auto,q_auto/v1579191490/static/loader_eyctc7.gif'
src='https://res.cloudinary.com/hylian/image/upload/f_auto,q_auto/v1579191490/static/loader_eyctc7.gif'
alt='loading .....'
/>
</div>
Expand Down
6 changes: 3 additions & 3 deletions src/components/Post/PostHeader.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ const PostHeader = props => {
} = props;

const [{ auth }] = useStore();
const isSelma = !auth.user ? null : auth.user.role === 'selma';
const isAdmin = !auth.user ? null : auth.user.role === 'admin';
const isOwner = !auth.user ? null : auth.user.id === author.id;
const rawTime = parseInt(createdAt);
const postDate = new Date(rawTime);
Expand Down Expand Up @@ -144,7 +144,7 @@ const PostHeader = props => {
/>

<ul className='more-dropdown'>
{(isAuth && isOwner) || (isAuth && isSelma) ? (
{(isAuth && isOwner) || (isAuth && isAdmin) ? (
<li>
<Link
href
Expand All @@ -156,7 +156,7 @@ const PostHeader = props => {
</Link>
</li>
) : null}
{(isAuth && isOwner) || (isAuth && isSelma) ? (
{(isAuth && isOwner) || (isAuth && isAdmin) ? (
<li>
<Link
href
Expand Down
2 changes: 1 addition & 1 deletion src/components/Post/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const Post = ({ queryOptions, isAuth }) => {
<div className='d-flex justify-content-center my-2'>
<LazyLoadImage
className='flex'
src='https://res.cloudinary.com/weare270b/image/upload/f_auto,q_auto/v1579191490/static/loader_eyctc7.gif'
src='https://res.cloudinary.com/hylian/image/upload/f_auto,q_auto/v1579191490/static/loader_eyctc7.gif'
alt='loading...'
/>
</div>
Expand Down
12 changes: 6 additions & 6 deletions src/components/Search/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,22 +40,22 @@ export default class Search extends React.Component {
<>
<Default>
<InstantSearch
indexName='production_avonation_users'
indexName='production_local_users'
searchClient={searchClient}
>
<div className='search-bar w-search notification-list friend-requests'>
<div className='form-group with-button'>
<CustomSearchBar />

<div className='search-result'>
<Index indexName='production_avonation_users'>
<Index indexName='production_local_users'>
<ConnectedUsers
hashTagQuery={state.hashTagQuery}
clearHashTagQuery={this.clearHashTagQuery}
/>
</Index>

<Index indexName='production_avonation_posts'>
<Index indexName='production_local_posts'>
<ConnectedPosts />
</Index>
</div>
Expand All @@ -73,22 +73,22 @@ export default class Search extends React.Component {
/>
{state.mobileToggleState && (
<InstantSearch
indexName='production_avonation_users'
indexName='production_local_users'
searchClient={searchClient}
>
<div className='search-bar w-search notification-list friend-requests'>
<div className='form-group with-button'>
<CustomSearchBar />

<div className='search-result'>
<Index indexName='production_avonation_users'>
<Index indexName='production_local_users'>
<ConnectedUsers
hashTagQuery={state.hashTagQuery}
clearHashTagQuery={this.clearHashTagQuery}
/>
</Index>

<Index indexName='production_avonation_posts'>
<Index indexName='production_local_posts'>
<ConnectedPosts />
</Index>
</div>
Expand Down
8 changes: 4 additions & 4 deletions src/components/SharePost.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const SharePost = ({ postId, post, postSharer, sharedPostId }) => {
hasShared = true;
}

let url = `https://beta.theavocadonation.com/post/${postId}`;
let url = `https://vigorous-chandrasekhar-bbd3e9.netlify.app/post/${postId}`;

const handleButtonClick = async (event, mutate) => {
event.preventDefault();
Expand Down Expand Up @@ -95,7 +95,7 @@ const SharePost = ({ postId, post, postSharer, sharedPostId }) => {
className='btn btn-control share-link'
>
<LazyLoadImage
src='https://res.cloudinary.com/weare270b/image/upload/f_auto,q_auto/v1575849612/static/share-icon_rkyjac.png'
src='https://res.cloudinary.com/hylian/image/upload/f_auto,q_auto/v1575849612/static/share-icon_rkyjac.png'
alt=''
/>
</a>
Expand All @@ -104,10 +104,10 @@ const SharePost = ({ postId, post, postSharer, sharedPostId }) => {
<li>
<Link href onClick={e => handleButtonClick(e, mutate)}>
<LazyLoadImage
src='https://res.cloudinary.com/weare270b/image/upload/f_auto,q_auto/v1575849612/static/avocado-icon_rwvve0.png'
src='https://res.cloudinary.com/hylian/image/upload/f_auto,q_auto/v1575849612/static/local-icon_rwvve0.png'
alt=''
/>
<span>Avocado Share</span>
<span>Local Share</span>
</Link>
</li>
<li>
Expand Down
16 changes: 8 additions & 8 deletions src/components/Sidebar/SidebarContent.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const SidebarContent = ({ onSetSidebarOpen, isAuth, location }) => {
<Link to={generatePath(Routes.HOME)} className='logo'>
<div className='img-wrap'>
<LazyLoadImage
src='https://res.cloudinary.com/weare270b/image/upload/f_auto,q_auto/v1575849612/static/avocado-img_fwdb02.png'
src='https://res.cloudinary.com/hylian/image/upload/f_auto,q_auto/v1575849612/static/local-img_fwdb02.png'
alt='Olympus'
/>
</div>
Expand All @@ -26,7 +26,7 @@ const SidebarContent = ({ onSetSidebarOpen, isAuth, location }) => {
<div className='logo'>
<div className='img-wrap'>
<LazyLoadImage
src='https://res.cloudinary.com/weare270b/image/upload/f_auto,q_auto/v1575849612/static/avocado-img_fwdb02.png'
src='https://res.cloudinary.com/hylian/image/upload/f_auto,q_auto/v1575849612/static/local-img_fwdb02.png'
alt='Olympus'
onClick={() => onSetSidebarOpen(true, 'fixed-sidebar open')}
/>
Expand All @@ -38,7 +38,7 @@ const SidebarContent = ({ onSetSidebarOpen, isAuth, location }) => {
<div className='logo'>
<div className='img-wrap'>
<LazyLoadImage
src='https://res.cloudinary.com/weare270b/image/upload/f_auto,q_auto/v1575849612/static/avocado-img_fwdb02.png'
src='https://res.cloudinary.com/hylian/image/upload/f_auto,q_auto/v1575849612/static/local-img_fwdb02.png'
alt='Olympus'
/>
</div>
Expand All @@ -52,7 +52,7 @@ const SidebarContent = ({ onSetSidebarOpen, isAuth, location }) => {
<div className='js-sidebar-open'>
<OverlayTriggers toolTipText='OPEN MENU' placement='right'>
<img
src='https://res.cloudinary.com/weare270b/image/upload/f_auto,q_auto/v1575849612/static/menu-img_powmte.png'
src='https://res.cloudinary.com/hylian/image/upload/f_auto,q_auto/v1575849612/static/menu-img_powmte.png'
alt='OPEN MENU'
onClick={() =>
onSetSidebarOpen(true, 'fixed-sidebar open')
Expand All @@ -65,7 +65,7 @@ const SidebarContent = ({ onSetSidebarOpen, isAuth, location }) => {
<Link to={generatePath(Routes.HOME)}>
<OverlayTriggers toolTipText='NEWSFEED' placement='right'>
<img
src='https://res.cloudinary.com/weare270b/image/upload/f_auto,q_auto/v1575849612/static/avocado-icon_rwvve0.png'
src='https://res.cloudinary.com/hylian/image/upload/f_auto,q_auto/v1575849612/static/local-icon_rwvve0.png'
alt=''
/>
</OverlayTriggers>
Expand All @@ -75,7 +75,7 @@ const SidebarContent = ({ onSetSidebarOpen, isAuth, location }) => {
<Link to={generatePath(Routes.DISCOVER)}>
<OverlayTriggers toolTipText='DISCOVER' placement='right'>
<img
src='https://res.cloudinary.com/weare270b/image/upload/f_auto,q_auto/v1575849612/static/search-icon_vpzkxv.png'
src='https://res.cloudinary.com/hylian/image/upload/f_auto,q_auto/v1575849612/static/search-icon_vpzkxv.png'
alt=''
/>
</OverlayTriggers>
Expand All @@ -85,7 +85,7 @@ const SidebarContent = ({ onSetSidebarOpen, isAuth, location }) => {
<Link to={generatePath(Routes.HOME)}>
<OverlayTriggers toolTipText='FAVS' placement='right'>
<LazyLoadImage
src='https://res.cloudinary.com/weare270b/image/upload/f_auto,q_auto/v1575849612/static/star-icon_qbwpz1.png'
src='https://res.cloudinary.com/hylian/image/upload/f_auto,q_auto/v1575849612/static/star-icon_qbwpz1.png'
alt=''
/>
</OverlayTriggers>
Expand All @@ -95,7 +95,7 @@ const SidebarContent = ({ onSetSidebarOpen, isAuth, location }) => {
<Link to={generatePath(Routes.REWARDS)}>
<OverlayTriggers toolTipText='REWARDS' placement='right'>
<img
src='https://res.cloudinary.com/weare270b/image/upload/f_auto,q_auto/v1575849612/static/star-icon_qbwpz1.png'
src='https://res.cloudinary.com/hylian/image/upload/f_auto,q_auto/v1575849612/static/star-icon_qbwpz1.png'
alt=''
/>
</OverlayTriggers>
Expand Down
Loading

0 comments on commit 21fc759

Please sign in to comment.