soci-frontend
web3-sign-msg
soci-frontend | web3-sign-msg | |
---|---|---|
4 | 1 | |
19 | 6 | |
- | - | |
0.0 | 0.0 | |
9 months ago | about 3 years ago | |
JavaScript | JavaScript | |
MIT License | - |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
soci-frontend
-
Using SVG to create simple sparkline charts
I ended up hand crafting my svg graphs for non.io for many of the same reasons. I originally was looking around at 3rd party libraries, but one of my goals with the site was to use as few external libraries as possible. I made an attempt at dynamically generating the svg points myself, and found it incredibly easy.
For context, here's the 22 lines of code it took to create a simple svg graph: https://github.com/jjcm/soci-frontend/blob/master/components...
And here's the final output: https://non.io/Animation-example
-
We Use Web Components at GitHub
CSS variables help somewhat with this. Variable values penetrate the shadowroot, so you can effectively build an "api" for styles your component. I've done that a few times, and it's been enough for me to get by in most cases. An example is here: https://github.com/jjcm/soci-frontend/blob/master/components...
-
Add a Dark Theme to a Ruby on Rails App
This is excellent for a small app, but if you have any production sized app or a larger team, it's not a great approach. Using colors directly in a theme override mean you have to then design and write the css for every page twice.
A better approach for doing dark mode is to use semantic tokens as a middleman. This works great not just for dark mode, but theming in general - allowing for high contrast mode, color blind modes, and others, while reducing the amount of effort required to style a new page (rather than growing multiplicatively with direct overrides).
If you're curious about this, I have a very basic schema I made for my app that you're welcome to steal here: https://github.com/jjcm/soci-frontend/blob/master/docs/token...
Here's an example implementation of the above schema: https://github.com/jjcm/soci-frontend/blob/master/soci-token...
The great thing is once it's implemented, it becomes VERY easy to know what token to use where. Got a button that's a primary action in a hover state? You probably want to use --brand-background-hover for the bg. Means you can do a lot of the design directly in code I find.
web3-sign-msg
-
We Use Web Components at GitHub
- The web component concept is great. Especially for mixing server-side rendering and JavaScript-powered components.
That last one IMO is web components killer feature. I can now wrote a mini component and then I tugg it in with the other 99% of my page that is rendered server side.
It means, I'm able to serve my users quickly. I have SEO'd everything too. Cool!
-1: https://github.com/TimDaub/web3-sign-msg
- 2: https://docs.ficusjs.org/
-3: https://github.com/developit/htm
What are some alternatives?
Stimulus - A modest JavaScript framework for the HTML you already have
services-as-dom-elements
web3-react-native - ⚛️ Web3 Native Modules for React Native.
view_component - A framework for building reusable, testable & encapsulated view components in Ruby on Rails.
open-wc - Open Web Components: guides, tools and libraries for developing web components.
community-protocols - Cross-component coordination protocols
0x-tracker-api - NodeJS API built for 0x Tracker which exposes 0x protocol data and metrics for consumption by the 0x Tracker Client application.
ficusjs - FicusJS is a set of lightweight functions for developing applications using web components
use-metamask - a custom React Hook to manage Metamask in Ethereum ĐApp projects