├── .gitignore
├── LICENSE
├── README.md
├── index.html
├── main.css
└── main.scss
/.gitignore:
--------------------------------------------------------------------------------
1 | /main.css.map
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2020 Sam Cross
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 | **This project is not currently being developed, but if PRs are submitted they'll be checked merged where suitable!**
2 |
3 | # Responsive CSS-only Header
4 |
5 | * **NO JavaScript**
6 | * Fully-responsive, mobile-first
7 | * Easily customisable with SCSS variables
8 | * SCSS-powered
9 | * Breakpoints for tablet and desktop layouts
10 |
11 | This is a fully-responsive CSS-only header for your websites and other web applications! It uses `position: sticky` to stay at the top of the screen, and has mobile, tablet, and desktop layouts, with a maximum width (after which it centers itself).
12 |
13 | ## Licence
14 |
15 | This project is licenced under the MIT licence.
16 |
17 | I'd love to see what you make with this, so please send me an email with your projects!
18 |
19 | ## Usage
20 |
21 | TBA
22 |
23 | ## Modification
24 |
25 | Edit the SCSS file and run Live SCSS Compiler (VS Code extension) or similar build tool to run.
26 |
27 | Alternatively, just find-and-replace the variable values in the CSS file.
28 |
29 | **If submitting a pull request, please edit `main.scss` and commit both `main.scss` and a rebuilt `main.css`.**
30 |
--------------------------------------------------------------------------------
/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
48 |
Responsive Header
49 |
A fully-responsive CSS-only header for your websites and other web applications.
50 |
51 |
Technology
52 |
This header is built with absolutely no JavaScript dependency. It uses CSS flexbox and grid for positioning
53 | (sorry older browsers!), and works on the smallest mobiles around.
54 |
55 |
Please note: The menu uses a checkbox to open and close. You may need to add a handler to
56 | ensure the checkbox is closed after a link is selected, if using React, or a similar library.
57 |
58 |
Random Content Follows
59 |
Below are some chunks of lorem ipsum to fill the space. Feel free to ignore them.
60 |
61 |
More Content
62 |
This is some page content. Ad minim non pariatur eiusmod adipisicing magna incididunt qui cupidatat. In Lorem
63 | ullamco exercitation in laborum magna. Aliqua cillum do pariatur dolor adipisicing ea enim. Deserunt nisi
64 | voluptate amet veniam aute ad duis cillum laborum occaecat nisi. Veniam occaecat eiusmod eu eu excepteur
65 | nostrud consectetur velit Lorem incididunt consectetur in dolore. Non fugiat deserunt exercitation ullamco.
66 | Consequat dolor veniam consequat voluptate non ad laboris.
67 |
68 |
More Content
69 |
This is some page content. Ad minim non pariatur eiusmod adipisicing magna incididunt qui cupidatat. In Lorem
70 | ullamco exercitation in laborum magna. Aliqua cillum do pariatur dolor adipisicing ea enim. Deserunt nisi
71 | voluptate amet veniam aute ad duis cillum laborum occaecat nisi. Veniam occaecat eiusmod eu eu excepteur
72 | nostrud consectetur velit Lorem incididunt consectetur in dolore. Non fugiat deserunt exercitation ullamco.
73 | Consequat dolor veniam consequat voluptate non ad laboris.
74 |
75 |
More Content
76 |
This is some page content. Ad minim non pariatur eiusmod adipisicing magna incididunt qui cupidatat. In Lorem
77 | ullamco exercitation in laborum magna. Aliqua cillum do pariatur dolor adipisicing ea enim. Deserunt nisi
78 | voluptate amet veniam aute ad duis cillum laborum occaecat nisi. Veniam occaecat eiusmod eu eu excepteur
79 | nostrud consectetur velit Lorem incididunt consectetur in dolore. Non fugiat deserunt exercitation ullamco.
80 | Consequat dolor veniam consequat voluptate non ad laboris.
81 |
82 |
More Content
83 |
This is some page content. Ad minim non pariatur eiusmod adipisicing magna incididunt qui cupidatat. In Lorem
84 | ullamco exercitation in laborum magna. Aliqua cillum do pariatur dolor adipisicing ea enim. Deserunt nisi
85 | voluptate amet veniam aute ad duis cillum laborum occaecat nisi. Veniam occaecat eiusmod eu eu excepteur
86 | nostrud consectetur velit Lorem incididunt consectetur in dolore. Non fugiat deserunt exercitation ullamco.
87 | Consequat dolor veniam consequat voluptate non ad laboris.
88 |
89 |
90 |