feat: add PWA support

This commit is contained in:
divlo 2020-12-28 13:07:21 +01:00
parent c594577415
commit c285d3b69e
72 changed files with 2892 additions and 1339 deletions

View File

@ -1,2 +1,4 @@
node_modules node_modules
build build
dist
.next

View File

@ -1,3 +1,3 @@
COMPOSE_PROJECT_NAME="function.divlo.fr-website" COMPOSE_PROJECT_NAME="function.divlo.fr-website"
NEXT_PUBLIC_API_URL = "http://localhost:8080" NEXT_PUBLIC_API_URL="http://localhost:8080"
CONTAINER_API_URL="http://functionproject-api:8080" CONTAINER_API_URL="http://functionproject-api:8080"

View File

@ -0,0 +1,33 @@
import Link from 'next/link'
export default function Footer() {
return (
<>
<footer className="footer">
<p className="footer-text text-center">
<Link href="/about">
<a>FunctionProject</a>
</Link>
&nbsp;- Version 2.3 <br />
<a href="https://divlo.fr/" target="_blank" rel="noopener noreferrer">
Divlo
</a>{' '}
| Tous droits réservés
</p>
</footer>
<style jsx>{`
.footer {
border-top: var(--border-header-footer);
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
}
.footer-text {
line-height: 2.5;
}
`}</style>
</>
)
}

View File

@ -1,10 +0,0 @@
.footer {
border-top: var(--border-header-footer);
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
}
.footer-text {
line-height: 2.5;
}

View File

@ -1,19 +0,0 @@
import Link from 'next/link'
import './Footer.css'
export default function Footer () {
return (
<footer className='footer'>
<p className='footer-text text-center'>
<Link href='/about'>
<a>FunctionProject</a>
</Link>
&nbsp;- Version 2.3 <br />
<a href='https://divlo.fr/' target='_blank' rel='noopener noreferrer'>
Divlo
</a>{' '}
| Tous droits réservés
</p>
</footer>
)
}

View File

