Giter Site home page Giter Site logo

iluvjava.github.io's Introduction

JustAWebsite

it's just a few html css files.

grepassages.html

  • Might need to add a dropdown manual at the top of nev bar to make it easier to read passages. (WIP)
    • Drop down manu will be created by the script. id="my-dropdown-manu"
      • Scan all elements with class: "passage Entry"
      • Add then passge title to the dropdown list as <li>
    • Hide unviewing passages on page
      • Make one of the passage entry to be on page by default.
      • Default unhidden must be manually coded in.

About The Technical Details

Promises and Async Function

  • Link
  • An async function can make calls to functions that return promises and then await all of the to finish.
  • await keyword can only be used for function that returns a promise.
  • Function that returns a promise:
    function returnAPromise()
    {
        return new promise
        (
            resolve =>
            {
                // what you wanna do here
                resolve(//your result here.);
            }
        )
    }
  • The promise can return something, just use the resolve() fxn to return to the the functions awaiting.
  • The let something = await somethingelse() will make the execute synchroous, should use promise.all() to execute shits all at the same time and wait for all of the them to finish.

Placement of the script tags

  • Global module patters ensure functions members are not accessible after website has been set up.
  • The main script of the page must be called before the boostrap.
    • This is the case because all the DOM objects must be set up properly before styling and adding listeners to them.
  • Adding the script tags in order into the HTML or using the global module patterns and event listener on windows also works.

My JS Library

  • Because front end dev is hard and contains lots of bull shit, building a library of my own will be really helpful if I were to continue doing front end bullshit.
  • This library is going to be based on Jquery.

convert()

  • This is a function that converts Json object in certain grammatical syntax into visual elements on the page.
  • The helper functions for it includes:
    • createElement();
    • createAttrs();
  • Here is the type of json that it can convert.
const MYELEMENTS = 
    [
        {
            element: "div" // element tag, <, > must be used. 
            , 
            parent: "body" // The parent that this element will be appended to. 
            ,
            attributes: 
            { 
                // ID is not supported. 
                alt: "TheAlText"
                , 
                src: "/example.com"
                , 
                "somethingelse": "stuff"
                ,
                "someattribues": "the key for that attributes."
                , 
                "somebooleanattribute": "" // use empty val for boolean attributes.  
            }
            ,
            children:
            [
                // recursion....
                // A value for "parents" is optional here. 
            ]
        }
    ]

iluvjava.github.io's People

Contributors

iluvjava avatar

Watchers

 avatar  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.