
來用 Sketch 畫你的 UI 吧 | VISIONCAN 在之前就聽說過這個黃黃的鑽石 Sketch 來畫 UI 相當好用,就趁當時 Sketch 3 推出時入手了,再親身體驗過後,我推薦用 Sketch 來畫你的 UI,以下跟大家簡單分享幾個我回不去 Photoshop 的特點: 超方便的圖片匯出 因應 Retina 的螢幕,Sketch 可以很方便的一次輸出多個倍數匯出,傳統用 Photoshop 可能得先輸出 2x 再去縮 1x,另一個好處是 Sketch 是向量的,可以先畫 1x 再輸出 2x 甚至更大 3x,若要支援甫推出的 iPhone 6 Plus 可說是無痛升級 3x!註: 其實 Photoshop 也是可以向量,只是用起來不那麼方便! 我之前的作法給大家參考一下,由於我是使用 Macbook Retina 螢幕,所以我是先畫 2x,再去縮放 0.5 倍及 1.5 倍: 另一個亮點就是不用特地隱藏其它圖層可以直接輸出我要的圖層,過往使用 Photoshop 得先隱藏某些圖層才能再輸出(Save to Web),但若是用 Sketch 的 slice 切片功能還是得隱藏部份圖層就是。 輸出還有一個很方便的功能,就是在預覽區裡就可以直接使用拖拉輸出圖片了,一個動作就將檔案加到寄件附件裡! 相對間距顯示 按下 option 再移動可以方便的知道物件間距是多少,透過不同物件中移動可以很快速的知道相對的座標及間距或是否有置中。 多層的填色、外框、陰影 元素可以有很多層的填色、外框等,效果可以疊加,另一方面在單一元素的 A/B test 很好用啊~ 建立可重用 symbols、text styles 這也是我覺得 Sketch 很大的一個亮點,把元素轉成 symbols,像是一個模組一樣可以重複使用,要修改是同步的,假如以一個 iOS App 來說,我有個畫面都各有一個褐色的 Navigation Bar,萬一要改成白色底、字體,在 Photoshop 要怎麼作? 背景模糊 我覺得這是針對 iOS7 來的吧!! Artboard 也算是一個 Sketch 的特色,一個檔裡可分很多 Page,而 Page 裡可以放很多 Artboard,可以想像 Artboard 是 App 中某個 Tab 裡每個流程畫面,而用 Page 來區分不同 Tab,另一個也是不錯用法就是利用不同的 Artboard 來作 app 的各種 size 的 icon。 結論:
Baseline - a designer framework by Stephanecurzi.me “Real” baseline grid on the web When I first started to design Baseline, I wanted to base the grid on the work of Josef Müller-Brockmann, unfortunately some missing CSS attributes — like type leading — kept me from implementing a true grid based approach. I then decided to another look at the basic grid used in print: the baseline grid. Most frameworks and examples of baseline grids simply put the type on a regular line-height, but one problem with this approach is that the text rarely lines up correctly between columns and headlines — H1 through H6. How to use Baseline Baseline can be used in many different ways. Download The .zip file includes the full set of CSS files both for development and deployment, a Photoshop base document and a full set of HTML templates and examples. Going from 0.2 to 0.5 I’ve jumped the version from 0.2 to 0.5 because Baseline is getting closer to be feature complete than what I had anticipated. Known problems and limitations Version history Version 0.5.1
react-to-print Print the content of a React component. npm install --save react-to-print const contentRef = useRef<HTMLDivElement>(null);const reactToPrintFn = useReactToPrint({ contentRef }); return ( <div><button onClick={reactToPrintFn}>Print</button><div ref={contentRef}>Content to print</div></div>); The hook returns a function that will initiate the print process when called. react-to-print should be compatible with most modern browsers. Mobile Browsers in WebView While printing on mobile browsers generally works, printing within a WebView (when your page is opened by an app such as Facebook or Slack, but not by the full browser itself) is known to generally not work. We are actively researching resolutions to this issue, but it likely requires changes by Google/Chromium and Apple/WebKit. Known Incompatible Browsers Can react-to-print be used to download a PDF without using the Print Preview window? No. For examples of how others have done this, see #484 No. Not directly. Setting state in onBeforePrint
You-Dont-Know-JS/README.md at master · getify/You-Dont-Know-JS 960 Grid System React-pdf React For Beginners — Learn with Video Tutorials Creating a Menu using React.js - DEV Community Menus are an essential tool for helping customers decide what to order and are a necessary part of the dining experience. It is typically displayed on paper or digitally, and it includes the names and prices of each dish along with a brief description of what the meal consists of, for example, the restaurant menu. Menus vary in terms of the types of dishes that are offered. Some menus might focus on a particular type of cuisine, such as Italian, Chinese, or Nigerian, while others might offer a more diverse selection of dishes from different cuisines. This tutorial will provide an overview of how to create a menu list using React.js. Necessary steps for setting up the project or local environment. Learn how to iterate over an array of menu items and render them as a list using the ul li elements tags. For this project, TailwindCss was used for styling. By the end of this tutorial, you will understand how to create a menu using React.js and be able to develop this project. Prerequisite Home.jsx
What I learned from analysing 1.65M versions of Node.js modules in NPM — Security and Node.js So what does it take to analyse NPM and all its modules and versions? To begin with, you need data about what is in the repository. This is actually surprisingly easy, because NPM provides you with a simple way to set up your own copy of it. install couchdbclone npm-registry-couchapprun the specified scripts to create views in couchdbset up data replication from the registrywait for the data to download Now that we have all the meta-information about NPM modules, we can actually export the data into a different database where it is possible to run the desired queries and compare various data points. But this would only provide a part of the results if we also would want to analyse code: check files, run some regex, get size information etc. To get the full results we would have to: download metadata from the repositoryanalyse metadatadownload the code for all versions of the moduleunpack and analyse the code Easy right? Not so fast! PS! tl;dr PS. Top 10 What to make out of this? Or don’t.
Build Tinder for Netflix with Angular in 1 hour | Code Candy "With no knowledge of Angular JS, build a working Tinder for Netflix in Angular." Our Tinder for Netflix course will give you a simple to understand introduction into how to build real Angular applications. During this 1 hour course, you will learn how to ask for data from an API as well as how service, controllers and views tie in together in Angular JS to create this beautiful application At Code Candy, our core belief is that students learn best by building something real and making it look nice too. We put a large emphasis on creating easy to understand content, with short sections that build on each other. Is this course for me? Students, Entrepreneurs, developers who know a framework, developers who don't know a framework, designers looking to better understand a developers workflow - all welcome! What will I need? An Mac computer. We also recommend using a free text editor like Sublime Text which is what we use. Prerequisites Course Cost FREE What you'll cover
Game Architecture · huytd/agar.io-clone Wiki This document will help you understand the project architecture, what's in the source and how the game is running on both client and server side. Requirements NodeJSNPMBowerSocket.IOExpress Architecture The game runs on a NodeJS environment using Socket.IO to create a WebSocket server listening on port 3000 (by default). There's also a ExpressJS setup serving a simple HTTP service that displays index.html, which has the Canvas element used to render the game and some client side Javascript to coummunicate with the WebSocket server. Project Structure This project has 3 main parts: Config files (bower.json, package.json, etc.)Client sideServer side The config files list the libraries, packages, etc. that are needed for the game to run. npm install It will install all the libraries listed in package.json and bower.json Game Client The client folder contains the code used in the game client. The game client logic inside js/app.js. No game logic are processed from client side. to and see the crappy lag