Coder Social home page Coder Social logo

j5py / j5py.github.io Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 60 KB

A simple Responsive Web Design acting as a Single Page Application from a previous account (it was initially a way to save my progress in CSS and JS, and it remains above all a way to practice JS).

Home Page: https://j5py.github.io

CSS 30.37% HTML 7.40% JavaScript 62.23%
javascript async-await fetch-api generator promise

j5py.github.io's People

Contributors

j5py avatar

Watchers

 avatar

j5py.github.io's Issues

Improve droppable menu listeners

As a JavaScript developer
I need to remove an event listener when it is no longer relevant
So that the event does not fire endlessly for no other purpose than to affect memory

Details and Assumptions

  • A listener is identified using a combination of the event type and the event listener function itself

Acceptance Criteria

Given the render.js update
When temporary console.log added to listeners only report a value at relevant times
Then the update is successful and the task is done when console.log are deleted

Under Construction message

As a website visitor
I need a message warning that the content and navigation is not yet available
So that I can understand that the page is not broken

Details and Assumptions

  • In the current state the repository has no content to retrieve and an error is thrown
  • The logic of dynamic.js should allow to display a message if no content

Acceptance Criteria

Given the home page
When simply loading the page before any content is added
Then we should clearly see a short explanation text

Default Content for development

As a developer
I need default content to fill templates
So that I can test the behaviour and verify the rendering

Details and Assumptions

  • For now, the content is retrieved in pages.js
  • There should be a pre-filled dev file and an editable one

Acceptance Criteria

Given no personal content was added
When loading the home page with default values
Then navigation links are functional and the page is not empty

Cache buster should only be used for JSON

As a user
I need the logic to load quickly and make sure I have the latest content
So that I can enjoy browsing immediately

Details and Assumptions

  • JavaScript files can be cached, ultimately only JSON content will be modified frequently

Acceptance Criteria

Given the move of the getCacheBuster method and its use on the JSON request only
When the page is reloaded
Then only the JSON file is replaced due to the random value of the query string

Slugify any page title for readable URLs

As a Git user
I need to fill the input file without worrying about special characters for page titles
So that when I clone or fork the repository the code already covers many cases for a clean URL

Details and Assumptions

  • Modify the string.getSlug method of js/common.js to replace or remove the most common English and French characters made unreadable by encodeURI
  • Perform local tests with different values, leave changes to js/input.js or data/test.json files for the next issue

Acceptance Criteria

Given local tests
When a dozen character combinations for page titles return clean URL hashes not impacted by `encodeURI`
Then the modification of `string.getSlug` is considered acceptable at this stage

Modern Promises async/await

As a user
I need the quickest initial rendering possible
So that I don't leave after 3 seconds

Details and Assumptions

  • Remove boot.script.waitLoad and boot.init in boot.js
  • Write a method based async and await

Acceptance Criteria

Given the modification of the code
When loading the home page
Then the rendering should be immediate

JavaScript Review: Array Methods, Iterators and Generators

As a JavaScript developer
I need to use all the native features of the language
So that the code is as light and readable as possible

Details and Assumptions

  • Examine each loop and function by evaluating whether any of the Array.prototype methods listed on MDN, or any of the iterators and generators mentioned in one of my gists, can replace multiple lines of code

Acceptance Criteria

Given a careful reading
When I am sure that no JavaScript can be optimized
Then the task is done

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.