This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
npx gatsby new your-gatsby-site |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Hello1 | |
{ | |
public static void Main() | |
{ | |
- System.Console.WriteLine("Hello, World!"); | |
+ System.Console.WriteLine("Rock all night long!"); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let foo = 'bar' | |
/** | |
Don't worry about the code block, it will be saved as a gist with right language format, and auto embed to your post. | |
**/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Install Tailwind: | |
npm install tailwindcss --save-dev | |
# Generate Tailwind config: | |
npx tailwind init |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
npm i @emotion/core @emotion/styled tailwind.macro@next gatsby-plugin-postcss postcss-import postcss-preset-env | |
# We are installing the 'next' version of tailwind micro so as to use TailwindCSS 1.0.0+ | |
# For older versions of TailwindCSS, just install 'tailwind.macro' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
plugins: [ | |
... | |
{ | |
resolve: `gatsby-plugin-postcss`, | |
options: { | |
// Accepts all options defined by `gatsby-plugin-postcss` plugin. | |
}, | |
}, | |
{ | |
resolve: `gatsby-plugin-emotion`, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@tailwind base; | |
@tailwind utilities; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Edit the path to where you have kept the globals.css file | |
import "./src/styles/globals.css" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from "react"; | |
import tw from "tailwind.macro"; | |
const MyComponent = ( | |
<h4 css={tw`font-semibold text-lg leading-snug truncate`}>This is Soumya</h4> | |
); | |
export default MyComponent; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from "react" | |
import tw from "tailwind.macro" | |
const MyComponent = tw.div` | |
bg-white | |
rounded-lg | |
overflow-hidden | |
border | |
` |
OlderNewer