@ -3,7 +3,6 @@ import htmlParser from 'html-react-parser'
import Loader from '../Loader' import Loader from '../Loader'
import useAPI from '../../hooks/useAPI' import useAPI from '../../hooks/useAPI'
import api from '../../utils/api' import api from '../../utils/api'
import '../../public/css/pages/admin.css'
const AddEditFunction = props => { const AddEditFunction = props => {
const [, categories] = useAPI('/categories') const [, categories] = useAPI('/categories')

View File

@ -3,8 +3,6 @@ import dynamic from 'next/dynamic'
import { complex } from '../../utils/sunEditorConfig' import { complex } from '../../utils/sunEditorConfig'
import api from '../../utils/api' import api from '../../utils/api'
import FunctionArticle from '../FunctionPage/FunctionArticle' import FunctionArticle from '../FunctionPage/FunctionArticle'
import 'notyf/notyf.min.css'
import '../../public/css/suneditor.min.css'
const SunEditor = dynamic(() => import('suneditor-react'), { ssr: false }) const SunEditor = dynamic(() => import('suneditor-react'), { ssr: false })

View File

@ -1,6 +1,5 @@
import { useState } from 'react' import { useState } from 'react'
import api from '../../utils/api' import api from '../../utils/api'
import 'notyf/notyf.min.css'
const EditFormFunction = props => { const EditFormFunction = props => {
const [inputsArray, setInputsArray] = useState( const [inputsArray, setInputsArray] = useState(

View File

@ -1,67 +0,0 @@
.FunctionCard {
display: flex;
align-items: center;
position: relative;
flex-direction: column;
word-wrap: break-word;
box-shadow: 0px 0px 6px 6px rgba(0, 0, 0, 0.25);
border: 1px solid black;
border-radius: 1rem;
margin: 0 0 50px 0;
cursor: pointer;
transition: all 0.3s;
color: var(--text-color);
text-decoration: none !important;
}
.FunctionCard__container {
height: 100%;
width: 100%;
display: flex;
flex-direction: column;
}
.FunctionCard:hover {
transform: translateY(-7px);
}
/* col-md */
@media (min-width: 768px) {
.FunctionCard {
margin: 0 30px 50px 30px;
}
}
/* col-xl */
@media (min-width: 1200px) {
.FunctionCard {
margin: 0 20px 50px 20px;
}
}
.FunctionCard__top {
display: flex;
flex-direction: column;
align-items: center;
flex-grow: 1;
}
.FunctionCard__image {
width: 150px;
}
.FunctionCard__title {
font-size: 1.4em;
margin: 0;
color: var(--important);
font-weight: 300;
}
.FunctionCard__description {
margin: 20px 0 10px 0;
}
.FunctionCard__info {
display: flex;
justify-content: center;
align-items: center;
width: 100%;
}
.FunctionCard__category {
border-radius: 0.5em;
padding: 0.5em;
margin-right: 20px;
font-size: 16.4px;
}

View File

@ -3,7 +3,6 @@ import { useState, forwardRef, memo } from 'react'
import date from 'date-and-time' import date from 'date-and-time'
import Loader from '../Loader' import Loader from '../Loader'
import { API_URL } from '../../utils/api' import { API_URL } from '../../utils/api'
import './FunctionCard.css'
const FunctionCard = memo( const FunctionCard = memo(
forwardRef((props, ref) => { forwardRef((props, ref) => {
@ -13,13 +12,14 @@ const FunctionCard = memo(
setIsLoading(false) setIsLoading(false)
} }
const handleError = event => { const handleError = (event) => {
event.target.src = API_URL + '/images/functions/default.png' event.target.src = API_URL + '/images/functions/default.png'
} }
const isFormOrArticle = props.type === 'form' || props.type === 'article' const isFormOrArticle = props.type === 'form' || props.type === 'article'
return ( return (
<>
<Link <Link
{...(props.isAdmin {...(props.isAdmin
? { ? {
@ -39,40 +39,111 @@ const FunctionCard = memo(
style={ style={
isLoading ? { height: '360px', justifyContent: 'center' } : null isLoading ? { height: '360px', justifyContent: 'center' } : null
} }
className='FunctionCard col-sm-24 col-md-10 col-xl-7' className="FunctionCard col-sm-24 col-md-10 col-xl-7"
> >
{isLoading && <Loader width='125px' height='125px' />} {isLoading && <Loader width="125px" height="125px" />}
<div <div
className={`FunctionCard__container ${isLoading ? 'd-none' : ''}`} className={`FunctionCard__container ${isLoading ? 'd-none' : ''}`}
> >
<div className='FunctionCard__top'> <div className="FunctionCard__top">
<img <img
onLoad={handleLoad} onLoad={handleLoad}
onError={handleError} onError={handleError}
className='FunctionCard__image' className="FunctionCard__image"
alt={props.title} alt={props.title}
src={API_URL + props.image} src={API_URL + props.image}
/> />
<h2 className='FunctionCard__title'>{props.title}</h2> <h2 className="FunctionCard__title">{props.title}</h2>
<p className='FunctionCard__description text-center'> <p className="FunctionCard__description text-center">
{props.description} {props.description}
</p> </p>
</div> </div>
<div className='FunctionCard__info'> <div className="FunctionCard__info">
<p <p
className='FunctionCard__category' className="FunctionCard__category"
style={{ backgroundColor: props.categorie.color }} style={{ backgroundColor: props.categorie.color }}
> >
{props.categorie.name} {props.categorie.name}
</p> </p>
<p className='FunctionCard__publication-date'> <p className="FunctionCard__publication-date">
{date.format(new Date(props.createdAt), 'DD/MM/YYYY', false)} {date.format(new Date(props.createdAt), 'DD/MM/YYYY', false)}
</p> </p>
</div> </div>
</div> </div>
</a> </a>
</Link> </Link>
<style jsx>{`
.FunctionCard {
display: flex;
align-items: center;
position: relative;
flex-direction: column;
word-wrap: break-word;
box-shadow: 0px 0px 6px 6px rgba(0, 0, 0, 0.25);
border: 1px solid black;
border-radius: 1rem;
margin: 0 0 50px 0;
cursor: pointer;
transition: all 0.3s;
color: var(--text-color);
text-decoration: none !important;
}
.FunctionCard__container {
height: 100%;
width: 100%;
display: flex;
flex-direction: column;
}
.FunctionCard:hover {
transform: translateY(-7px);
}
/* col-md */
@media (min-width: 768px) {
.FunctionCard {
margin: 0 30px 50px 30px;
}
}
/* col-xl */
@media (min-width: 1200px) {
.FunctionCard {
margin: 0 20px 50px 20px;
}
}
.FunctionCard__top {
display: flex;
flex-direction: column;
align-items: center;
flex-grow: 1;
}
.FunctionCard__image {
width: 150px;
}
.FunctionCard__title {
font-size: 1.4em;
margin: 0;
color: var(--important);
font-weight: 300;
}
.FunctionCard__description {
margin: 20px 0 10px 0;
}
.FunctionCard__info {
display: flex;
justify-content: center;
align-items: center;
width: 100%;
}
.FunctionCard__category {
border-radius: 0.5em;
padding: 0.5em;
margin-right: 20px;
font-size: 16.4px;
}
`}</style>
</>
) )
}) })
) )

View File

@ -6,7 +6,6 @@ import { UserContext } from '../../../contexts/UserContext'
import ReactMarkdown from 'react-markdown' import ReactMarkdown from 'react-markdown'
import CodeBlock from '../../CodeBlock' import CodeBlock from '../../CodeBlock'
import api, { API_URL } from '../../../utils/api' import api, { API_URL } from '../../../utils/api'
import './CommentCard.css'
const CommentCard = forwardRef((props, ref) => { const CommentCard = forwardRef((props, ref) => {
const { isAuth, user } = useContext(UserContext) const { isAuth, user } = useContext(UserContext)

View File

@ -4,7 +4,6 @@ import { UserContext } from '../../../contexts/UserContext'
import CommentCard from '../CommentCard/CommentCard' import CommentCard from '../CommentCard/CommentCard'
import Loader from '../../Loader' import Loader from '../../Loader'
import api from '../../../utils/api' import api from '../../../utils/api'
import './FunctionComments.css'
const FunctionComments = ({ functionId }) => { const FunctionComments = ({ functionId }) => {
// State pour poster un commentaire // State pour poster un commentaire

View File

@ -6,7 +6,6 @@ import { faStar as farStar } from '@fortawesome/free-regular-svg-icons'
import date from 'date-and-time' import date from 'date-and-time'
import { UserContext } from '../../contexts/UserContext' import { UserContext } from '../../contexts/UserContext'
import api, { API_URL } from '../../utils/api' import api, { API_URL } from '../../utils/api'
import '../FunctionCard/FunctionCard.css'
const FunctionComponentTop = props => { const FunctionComponentTop = props => {
const { isAuth, user } = useContext(UserContext) const { isAuth, user } = useContext(UserContext)

View File

@ -6,7 +6,6 @@ import api from '../../utils/api'
import fr from 'date-fns/locale/fr' import fr from 'date-fns/locale/fr'
import { registerLocale } from 'react-datepicker' import { registerLocale } from 'react-datepicker'
import date from 'date-and-time' import date from 'date-and-time'
import 'react-datepicker/dist/react-datepicker.css'
registerLocale('fr', fr) registerLocale('fr', fr)

View File

@ -1,5 +1,4 @@
import SwipeableViews from 'react-swipeable-views' import SwipeableViews from 'react-swipeable-views'
import './FunctionTabs.css'
const FunctionTabs = props => { const FunctionTabs = props => {
return ( return (

View File

@ -4,7 +4,6 @@ import FunctionCard from '../FunctionCard/FunctionCard'
import Loader from '../Loader' import Loader from '../Loader'
import api from '../../utils/api' import api from '../../utils/api'
import useAPI from '../../hooks/useAPI' import useAPI from '../../hooks/useAPI'
import './FunctionsList.css'
let pageFunctions = 1 let pageFunctions = 1
const FunctionsList = props => { const FunctionsList = props => {

View File

@ -1,44 +1,49 @@
import Head from 'next/head' import Head from 'next/head'
const HeadTag = ({ title, image, description }) => ( const HeadTag = (props) => {
const {
title = 'FunctionProject',
image = '/images/FunctionProject_icon_small.png',
description = "Apprenez la programmation grâce à l'apprentissage par projet alias fonction.",
url = 'https://function.divlo.fr/'
} = props
return (
<Head> <Head>
<title>{title || ''}</title> <title>{title}</title>
<link rel='icon' type='image/png' href={image} /> <link rel="icon" type="image/png" href={image} />
{/* Meta Tag */} {/* Meta Tag */}
<meta name='viewport' content='width=device-width, initial-scale=1' /> <meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name='description' content={description} /> <meta name="description" content={description} />
<link rel='canonical' href='function.divlo.fr' /> <meta name="Language" content="fr" />
<meta name='Language' content='fr' /> <meta name="theme-color" content="#ffd800" />
<meta name='theme-color' content='#ffd800' />
{/* Open Graph Metadata */} {/* Open Graph Metadata */}
<meta property='og:title' content={title} /> <meta property="og:title" content={title} />
<meta property='og:type' content='website' /> <meta property="og:type" content="website" />
<meta property='og:url' content='https://function.divlo.fr/' /> <meta property="og:url" content={url} />
<meta property='og:image' content={image} /> <meta property="og:image" content={image} />
<meta property='og:description' content={description} /> <meta property="og:description" content={description} />
<meta property='og:locale' content='fr_FR' /> <meta property="og:locale" content="fr_FR" />
<meta property='og:site_name' content='FunctionProject' /> <meta property="og:site_name" content={title} />
{/* Twitter card Metadata */} {/* Twitter card Metadata */}
<meta name='twitter:card' content='summary' /> <meta name="twitter:card" content="summary" />
<meta name='twitter:description' content={description} /> <meta name="twitter:description" content={description} />
<meta name='twitter:title' content={title} /> <meta name="twitter:title" content={title} />
<meta name='twitter:site' content='@Divlo_FR' /> <meta name="twitter:image:src" content={image} />
<meta name='twitter:image:src' content={image} />
<meta name='twitter:creator' content='@Divlo_FR' /> {/* PWA Data */}
<link rel="manifest" href="/manifest.json" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="mobile-web-app-capable" content="yes" />
<link rel="apple-touch-icon" href={image} />
{/* Preloader script */} {/* Preloader script */}
<script src='/js/preloader.js' /> <script src="/js/preloader.js" />
</Head> </Head>
) )
HeadTag.defaultProps = {
title: 'FunctionProject',
description:
"Apprenez la programmation grâce à l'apprentissage par projet alias fonction.",
image: '/images/FunctionProject_icon_small.png'
} }
export default HeadTag export default HeadTag

View File

@ -3,7 +3,6 @@ import { UserContext } from '../../contexts/UserContext'
import Link from 'next/link' import Link from 'next/link'
import { useRouter } from 'next/router' import { useRouter } from 'next/router'
import NavigationLink from './NavigationLink' import NavigationLink from './NavigationLink'
import './Header.css'
export default function Header () { export default function Header () {
const { isAuth, logoutUser, user } = useContext(UserContext) const { isAuth, logoutUser, user } = useContext(UserContext)

View File

@ -1,6 +1,5 @@
import Link from 'next/link' import Link from 'next/link'
import { useRouter } from 'next/router' import { useRouter } from 'next/router'
import './Header.css'
export default function NavigationLink (props) { export default function NavigationLink (props) {
const { pathname } = useRouter() const { pathname } = useRouter()

View File

@ -1,7 +1,6 @@
import Link from 'next/link' import Link from 'next/link'
import { forwardRef, memo } from 'react' import { forwardRef, memo } from 'react'
import { API_URL } from '../../utils/api' import { API_URL } from '../../utils/api'
import './UserCard.css'
const UserCard = memo( const UserCard = memo(
forwardRef((props, ref) => { forwardRef((props, ref) => {

View File

@ -1,3 +1,11 @@
const withCSS = require('@zeit/next-css')
const withFonts = require('next-fonts') const withFonts = require('next-fonts')
module.exports = withFonts(withCSS()) const withPWA = require('next-pwa')
module.exports = withFonts(
withPWA({
pwa: {
disable: process.env.NODE_ENV !== 'production',
dest: 'public'
}
})
)

3716
website/package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -27,7 +27,6 @@
"@fortawesome/free-regular-svg-icons": "^5.15.1", "@fortawesome/free-regular-svg-icons": "^5.15.1",
"@fortawesome/free-solid-svg-icons": "^5.15.1", "@fortawesome/free-solid-svg-icons": "^5.15.1",
"@fortawesome/react-fontawesome": "^0.1.14", "@fortawesome/react-fontawesome": "^0.1.14",
"@zeit/next-css": "^1.0.1",
"axios": "^0.21.1", "axios": "^0.21.1",
"date-and-time": "^0.14.2", "date-and-time": "^0.14.2",
"date-fns": "^2.16.1", "date-fns": "^2.16.1",
@ -36,6 +35,7 @@
"html-react-parser": "^1.1.1", "html-react-parser": "^1.1.1",
"next": "^10.0.4", "next": "^10.0.4",
"next-fonts": "^1.5.1", "next-fonts": "^1.5.1",
"next-pwa": "^5.0.1",
"notyf": "^3.9.0", "notyf": "^3.9.0",
"nprogress": "^0.2.0", "nprogress": "^0.2.0",
"react": "17.0.1", "react": "17.0.1",

View File

@ -1,6 +1,5 @@
import Link from 'next/link' import Link from 'next/link'
import HeadTag from '../components/HeadTag' import HeadTag from '../components/HeadTag'
import '../public/css/pages/404.css'
const Error404 = () => ( const Error404 = () => (
<> <>

View File

@ -4,17 +4,36 @@ import NProgress from 'nprogress'
/* Components Imports */ /* Components Imports */
import Header from '../components/Header/Header' import Header from '../components/Header/Header'
import Footer from '../components/Footer/Footer' import Footer from '../components/Footer'
/* Contexts Imports */ /* Contexts Imports */
import UserContextProvider from '../contexts/UserContext' import UserContextProvider from '../contexts/UserContext'
/* CSS Imports */ /* CSS Imports */
import 'notyf/notyf.min.css'
import 'react-datepicker/dist/react-datepicker.css'
import '../public/fonts/Montserrat/Montserrat.css' import '../public/fonts/Montserrat/Montserrat.css'
import '../public/css/normalize.css' import '../styles/suneditor.min.css'
import '../public/css/grid.css' import '../styles/normalize.css'
import '../public/css/general.css' import '../styles/grid.css'
import '../public/css/nprogress.css' import '../styles/general.css'
import '../styles/nprogress.css'
import '../styles/pages/admin.css'
import '../styles/pages/404.css'
import '../styles/pages/index.css'
import '../styles/pages/profile.css'
import '../styles/pages/register-login.css'
import '../styles/pages/users.css'
import '../styles/pages/FunctionComponent.css'
import '../styles/pages/functions/chronometerTimer.css'
import '../styles/pages/functions/rightPrice.css'
import '../styles/pages/functions/toDoList.css'
import '../styles/components/Header.css'
import '../styles/components/FunctionTabs.css'
import '../styles/components/CommentCard.css'
import '../styles/components/FunctionComments.css'
import '../styles/components/FunctionsList.css'
import '../styles/components/UserCard.css'
Router.events.on('routeChangeStart', () => NProgress.start()) Router.events.on('routeChangeStart', () => NProgress.start())
Router.events.on('routeChangeComplete', () => NProgress.done()) Router.events.on('routeChangeComplete', () => NProgress.done())

View File

@ -7,8 +7,6 @@ import EditArticleFunction from '../../components/FunctionAdmin/EditArticleFunct
import EditFormFunction from '../../components/FunctionAdmin/EditFormFunction' import EditFormFunction from '../../components/FunctionAdmin/EditFormFunction'
import redirect from '../../utils/redirect' import redirect from '../../utils/redirect'
import api, { API_URL } from '../../utils/api' import api, { API_URL } from '../../utils/api'
import '../../components/FunctionPage/FunctionTabs.css'
import '../../public/css/pages/admin.css'
const AdminFunctionComponent = props => { const AdminFunctionComponent = props => {
const [slideIndex, setSlideIndex] = useState(0) const [slideIndex, setSlideIndex] = useState(0)

View File

@ -8,7 +8,6 @@ import Modal from '../../components/Modal'
import FunctionsList from '../../components/FunctionsList/FunctionsList' import FunctionsList from '../../components/FunctionsList/FunctionsList'
import AddEditFunction from '../../components/FunctionAdmin/AddEditFunction' import AddEditFunction from '../../components/FunctionAdmin/AddEditFunction'
import redirect from '../../utils/redirect' import redirect from '../../utils/redirect'
import '../../public/css/pages/admin.css'
const Admin = props => { const Admin = props => {
const [isOpen, setIsOpen] = useState(false) const [isOpen, setIsOpen] = useState(false)

View File

@ -11,7 +11,6 @@ import htmlParser from 'html-react-parser'
import Loader from '../../components/Loader' import Loader from '../../components/Loader'
import useAPI from '../../hooks/useAPI' import useAPI from '../../hooks/useAPI'
import api from '../../utils/api' import api from '../../utils/api'
import '../../public/css/pages/admin.css'
const defaultCategoryState = { name: '', color: '#ffffff' } const defaultCategoryState = { name: '', color: '#ffffff' }

View File

@ -6,7 +6,6 @@ import { faCheck, faTrash } from '@fortawesome/free-solid-svg-icons'
import redirect from '../../utils/redirect' import redirect from '../../utils/redirect'
import HeadTag from '../../components/HeadTag' import HeadTag from '../../components/HeadTag'
import api from '../../utils/api' import api from '../../utils/api'
import '../../public/css/pages/admin.css'
const manageQuotes = props => { const manageQuotes = props => {
const [quotesData, setQuotesData] = useState({ const [quotesData, setQuotesData] = useState({

View File

@ -5,7 +5,6 @@ import FunctionComments from '../../components/FunctionPage/FunctionComments/Fun
import FunctionPage from '../../components/FunctionPage/FunctionPage' import FunctionPage from '../../components/FunctionPage/FunctionPage'
import redirect from '../../utils/redirect' import redirect from '../../utils/redirect'
import api from '../../utils/api' import api from '../../utils/api'
import '../../public/css/pages/FunctionComponent.css'
const FunctionTabManager = props => { const FunctionTabManager = props => {
if (props.type === 'form') { if (props.type === 'form') {

View File

@ -9,8 +9,6 @@ import Loader from '../../components/Loader'
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome' import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
import { faPlay, faPause, faSync } from '@fortawesome/free-solid-svg-icons' import { faPlay, faPause, faSync } from '@fortawesome/free-solid-svg-icons'
import api from '../../utils/api' import api from '../../utils/api'
import '../../public/css/pages/FunctionComponent.css'
import '../../public/css/pages/functions/chronometerTimer.css'
let interval let interval
function convertSeconds (seconds) { function convertSeconds (seconds) {

View File

@ -12,9 +12,6 @@ import FunctionArticle from '../../components/FunctionPage/FunctionArticle'
import FunctionComments from '../../components/FunctionPage/FunctionComments/FunctionComments' import FunctionComments from '../../components/FunctionPage/FunctionComments/FunctionComments'
import Modal from '../../components/Modal' import Modal from '../../components/Modal'
import api from '../../utils/api' import api from '../../utils/api'
import 'notyf/notyf.min.css'
import '../../public/css/pages/FunctionComponent.css'
import '../../public/css/pages/admin.css'
const CreateLink = ({ linksData, setLinksData }) => { const CreateLink = ({ linksData, setLinksData }) => {
const { isAuth, user } = useContext(UserContext) const { isAuth, user } = useContext(UserContext)

View File

@ -12,8 +12,6 @@ import FunctionArticle from '../../components/FunctionPage/FunctionArticle'
import FunctionComments from '../../components/FunctionPage/FunctionComments/FunctionComments' import FunctionComments from '../../components/FunctionPage/FunctionComments/FunctionComments'
import api from '../../utils/api' import api from '../../utils/api'
import copyToClipboard from '../../utils/copyToClipboard' import copyToClipboard from '../../utils/copyToClipboard'
import 'notyf/notyf.min.css'
import '../../public/css/pages/FunctionComponent.css'
const GenerateQuote = () => { const GenerateQuote = () => {
const [quote, setQuote] = useState({ quote: '', author: '' }) const [quote, setQuote] = useState({ quote: '', author: '' })

View File

@ -6,8 +6,6 @@ import FunctionArticle from '../../components/FunctionPage/FunctionArticle'
import FunctionComments from '../../components/FunctionPage/FunctionComments/FunctionComments' import FunctionComments from '../../components/FunctionPage/FunctionComments/FunctionComments'
import Loader from '../../components/Loader' import Loader from '../../components/Loader'
import api from '../../utils/api' import api from '../../utils/api'
import '../../public/css/pages/FunctionComponent.css'
import '../../public/css/pages/functions/rightPrice.css'
const PlayRightPrice = () => { const PlayRightPrice = () => {
const [isPlaying, setIsPlaying] = useState(false) const [isPlaying, setIsPlaying] = useState(false)

View File

@ -9,8 +9,6 @@ import FunctionTabs from '../../components/FunctionPage/FunctionTabs'
import FunctionArticle from '../../components/FunctionPage/FunctionArticle' import FunctionArticle from '../../components/FunctionPage/FunctionArticle'
import FunctionComments from '../../components/FunctionPage/FunctionComments/FunctionComments' import FunctionComments from '../../components/FunctionPage/FunctionComments/FunctionComments'
import api from '../../utils/api' import api from '../../utils/api'
import '../../public/css/pages/FunctionComponent.css'
import '../../public/css/pages/functions/toDoList.css'
const ManageToDo = () => { const ManageToDo = () => {
const { isAuth, user } = useContext(UserContext) const { isAuth, user } = useContext(UserContext)

View File

@ -4,7 +4,6 @@ import { autoPlay } from 'react-swipeable-views-utils'
import Link from 'next/link' import Link from 'next/link'
import HeadTag from '../components/HeadTag' import HeadTag from '../components/HeadTag'
import Loader from '../components/Loader' import Loader from '../components/Loader'
import '../public/css/pages/index.css'
const AutoPlaySwipeableViews = autoPlay(SwipeableViews) const AutoPlaySwipeableViews = autoPlay(SwipeableViews)

View File

@ -13,7 +13,6 @@ import Loader from '../../components/Loader'
import ReactMarkdown from 'react-markdown' import ReactMarkdown from 'react-markdown'
import CodeBlock from '../../components/CodeBlock' import CodeBlock from '../../components/CodeBlock'
import api, { API_URL } from '../../utils/api' import api, { API_URL } from '../../utils/api'
import '../../public/css/pages/profile.css'
const Profile = props => { const Profile = props => {
const { isAuth, user, logoutUser } = useContext(UserContext) const { isAuth, user, logoutUser } = useContext(UserContext)

View File

@ -4,7 +4,6 @@ import Loader from '../../components/Loader'
import HeadTag from '../../components/HeadTag' import HeadTag from '../../components/HeadTag'
import api from '../../utils/api' import api from '../../utils/api'
import withoutAuth from '../../hoc/withoutAuth' import withoutAuth from '../../hoc/withoutAuth'
import '../../public/css/pages/register-login.css'
const forgotPassword = () => { const forgotPassword = () => {
const [inputState, setInputState] = useState({}) const [inputState, setInputState] = useState({})

View File

@ -3,7 +3,6 @@ import HeadTag from '../../components/HeadTag'
import Loader from '../../components/Loader' import Loader from '../../components/Loader'
import UserCard from '../../components/UserCard/UserCard' import UserCard from '../../components/UserCard/UserCard'
import api from '../../utils/api' import api from '../../utils/api'
import '../../public/css/pages/users.css'
const Users = () => { const Users = () => {
let pageUsers = 1 let pageUsers = 1

View File

@ -6,7 +6,6 @@ import Loader from '../../components/Loader'
import HeadTag from '../../components/HeadTag' import HeadTag from '../../components/HeadTag'
import { UserContext } from '../../contexts/UserContext' import { UserContext } from '../../contexts/UserContext'
import withoutAuth from '../../hoc/withoutAuth' import withoutAuth from '../../hoc/withoutAuth'
import '../../public/css/pages/register-login.css'
const Login = () => { const Login = () => {
const router = useRouter() const router = useRouter()

View File

@ -5,7 +5,6 @@ import HeadTag from '../../components/HeadTag'
import api from '../../utils/api' import api from '../../utils/api'
import redirect from '../../utils/redirect' import redirect from '../../utils/redirect'
import withoutAuth from '../../hoc/withoutAuth' import withoutAuth from '../../hoc/withoutAuth'
import '../../public/css/pages/register-login.css'
const newPassword = (props) => { const newPassword = (props) => {
const [inputState, setInputState] = useState({}) const [inputState, setInputState] = useState({})

View File

@ -4,7 +4,6 @@ import Loader from '../../components/Loader'
import HeadTag from '../../components/HeadTag' import HeadTag from '../../components/HeadTag'
import api from '../../utils/api' import api from '../../utils/api'
import withoutAuth from '../../hoc/withoutAuth' import withoutAuth from '../../hoc/withoutAuth'
import '../../public/css/pages/register-login.css'
const Register = () => { const Register = () => {
const [inputState, setInputState] = useState({ name: '', email: '', password: '' }) const [inputState, setInputState] = useState({ name: '', email: '', password: '' })

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 KiB

View File

@ -0,0 +1,51 @@
{
"name": "FunctionProject",
"short_name": "FunctionProject",
"icons": [
{
"src": "images/icons/icon-72x72.png",
"sizes": "72x72",
"type": "image/png"
},
{
"src": "images/icons/icon-96x96.png",
"sizes": "96x96",
"type": "image/png"
},
{
"src": "images/icons/icon-128x128.png",
"sizes": "128x128",
"type": "image/png"
},
{
"src": "images/icons/icon-144x144.png",
"sizes": "144x144",
"type": "image/png"
},
{
"src": "images/icons/icon-152x152.png",
"sizes": "152x152",
"type": "image/png"
},
{
"src": "images/icons/icon-192x192.png",
"sizes": "192x192",
"type": "image/png",
"purpose": "maskable"
},
{
"src": "images/icons/icon-384x384.png",
"sizes": "384x384",
"type": "image/png"
},
{
"src": "images/icons/icon-512x512.png",
"sizes": "512x512",
"type": "image/png"
}
],
"theme_color": "#ffd800",
"background_color": "#181818",
"start_url": "/",
"display": "standalone"
}