{"id":19533972,"url":"https://github.com/rafgraph/four-corner-layout","last_synced_at":"2026-01-02T16:05:11.961Z","repository":{"id":66154999,"uuid":"56900788","full_name":"rafgraph/four-corner-layout","owner":"rafgraph","description":"Design concept for four presentation pages on a single web page","archived":false,"fork":false,"pushed_at":"2021-01-15T16:12:15.000Z","size":727,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"gh-pages","last_synced_at":"2025-01-21T06:09:23.572Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://four-corner-layout.rafgraph.dev","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rafgraph.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-04-23T04:43:22.000Z","updated_at":"2023-08-23T11:25:39.000Z","dependencies_parsed_at":"2023-04-20T11:58:54.202Z","dependency_job_id":null,"html_url":"https://github.com/rafgraph/four-corner-layout","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rafgraph%2Ffour-corner-layout","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rafgraph%2Ffour-corner-layout/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rafgraph%2Ffour-corner-layout/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rafgraph%2Ffour-corner-layout/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rafgraph","download_url":"https://codeload.github.com/rafgraph/four-corner-layout/tar.gz/refs/heads/gh-pages","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243573488,"owners_count":20312883,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-11T02:11:37.737Z","updated_at":"2026-01-02T16:05:11.933Z","avatar_url":"https://github.com/rafgraph.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Four Corner Layout Concept\n\nFour presentation pages on a single web page. Each presentation page is immersive and dynamically resizes to fit the viewable area.\n\n[Live Concept](https://four-corner-layout.rafgraph.dev)\n\n## Code Notes\n\n#### Corner Component\n- [Corner.jsx](https://github.com/rafgraph/four-corner-layout/blob/gh-pages/components/Corner.jsx)\n- A single corner component that is a pure function of its props (stateless functional react component)\n- Based on the props it receives it renders itself as either the top-left, top-right, bottom-left or bottom-right corner in expanded or non-expanded state\n\n#### SVG Arrows\n- [SvgArrows.jsx](https://github.com/rafgraph/four-corner-layout/blob/gh-pages/components/SvgArrows.jsx)\n- Each svg arrow is wrapped in a stateless react component, which can optionally receive the following props (all have defaults that can be overwritten except for `className`, which is merged with the default value):\n  - `width`\n    - svg width attribute (not style attribute)\n    - type: string, can be unit-less, e.g. `'20'`, `'20px'`, `'20vw'`, etc\n  - `height`\n    - svg height attribute (not style attribute)\n    - type: string, can be unit-less, e.g. `'20'`, `'20px'`, `'20vw'`, etc\n  - `scale`\n    - multiplier to default (or supplied) unit-less width and height\n    - type: number (width and height must be unit-less to use scale), e.g. `1.5`\n  - `title`\n    - svg title attribute, also used for the default `aria-label`\n    - type: string, e.g. `'Go Left'`\n  - `className`\n    - classes to merge with default classes\n    - default classes: `'arrow [direction]-arrow'` (defaults can't be overwritten)\n    - type: string, e.g. `'go-left another-class'`\n  - `style`\n    - svg style attribute\n    - type: react style object, e.g. `{ display: 'block', margin: 'auto' }`\n    - note that the fill property is defined in css so it can be changed with css `:hover`/`:active` selectors\n    - note that there is no default style object so it is added as part of `...other`\n  - ... and every other prop you pass in, including `viewBox`\n\n```javascript\nimport react, { PropTypes } from 'react';\n\nconst propTypes = {\n  width: PropTypes.string,\n  height: PropTypes.string,\n  scale: PropTypes.number,\n  title: PropTypes.string,\n  className: PropTypes.string,\n};\n\nconst defaultPropsHorizontalArrow = {\n  width: '21',\n  height: '7',\n  scale: 1,\n};\n\n// note that default title is declared as a default attribute\n// of the function (instead of as a default prop) because each arrow\n// has it's own title but share default props\nfunction LeftArrow({ width, height, scale, className, title = 'Left Arrow', ...other }) {\n  return (\n    \u003csvg\n      // merge classes\n      className={`arrow left-arrow${className ? ` ${className}` : ''}`}\n      xmlns=\"http://www.w3.org/2000/svg\"\n      width={(width * scale) || width}\n      height={(height * scale) || height}\n      viewBox=\"0 0 900 300\"\n      aria-label={title}\n      // by putting ...other last it will override any previously defined attributes\n      {...other}\n    \u003e\n      \u003ctitle\u003e{title}\u003c/title\u003e\n      \u003cpath d=\"M900 183.418H232.596V300L0 150 232.596 0v116.582H900v66.836z\" /\u003e\n    \u003c/svg\u003e\n  );\n}\n\nLeftArrow.propTypes = propTypes;\nLeftArrow.defaultProps = defaultPropsHorizontalArrow;\n\nexport { LeftArrow };\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frafgraph%2Ffour-corner-layout","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frafgraph%2Ffour-corner-layout","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frafgraph%2Ffour-corner-layout/lists"}