Coder Social home page Coder Social logo

pafeltowicz / warsawjs-workshop-12-quiz Goto Github PK

View Code? Open in Web Editor NEW

This project forked from valian/warsawjs-workshop-12-quiz

0.0 1.0 0.0 4.22 MB

Quiz game prepared for #VueJS workshops in Warsaw

JavaScript 58.21% HTML 1.33% Vue 29.91% CSS 10.55%

warsawjs-workshop-12-quiz's Introduction

warsawjs-workshop-12-be-a-milionaire

A Vue.js workshop project. Goal of this workshops is to create clone of the Be a Milionaire game. It's a very popular TV show, where contestants can win up to 1 mln $.

Rules

User will face set of 10-15 questions with increasing difficulty levels. Each question has 4 answers, only one correct. First incorrect answer ends game.

Vue.js features used in workshops

Template syntax

  • interpolation (plus v-once)
  • raw html v-html
  • one-way binding v-bind (:)
  • conditionals v-if / v-else / v-show
  • events v-on (@)
  • two-way binding v-model
  • iteration v-for
  • special directive v-cloak
  • class and styles
  • where to put javascript?
  • transitions and animations

Components

  • data
  • methods
  • computed
  • watch
  • slots (default / named)
  • lifecycle
  • nested components
  • props
  • single file components
  • pure functional components

Reusability

  • mixins
  • plugins
  • extends
  • filters
  • custom events
  • custom model

Advanced

  • render function
  • reactivity in depth
  • State management with bus

Vuex

  • store structure
  • access from components
  • mutations
  • actions
  • getters
  • namespaces

Router

  • templates router-link and router-view
  • defining routes name, path, component, children
  • programmatic navigation $router.push and $router.go
  • advanced - guards
  • advanced - meta and multiple components

Tooling

  • vue-cli

<<<<<<< HEAD

Start

To start, go to branch starting-point (here) and follow instructions in README.md file.

Workshop roadmap

  • Introduction to Vue
  • Installation of Vue Dev Tools
  • standalone installation example
  • Single File Components, webpack, vue-cli
  • routing theory
  • setup router
  • create Intro route and add link from the main page
  • create PlayView and add link from Intro
  • create functional Layout for PlayView using slots
  • load questions using API and created hook, add currency filter
  • Game and QuestionsBar components, props, move currency filter to global scope
  • option to answer question
  • Vuex theory
  • setup store, change structure of app, no namespacing yet
  • implement quiz store, use it in components
  • Narrow Layout
  • Won and Lost Views
  • Loading and StartGameButton components - render function, mixins
  • Add settings store app + namespacing
  • New view for settings, link from RulesView
  • Custom v-model component - DifficultySlider
  • RootGetters in quiz for accessing difficulty kept in settings store
  • Transitions on routes and questions

starting-point

Build Setup

# install dependencies
npm install

# serve with hot reload at localhost:8080
npm run dev

# build for production with minification
npm run build

# build for production and view the bundle analyzer report
npm run build --report

For a detailed explanation on how things work, check out the guide and docs for vue-loader.

warsawjs-workshop-12-quiz's People

Contributors

valian avatar

Watchers

James Cloos avatar

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.