This file contains hidden or 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 { useCallback } from "react"; | |
| import { extendObservable, makeAutoObservable, toJS } from "mobx"; | |
| import debounce from "../utils/debounce"; | |
| import ComponentData from "../components/Templates/ComponentData"; | |
| class SiteState { | |
| id = ""; | |
| subdomain = ""; | |
| components = {}; | |
| componentsList = []; |
This file contains hidden or 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 styled from "styled-components"; | |
| export const Wrapper = styled.div` | |
| padding: 2rem; | |
| display: flex; | |
| flex-direction: column; | |
| position: relative; | |
| z-index: 35; | |
| background: ${(props) => props.color2}; |
This file contains hidden or 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 { observer } from "mobx-react"; | |
| import React from "react"; | |
| import styled from "styled-components"; | |
| import PrintSocial from "../../components/Templates/pure/PrintSocial"; | |
| import { siteState } from "../../stores/SiteState"; | |
| import getColorValue from "../../utils/getColorValue"; | |
| import { Wrapper } from "./styles"; | |
| const OnlyLinks = observer(({ compKey, preview, siteData }) => { | |
| const compCss = compKey.toLowerCase(); |
This file contains hidden or 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
| export default { | |
| ["OnlyLinks"]: { | |
| title: "Only Links", | |
| subtitle: | |
| "A simple page to show off your profile, social media, and external links.", | |
| demoLinks: ["https://google.ca", "https://google.ca"], | |
| tags: ["Link in bio", "Minimal", "Profile"], | |
| inputCategories: ["Color", "Fonts", "Profile", "Social", "Content"], | |
| inputs: { | |
| Publish: { |
This file contains hidden or 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
| export default { | |
| ["CoolText"]: { | |
| title: "Cool Text", | |
| subtitle: "Create a cool text animation.", | |
| demoLinks: [ | |
| "https://cooltext-1.leavewithaweb.site/", | |
| "https://cooltext-2.leavewithaweb.site/", | |
| ], | |
| tags: ["Animation", "Minimal", "Profile"], | |
| inputCategories: [ |
This file contains hidden or 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 { toJS } from "mobx"; | |
| import { observer } from "mobx-react"; | |
| import React from "react"; | |
| import { siteState } from "../../stores/SiteState"; | |
| import styled from "styled-components"; | |
| import PrintSocial from "../../components/Templates/pure/PrintSocial"; | |
| import { uiState } from "../../stores/UiState"; | |
| const Wrapper = styled.div` | |
| height: ${(props) => props.previewHeight}; |
This file contains hidden or 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
| export default { | |
| ["BigPhoto"]: { | |
| title: "Big Photo", | |
| subtitle: "A huge website designed for leaving a big impression.", | |
| demoLinks: [ | |
| "https://bigphoto-1.leavewithaweb.site/", | |
| "https://bigphoto-2.leavewithaweb.site/", | |
| ], | |
| tags: ["Photography", "Portfolio", "Link in bio"], | |
| inputCategories: ["Color", "Fonts", "Profile", "Items", "Social"], |
This file contains hidden or 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
| const Nightmare = require("nightmare"); | |
| const nightmare = Nightmare({ show: true }); | |
| nightmare | |
| .goto("https://duckduckgo.com") | |
| .type("#search_form_input_homepage", "web scraping") | |
| .click("#search_button_homepage") | |
| .wait(3000) | |
| .evaluate(() => { | |
| const results = document.getElementsByClassName( |
This file contains hidden or 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
| const cheerio = require("cheerio"); | |
| const axios = require("axios"); | |
| const fs = require("fs"); | |
| const writeStream = fs.createWriteStream("hackernews.csv"); | |
| writeStream.write(`Title,Link \n`); | |
| axios.get("https://news.ycombinator.com/").then((response) => { | |
| let $ = cheerio.load(response.data); |
This file contains hidden or 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
| <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
| <html xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office"> | |
| <head> | |
| <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> | |
| <!--[if !mso]><!--> | |
| <meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
| <!--<![endif]--> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <meta name="format-detection" content="telephone=no"> | |
| <meta name="x-apple-disable-message-reformatting"> |