├── .gitattributes ├── .gitignore ├── LICENSE ├── README.md ├── dist ├── base.98fd6c19.css ├── favicon.26242483.ico ├── index.html └── js.00a46daa.js ├── package.json └── src ├── css └── base.css ├── favicon.ico ├── index.html └── js ├── index.js └── infinitemenu.js /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /node_modules 2 | /.cache 3 | package-lock.json -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2009 - 2020 [Codrops](https://tympanus.net/codrops) 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Scroll Loop Menu 2 | 3 | A simple infinitely scrollable menu based on the [demo](https://codepen.io/vincentorback/pen/OpdNJa) by Vincent Orback. 4 | 5 |  6 | 7 | [Article on Codrops](https://tympanus.net/codrops/?p=49748) 8 | 9 | [Demo](http://tympanus.net/Tutorials/ScrollLoopMenu/) 10 | 11 | 12 | ## Installation 13 | 14 | Install dependencies: 15 | 16 | ``` 17 | npm install 18 | ``` 19 | 20 | Compile the code for development and start a local server: 21 | 22 | ``` 23 | npm start 24 | ``` 25 | 26 | Create the build: 27 | 28 | ``` 29 | npm run build 30 | ``` 31 | 32 | ## Misc 33 | 34 | Follow Codrops: [Twitter](http://www.twitter.com/codrops), [Facebook](http://www.facebook.com/codrops), [GitHub](https://github.com/codrops), [Instagram](https://www.instagram.com/codropsss/) 35 | 36 | ## License 37 | [MIT](LICENSE) 38 | 39 | Made with :blue_heart: by [Codrops](http://www.codrops.com) -------------------------------------------------------------------------------- /dist/base.98fd6c19.css: -------------------------------------------------------------------------------- 1 | *, 2 | *::after, 3 | *::before { 4 | box-sizing: border-box; 5 | } 6 | 7 | :root { 8 | font-size: 15px; 9 | } 10 | 11 | .js body:not(.mobile) { 12 | height: 100%; 13 | overflow: hidden; 14 | } 15 | 16 | body { 17 | margin: 0; 18 | --color-text: #111; 19 | --color-bg: #fff; 20 | --color-link: #c0092b; 21 | --color-link-hover: #000; 22 | --color-menu: #000; 23 | --color-menu-hover: #c0092b; 24 | color: var(--color-text); 25 | background-color: var(--color-bg); 26 | -webkit-font-smoothing: antialiased; 27 | -moz-osx-font-smoothing: grayscale; 28 | font-family: freight-big-pro, "Minion Pro", serif; 29 | font-weight: 300; 30 | } 31 | 32 | a { 33 | text-decoration: none; 34 | color: var(--color-link); 35 | outline: none; 36 | cursor: pointer; 37 | } 38 | 39 | a:hover, 40 | a:focus { 41 | color: var(--color-link-hover); 42 | outline: none; 43 | } 44 | 45 | .frame { 46 | top: 0; 47 | padding: 1rem; 48 | position: fixed; 49 | z-index: 1000; 50 | font-weight: 600; 51 | font-style: italic; 52 | background: #f0f0f0; 53 | width: 100%; 54 | display: flex; 55 | } 56 | 57 | .frame__title { 58 | font-size: 1rem; 59 | margin: 0; 60 | font-weight: 600; 61 | } 62 | 63 | .frame__links { 64 | margin: 0 1rem; 65 | } 66 | 67 | .frame__links a:not(:last-child) { 68 | margin-right: 1rem; 69 | } 70 | 71 | .frame__button { 72 | color: var(--color-link); 73 | margin-left: auto; 74 | } 75 | 76 | .menu { 77 | width: 100vw; 78 | height: 100vh; 79 | position: relative; 80 | overflow: auto; 81 | -webkit-overflow-scrolling: touch; 82 | scrollbar-width: none; /* Hide scrollbar in FF */ 83 | display: flex; 84 | flex-direction: column; 85 | align-items: flex-end; 86 | text-align: right; 87 | -webkit-touch-callout: none; 88 | -webkit-user-select: none; 89 | -moz-user-select: none; 90 | -ms-user-select: none; 91 | user-select: none; 92 | } 93 | 94 | .mobile .menu { 95 | padding: 5rem 0; 96 | height: auto; 97 | } 98 | 99 | .menu__item { 100 | flex: none; 101 | margin-right: 4rem; 102 | padding: 0 2rem 0 0; 103 | } 104 | 105 | .menu__item-inner { 106 | white-space: nowrap; 107 | position: relative; 108 | cursor: pointer; 109 | font-size: 7vw; 110 | padding: 0.5rem; 111 | display: block; 112 | color: var(--color-menu); 113 | transition: transform 0.2s; 114 | } 115 | 116 | .menu__item-inner:hover { 117 | font-style: italic; 118 | transform: translate3d(2rem,0,0); 119 | color: var(--color-menu-hover); 120 | } 121 | 122 | .menu__item-inner::before { 123 | content: ''; 124 | top: 55%; 125 | width: 3.5rem; 126 | height: 1px; 127 | background: currentColor; 128 | position: absolute; 129 | right: calc(100% + 2rem); 130 | opacity: 0; 131 | pointer-events: none; 132 | } 133 | 134 | .menu__item-inner:hover::before { 135 | opacity: 1; 136 | } 137 | 138 | /* Pseudo-element for making sure that hover area is active */ 139 | .menu__item-inner:hover::after { 140 | content: ''; 141 | position: absolute; 142 | top: 0; 143 | left: -5.5rem; 144 | right: 0; 145 | height: 100%; 146 | } 147 | 148 | ::-webkit-scrollbar { 149 | display: none; 150 | } 151 | 152 | @media screen and (min-width: 53em) { 153 | .frame { 154 | background: none; 155 | display: grid; 156 | grid-template-areas: 'title button' 157 | 'links ...'; 158 | padding: 3rem 4rem; 159 | pointer-events: none; 160 | } 161 | .frame__links { 162 | margin: 3rem 0 2rem; 163 | grid-area: links; 164 | justify-self: start; 165 | } 166 | .frame__links a { 167 | display: block; 168 | pointer-events: auto; 169 | } 170 | .frame__button { 171 | grid-area: button; 172 | justify-self: end; 173 | } 174 | .menu__item { 175 | margin-right: 25vw; 176 | } 177 | .menu__item-inner { 178 | padding: 1vh 0; 179 | font-size: 9.5vh; 180 | } 181 | } 182 | -------------------------------------------------------------------------------- /dist/favicon.26242483.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codrops/ScrollLoopMenu/38257822c0bf1579ded7a17e6800acfd808014d3/dist/favicon.26242483.ico -------------------------------------------------------------------------------- /dist/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 |
5 | 6 | 7 |