Coder Social home page Coder Social logo

etherethos-app's Introduction

Installation

To start the project locally you need to install the dev depencies for the project to have all it needs.

npm install

To start the dev environment

npm run start

For build command

npm run build

Please ensure that Tailwind CSS is installed as a depency in the package.json file.

Starting Tailwind

Before starting the tailwind process, I'll explain a bit how it works under the hood.

  • Tailwind uses the tailwind classes that are used in the project to generate a css file called output.css.
  • The input.css file actually import the Tailwind module.

To start the Tailwind watching and compiling process, run the CLI tool to scan your template files for classes and build your CSS.


npx tailwindcss -i ./css/input.css -o ./css/output.css --watch

Both script should run at the same time (npm run start and the Tailwind watcher)

Tailwind config

There is a file in the root of the project called tailwind.config.js.

This is where Tailwind is looking for js and html file to check for styling classes. The current config is tailored for this project so there is no need to change it.

Just below there is a parameter called theme. If you ever want to add specific colors or font to the project, this is where you can do it. Then if you want to use it you just need to add the theme variable to the tailwind css class

Here's an example with the "main" color

<div class="bg-main">

I don't put the custom font here since it's an adobe font and there is a cdn link on the head of the website.

Javascript targeting

I've put a bunch of data-attributes to html element and module so they can be target by js script and I hope will help manage the content and interation of each module

Modules

Each dynamic module should be contained in a <section> tag.

They can be target as a whole like this

document.querySelectorAll('[data-module]')

or they can be targetted specifically like this:

document.querySelector('[data-module="badges"]')

of course you should have no problem targetting them with templating variable.

document.querySelector('[data-module={var_name}]')

Targeting a module view/edit content

Each of these module has a view and an edit layout identified like this

data-module-view and data-module-edit.

You can target it through the parent section like this

const badge_elem = document.querySelector('[data-module="badges"]');
const badge_view = badge_elem.querySelector('[data-module-view]');

That way it will only target the view layout of that particular module.

Included Javascript Scripts

Right now there is an app.js file that is linked to the project. For now this file only toggles between the view mode and the edit mode.

There is also a basic function that add a field when you click on the add field button data-add-field.

That's about it and it is mostly to ensure a sandbox approach to how you want to make the bridge between the front-end and EtherScan.

You can modify this if you want.

etherethos-app's People

Contributors

tophercully avatar monkmatto avatar jobarbo avatar

Forkers

tophercully

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.