This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const Projects = () => { | |
return ( | |
<> | |
<h2>Project Component</h2> | |
<div className="ui three cards"> | |
<ProjectCard /> | |
<ProjectCard /> | |
<ProjectCard /> | |
<ProjectCard /> | |
<ProjectCard /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react' | |
const ProjectCard = () => { | |
return ( | |
<div className="card"> | |
<div className= "image"> | |
<img></img> | |
</div> | |
<div className="content"> | |
<div className="header"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const Skills = () => { | |
const frontend = { | |
name:'Frontend Stack', | |
skills:['JavaScript','React/Redux','HTML','CSS','Bootstrap','SemanticUI'] | |
} | |
const backend = { | |
name: "Backend Stack", | |
skills: ['Python', 'Django', 'AWS', 'PostgreSQL'] | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react' | |
import SkillsList from './SkillsList' | |
const SkillsCard = (props) => { | |
return ( | |
<div className="card"> | |
<div className ="content"> | |
<div className= "center aligned header"> | |
{props.skills.name} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const Skills = () => { | |
const frontend = ['JavaScript','React/Redux','HTML','CSS','Bootstrap','SemanticUI'] | |
const backend = ['Python', 'Django', 'AWS', 'PostgreSQL'] | |
const gameDev = ['Unity','Phaser','PyGame'] | |
return ( | |
<> | |
<h1 className="ui center aligned basic segment">Skills</h1> | |
<div className="ui centered raised cards"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const Skills = () => { | |
return ( | |
<div className="ui three column grid"> | |
<h2>Skills Component</h2> | |
<div className="row"> | |
<div className="column"> | |
<SkillsList skills = {frontend}/> | |
</div> | |
<div className="column" > | |
<SkillsList skills = {backend}/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const SkillsList = (props) => { | |
return ( | |
<div className="ui list"> | |
{props.skills.map(skill => ( | |
<div className="item" key={skill}> | |
{skill} | |
</div> | |
))} | |
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react' | |
import Header from './Header' | |
import Projects from './Projects' | |
import Skills from './Skills' | |
const App = () => { | |
return ( | |
<div> | |
<Header /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from django.contrib import admin | |
from django.urls import path | |
from rest_framework import routers | |
from .api import ProjectInfoViewSet | |
router = routers.DefaultRouter() | |
router.register('api/projects',ProjectInfoViewSet) | |
urlpatterns = router.urls |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from backend.models import ProjectInfo | |
from rest_framework import viewsets | |
from .serializers import ProjectInfoSerializer | |
# Project Info viewset | |
# allows us to create a CRUD api without specifying methods for functionality | |
class ProjectInfoViewSet(viewsets.ModelViewSet): | |
queryset = ProjectInfo.objects.filter(show=True) |