Code Monkey home page Code Monkey logo

sciencenewsresearch-front's Introduction

Collaborative Science News Research Project

Research Implementation about Collaborative Science News Research in KIXLAB 2018.

  yarn add
  yarn run start

How to deploy?

After make some changes in your branch, (in case you test your code)

  git add .
  git commit -m "your commit message"
  git checkout master
  git merge <your branch name> --no-ff
  git push origin master

  yarn build
  scp -i <your/pem file path/name.pem> -r build [email protected]:/var/www/

You can download name.pem if you are authorized user of above server.

How to change Tutorial?

Tutorial files are /src/Components/Pages/Intro, /src/Components/Pages/QuestionerIntro, and /src/Components/Pages/AnswererIntro. In Those files, there is function named recursive_listing that automatically renders array of objects.

const recursive_listing = (depth, data) => {
      return (
        <ol type={listing[depth % 3]}>
          {data.map(item => {
            return (
              <React.Fragment>
                <li>
                  <span dangerouslySetInnerHTML={{ __html: item.text }} />
                  <br />
                  {item.image && <img src={item.image} />}
                </li>
                {item.children &&
                  item.children.length > 0 &&
                  recursive_listing(depth + 1, item.children)}
              </React.Fragment>
            );
          })}
        </ol>
      );
    };

Each object can have text, children and image. You can change your introduction text manually in each file and also import some images. It's not clever way but you can place your all image files in /src/static/ and import those files by import ... from ... syntax. For example,

import duringQ from "../../../static/duringQ.png";

Then you can use that image by define object like this

const instructions = [
  {
    text: "hello intorduction",
    image: duringQ,
    children: [
      {text: "children text"}
    ]
  }
]

sciencenewsresearch-front's People

Contributors

chaht01 avatar eunyoung4444 avatar

Watchers

 avatar  avatar  avatar

Forkers

eunyoung4444

sciencenewsresearch-front's Issues

Questioner: Annotation rendering

  • Saga: Question model mock
  • Fetch Questions using mock Api
  • Listing
  • Mouseover event on sentence trigger highlight of question UI in list

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.