├── .cspell.json
├── .editorconfig
├── .eslintrc.js
├── .gitattributes
├── .github
├── CODE_OF_CONDUCT.md
├── CONTRIBUTING.md
├── ISSUE_TEMPLATE
│ ├── bug_report.yml
│ ├── config.yml
│ └── feature_request.yml
├── PULL_REQUEST_TEMPLATE.md
├── SUPPORT.md
├── dependabot.yml
└── workflows
│ ├── build-dist.yaml
│ ├── codeql-analysis.yml
│ ├── dependency-review.yml
│ ├── publish.yaml
│ ├── push-to-template.yaml
│ ├── spellcheck.yml
│ └── test.yaml
├── .gitignore
├── CHANGELOG.md
├── LICENSE.txt
├── README.md
├── dist
├── .editorconfig
├── .gitattributes
├── .gitignore
├── 404.html
├── LICENSE.txt
├── css
│ ├── normalize.css
│ └── style.css
├── favicon.ico
├── icon.png
├── icon.svg
├── img
│ └── .gitignore
├── index.html
├── js
│ ├── app.js
│ └── vendor
│ │ └── modernizr-3.12.0.min.js
├── package.json
├── robots.txt
├── site.webmanifest
├── tile-wide.png
├── tile.png
├── webpack.common.js
├── webpack.config.dev.js
└── webpack.config.prod.js
├── docs
├── TOC.md
├── about-this-repo.md
├── css.md
├── extend.md
├── faq.md
├── html.md
├── js.md
├── misc.md
└── usage.md
├── gulpfile.mjs
├── modernizr-config.json
├── package-lock.json
├── package.json
├── src
├── .editorconfig
├── .gitattributes
├── .gitignore
├── 404.html
├── favicon.ico
├── icon.png
├── icon.svg
├── img
│ └── .gitignore
├── index.html
├── js
│ └── app.js
├── package.json
├── robots.txt
├── site.webmanifest
├── tile-wide.png
├── tile.png
├── webpack.common.js
├── webpack.config.dev.js
└── webpack.config.prod.js
└── test
├── file_content.mjs
└── file_existence.mjs
/.cspell.json:
--------------------------------------------------------------------------------
1 | {
2 | "version": "0.2",
3 | "words": [
4 | "codeql",
5 | "devdeps",
6 | "FOUC",
7 | "lighttpd",
8 | "mkdir",
9 | "modernizr",
10 | "robotstxt",
11 | "vuejs",
12 | "cpina"
13 | ],
14 | "language": "en,en-GB,en-US",
15 | "allowCompoundWords": true,
16 | "files": [
17 | "**/*.md"
18 | ],
19 | "ignoreRegExpList": [
20 | "\\_\\w+",
21 | "\\#\\w+"
22 | ],
23 | "ignorePaths": [
24 | ".cspell.json"
25 | ],
26 | "useGitignore": true
27 | }
28 |
--------------------------------------------------------------------------------
/.editorconfig:
--------------------------------------------------------------------------------
1 | # For more information about the properties used in
2 | # this file, please see the EditorConfig documentation:
3 | # https://editorconfig.org/
4 |
5 | root = true
6 |
7 | [*]
8 | charset = utf-8
9 | end_of_line = lf
10 | indent_size = 2
11 | indent_style = space
12 | insert_final_newline = true
13 | trim_trailing_whitespace = true
14 |
15 | [*.md]
16 | trim_trailing_whitespace = false
17 |
--------------------------------------------------------------------------------
/.eslintrc.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | env: {
3 | browser: true,
4 | es6: true,
5 | mocha: true,
6 | node : true
7 | },
8 | plugins: ['mocha'],
9 | extends: 'eslint:recommended',
10 | parserOptions: {
11 | 'ecmaVersion': 2020,
12 | 'sourceType': 'module'
13 | },
14 | rules: {
15 | indent: ['error', 2],
16 | quotes: ['error', 'single'],
17 | semi: ['error', 'always']
18 | }
19 | };
20 |
--------------------------------------------------------------------------------
/.gitattributes:
--------------------------------------------------------------------------------
1 | # Automatically normalize line endings for all text-based files
2 | # https://git-scm.com/docs/gitattributes#_end_of_line_conversion
3 |
4 | * text=auto
5 |
6 | # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
7 |
8 | # For the following file types, normalize line endings to LF on
9 | # checkin and prevent conversion to CRLF when they are checked out
10 | # (this is required in order to prevent newline related issues like,
11 | # for example, after the build script is run)
12 |
13 | .* text eol=lf
14 | *.css text eol=lf
15 | *.html text eol=lf
16 | *.js text eol=lf
17 | *.json text eol=lf
18 | *.md text eol=lf
19 | *.sh text eol=lf
20 | *.txt text eol=lf
21 | *.xml text eol=lf
22 |
--------------------------------------------------------------------------------
/.github/CODE_OF_CONDUCT.md:
--------------------------------------------------------------------------------
1 | # Contributor Covenant Code of Conduct
2 |
3 | ## Our Pledge
4 |
5 | In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.
6 |
7 | ## Our Standards
8 |
9 | Examples of behavior that contributes to creating a positive environment include:
10 |
11 | * Using welcoming and inclusive language
12 | * Being respectful of differing viewpoints and experiences
13 | * Gracefully accepting constructive criticism
14 | * Focusing on what is best for the community
15 | * Showing empathy towards other community members
16 |
17 | Examples of unacceptable behavior by participants include:
18 |
19 | * The use of sexualized language or imagery and unwelcome sexual attention or advances
20 | * Trolling, insulting/derogatory comments, and personal or political attacks
21 | * Public or private harassment
22 | * Publishing others' private information, such as a physical or electronic address, without explicit permission
23 | * Other conduct which could reasonably be considered inappropriate in a professional setting
24 |
25 | ## Our Responsibilities
26 |
27 | Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.
28 |
29 | Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
30 |
31 | ## Scope
32 |
33 | This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.
34 |
35 | ## Enforcement
36 |
37 | Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at h5bp@htmlcssjavascript.com. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
38 |
39 | Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.
40 |
41 | ## Attribution
42 |
43 | This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [https://contributor-covenant.org/version/1/4][version]
44 |
45 | [homepage]: https://contributor-covenant.org
46 | [version]: https://contributor-covenant.org/version/1/4/
47 |
--------------------------------------------------------------------------------
/.github/CONTRIBUTING.md:
--------------------------------------------------------------------------------
1 | # Contributing to HTML5 Boilerplate
2 |
3 | ♥ [HTML5 Boilerplate](https://html5boilerplate.com/) and want to get involved?
4 | Thanks! We're actively looking for folks interested in helping out and there
5 | are plenty of ways you can help!
6 |
7 | Please take a moment to review this document in order to make the contribution
8 | process easy and effective for everyone involved.
9 |
10 | Following these guidelines helps to communicate that you respect the time of
11 | the developers managing and developing this open source project. In return,
12 | they should reciprocate that respect in addressing your issue or assessing
13 | patches and features.
14 |
15 |
16 | ## Using the issue tracker
17 |
18 | The [issue tracker](https://github.com/h5bp/html5-boilerplate/issues) is
19 | the preferred channel for [bug reports](#bugs), [features requests](#features)
20 | and [submitting pull requests](#pull-requests), but please respect the following
21 | restrictions:
22 |
23 | * Please **do not** use the issue tracker for personal support requests (use
24 | [Stack Overflow](https://stackoverflow.com/questions/tagged/html5boilerplate)).
25 |
26 | * Please **do not** derail or troll issues. Keep the discussion on topic and
27 | respect the opinions of others.
28 |
29 | * Please **do not** open issues or pull requests regarding the code in
30 | [`.htaccess`](https://github.com/h5bp/server-configs-apache),
31 | [`Modernizr`](https://github.com/Modernizr/Modernizr) or
32 | [`Normalize.css`](https://github.com/necolas/normalize.css) (open them in
33 | their respective repositories).
34 |
35 |
36 |
37 | ## Bug reports
38 |
39 | A bug is a _demonstrable problem_ that is caused by the code in the repository.
40 | Good bug reports are extremely helpful - thank you!
41 |
42 | Guidelines for bug reports:
43 |
44 | 1. **Use the GitHub issue search** — check if the issue has already been
45 | reported.
46 |
47 | 2. **Check if the issue has been fixed** — try to reproduce it using the
48 | latest `main` or development branch in the repository.
49 |
50 | 3. **Isolate the problem** — ideally create a [reduced test
51 | case](https://css-tricks.com/reduced-test-cases/) and a live example.
52 |
53 | A good bug report shouldn't leave others needing to chase you up for more
54 | information. Please try to be as detailed as possible in your report. What is
55 | your environment? What steps will reproduce the issue? What browser(s) and OS
56 | experience the problem? What would you expect to be the outcome? All these
57 | details will help people to fix any potential bugs.
58 |
59 | Example:
60 |
61 | > Short and descriptive example bug report title
62 | >
63 | > A summary of the issue and the browser/OS environment in which it occurs. If
64 | > suitable, include the steps required to reproduce the bug.
65 | >
66 | > 1. This is the first step
67 | > 2. This is the second step
68 | > 3. Further steps, etc.
69 | >
70 | > `` - a link to the reduced test case
71 | >
72 | > Any other information you want to share that is relevant to the issue being
73 | > reported. This might include the lines of code that you have identified as
74 | > causing the bug, and potential solutions (and your opinions on their
75 | > merits).
76 |
77 |
78 |
79 | ## Feature requests
80 |
81 | Feature requests are welcome. But take a moment to find out whether your idea
82 | fits with the scope and aims of the project. It's up to *you* to make a strong
83 | case to convince the project's developers of the merits of this feature. Please
84 | provide as much detail and context as possible.
85 |
86 |
87 |
88 | ## Pull requests
89 |
90 | Good pull requests - patches, improvements, new features - are a fantastic
91 | help. They should remain focused in scope and avoid containing unrelated
92 | commits.
93 |
94 | **Please ask first** before embarking on any significant pull request (e.g.
95 | implementing features, refactoring code, porting to a different language),
96 | otherwise you risk spending a lot of time working on something that the
97 | project's developers might not want to merge into the project.
98 |
99 | Please adhere to the coding conventions used throughout a project (indentation,
100 | accurate comments, etc.) and any other requirements (such as test coverage).
101 |
102 | Adhering to the following process is the best way to get your work
103 | included in the project:
104 |
105 | 1. [Fork](https://help.github.com/articles/fork-a-repo/) the project, clone your
106 | fork, and configure the remotes:
107 |
108 | ```bash
109 | # Clone your fork of the repo into the current directory
110 | git clone https://github.com//html5-boilerplate.git
111 | # Navigate to the newly cloned directory
112 | cd html5-boilerplate
113 | # Assign the original repo to a remote called "upstream"
114 | git remote add upstream https://github.com/h5bp/html5-boilerplate.git
115 | ```
116 |
117 | 2. If you cloned a while ago, get the latest changes from upstream:
118 |
119 | ```bash
120 | git checkout main
121 | git pull upstream main
122 | ```
123 |
124 | 3. Create a new topic branch (off the main project development branch) to
125 | contain your feature, change, or fix:
126 |
127 | ```bash
128 | git checkout -b
129 | ```
130 |
131 | 4. Commit your changes in logical chunks. Please adhere to these [git commit
132 | message guidelines](https://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html)
133 | or your code is unlikely be merged into the main project. Use Git's
134 | [interactive rebase](https://help.github.com/articles/about-git-rebase/)
135 | feature to tidy up your commits before making them public.
136 |
137 | 5. Locally merge (or rebase) the upstream development branch into your topic branch:
138 |
139 | ```bash
140 | git pull [--rebase] upstream main
141 | ```
142 |
143 | 6. Push your topic branch up to your fork:
144 |
145 | ```bash
146 | git push origin
147 | ```
148 |
149 | 7. [Open a Pull Request](https://help.github.com/articles/using-pull-requests/)
150 | with a clear title and description.
151 |
152 | **IMPORTANT**: By submitting a patch, you agree to allow the project
153 | owners to license your work under the terms of the [MIT License](LICENSE.txt).
154 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/bug_report.yml:
--------------------------------------------------------------------------------
1 | name: Report a bug
2 | description: Tell us about a bug or issue you may have identified in HTML5 Boilerplate.
3 | title: "Provide a general summary of the issue"
4 | labels: [bug]
5 | assignees: "-"
6 | body:
7 | - type: checkboxes
8 | attributes:
9 | label: Prerequisites
10 | description: Take a couple minutes to help our maintainers work faster.
11 | options:
12 | - label: I have [searched](https://github.com/h5bp/html5-boilerplate/issues?utf8=%E2%9C%93&q=is%3Aissue) for duplicate or closed issues
13 | required: true
14 | - label: I have read the [contributing guidelines](https://github.com/h5bp/html5-boilerplate/blob/main/.github/CONTRIBUTING.md)
15 | required: true
16 | - type: textarea
17 | id: what-happened
18 | attributes:
19 | label: Describe the issue
20 | description: Provide a summary of the issue and what you expected to happen, including specific steps to reproduce.
21 | validations:
22 | required: true
23 | - type: textarea
24 | id: reduced-test-case
25 | attributes:
26 | label: Reduced test cases
27 | description: Include links [reduced test case](https://css-tricks.com/reduced-test-cases/) links.
28 | validations:
29 | required: true
30 | - type: dropdown
31 | id: os
32 | attributes:
33 | label: What operating system(s) are you seeing the problem on?
34 | multiple: true
35 | options:
36 | - Windows
37 | - macOS
38 | - Android
39 | - iOS
40 | - Linux
41 | validations:
42 | required: true
43 | - type: dropdown
44 | id: browser
45 | attributes:
46 | label: What browser(s) are you seeing the problem on?
47 | multiple: true
48 | options:
49 | - Chrome
50 | - Safari
51 | - Firefox
52 | - Microsoft Edge
53 | - Opera
54 | - type: input
55 | id: version
56 | attributes:
57 | label: What version of HTML% Boilerplate are you using?
58 | placeholder: "e.g., v8.0.0 or v7.1.0"
59 | validations:
60 | required: true
61 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/config.yml:
--------------------------------------------------------------------------------
1 | contact_links:
2 | - name: Ask the community
3 | url: https://github.com/h5bp/html5-boilerplate/discussions/new
4 | about: Ask and discuss questions with other HTML5 Boilerplate community members.
5 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/feature_request.yml:
--------------------------------------------------------------------------------
1 | name: Feature request
2 | description: Suggest new or updated features to include in HTML5 Boilerplate.
3 | title: "Suggest a new feature"
4 | labels: [feature]
5 | assignees: []
6 | body:
7 | - type: checkboxes
8 | attributes:
9 | label: Prerequisites
10 | description: Take a couple minutes to help our maintainers work faster.
11 | options:
12 | - label: I have [searched](https://github.com/h5bp/html5-boilerplate/issues?utf8=%E2%9C%93&q=is%3Aissue) for duplicate or closed issues
13 | required: true
14 | - label: I have read the [contributing guidelines](https://github.com/h5bp/html5-boilerplate/blob/main/.github/CONTRIBUTING.md)
15 | required: true
16 | - type: textarea
17 | id: proposal
18 | attributes:
19 | label: Proposal
20 | description: Provide detailed information for what we should add, including relevant links to prior art, screenshots, or live demos whenever possible.
21 | validations:
22 | required: true
23 | - type: textarea
24 | id: motivation
25 | attributes:
26 | label: Motivation and context
27 | description: Tell us why this change is needed or helpful, and what problems it may help solve.
28 | validations:
29 | required: true
30 |
--------------------------------------------------------------------------------
/.github/PULL_REQUEST_TEMPLATE.md:
--------------------------------------------------------------------------------
1 | ## Types of changes
2 |
3 | - [ ] Bug fix (non-breaking change which fixes an issue)
4 | - [ ] New feature (non-breaking change which adds functionality)
5 | - [ ] Breaking change (fix or feature that would cause existing functionality to change)
6 |
7 | ## Checklist:
8 |
9 |
10 | - [ ] My code follows the code style of this project.
11 | - [ ] My change requires a change to the documentation.
12 | - [ ] I have updated the documentation accordingly.
13 | - [ ] I have read the **[CONTRIBUTING](https://github.com/h5bp/html5-boilerplate/blob/main/.github/CONTRIBUTING.md)** document.
14 | - [ ] I have added tests to cover my changes.
15 | - [ ] All new and existing tests passed.
16 |
17 | Pull requests should be thought of as a conversation. There will be some back and forth when trying to get code merged into this or any other project. With all but the simplest changes you can and should expect that the maintainers of the project will request changes to your code. Please be aware of that and check in after you open your PR in order to get your code merged in cleanly.
18 |
19 | Thanks!
20 |
--------------------------------------------------------------------------------
/.github/SUPPORT.md:
--------------------------------------------------------------------------------
1 | # Support
2 |
3 | For personal support requests with HTML5 Boilerplate please use Stack Overflow
4 | ([`html5boilerplate`](https://stackoverflow.com/questions/tagged/html5boilerplate) tag).
5 |
6 | Please check the respective repository/website for support regarding the code in
7 | [`.htaccess`](https://github.com/h5bp/server-configs-apache),
8 | [`Modernizr`](https://modernizr.com/) or
9 | [`Normalize.css`](https://github.com/necolas/normalize.css).
10 |
--------------------------------------------------------------------------------
/.github/dependabot.yml:
--------------------------------------------------------------------------------
1 | version: 2
2 | updates:
3 | - package-ecosystem: npm
4 | directory: "/"
5 | schedule:
6 | interval: monthly
7 | versioning-strategy: increase
8 | - package-ecosystem: npm
9 | directory: "/src/"
10 | schedule:
11 | interval: monthly
12 | versioning-strategy: increase
13 | - package-ecosystem: github-actions
14 | directory: "/"
15 | schedule:
16 | interval: monthly
17 |
18 |
--------------------------------------------------------------------------------
/.github/workflows/build-dist.yaml:
--------------------------------------------------------------------------------
1 | name: Build dist
2 |
3 | # Controls when the workflow will run
4 | on:
5 | # Triggers the workflow on push or pull request events but only for the main branch
6 | push:
7 | branches: [ main ]
8 |
9 | # Allows you to run this workflow manually from the Actions tab
10 | workflow_dispatch:
11 |
12 | # A workflow run is made up of one or more jobs that can run sequentially or in parallel
13 | permissions:
14 | contents: read
15 |
16 | jobs:
17 | # This workflow contains a single job called "build"
18 | build:
19 | # The type of runner that the job will run on
20 | permissions:
21 | contents: write # for stefanzweifel/git-auto-commit-action to push code in repo
22 | runs-on: ubuntu-latest
23 |
24 | # Steps represent a sequence of tasks that will be executed as part of the job
25 | steps:
26 | # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
27 | - uses: actions/checkout@v3
28 | with:
29 | ref: main
30 |
31 | # Runs a single command using the runners shell
32 | - name: build
33 | uses: actions/setup-node@v3
34 | with:
35 | node-version: ${{ matrix.node-version }}
36 | - run: npm install
37 | - run: npm run build
38 | - name: commit
39 | uses: stefanzweifel/git-auto-commit-action@v4
40 | with:
41 | commit_message: "[Bot] Update dist"
42 |
--------------------------------------------------------------------------------
/.github/workflows/codeql-analysis.yml:
--------------------------------------------------------------------------------
1 | name: "CodeQL"
2 |
3 | on:
4 | push:
5 | branches:
6 | - main
7 | - "!dependabot/**"
8 | pull_request:
9 | branches:
10 | - main
11 | - "!dependabot/**"
12 |
13 | jobs:
14 | analyze:
15 | name: Analyze
16 | runs-on: ubuntu-latest
17 | permissions:
18 | actions: read
19 | contents: read
20 | security-events: write
21 |
22 | steps:
23 | - name: Checkout repository
24 | uses: actions/checkout@v3
25 |
26 | - name: Initialize CodeQL
27 | uses: github/codeql-action/init@v2
28 | with:
29 | languages: 'javascript'
30 |
31 | - name: Perform CodeQL Analysis
32 | uses: github/codeql-action/analyze@v2
33 |
--------------------------------------------------------------------------------
/.github/workflows/dependency-review.yml:
--------------------------------------------------------------------------------
1 | name: 'Dependency Review'
2 | on: [pull_request]
3 |
4 | permissions:
5 | contents: read
6 |
7 | jobs:
8 | dependency-review:
9 | runs-on: ubuntu-latest
10 | steps:
11 | - name: 'Checkout Repository'
12 | uses: actions/checkout@v3
13 | - name: 'Dependency Review'
14 | uses: actions/dependency-review-action@v3
15 |
--------------------------------------------------------------------------------
/.github/workflows/publish.yaml:
--------------------------------------------------------------------------------
1 | name: publish
2 |
3 | on:
4 | push:
5 | tags:
6 | - 'v*'
7 |
8 | permissions:
9 | contents: read
10 |
11 | jobs:
12 | build:
13 | permissions:
14 | contents: write # for actions/create-release to create a release
15 | name: Upload Release Asset
16 | runs-on: ubuntu-latest
17 | steps:
18 | - name: Checkout code
19 | uses: actions/checkout@v3
20 | - name: Get tag
21 | id: get_version
22 | run: echo ::set-output name=VERSION::$(echo $GITHUB_REF | cut -d / -f 3)
23 | - name: Create Zip Folder
24 | working-directory: dist
25 | run: zip -r ../html5-boilerplate_${{ steps.get_version.outputs.VERSION }}.zip ./
26 | - name: Create Release
27 | id: create_release
28 | uses: actions/create-release@v1
29 | env:
30 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
31 | with:
32 | tag_name: ${{ github.ref }}
33 | release_name: Release ${{ github.ref }}
34 | draft: false
35 | prerelease: false
36 | - name: Upload Release Asset
37 | id: upload-release-asset
38 | uses: actions/upload-release-asset@v1
39 | env:
40 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
41 | with:
42 | upload_url: ${{ steps.create_release.outputs.upload_url }}
43 | asset_path: ./html5-boilerplate_${{ steps.get_version.outputs.VERSION }}.zip
44 | asset_name: html5-boilerplate_${{ steps.get_version.outputs.VERSION }}.zip
45 | asset_content_type: application/zip
46 | - name: Setup Node
47 | uses: actions/setup-node@v3
48 | with:
49 | node-version: 16
50 | registry-url: https://registry.npmjs.org/
51 | - name: publish npm
52 | run: npm publish
53 | env:
54 | NODE_AUTH_TOKEN: ${{secrets.npm_token}}
55 |
--------------------------------------------------------------------------------
/.github/workflows/push-to-template.yaml:
--------------------------------------------------------------------------------
1 | name: Push to template repository
2 |
3 | on:
4 | push:
5 | branches: [ main ]
6 |
7 | permissions:
8 | contents: read
9 |
10 | jobs:
11 | build:
12 | runs-on: ubuntu-latest
13 | steps:
14 | - name: Get npm cache directory
15 | id: npm-cache
16 | run: |
17 | echo "::set-output name=dir::$(npm config get cache)"
18 | - uses: actions/cache@v3
19 | with:
20 | path: ${{ steps.npm-cache.outputs.dir }}
21 | key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
22 | restore-keys: |
23 | ${{ runner.os }}-node-
24 | - uses: actions/checkout@v3
25 | - name: Setup Node.js
26 | uses: actions/setup-node@v3
27 | with:
28 | node-version: 'lts/*'
29 | - name: Install dependencies
30 | run: npm ci
31 | - name: Build
32 | run: npm run build
33 | - name: Pushes to another repository
34 | uses: cpina/github-action-push-to-another-repository@main
35 | env:
36 | API_TOKEN_GITHUB: ${{ secrets.API_TOKEN_GITHUB }}
37 | with:
38 | source-directory: 'dist'
39 | destination-github-username: 'h5bp'
40 | destination-repository-name: 'html5-boilerplate-template'
41 | user-name: 'roblarsen'
42 | user-email: rob@htmlcssjavascript.com
43 | commit-message: "The latest and greatest from HTML5 Boilerplate"
44 |
45 |
--------------------------------------------------------------------------------
/.github/workflows/spellcheck.yml:
--------------------------------------------------------------------------------
1 | name: 'Check spelling'
2 | on: # rebuild any PRs and main branch changes
3 | push:
4 | branches-ignore:
5 | - "dependabot/**"
6 | pull_request:
7 |
8 | permissions:
9 | contents: read
10 |
11 | jobs:
12 | spellcheck:
13 | runs-on: ubuntu-latest
14 | steps:
15 | - uses: actions/checkout@v3
16 | - uses: streetsidesoftware/cspell-action@v2
17 | with:
18 | inline: warning
19 | strict: false
20 | incremental_files_only: true
21 |
--------------------------------------------------------------------------------
/.github/workflows/test.yaml:
--------------------------------------------------------------------------------
1 | name: Build status
2 |
3 | on:
4 | push:
5 | branches: [main]
6 | pull_request:
7 | branches: [main]
8 |
9 | permissions:
10 | contents: read
11 |
12 | jobs:
13 | build:
14 | runs-on: ubuntu-latest
15 | strategy:
16 | matrix:
17 | node-version: [14.x, 16.x]
18 | steps:
19 | - name: Get npm cache directory
20 | id: npm-cache
21 | run: |
22 | echo "::set-output name=dir::$(npm config get cache)"
23 | - uses: actions/cache@v3
24 | with:
25 | path: ${{ steps.npm-cache.outputs.dir }}
26 | key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
27 | restore-keys: |
28 | ${{ runner.os }}-node-
29 | - uses: actions/checkout@v3
30 | - name: Run tests ${{ matrix.node-version }}
31 | uses: actions/setup-node@v3
32 | with:
33 | node-version: ${{ matrix.node-version }}
34 | - run: npm ci
35 | - run: npm test
36 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | **/.DS_Store
2 | archive
3 | node_modules
4 | packages
5 | dist/package-lock.json
6 | src/package-lock.json
7 |
--------------------------------------------------------------------------------
/CHANGELOG.md:
--------------------------------------------------------------------------------
1 | # Changelog
2 |
3 | ## 9.0.0 (TBD)
4 |
5 | * Rename CSS file [#2342](https://github.com/h5bp/html5-boilerplate/pull/2342) and JS file [#2341](https://github.com/h5bp/html5-boilerplate/pull/2341)
6 |
7 | ## 8.0.0 (June 04, 2020)
8 |
9 | * Add a sample package.json with basic Parcel commands ([#2227](https://github.com/h5bp/html5-boilerplate/pull/2229)), ([231e047](https://github.com/h5bp/html5-boilerplate/commit/231e047d270316b454156dc261e6e04da660e2a2))
10 | * Add sample Open Graph metadata ([#2235](https://github.com/h5bp/html5-boilerplate/pull/2235))
11 | * Update Modernizr to 3.11.2 ([84ae9cc](https://github.com/h5bp/html5-boilerplate/commit/84ae9cc91188bea4edb8ec91e2a25a2a7f7837a6))
12 | * Remove jQuery ([#2225](https://github.com/h5bp/html5-boilerplate/pull/2225))
13 | * Set anonymizeIp to true in Google Analytics snippet ([#2219](https://github.com/h5bp/html5-boilerplate/pull/2219))
14 | * Update main.css to 2.1.0 ([#2234](https://github.com/h5bp/html5-boilerplate/pull/2234))
15 | * Remove Browser Upgrade Prompt ([23c4112](https://github.com/h5bp/html5-boilerplate/commit/23c4112db067262c715ebad861ec892c29c3cdaa))
16 | * Create new publish action ([#2260](https://github.com/h5bp/html5-boilerplate/pull/2260)), ([#2241](https://github.com/h5bp/html5-boilerplate/pull/2241))
17 | * Docs updates ([#2251](https://github.com/h5bp/html5-boilerplate/pull/2251)), ([#2253](https://github.com/h5bp/html5-boilerplate/pull/2253)), ([#2245](https://github.com/h5bp/html5-boilerplate/pull/2245)), ([#2220](https://github.com/h5bp/html5-boilerplate/pull/2220)), ([#2263](https://github.com/h5bp/html5-boilerplate/pull/2263)), ([#2262](https://github.com/h5bp/html5-boilerplate/pull/2262))
18 |
19 | ## 7.3.0 (November 19, 2019)
20 |
21 | * Update Modernizr to 3.8 ([2b2bb45](https://github.com/h5bp/html5-boilerplate/commit/2b2bb453916b4b09a6f0929340290dc2505f7ce9))
22 | * Update to Gulp 4 ([#2151](https://github.com/h5bp/html5-boilerplate/pull/2151))
23 | * Update package.json ([#2162](https://github.com/h5bp/html5-boilerplate/pull/#2162)) and enable package-lock.json ([abe2087](https://github.com/h5bp/html5-boilerplate/commit/abe20877fdb569c84aa0a1f8ae12c51c51e41250)),([#2145](https://github.com/h5bp/html5-boilerplate/pull/#2145))
24 | * Remove redundant rules from .editorconfig ([#2157](https://github.com/h5bp/html5-boilerplate/pull/2157))
25 | * Small docs maintenance updates ([#2155](https://github.com/h5bp/html5-boilerplate/pull/2155)), ([#2164](https://github.com/h5bp/html5-boilerplate/pull/2164)), ([#2165](https://github.com/h5bp/html5-boilerplate/pull/2165)), ([#2167](https://github.com/h5bp/html5-boilerplate/pull/2167)) & ([#2168](https://github.com/h5bp/html5-boilerplate/pull/2168))
26 | * Bump lowest supported version of node to 8.x ([#2142](https://github.com/h5bp/html5-boilerplate/pull/2142))
27 | * Remove .jscsrc config and remove gulp-jscs from package.json ([#2153](https://github.com/h5bp/html5-boilerplate/pull/2153))
28 |
29 | ## 7.2.0 (June 4, 2019)
30 |
31 | * Remove `defer` from Google Analytics snippet ([#2132](https://github.com/h5bp/html5-boilerplate/pull/2132))
32 | * Update jQuery to v3.4.1 ([#2126](https://github.com/h5bp/html5-boilerplate/pull/2126))
33 | * Update Apache Server Configs to 3.2.1 ([#2128](https://github.com/h5bp/html5-boilerplate/pull/2128))
34 | * Update main.css to v2.0.0 ([#2135](https://github.com/h5bp/html5-boilerplate/pull/2135))
35 | * Docs updates ([#2122](https://github.com/h5bp/html5-boilerplate/pull/2122)), ([#2125](https://github.com/h5bp/html5-boilerplate/pull/2125)), ([#2134](https://github.com/h5bp/html5-boilerplate/pull/2134)), ([#2137](https://github.com/h5bp/html5-boilerplate/pull/2137)), ([#2138](https://github.com/h5bp/html5-boilerplate/pull/2138))
36 |
37 | ## 7.1.0 (March 18, 2019)
38 |
39 | * Update Modernizr to 3.7.1 ([#2121](https://github.com/h5bp/html5-boilerplate/pull/2121))
40 | * Update Analytics docs and snippet ([#2118](https://github.com/h5bp/html5-boilerplate/pull/2118))
41 | * Minor docs updates ([#2115](https://github.com/h5bp/html5-boilerplate/pull/2115))
42 | * Minor devdeps updates ([#2114](https://github.com/h5bp/html5-boilerplate/pull/2114))
43 | * More succinct way of writing the IE conditional statement ([#2113](https://github.com/h5bp/html5-boilerplate/pull/2113))
44 |
45 | ## 7.0.1 (February 11, 2019)
46 |
47 | * Bumps main.css to current version ([#2112](https://github.com/h5bp/html5-boilerplate/pull/2112))
48 |
49 | ## 7.0.0 (February 8, 2019)
50 |
51 | * Drop support for IE9/IE10 (usage of these versions is tiny and Microsoft officially ended support back in 2016. ([#2074](https://github.com/h5bp/html5-boilerplate/pull/2074))
52 | * Move the CSS to a separate repo ([#2066](https://github.com/h5bp/html5-boilerplate/pull/2066))
53 | * Add theme-color meta tag to index.html ([#2074](https://github.com/h5bp/html5-boilerplate/pull/2074))
54 | * Add 'install with yarn' steps to README ([#2063](https://github.com/h5bp/html5-boilerplate/pull/2063))
55 | * Improved Webmanifest ([#2060](https://github.com/h5bp/html5-boilerplate/pull/2060))
56 | * Upgrade Normalize to 8.0.1 ([#2104](https://github.com/h5bp/html5-boilerplate/pull/2104))
57 | * Update .htaccess ([#2110](https://github.com/h5bp/html5-boilerplate/pull/2110))
58 | * Remove instances of `shrink-to-fit=no` ([#2103](https://github.com/h5bp/html5-boilerplate/pull/2103))
59 | * Removes "display": "standalone" from manifest ([#2096](https://github.com/h5bp/html5-boilerplate/pull/2096))
60 | * Big Docs update - Fixed links, removed IE9/IE10 specific info, made touch icons section more concise, add details on security.txt and more tidying up ([#2074](https://github.com/h5bp/html5-boilerplate/pull/2031), [#2065](https://github.com/h5bp/html5-boilerplate/pull/2065), [#2062](https://github.com/h5bp/html5-boilerplate/pull/2062))
61 |
62 | ## 6.1.0 (May 1, 2018)
63 |
64 | * [Update Apache Server Configs to `v3.0.0`.](https://github.com/h5bp/html5-boilerplate/pull/2042)
65 | * Migrate to eslint ([#2037](https://github.com/h5bp/html5-boilerplate/pull/2037))
66 | * Update to jQuery 3.3.1 ([#2018](https://github.com/h5bp/html5-boilerplate/pull/2018))
67 | * Update to Modernizr v3.6 and Normalize v8 ([#2028](https://github.com/h5bp/html5-boilerplate/pull/2028))
68 | * Update Dev Dependencies ([#2032](https://github.com/h5bp/html5-boilerplate/pull/2032)) ([#2017](https://github.com/h5bp/html5-boilerplate/pull/2017)) ([#2010](https://github.com/h5bp/html5-boilerplate/pull/2010)) ([#2009](https://github.com/h5bp/html5-boilerplate/pull/2009))
69 | * Replace 'node-sri' with 'ssri' ([#2031](https://github.com/h5bp/html5-boilerplate/pull/2031))
70 | * Add .babelrc and .prettierrc to .gitattributes ([#2030](https://github.com/h5bp/html5-boilerplate/pull/2030))
71 | * Update .htaccess ([#2003](https://github.com/h5bp/html5-boilerplate/pull/2003))
72 | * Fixed JSHint errors ([#1994](https://github.com/h5bp/html5-boilerplate/pull/1994))
73 | * Add CODE_OF_CONDUCT.md ([#2011](https://github.com/h5bp/html5-boilerplate/pull/2011))
74 | * Update Documentation ([#2029](https://github.com/h5bp/html5-boilerplate/pull/2029)) ([#2015](https://github.com/h5bp/html5-boilerplate/pull/2015)) ([#2007](https://github.com/h5bp/html5-boilerplate/pull/2007)) ([#2006](https://github.com/h5bp/html5-boilerplate/pull/2006)) ([#1996](https://github.com/h5bp/html5-boilerplate/pull/1996))
75 |
76 | ## 6.0.1 (August 20, 2017)
77 |
78 | * Reverts .visuallyhidden (see [#1985](https://github.com/h5bp/html5-boilerplate/issues/1985))
79 |
80 | ## 6.0.0 (August 17, 2017)
81 |
82 | * Fix Bug: .visuallyhidden on macOS VO fixes #1985 ([#1989](https://github.com/h5bp/html5-boilerplate/pull/1989))
83 | * Adds web app manifest file ([#1963](https://github.com/h5bp/html5-boilerplate/pull/1963))
84 | * Update to jQuery 3.2.1 ([#1942](https://github.com/h5bp/html5-boilerplate/pull/1942))
85 | * Improve ::selection documentation which became confusing after c7057be ([#1955](https://github.com/h5bp/html5-boilerplate/pull/1955))
86 | * refactor(html): update browsehappy to https instead of http ([#1952](https://github.com/h5bp/html5-boilerplate/pull/1952))
87 | * Fix links to CONTRIBUTING.md ([#1951](https://github.com/h5bp/html5-boilerplate/pull/1951))
88 | * Adds .github folder and contents Fixes ([#1948](https://github.com/h5bp/html5-boilerplate/pull/1948))
89 | * Modernizr 3, modernizr.config and ([#1940](https://github.com/h5bp/html5-boilerplate/pull/1940))
90 | * Housekeeping by @coliff (#1968 #1969 #1965 #1964 #1958 #1957 #1956)
91 | * Update .gitattributes for Web Projects ([#1935](https://github.com/h5bp/html5-boilerplate/pull/1935))
92 | * Add the link for useful .gitignore templates ([#1936](https://github.com/h5bp/html5-boilerplate/pull/1936))
93 | * Node plumbing updated ([#1925](https://github.com/h5bp/html5-boilerplate/pull/1925)) ([#1928](https://github.com/h5bp/html5-boilerplate/pull/1928)) ([#1931](https://github.com/h5bp/html5-boilerplate/pull/1931))
94 | * Use es2015 syntax in mocha tests ([#1788](https://github.com/h5bp/html5-boilerplate/pull/1788))
95 | * Scope :first-letter selector for print styles ([#1904](https://github.com/h5bp/html5-boilerplate/pull/1904))
96 | * Add SRI Hash for jQuery ([#1904](https://github.com/h5bp/html5-boilerplate/pull/1904))
97 | * Update .jshintrc ([#1903](https://github.com/h5bp/html5-boilerplate/pull/1903))
98 | * Improve accessibility with visuallyhidden content ([#1900](https://github.com/h5bp/html5-boilerplate/pull/1900))
99 | * Tell users that IE 8 and 9 are outdated
100 | ([#1747](https://github.com/h5bp/html5-boilerplate/issues/1747)).
101 | * Removed IE8 Support (upgrades jQuery and normalize.css to latest)
102 | ([#1524](https://github.com/h5bp/html5-boilerplate/issues/1524)).
103 | * Fix print styles for Internet Explorer 11
104 | ([#1799](https://github.com/h5bp/html5-boilerplate/issues/1799)).
105 | * Update doc links to https
106 | ([#1889](https://github.com/h5bp/html5-boilerplate/issues/1889)).
107 | * Delete crossdomain.xml
108 | ([#1881](https://github.com/h5bp/html5-boilerplate/issues/1881)).
109 | * Adds pre-wrap to PRE
110 | ([#1742](https://github.com/h5bp/html5-boilerplate/issues/1742)).
111 | * Change license format to SPDX format
112 | ([#1814](https://github.com/h5bp/html5-boilerplate/pull/1814)).
113 | * Simplify the Google Analytics snippet using `async` & `defer` ([#1660](https://github.com/h5bp/html5-boilerplate/pull/1660#issuecomment-89285678)).
114 |
115 | ## 5.3.0 (January 12, 2016)
116 |
117 | * Update jQuery to `v1.12.0`.
118 | * Fetch `jQuery` from jQuery's CDN instead of Google's
119 | ([#1737](https://github.com/h5bp/html5-boilerplate/issues/1737),
120 | [#1739](https://github.com/h5bp/html5-boilerplate/issues/1739)).
121 | * Change print color for `:first-letter` and `:first-line`
122 | pseudo-elements
123 | ([#1715](https://github.com/h5bp/html5-boilerplate/pull/1715)).
124 |
125 | ## 5.2.0 (May 1, 2015)
126 |
127 | * Update jQuery to `v1.11.3`
128 | ([#1699](https://github.com/h5bp/html5-boilerplate/issues/1699)).
129 | * Deprecate protocol-relative URLs
130 | ([#1694](https://github.com/h5bp/html5-boilerplate/issues/1694)).
131 | * Update high resolution media query
132 | ([#1474](https://github.com/h5bp/html5-boilerplate/issues/1474)).
133 | * Update Apache Server Configs to `v2.14.0`.
134 |
135 | ## 5.1.0 (April 1, 2015)
136 |
137 | * Update Normalize.css to `v3.0.3`.
138 | * Use `https://` in the Google Universal Analytics snippet
139 | ([eee759b](https://github.com/h5bp/html5-boilerplate/commit/eee759bfe175e850bbc8e4ad0682ec4fe4bd05d6)).
140 | * Remove the `visibility: hidden` declaration from `.hidden`
141 | ([#1663](https://github.com/h5bp/html5-boilerplate/issues/1663)).
142 | * Use ``
143 | instead of ``
144 | ([#1656](https://github.com/h5bp/html5-boilerplate/issues/1656)).
145 | * Update Apache Server Configs to `v2.13.0`.
146 |
147 | ## 5.0.0 (February 1, 2015)
148 |
149 | * Update to jQuery 1.11.2.
150 | * Update Apache Server Configs to v2.11.0.
151 | * Rename Apple touch icon to `apple-touch-icon.png` and add
152 | `` in `index.html`
153 | ([#1622](https://github.com/h5bp/html5-boilerplate/issues/1622)).
154 | * Add vertical centering for `iframe`
155 | ([#1613](https://github.com/h5bp/html5-boilerplate/issues/1613)).
156 | * Change the outdated browser prompt classname to `browserupgrade`
157 | ([#1608](https://github.com/h5bp/html5-boilerplate/issues/1608)).
158 | * Update to Normalize.css 3.0.2.
159 | ([#1050](https://github.com/h5bp/html5-boilerplate/issues/1050)).
160 | * Update `apple-touch-icon-precomposed.png` and the _"Apple touch
161 | icons"_ related documentation
162 | ([#1599](https://github.com/h5bp/html5-boilerplate/pull/1599)).
163 | * Add pseudo-elements to universal selector in print media query
164 | ([#1585](https://github.com/h5bp/html5-boilerplate/pull/1585)).
165 | * Update to Modernizr 2.8.3.
166 | * Remove need to readjust margins in `404.html`
167 | ([#1567](https://github.com/h5bp/html5-boilerplate/pull/1567)).
168 | * Add `/.editorconfig` file
169 | ([#1561](https://github.com/h5bp/html5-boilerplate/issues/1561),
170 | [#1564](https://github.com/h5bp/html5-boilerplate/issues/1564)).
171 | * Add `auto` to the Google Universal Analytics tracker create method
172 | ([#1562](https://github.com/h5bp/html5-boilerplate/issues/1562)).
173 | * Add `timeline` and `timelineEnd` to the list of `console` methods
174 | ([#1559](https://github.com/h5bp/html5-boilerplate/issues/1559)).
175 | * Add `lang=""` to ``
176 | ([#1542](https://github.com/h5bp/html5-boilerplate/issues/1542)).
177 | * Use `` instead of ``
178 | ([#1522](https://github.com/h5bp/html5-boilerplate/issues/1522)).
179 | * Add `/browserconfig.xml` file and tile images
180 | ([#1481](https://github.com/h5bp/html5-boilerplate/issues/1481)).
181 | * Add `Disallow:` to `robots.txt`
182 | ([#1487](https://github.com/h5bp/html5-boilerplate/issues/1487)).
183 | * Remove default foreground color from form elements
184 | ([#1390](https://github.com/h5bp/html5-boilerplate/issues/1390)).
185 | * Remove default margin from print styles
186 | ([#1477](https://github.com/h5bp/html5-boilerplate/issues/1477)).
187 | * Remove image replacement helper class `.ir`
188 | ([#1472](https://github.com/h5bp/html5-boilerplate/issues/1472),
189 | [#1475](https://github.com/h5bp/html5-boilerplate/issues/1475)).
190 | * Add vertical centering for `svg`
191 | ([#1453](https://github.com/h5bp/html5-boilerplate/issues/1453)).
192 | * Redesign 404 page
193 | ([#1443](https://github.com/h5bp/html5-boilerplate/pull/1443)).
194 | * Remove IE 6/7 hacks from `main.css`
195 | ([#1050](https://github.com/h5bp/html5-boilerplate/issues/1050)).
196 | * Remove IE conditional classes
197 | ([#1187](https://github.com/h5bp/html5-boilerplate/issues/1187),
198 | [#1290](https://github.com/h5bp/html5-boilerplate/issues/1290)).
199 |
200 | ## 4.3.0 (September 10, 2013)
201 |
202 | * Use one `apple-touch-icon` instead of six
203 | ([#1367](https://github.com/h5bp/html5-boilerplate/issues/1367)).
204 | * Move font-related declarations from `body` to `html`
205 | ([#1411](https://github.com/h5bp/html5-boilerplate/issues/1411)).
206 | * Update to Apache Server Configs 1.1.0.
207 | * Add `initial-scale=1` to the viewport `meta`
208 | ([#1398](https://github.com/h5bp/html5-boilerplate/pull/1398)).
209 | * Vertical centering for audio, canvas and video-tags
210 | ([#1326](https://github.com/h5bp/html5-boilerplate/issues/1326)).
211 | * Remove Google Chrome Frame related code
212 | ([#1379](https://github.com/h5bp/html5-boilerplate/pull/1379),
213 | [#1396](https://github.com/h5bp/html5-boilerplate/pull/1396)).
214 | * Update to Google Universal Analytics
215 | ([#1347](https://github.com/h5bp/html5-boilerplate/issues/1347)).
216 | * Update to jQuery 1.10.2.
217 | * Update to Normalize.css 1.1.3.
218 |
219 | ## 4.2.0 (April 8, 2013)
220 |
221 | * Remove Google Analytics protocol check
222 | ([#1319](https://github.com/h5bp/html5-boilerplate/pull/1319)).
223 | * Update to Normalize.css 1.1.1.
224 | * Update Apache configurations to include the latest changes in the
225 | canonical [`.htaccess`](https://github.com/h5bp/server-configs-apache)
226 | file.
227 | * Use a protocol relative URL for the 404 template script.
228 | * Update to jQuery 1.9.1.
229 |
230 | ## 4.1.0 (January 21, 2013)
231 |
232 | * Update to Normalize.css 1.1.0.
233 | * Update to jQuery 1.9.0.
234 |
235 | ## 4.0.3 (January 12, 2013)
236 |
237 | * Use 32x32 favicon.ico
238 | ([#1286](https://github.com/h5bp/html5-boilerplate/pull/1286)).
239 | * Remove named function expression in plugins.js
240 | ([#1280](https://github.com/h5bp/html5-boilerplate/pull/1280)).
241 | * Adjust CSS image-replacement code
242 | ([#1239](https://github.com/h5bp/html5-boilerplate/issues/1239)).
243 | * Update HiDPI example media query
244 | ([#1127](https://github.com/h5bp/html5-boilerplate/issues/1127)).
245 |
246 | ## 4.0.2 (December 9, 2012)
247 |
248 | * Update placeholder icons.
249 | * Update to Normalize.css 1.0.2.
250 | * Update to jQuery 1.8.3.
251 |
252 | ## 4.0.1 (October 20, 2012)
253 |
254 | * Further improvements to `console` method stubbing
255 | ([#1206](https://github.com/h5bp/html5-boilerplate/issues/1206),
256 | [#1229](https://github.com/h5bp/html5-boilerplate/pull/1229)).
257 | * Update to jQuery 1.8.2.
258 | * Update to Modernizr 2.6.2.
259 | * Minor additions to the documentation.
260 |
261 | ## 4.0.0 (August 28, 2012)
262 |
263 | * Improve the Apache compression configuration
264 | ([#1012](https://github.com/h5bp/html5-boilerplate/issues/1012),
265 | [#1173](https://github.com/h5bp/html5-boilerplate/issues/1173)).
266 | * Add a HiDPI example media query
267 | ([#1127](https://github.com/h5bp/html5-boilerplate/issues/1127)).
268 | * Add bundled docs
269 | ([#1154](https://github.com/h5bp/html5-boilerplate/issues/1154)).
270 | * Add MIT license
271 | ([#1139](https://github.com/h5bp/html5-boilerplate/issues/1139)).
272 | * Update to Normalize.css 1.0.1.
273 | * Separate Normalize.css from the rest of the CSS
274 | ([#1160](https://github.com/h5bp/html5-boilerplate/issues/1160)).
275 | * Improve `console.log` protection
276 | ([#1107](https://github.com/h5bp/html5-boilerplate/issues/1107)).
277 | * Replace hot pink text selection color with a neutral color.
278 | * Change image replacement technique
279 | ([#1149](https://github.com/h5bp/html5-boilerplate/issues/1149)).
280 | * Code format and consistency changes
281 | ([#1112](https://github.com/h5bp/html5-boilerplate/issues/1112)).
282 | * Rename CSS file and rename JS files and subdirectories.
283 | * Update to jQuery 1.8
284 | ([#1161](https://github.com/h5bp/html5-boilerplate/issues/1161)).
285 | * Update to Modernizr 2.6.1
286 | ([#1086](https://github.com/h5bp/html5-boilerplate/issues/1086)).
287 | * Remove uncompressed jQuery
288 | ([#1153](https://github.com/h5bp/html5-boilerplate/issues/1153)).
289 | * Remove superfluous inline comments
290 | ([#1150](https://github.com/h5bp/html5-boilerplate/issues/1150)).
291 |
292 | ## 3.0.2 (February 19, 2012)
293 |
294 | * Update to Modernizr 2.5.3.
295 |
296 | ## 3.0.1 (February 08, 2012)
297 |
298 | * Update to Modernizr 2.5.2 (includes html5shiv 3.3).
299 |
300 | ## 3.0.0 (February 06, 2012)
301 |
302 | * Improvements to `.htaccess`.
303 | * Improve 404 design.
304 | * Simplify JS folder structure.
305 | * Change `html` IE class names changed to target ranges rather than
306 | specific versions of IE.
307 | * Update CSS to include latest normalize.css changes and better
308 | typographic defaults
309 | ([#825](https://github.com/h5bp/html5-boilerplate/issues/825)).
310 | * Update to Modernizr 2.5 (includes yepnope 1.5 and html5shiv 3.2).
311 | * Update to jQuery 1.7.1.
312 | * Revert to async snippet for the Google Analytics script.
313 | * Remove the ant build script
314 | ([#826](https://github.com/h5bp/html5-boilerplate/issues/826)).
315 | * Remove Respond.js
316 | ([#816](https://github.com/h5bp/html5-boilerplate/issues/816)).
317 | * Remove the `demo/` directory
318 | ([#808](https://github.com/h5bp/html5-boilerplate/issues/808)).
319 | * Remove the `test/` directory
320 | ([#808](https://github.com/h5bp/html5-boilerplate/issues/808)).
321 | * Remove Google Chrome Frame script for IE6 users; replace with links
322 | to Chrome Frame and options for alternative browsers.
323 | * Remove `initial-scale=1` from the viewport `meta`
324 | ([#824](https://github.com/h5bp/html5-boilerplate/issues/824)).
325 | * Remove `defer` from all scripts to avoid legacy IE bugs.
326 | * Remove explicit Site Speed tracking for Google Analytics. It's now
327 | enabled by default.
328 |
329 | ## 2.0.0 (August 10, 2011)
330 |
331 | * Change starting CSS to be based on normalize.css instead of reset.css
332 | ([#500](https://github.com/h5bp/html5-boilerplate/issues/500)).
333 | * Add Respond.js media query polyfill.
334 | * Add Google Chrome Frame script prompt for IE6 users.
335 | * Simplify the `html` conditional comments for modern browsers and add
336 | an `oldie` class.
337 | * Update clearfix to use "micro clearfix".
338 | * Add placeholder CSS MQs for mobile-first approach.
339 | * Add `textarea { resize: vertical; }` to only allow vertical resizing.
340 | * Add `img { max-width: 100%; }` to the print styles; prevents images
341 | being truncated.
342 | * Add Site Speed tracking for Google Analytics.
343 | * Update to jQuery 1.6.2 (and use minified by default).
344 | * Update to Modernizr 2.0 Complete, Production minified (includes
345 | yepnope, html5shiv, and Respond.js).
346 | * Use `Modernizr.load()` to load the Google Analytics script.
347 | * Much faster build process.
348 | * Add build script options for CSSLint, JSLint, JSHint tools.
349 | * Build script now compresses all images in subfolders.
350 | * Build script now versions files by SHA hash.
351 | * Many `.htaccess` improvements including: disable directory browsing,
352 | improved support for all versions of Apache, more robust and extensive
353 | HTTP compression rules.
354 | * Remove `handheld.css` as it has very poor device support.
355 | * Remove touch-icon `link` elements from the HTML and include improved
356 | touch-icon support.
357 | * Remove the cache-busting query parameters from files references in
358 | the HTML.
359 | * Remove IE6 PNGFix.
360 |
361 | ## 1.0.0 (March 21, 2011)
362 |
363 | * Rewrite build script to make it more customizable and flexible.
364 | * Add a humans.txt.
365 | * Numerous `.htaccess` improvements (including inline documentation).
366 | * Move the alternative server configurations to the H5BP server configs
367 | repo.
368 | * Use a protocol-relative url to reference jQuery and prevent mixed
369 | content warnings.
370 | * Optimize the Google Analytics snippet.
371 | * Use Eric Meyer's recent CSS reset update and the HTML5 Doctor reset.
372 | * More robust `sub`/`sup` CSS styles.
373 | * Add keyboard `.focusable` helper class that extends `.visuallyhidden`.
374 | * Print styles no longer print hash or JavaScript links.
375 | * Add a print reset for IE's proprietary filters.
376 | * Remove IE9-specific conditional class on the `html` element.
377 | * Remove margins from lists within `nav` elements.
378 | * Remove YUI profiling.
379 |
--------------------------------------------------------------------------------
/LICENSE.txt:
--------------------------------------------------------------------------------
1 | Copyright (c) HTML5 Boilerplate
2 |
3 | Permission is hereby granted, free of charge, to any person obtaining a copy of
4 | this software and associated documentation files (the "Software"), to deal in
5 | the Software without restriction, including without limitation the rights to
6 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
7 | of the Software, and to permit persons to whom the Software is furnished to do
8 | so, subject to the following conditions:
9 |
10 | The above copyright notice and this permission notice shall be included in all
11 | copies or substantial portions of the Software.
12 |
13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19 | SOFTWARE.
20 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # [HTML5 Boilerplate](https://html5boilerplate.com/)
2 |
3 | [](https://github.com/h5bp/html5-boilerplate/actions?query=workflow%3A%22Build+status%22+branch%3Amain)
4 | [](https://github.com/h5bp/html5-boilerplate/blob/main/LICENSE.txt)
5 | [](https://www.npmjs.com/package/html5-boilerplate)
6 | [](https://github.com/h5bp/html5-boilerplate)
7 |
8 | HTML5 Boilerplate is a professional front-end template for building
9 | fast, robust, and adaptable web apps or sites.
10 |
11 | This project is the product of over 10 years of iterative development and
12 | community knowledge. It does not impose a specific development
13 | philosophy or framework, so you're free to architect your code in the
14 | way that you want.
15 |
16 | * [Homepage](https://html5boilerplate.com/)
17 | * [Source Code](https://github.com/h5bp/html5-boilerplate)
18 | * [Twitter(@h5pb)](https://twitter.com/h5bp)
19 |
20 | ## About This Repository
21 |
22 | This repository is where HTML5-Boilerplate is authored. Some of the tools,
23 | files and processes that you see here are solely for the _production_ of
24 | HTML5 Boilerplate and are not _part_ of HTML5 Boilerplate. For one example, the
25 | [gulpfile.mjs](https://github.com/h5bp/html5-boilerplate/blob/main/gulpfile.mjs)
26 | script is used to _build_ the project. It's not part of the project itself.
27 |
28 | The project we publish is represented by the contents of the `/dist/`
29 | folder. Everything else in this repository is used to author the project.
30 |
31 | Think of it this way, in the same way that you don't clone [vuejs/core](https://github.com/vuejs/core)
32 | to create a Vue.js app, you don't need to clone this repository to start a new
33 | site or app based on HTML5 Boilerplate.
34 |
35 | So, if you're looking for a quick start template to build a web site or
36 | application, look at the options in the
37 | [Quick Start](https://github.com/h5bp/html5-boilerplate#quick-start) section of this document.
38 |
39 | If you want to help us _improve_ HTML5 Boilerplate then you can start with the documentation [here](.github/CONTRIBUTING.md), which includes steps to clone this repo in order to get it set up for development.
40 |
41 | ## Quick Start
42 |
43 | Choose one of the following options:
44 |
45 | * Using the [create-html5-boilerplate](https://github.com/h5bp/create-html5-boilerplate)
46 | script, instantly fetch the latest npm published package (or any version
47 | available on npm) with `npx`, `npm init` or `yarn create` without having to
48 | install any dependencies. Running the following `npx` command installs the
49 | latest version into a folder called `new-site`
50 |
51 | ```bash
52 | npx create-html5-boilerplate new-site
53 | cd new-site
54 | npm install
55 | npm run start
56 | ```
57 |
58 | * Using our new [Template Repository](https://github.com/h5bp/html5-boilerplate-template)
59 | create a new GitHub repository based on the latest code from the main branch of HTML5
60 | Boilerplate.
61 |
62 | * Install with [npm](https://www.npmjs.com/): `npm install html5-boilerplate`
63 | or [yarn](https://yarnpkg.com/): `yarn add html5-boilerplate`. The resulting
64 | `node_modules/html5-boilerplate/dist` folder represents the latest version of
65 | the project for end users. Depending on what you want to use and how you want
66 | to use it, you may have to copy and paste the contents of that folder into
67 | your project directory.
68 |
69 |
70 | * Download the latest stable release from
71 | [here](https://github.com/h5bp/html5-boilerplate/releases/download/v8.0.0/html5-boilerplate_v8.0.0.zip). This zip file is a
72 | snapshot of the `dist` folder. On Windows, Mac and from the file manager on
73 | Linux unzipping this folder will output to a folder named something like
74 | `html5-boilerplate_v8.0.0`. From the command-line, you will need to create a
75 | folder and unzip the contents into that folder.
76 |
77 | ```bash
78 | mkdir html5-boilerplate
79 | unzip html5-boilerplate*.zip -d html5-boilerplate
80 | ```
81 |
82 | ## Features
83 |
84 | * A finely-tuned starter template: Reap the benefits of 10 years of analysis,
85 | research and experimentation by over 200 contributors.
86 | * Designed with progressive enhancement in mind.
87 | * Includes:
88 | * [`Normalize.css`](https://necolas.github.io/normalize.css/)
89 | for CSS normalizations and common bug fixes.
90 | * A custom build of [`Modernizr`](https://modernizr.com/) for feature
91 | detection.
92 | * [`Apache Server Configs`](https://github.com/h5bp/server-configs-apache)
93 | that improve the web site's performance and security.
94 | * Placeholder Open Graph elements and attributes.
95 | * An example package.json file with [WebPack](https://webpack.js.org/) commands
96 | built in to jumpstart application development.
97 | * Placeholder CSS Media Queries.
98 | * Useful CSS helper classes.
99 | * Default print styles, performance optimized.
100 | * Protection against any stray `console` statements causing JavaScript
101 | errors in older browsers.
102 | * "Delete-key friendly." Easy to strip out parts you don't need.
103 | * Extensive documentation.
104 |
105 | ## Browser Support
106 |
107 | HTML5-Boilerplate supports the latest, stable releases of all major browsers.
108 |
109 | You can find our range of supported browsers in our [package.json](https://github.com/h5bp/html5-boilerplate/blob/main/package.json#L55-L59) At present we alter the [browserlist default](https://github.com/browserslist/browserslist#full-list) by dropping IE 11.
110 |
111 | ```json
112 | "browserslist": [
113 | "> 0.5%",
114 | "last 2 versions",
115 | "Firefox ESR",
116 | "not dead",
117 | "not IE 11"
118 | ],
119 | ```
120 |
121 | That configuration translates to this [full list of browsers](https://browserslist.dev/?q=ID4gMC41JSwgICAgIGxhc3QgMiB2ZXJzaW9ucywgICAgIEZpcmVmb3ggRVNSLCAgICBub3QgZGVhZCwgICAgIG5vdCBJRSAxMQ).
122 |
123 | ## Documentation
124 |
125 | Take a look at the [documentation table of contents](docs/TOC.md). This
126 | documentation is bundled with the project which makes it available for offline
127 | reading and provides a useful starting point for any documentation you want to
128 | write about your project.
129 |
130 | ## Contributing
131 |
132 | Hundreds of developers have helped to make the HTML5 Boilerplate. Anyone is
133 | welcome to [contribute](.github/CONTRIBUTING.md). However, if you decide to get
134 | involved, please take a moment to review the [guidelines](.github/CONTRIBUTING.md):
135 |
136 | * [Bug reports](.github/CONTRIBUTING.md#bugs)
137 | * [Feature requests](.github/CONTRIBUTING.md#features)
138 | * [Pull requests](.github/CONTRIBUTING.md#pull-requests)
139 |
140 | ## License
141 |
142 | The code is available under the [MIT license](LICENSE.txt).
143 |
--------------------------------------------------------------------------------
/dist/.editorconfig:
--------------------------------------------------------------------------------
1 | # editorconfig.org
2 |
3 | root = true
4 |
5 | [*]
6 | charset = utf-8
7 | indent_size = 2
8 | indent_style = space
9 | insert_final_newline = true
10 | trim_trailing_whitespace = true
11 |
--------------------------------------------------------------------------------
/dist/.gitattributes:
--------------------------------------------------------------------------------
1 | ## GITATTRIBUTES FOR WEB PROJECTS
2 | #
3 | # These settings are for any web project.
4 | #
5 | # Details per file setting:
6 | # text These files should be normalized (i.e. convert CRLF to LF).
7 | # binary These files are binary and should be left untouched.
8 | #
9 | # Note that binary is a macro for -text -diff.
10 | ######################################################################
11 |
12 | ## AUTO-DETECT
13 | ## Handle line endings automatically for files detected as
14 | ## text and leave all files detected as binary untouched.
15 | ## This will handle all files NOT defined below.
16 | * text=auto
17 |
18 | ## SOURCE CODE
19 | *.bat text eol=crlf
20 | *.coffee text
21 | *.css text
22 | *.htm text
23 | *.html text
24 | *.inc text
25 | *.ini text
26 | *.js text
27 | *.json text
28 | *.jsx text
29 | *.less text
30 | *.od text
31 | *.onlydata text
32 | *.php text
33 | *.pl text
34 | *.py text
35 | *.rb text
36 | *.sass text
37 | *.scm text
38 | *.scss text
39 | *.sh text eol=lf
40 | *.sql text
41 | *.styl text
42 | *.tag text
43 | *.ts text
44 | *.tsx text
45 | *.xml text
46 | *.xhtml text
47 |
48 | ## DOCKER
49 | *.dockerignore text
50 | Dockerfile text
51 |
52 | ## DOCUMENTATION
53 | *.markdown text
54 | *.md text
55 | *.mdwn text
56 | *.mdown text
57 | *.mkd text
58 | *.mkdn text
59 | *.mdtxt text
60 | *.mdtext text
61 | *.txt text
62 | AUTHORS text
63 | CHANGELOG text
64 | CHANGES text
65 | CONTRIBUTING text
66 | COPYING text
67 | copyright text
68 | *COPYRIGHT* text
69 | INSTALL text
70 | license text
71 | LICENSE text
72 | NEWS text
73 | readme text
74 | *README* text
75 | TODO text
76 |
77 | ## TEMPLATES
78 | *.dot text
79 | *.ejs text
80 | *.haml text
81 | *.handlebars text
82 | *.hbs text
83 | *.hbt text
84 | *.jade text
85 | *.latte text
86 | *.mustache text
87 | *.njk text
88 | *.phtml text
89 | *.tmpl text
90 | *.tpl text
91 | *.twig text
92 |
93 | ## LINTERS
94 | .babelrc text
95 | .csslintrc text
96 | .eslintrc text
97 | .htmlhintrc text
98 | .jscsrc text
99 | .jshintrc text
100 | .jshintignore text
101 | .prettierrc text
102 | .stylelintrc text
103 |
104 | ## CONFIGS
105 | *.bowerrc text
106 | *.cnf text
107 | *.conf text
108 | *.config text
109 | .browserslistrc text
110 | .editorconfig text
111 | .gitattributes text
112 | .gitconfig text
113 | .gitignore text
114 | .htaccess text
115 | *.npmignore text
116 | *.yaml text
117 | *.yml text
118 | browserslist text
119 | Makefile text
120 | makefile text
121 |
122 | ## HEROKU
123 | Procfile text
124 | .slugignore text
125 |
126 | ## GRAPHICS
127 | *.ai binary
128 | *.bmp binary
129 | *.eps binary
130 | *.gif binary
131 | *.ico binary
132 | *.jng binary
133 | *.jp2 binary
134 | *.jpg binary
135 | *.jpeg binary
136 | *.jpx binary
137 | *.jxr binary
138 | *.pdf binary
139 | *.png binary
140 | *.psb binary
141 | *.psd binary
142 | *.svg text
143 | *.svgz binary
144 | *.tif binary
145 | *.tiff binary
146 | *.wbmp binary
147 | *.webp binary
148 |
149 | ## AUDIO
150 | *.kar binary
151 | *.m4a binary
152 | *.mid binary
153 | *.midi binary
154 | *.mp3 binary
155 | *.ogg binary
156 | *.ra binary
157 |
158 | ## VIDEO
159 | *.3gpp binary
160 | *.3gp binary
161 | *.as binary
162 | *.asf binary
163 | *.asx binary
164 | *.fla binary
165 | *.flv binary
166 | *.m4v binary
167 | *.mng binary
168 | *.mov binary
169 | *.mp4 binary
170 | *.mpeg binary
171 | *.mpg binary
172 | *.ogv binary
173 | *.swc binary
174 | *.swf binary
175 | *.webm binary
176 |
177 | ## ARCHIVES
178 | *.7z binary
179 | *.gz binary
180 | *.jar binary
181 | *.rar binary
182 | *.tar binary
183 | *.zip binary
184 |
185 | ## FONTS
186 | *.ttf binary
187 | *.eot binary
188 | *.otf binary
189 | *.woff binary
190 | *.woff2 binary
191 |
192 | ## EXECUTABLES
193 | *.exe binary
194 | *.pyc binary
195 |
--------------------------------------------------------------------------------
/dist/.gitignore:
--------------------------------------------------------------------------------
1 | # Include your project-specific ignores in this file
2 | # Read about how to use .gitignore: https://help.github.com/articles/ignoring-files
3 | # Useful .gitignore templates: https://github.com/github/gitignore
4 | node_modules
5 | dist
6 | .cache
--------------------------------------------------------------------------------
/dist/404.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | Page Not Found
7 |
8 |
54 |
55 |
56 |
57 |
Page Not Found
58 |
Sorry, but the page you were trying to view does not exist.
59 |
60 |
61 |
62 |
63 |
--------------------------------------------------------------------------------
/dist/LICENSE.txt:
--------------------------------------------------------------------------------
1 | Copyright (c) HTML5 Boilerplate
2 |
3 | Permission is hereby granted, free of charge, to any person obtaining a copy of
4 | this software and associated documentation files (the "Software"), to deal in
5 | the Software without restriction, including without limitation the rights to
6 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
7 | of the Software, and to permit persons to whom the Software is furnished to do
8 | so, subject to the following conditions:
9 |
10 | The above copyright notice and this permission notice shall be included in all
11 | copies or substantial portions of the Software.
12 |
13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19 | SOFTWARE.
20 |
--------------------------------------------------------------------------------
/dist/css/normalize.css:
--------------------------------------------------------------------------------
1 | /*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */
2 |
3 | /* Document
4 | ========================================================================== */
5 |
6 | /**
7 | * 1. Correct the line height in all browsers.
8 | * 2. Prevent adjustments of font size after orientation changes in iOS.
9 | */
10 |
11 | html {
12 | line-height: 1.15; /* 1 */
13 | -webkit-text-size-adjust: 100%; /* 2 */
14 | }
15 |
16 | /* Sections
17 | ========================================================================== */
18 |
19 | /**
20 | * Remove the margin in all browsers.
21 | */
22 |
23 | body {
24 | margin: 0;
25 | }
26 |
27 | /**
28 | * Render the `main` element consistently in IE.
29 | */
30 |
31 | main {
32 | display: block;
33 | }
34 |
35 | /**
36 | * Correct the font size and margin on `h1` elements within `section` and
37 | * `article` contexts in Chrome, Firefox, and Safari.
38 | */
39 |
40 | h1 {
41 | font-size: 2em;
42 | margin: 0.67em 0;
43 | }
44 |
45 | /* Grouping content
46 | ========================================================================== */
47 |
48 | /**
49 | * 1. Add the correct box sizing in Firefox.
50 | * 2. Show the overflow in Edge and IE.
51 | */
52 |
53 | hr {
54 | box-sizing: content-box; /* 1 */
55 | height: 0; /* 1 */
56 | overflow: visible; /* 2 */
57 | }
58 |
59 | /**
60 | * 1. Correct the inheritance and scaling of font size in all browsers.
61 | * 2. Correct the odd `em` font sizing in all browsers.
62 | */
63 |
64 | pre {
65 | font-family: monospace, monospace; /* 1 */
66 | font-size: 1em; /* 2 */
67 | }
68 |
69 | /* Text-level semantics
70 | ========================================================================== */
71 |
72 | /**
73 | * Remove the gray background on active links in IE 10.
74 | */
75 |
76 | a {
77 | background-color: transparent;
78 | }
79 |
80 | /**
81 | * 1. Remove the bottom border in Chrome 57-
82 | * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.
83 | */
84 |
85 | abbr[title] {
86 | border-bottom: none; /* 1 */
87 | text-decoration: underline; /* 2 */
88 | text-decoration: underline dotted; /* 2 */
89 | }
90 |
91 | /**
92 | * Add the correct font weight in Chrome, Edge, and Safari.
93 | */
94 |
95 | b,
96 | strong {
97 | font-weight: bolder;
98 | }
99 |
100 | /**
101 | * 1. Correct the inheritance and scaling of font size in all browsers.
102 | * 2. Correct the odd `em` font sizing in all browsers.
103 | */
104 |
105 | code,
106 | kbd,
107 | samp {
108 | font-family: monospace, monospace; /* 1 */
109 | font-size: 1em; /* 2 */
110 | }
111 |
112 | /**
113 | * Add the correct font size in all browsers.
114 | */
115 |
116 | small {
117 | font-size: 80%;
118 | }
119 |
120 | /**
121 | * Prevent `sub` and `sup` elements from affecting the line height in
122 | * all browsers.
123 | */
124 |
125 | sub,
126 | sup {
127 | font-size: 75%;
128 | line-height: 0;
129 | position: relative;
130 | vertical-align: baseline;
131 | }
132 |
133 | sub {
134 | bottom: -0.25em;
135 | }
136 |
137 | sup {
138 | top: -0.5em;
139 | }
140 |
141 | /* Embedded content
142 | ========================================================================== */
143 |
144 | /**
145 | * Remove the border on images inside links in IE 10.
146 | */
147 |
148 | img {
149 | border-style: none;
150 | }
151 |
152 | /* Forms
153 | ========================================================================== */
154 |
155 | /**
156 | * 1. Change the font styles in all browsers.
157 | * 2. Remove the margin in Firefox and Safari.
158 | */
159 |
160 | button,
161 | input,
162 | optgroup,
163 | select,
164 | textarea {
165 | font-family: inherit; /* 1 */
166 | font-size: 100%; /* 1 */
167 | line-height: 1.15; /* 1 */
168 | margin: 0; /* 2 */
169 | }
170 |
171 | /**
172 | * Show the overflow in IE.
173 | * 1. Show the overflow in Edge.
174 | */
175 |
176 | button,
177 | input { /* 1 */
178 | overflow: visible;
179 | }
180 |
181 | /**
182 | * Remove the inheritance of text transform in Edge, Firefox, and IE.
183 | * 1. Remove the inheritance of text transform in Firefox.
184 | */
185 |
186 | button,
187 | select { /* 1 */
188 | text-transform: none;
189 | }
190 |
191 | /**
192 | * Correct the inability to style clickable types in iOS and Safari.
193 | */
194 |
195 | button,
196 | [type="button"],
197 | [type="reset"],
198 | [type="submit"] {
199 | -webkit-appearance: button;
200 | }
201 |
202 | /**
203 | * Remove the inner border and padding in Firefox.
204 | */
205 |
206 | button::-moz-focus-inner,
207 | [type="button"]::-moz-focus-inner,
208 | [type="reset"]::-moz-focus-inner,
209 | [type="submit"]::-moz-focus-inner {
210 | border-style: none;
211 | padding: 0;
212 | }
213 |
214 | /**
215 | * Restore the focus styles unset by the previous rule.
216 | */
217 |
218 | button:-moz-focusring,
219 | [type="button"]:-moz-focusring,
220 | [type="reset"]:-moz-focusring,
221 | [type="submit"]:-moz-focusring {
222 | outline: 1px dotted ButtonText;
223 | }
224 |
225 | /**
226 | * Correct the padding in Firefox.
227 | */
228 |
229 | fieldset {
230 | padding: 0.35em 0.75em 0.625em;
231 | }
232 |
233 | /**
234 | * 1. Correct the text wrapping in Edge and IE.
235 | * 2. Correct the color inheritance from `fieldset` elements in IE.
236 | * 3. Remove the padding so developers are not caught out when they zero out
237 | * `fieldset` elements in all browsers.
238 | */
239 |
240 | legend {
241 | box-sizing: border-box; /* 1 */
242 | color: inherit; /* 2 */
243 | display: table; /* 1 */
244 | max-width: 100%; /* 1 */
245 | padding: 0; /* 3 */
246 | white-space: normal; /* 1 */
247 | }
248 |
249 | /**
250 | * Add the correct vertical alignment in Chrome, Firefox, and Opera.
251 | */
252 |
253 | progress {
254 | vertical-align: baseline;
255 | }
256 |
257 | /**
258 | * Remove the default vertical scrollbar in IE 10+.
259 | */
260 |
261 | textarea {
262 | overflow: auto;
263 | }
264 |
265 | /**
266 | * 1. Add the correct box sizing in IE 10.
267 | * 2. Remove the padding in IE 10.
268 | */
269 |
270 | [type="checkbox"],
271 | [type="radio"] {
272 | box-sizing: border-box; /* 1 */
273 | padding: 0; /* 2 */
274 | }
275 |
276 | /**
277 | * Correct the cursor style of increment and decrement buttons in Chrome.
278 | */
279 |
280 | [type="number"]::-webkit-inner-spin-button,
281 | [type="number"]::-webkit-outer-spin-button {
282 | height: auto;
283 | }
284 |
285 | /**
286 | * 1. Correct the odd appearance in Chrome and Safari.
287 | * 2. Correct the outline style in Safari.
288 | */
289 |
290 | [type="search"] {
291 | -webkit-appearance: textfield; /* 1 */
292 | outline-offset: -2px; /* 2 */
293 | }
294 |
295 | /**
296 | * Remove the inner padding in Chrome and Safari on macOS.
297 | */
298 |
299 | [type="search"]::-webkit-search-decoration {
300 | -webkit-appearance: none;
301 | }
302 |
303 | /**
304 | * 1. Correct the inability to style clickable types in iOS and Safari.
305 | * 2. Change font properties to `inherit` in Safari.
306 | */
307 |
308 | ::-webkit-file-upload-button {
309 | -webkit-appearance: button; /* 1 */
310 | font: inherit; /* 2 */
311 | }
312 |
313 | /* Interactive
314 | ========================================================================== */
315 |
316 | /*
317 | * Add the correct display in Edge, IE 10+, and Firefox.
318 | */
319 |
320 | details {
321 | display: block;
322 | }
323 |
324 | /*
325 | * Add the correct display in all browsers.
326 | */
327 |
328 | summary {
329 | display: list-item;
330 | }
331 |
332 | /* Misc
333 | ========================================================================== */
334 |
335 | /**
336 | * Add the correct display in IE 10+.
337 | */
338 |
339 | template {
340 | display: none;
341 | }
342 |
343 | /**
344 | * Add the correct display in IE 10.
345 | */
346 |
347 | [hidden] {
348 | display: none;
349 | }
350 |
--------------------------------------------------------------------------------
/dist/css/style.css:
--------------------------------------------------------------------------------
1 | /*! HTML5 Boilerplate v8.0.0 | MIT License | https://html5boilerplate.com/ */
2 |
3 | /* main.css 3.0.0 | MIT License | https://github.com/h5bp/main.css#readme */
4 | /*
5 | * What follows is the result of much research on cross-browser styling.
6 | * Credit left inline and big thanks to Nicolas Gallagher, Jonathan Neal,
7 | * Kroc Camen, and the H5BP dev community and team.
8 | */
9 |
10 | /* ==========================================================================
11 | Base styles: opinionated defaults
12 | ========================================================================== */
13 |
14 | html {
15 | color: #222;
16 | font-size: 1em;
17 | line-height: 1.4;
18 | }
19 |
20 | /*
21 | * Remove text-shadow in selection highlight:
22 | * https://twitter.com/miketaylr/status/12228805301
23 | *
24 | * Customize the background color to match your design.
25 | */
26 |
27 | ::-moz-selection {
28 | background: #b3d4fc;
29 | text-shadow: none;
30 | }
31 |
32 | ::selection {
33 | background: #b3d4fc;
34 | text-shadow: none;
35 | }
36 |
37 | /*
38 | * A better looking default horizontal rule
39 | */
40 |
41 | hr {
42 | display: block;
43 | height: 1px;
44 | border: 0;
45 | border-top: 1px solid #ccc;
46 | margin: 1em 0;
47 | padding: 0;
48 | }
49 |
50 | /*
51 | * Remove the gap between audio, canvas, iframes,
52 | * images, videos and the bottom of their containers:
53 | * https://github.com/h5bp/html5-boilerplate/issues/440
54 | */
55 |
56 | audio,
57 | canvas,
58 | iframe,
59 | img,
60 | svg,
61 | video {
62 | vertical-align: middle;
63 | }
64 |
65 | /*
66 | * Remove default fieldset styles.
67 | */
68 |
69 | fieldset {
70 | border: 0;
71 | margin: 0;
72 | padding: 0;
73 | }
74 |
75 | /*
76 | * Allow only vertical resizing of textareas.
77 | */
78 |
79 | textarea {
80 | resize: vertical;
81 | }
82 |
83 | /* ==========================================================================
84 | Author's custom styles
85 | ========================================================================== */
86 |
87 | /* ==========================================================================
88 | Helper classes
89 | ========================================================================== */
90 |
91 | /*
92 | * Hide visually and from screen readers
93 | */
94 |
95 | .hidden,
96 | [hidden] {
97 | display: none !important;
98 | }
99 |
100 | /*
101 | * Hide only visually, but have it available for screen readers:
102 | * https://snook.ca/archives/html_and_css/hiding-content-for-accessibility
103 | *
104 | * 1. For long content, line feeds are not interpreted as spaces and small width
105 | * causes content to wrap 1 word per line:
106 | * https://medium.com/@jessebeach/beware-smushed-off-screen-accessible-text-5952a4c2cbfe
107 | */
108 |
109 | .visually-hidden {
110 | border: 0;
111 | clip: rect(0, 0, 0, 0);
112 | height: 1px;
113 | margin: -1px;
114 | overflow: hidden;
115 | padding: 0;
116 | position: absolute;
117 | white-space: nowrap;
118 | width: 1px;
119 | /* 1 */
120 | }
121 |
122 | /*
123 | * Extends the .visually-hidden class to allow the element
124 | * to be focusable when navigated to via the keyboard:
125 | * https://www.drupal.org/node/897638
126 | */
127 |
128 | .visually-hidden.focusable:active,
129 | .visually-hidden.focusable:focus {
130 | clip: auto;
131 | height: auto;
132 | margin: 0;
133 | overflow: visible;
134 | position: static;
135 | white-space: inherit;
136 | width: auto;
137 | }
138 |
139 | /*
140 | * Hide visually and from screen readers, but maintain layout
141 | */
142 |
143 | .invisible {
144 | visibility: hidden;
145 | }
146 |
147 | /*
148 | * Clearfix: contain floats
149 | *
150 | * The use of `table` rather than `block` is only necessary if using
151 | * `::before` to contain the top-margins of child elements.
152 | */
153 |
154 | .clearfix::before,
155 | .clearfix::after {
156 | content: "";
157 | display: table;
158 | }
159 |
160 | .clearfix::after {
161 | clear: both;
162 | }
163 |
164 | /* ==========================================================================
165 | EXAMPLE Media Queries for Responsive Design.
166 | These examples override the primary ('mobile first') styles.
167 | Modify as content requires.
168 | ========================================================================== */
169 |
170 | @media only screen and (min-width: 35em) {
171 | /* Style adjustments for viewports that meet the condition */
172 | }
173 |
174 | @media print,
175 | (-webkit-min-device-pixel-ratio: 1.25),
176 | (min-resolution: 1.25dppx),
177 | (min-resolution: 120dpi) {
178 | /* Style adjustments for high resolution devices */
179 | }
180 |
181 | /* ==========================================================================
182 | Print styles.
183 | Inlined to avoid the additional HTTP request:
184 | https://www.phpied.com/delay-loading-your-print-css/
185 | ========================================================================== */
186 |
187 | @media print {
188 | *,
189 | *::before,
190 | *::after {
191 | background: #fff !important;
192 | color: #000 !important;
193 | /* Black prints faster */
194 | box-shadow: none !important;
195 | text-shadow: none !important;
196 | }
197 |
198 | a,
199 | a:visited {
200 | text-decoration: underline;
201 | }
202 |
203 | a[href]::after {
204 | content: " (" attr(href) ")";
205 | }
206 |
207 | abbr[title]::after {
208 | content: " (" attr(title) ")";
209 | }
210 |
211 | /*
212 | * Don't show links that are fragment identifiers,
213 | * or use the `javascript:` pseudo protocol
214 | */
215 | a[href^="#"]::after,
216 | a[href^="javascript:"]::after {
217 | content: "";
218 | }
219 |
220 | pre {
221 | white-space: pre-wrap !important;
222 | }
223 |
224 | pre,
225 | blockquote {
226 | border: 1px solid #999;
227 | page-break-inside: avoid;
228 | }
229 |
230 | tr,
231 | img {
232 | page-break-inside: avoid;
233 | }
234 |
235 | p,
236 | h2,
237 | h3 {
238 | orphans: 3;
239 | widows: 3;
240 | }
241 |
242 | h2,
243 | h3 {
244 | page-break-after: avoid;
245 | }
246 | }
247 |
248 |
--------------------------------------------------------------------------------
/dist/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/maker-shihab/html5-boilerplate/2154114f92a1357c0d75ec2633049c10cfbea6ba/dist/favicon.ico
--------------------------------------------------------------------------------
/dist/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/maker-shihab/html5-boilerplate/2154114f92a1357c0d75ec2633049c10cfbea6ba/dist/icon.png
--------------------------------------------------------------------------------
/dist/icon.svg:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/dist/img/.gitignore:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/maker-shihab/html5-boilerplate/2154114f92a1357c0d75ec2633049c10cfbea6ba/dist/img/.gitignore
--------------------------------------------------------------------------------
/dist/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
Hello world! This is HTML5 Boilerplate.
30 |
31 |
32 |
33 |
34 |
35 |
36 |
--------------------------------------------------------------------------------
/dist/js/app.js:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/maker-shihab/html5-boilerplate/2154114f92a1357c0d75ec2633049c10cfbea6ba/dist/js/app.js
--------------------------------------------------------------------------------
/dist/js/vendor/modernizr-3.12.0.min.js:
--------------------------------------------------------------------------------
1 | /*! modernizr 3.12.0 (Custom Build) | MIT *
2 | * https://modernizr.com/download/?-addtest-domprefixes-hasevent-mq-prefixedcssvalue-prefixes-setclasses-testallprops-testprop-teststyles !*/
3 | !function(e,n,t,r){function o(e,n){return typeof e===n}function i(e){var n=b.className,t=Modernizr._config.classPrefix||"";if(x&&(n=n.baseVal),Modernizr._config.enableJSClass){var r=new RegExp("(^|\\s)"+t+"no-js(\\s|$)");n=n.replace(r,"$1"+t+"js$2")}Modernizr._config.enableClasses&&(e.length>0&&(n+=" "+t+e.join(" "+t)),x?b.className.baseVal=n:b.className=n)}function s(e,n){if("object"==typeof e)for(var t in e)N(e,t)&&s(t,e[t]);else{e=e.toLowerCase();var r=e.split("."),o=Modernizr[r[0]];if(2===r.length&&(o=o[r[1]]),void 0!==o)return Modernizr;n="function"==typeof n?n():n,1===r.length?Modernizr[r[0]]=n:(!Modernizr[r[0]]||Modernizr[r[0]]instanceof Boolean||(Modernizr[r[0]]=new Boolean(Modernizr[r[0]])),Modernizr[r[0]][r[1]]=n),i([(n&&!1!==n?"":"no-")+r.join("-")]),Modernizr._trigger(e,n)}return Modernizr}function l(){return"function"!=typeof t.createElement?t.createElement(arguments[0]):x?t.createElementNS.call(t,"http://www.w3.org/2000/svg",arguments[0]):t.createElement.apply(t,arguments)}function a(){var e=t.body;return e||(e=l(x?"svg":"body"),e.fake=!0),e}function u(e,n,r,o){var i,s,u,f,c="modernizr",d=l("div"),p=a();if(parseInt(r,10))for(;r--;)u=l("div"),u.id=o?o[r]:c+(r+1),d.appendChild(u);return i=l("style"),i.type="text/css",i.id="s"+c,(p.fake?p:d).appendChild(i),p.appendChild(d),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(t.createTextNode(e)),d.id=c,p.fake&&(p.style.background="",p.style.overflow="hidden",f=b.style.overflow,b.style.overflow="hidden",b.appendChild(p)),s=n(d,e),p.fake&&p.parentNode?(p.parentNode.removeChild(p),b.style.overflow=f,b.offsetHeight):d.parentNode.removeChild(d),!!s}function f(e,t,r){var o;if("getComputedStyle"in n){o=getComputedStyle.call(n,e,t);var i=n.console;if(null!==o)r&&(o=o.getPropertyValue(r));else if(i){var s=i.error?"error":"log";i[s].call(i,"getComputedStyle returning null, its possible modernizr test results are inaccurate")}}else o=!t&&e.currentStyle&&e.currentStyle[r];return o}function c(e,n){return!!~(""+e).indexOf(n)}function d(e){return e.replace(/([A-Z])/g,function(e,n){return"-"+n.toLowerCase()}).replace(/^ms-/,"-ms-")}function p(e,t){var o=e.length;if("CSS"in n&&"supports"in n.CSS){for(;o--;)if(n.CSS.supports(d(e[o]),t))return!0;return!1}if("CSSSupportsRule"in n){for(var i=[];o--;)i.push("("+d(e[o])+":"+t+")");return i=i.join(" or "),u("@supports ("+i+") { #modernizr { position: absolute; } }",function(e){return"absolute"===f(e,null,"position")})}return r}function v(e){return e.replace(/([a-z])-([a-z])/g,function(e,n,t){return n+t.toUpperCase()}).replace(/^-/,"")}function h(e,n,t,i){function s(){u&&(delete L.style,delete L.modElem)}if(i=!o(i,"undefined")&&i,!o(t,"undefined")){var a=p(e,t);if(!o(a,"undefined"))return a}for(var u,f,d,h,m,y=["modernizr","tspan","samp"];!L.style&&y.length;)u=!0,L.modElem=l(y.shift()),L.style=L.modElem.style;for(d=e.length,f=0;f
45 | ```
46 |
47 | ## DNS prefetching
48 |
49 | In short, DNS Prefetching is a method of informing the browser of domain names
50 | referenced on a site so that the client can resolve the DNS for those hosts,
51 | cache them, and when it comes time to use them, have a faster turn around on the
52 | request.
53 |
54 | ### Implicit prefetches
55 |
56 | There is a lot of prefetching done for you automatically by the browser. When
57 | the browser encounters an anchor in your HTML that does not share the same
58 | domain name as the current location the browser requests, from the client OS,
59 | the IP address for this new domain. The client first checks its cache and then,
60 | lacking a cached copy, makes a request from a DNS server. These requests happen
61 | in the background and are not meant to block the rendering of the page.
62 |
63 | The goal of this is that when the foreign IP address is finally needed it will
64 | already be in the client cache and will not block the loading of the foreign
65 | content. Fewer requests result in faster page load times. The perception of this
66 | is increased on a mobile platform where DNS latency can be greater.
67 |
68 | ### Explicit prefetches
69 |
70 | Typically the browser only scans the HTML for foreign domains. If you have
71 | resources that are outside of your HTML (a JavaScript request to a remote server
72 | or a CDN that hosts content that may not be present on every page of your site,
73 | for example) then you can queue up a domain name to be prefetched.
74 |
75 | ```html
76 |
77 |
78 | ```
79 |
80 | You can use as many of these as you need, but it's best if they are all
81 | immediately after the [Meta
82 | Charset](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta#attr-charset)
83 | element (which should go right at the top of the `head`), so the browser can act
84 | on them ASAP.
85 |
86 |
87 | ### Further reading about DNS prefetching
88 |
89 | * https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-DNS-Prefetch-Control
90 | * https://dev.chromium.org/developers/design-documents/dns-prefetching
91 |
92 |
93 | ## Search
94 |
95 | ### Direct search spiders to your sitemap
96 |
97 | After creating a [sitemap](https://www.sitemaps.org/protocol.html)
98 |
99 | Submit it to search engine tool:
100 | * [Google](https://www.google.com/webmasters/tools/sitemap-list)
101 | * [Bing](https://www.bing.com/toolbox/webmaster)
102 | * [Yandex](https://webmaster.yandex.com/)
103 | * [Baidu](https://zhanzhang.baidu.com/) OR Insert the following line anywhere in
104 | your robots.txt file, specifying the path to your sitemap:
105 | ```
106 | Sitemap: https://example.com/sitemap_location.xml
107 | ```
108 |
109 | ### Hide pages from search engines
110 |
111 | According to Heather Champ, former community manager at Flickr, you should not
112 | allow search engines to index your "Contact Us" or "Complaints" page if you
113 | value your sanity. This is an HTML-centric way of achieving that.
114 |
115 | ```html
116 |
117 | ```
118 |
119 | **_WARNING:_** DO NOT INCLUDE ON PAGES THAT SHOULD APPEAR IN SEARCH ENGINES.
120 |
121 | ### Search Plugins
122 |
123 | Sites with in-site search functionality should be strongly considered for a
124 | browser search plugin. A "search plugin" is an XML file which defines how your
125 | plugin behaves in the browser. [How to make a browser search
126 | plugin](https://developer.mozilla.org/en-US/docs/Web/OpenSearch).
127 |
128 | ```html
129 |
130 | ```
131 |
132 |
133 | ## Miscellaneous
134 |
135 | * Use
136 | [polyfills](https://github.com/Modernizr/Modernizr/wiki/HTML5-Cross-browser-Polyfills).
137 |
138 | * Use [Microformats](http://microformats.org/wiki/Main_Page) (via
139 | [microdata](http://microformats.org/wiki/microdata)) for optimum search
140 | results
141 | [visibility](https://webmasters.googleblog.com/2009/05/introducing-rich-snippets.html).
142 |
143 | * If you want to disable the translation prompt in Chrome or block Google
144 | Translate from translating your web page, use [``](https://support.google.com/webmasters/answer/79812).
146 | To disable translation for a particular section of the web page, add
147 | [`class="notranslate"`](https://support.google.com/translate/?hl=en#2641276).
148 |
149 | * If you want to disable the automatic detection and formatting of possible
150 | phone numbers in Safari on iOS, use [``](https://developer.apple.com/library/archive/documentation/AppleApplications/Reference/SafariHTMLRef/Articles/MetaTags.html).
152 |
153 | * Avoid development/stage websites "leaking" into SERPs (search engine results
154 | page) by [implementing X-Robots-tag
155 | headers](https://github.com/h5bp/html5-boilerplate/issues/804).
156 |
157 |
158 | ## News Feeds
159 |
160 | ### RSS
161 |
162 | Have an RSS feed? Link to it here. Want to [learn how to write an RSS feed from
163 | scratch](https://www.rssboard.org/rss-specification)?
164 |
165 | ```html
166 |
167 | ```
168 |
169 | ### Atom
170 |
171 | Atom is similar to RSS, and you might prefer to use it instead of or in addition
172 | to it. [See what Atom's all
173 | about](https://en.wikipedia.org/wiki/Atom_(Web_standard)).
174 |
175 | ```html
176 |
177 | ```
178 |
179 | ### Pingbacks
180 |
181 | Your server may be notified when another site links to yours. The href attribute
182 | should contain the location of your pingback service.
183 |
184 | ```html
185 |
186 | ```
187 |
188 | * High-level explanation:
189 | https://codex.wordpress.org/Introduction_to_Blogging#Pingbacks
190 | * Step-by-step example case:
191 | https://www.hixie.ch/specs/pingback/pingback-1.0#TOC5
192 | * PHP pingback service:
193 | https://web.archive.org/web/20131211032834/http://blog.perplexedlabs.com/2009/07/15/xmlrpc-pingbacks-using-php/
194 |
195 |
196 |
197 | ## Social Networks
198 |
199 | ### Facebook Open Graph data
200 |
201 | You can control the information that Facebook and others display when users
202 | share your site. Below are just the most basic data points you might need. For
203 | specific content types (including "website"), see [Facebook's built-in Open
204 | Graph content
205 | templates](https://developers.facebook.com/docs/sharing/opengraph/using-objects).
206 | Take full advantage of Facebook's support for complex data and activity by
207 | following the [Open Graph
208 | tutorial](https://developers.facebook.com/docs/sharing/webmasters/getting-started).
209 |
210 | For a reference of Open Graph's markup and properties, you may check [Facebook's
211 | Open Graph Protocol reference](https://ogp.me). Finally, you can validate your
212 | markup with the [Facebook Object
213 | Debugger](https://developers.facebook.com/tools/debug/) (needs registration to
214 | Facebook).
215 |
216 | ```html
217 |
218 |
219 |
220 |
221 |
222 |
223 |
224 |
225 | ```
226 |
227 | ### Twitter Cards
228 |
229 | Twitter provides a snippet specification that serves a similar purpose to Open
230 | Graph. In fact, Twitter will use Open Graph when Cards is not available. You can
231 | read more about the various snippet formats in the
232 | [official Twitter Cards
233 | documentation](https://developer.twitter.com/en/docs/tweets/optimize-with-cards/overview/abouts-cards),
234 | and you can validate your markup with the [Card
235 | validator](https://cards-dev.twitter.com/validator) (needs registration to
236 | Twitter).
237 |
238 | ```html
239 |
240 |
241 |
242 |
243 |
244 |
245 |
246 | ```
247 |
248 | ### Schema.org
249 |
250 | Google also provides a snippet specification that serves a similar purpose to
251 | Facebook's Open Graph or Twitter Cards. This metadata is a subset of
252 | [schema.org's microdata vocabulary](https://schema.org/), which covers many
253 | other schemas that can describe the content of your pages to search engines. For
254 | this reason, this metadata is more generic for SEO, notably for Google's
255 | search-engine, although this vocabulary is also used by Microsoft, Pinterest and
256 | Yandex.
257 |
258 | You can validate your markup with the [Structured Data Testing
259 | Tool](https://search.google.com/structured-data/testing-tool). Also, please
260 | note that this markup requires to add attributes to your top `html` tag.
261 |
262 | ```html
263 |
264 |
265 |
266 |
267 |
268 |
269 |
270 |
271 | ```
272 |
273 | ## URLs
274 |
275 | ### Canonical URL
276 |
277 | Signal to search engines and others "Use this URL for this page!" Useful when
278 | parameters after a `#` or `?` is used to control the display state of a page.
279 | `https://www.example.com/cart.html?shopping-cart-open=true` can be indexed as
280 | the cleaner, more accurate `https://www.example.com/cart.html`.
281 |
282 | ```html
283 |
284 | ```
285 |
286 | ## Web Apps
287 |
288 | There are a couple of meta tags that provide information about a web app when
289 | added to the Home Screen on iOS:
290 |
291 | * Adding `apple-mobile-web-app-capable` will make your web app chrome-less and
292 | provide the default iOS app view. You can control the color scheme of the
293 | default view by adding `apple-mobile-web-app-status-bar-style`.
294 |
295 | ```html
296 |
297 |
298 | ```
299 |
300 | * You can use `apple-mobile-web-app-title` to add a specific sites name for the
301 | Home Screen icon.
302 |
303 | ```html
304 |
305 | ```
306 |
307 | For further information please read the [official
308 | documentation](https://developer.apple.com/library/archive/documentation/AppleApplications/Reference/SafariHTMLRef/Articles/MetaTags.html)
309 | on Apple's site.
310 |
311 |
312 | ### Apple Touch Icons
313 |
314 | Apple touch icons are used as icons when a user adds your webapp to the home
315 | screen of an iOS devices.
316 |
317 | Though the dimensions of the icon can vary between iOS devices and versions one
318 | `180×180px` touch icon named `icon.png` and including the following in the
319 | `` of the page is enough:
320 |
321 | ```html
322 |
323 | ```
324 |
325 | For a more comprehensive overview, please refer to Mathias' [article on Touch
326 | Icons](https://mathiasbynens.be/notes/touch-icons).
327 |
328 |
329 | ### Apple Touch Startup Image
330 |
331 | Apart from that it is possible to add start-up screens for web apps on iOS. This
332 | basically works by defining `apple-touch-startup-image` with an according link
333 | to the image. Since iOS devices have different screen resolutions it maybe
334 | necessary to add media queries to detect which image to load. Here is an example
335 | for an iPhone:
336 |
337 | ```html
338 |
339 | ```
340 |
341 |
342 | ### Theme Color
343 |
344 | You can add the [`theme-color` meta
345 | extension](https://html.spec.whatwg.org/multipage/semantics.html#meta-theme-color)
346 | in the `` of your pages to suggest the color that browsers and OSes should
347 | use if they customize the display of individual pages in their UIs with varying
348 | colors.
349 |
350 | ```html
351 |
352 | ```
353 |
354 | The `content` attribute extension can take any valid CSS color.
355 |
356 | Currently, the `theme-color` meta extension is supported by [Chrome 39+ for
357 | Android
358 | Lollipop](https://developers.google.com/web/updates/2014/11/Support-for-theme-color-in-Chrome-39-for-Android).
359 |
360 | ### security.txt
361 |
362 | When security risks in web services are discovered by users they often lack the
363 | channels to disclose them properly. As a result, security issues may be left
364 | unreported.
365 |
366 | Security.txt defines a standard to help organizations define the process for
367 | users to disclose security vulnerabilities securely. Include a text file on your
368 | server at `.well-known/security.txt` with the relevant contact details.
369 |
370 | Check [https://securitytxt.org/](https://securitytxt.org/) for more details.
371 |
--------------------------------------------------------------------------------
/docs/faq.md:
--------------------------------------------------------------------------------
1 | [HTML5 Boilerplate homepage](https://html5boilerplate.com/) | [Documentation
2 | table of contents](TOC.md)
3 |
4 | # Frequently asked questions
5 |
6 | * [Do I need to upgrade my site each time a new version of HTML5 Boilerplate is
7 | released?](#do-i-need-to-upgrade-my-site-each-time-a-new-version-of-html5-boilerplate-is-released)
8 | * [Where can I get help with support
9 | questions?](#where-can-i-get-help-with-support-questions)
10 |
11 | ## Do I need to upgrade my site each time a new version of HTML5 Boilerplate is released?
12 |
13 | No, just as you don't normally replace the foundation of a house once it was
14 | built. However, there is nothing stopping you from trying to work in the latest
15 | changes, but you'll have to assess the costs/benefits of doing so.
16 |
17 | ## Where can I get help with support questions?
18 |
19 | Please ask for help on
20 | [Stack Overflow](https://stackoverflow.com/questions/tagged/html5boilerplate).
21 |
--------------------------------------------------------------------------------
/docs/html.md:
--------------------------------------------------------------------------------
1 | [HTML5 Boilerplate homepage](https://html5boilerplate.com/) | [Documentation
2 | table of contents](TOC.md)
3 |
4 | # The HTML
5 |
6 | By default, HTML5 Boilerplate provides two `html` pages:
7 |
8 | * [`index.html`](#indexhtml) - a default HTML skeleton that should form the
9 | basis of all pages on your website
10 | * `404.html` - a placeholder 404 error page
11 |
12 | ## `index.html`
13 |
14 | ### The `no-js` Class
15 |
16 | The `no-js` class is provided in order to allow you to more easily and
17 | explicitly add custom styles based on whether JavaScript is disabled (`.no-js`)
18 | or enabled (`.js`). Using this technique also helps [avoid the
19 | FOUC](https://www.paulirish.com/2009/avoiding-the-fouc-v3/).
20 |
21 | ### Language Attribute
22 |
23 | Please consider specifying the language of your content by adding a
24 | [value](https://www.iana.org/assignments/language-subtag-registry/language-subtag-registry)
25 | to the `lang` attribute in the `` as in this example:
26 |
27 | ```html
28 |
29 | ```
30 |
31 | ### The order of the `` and `` tags
32 |
33 | The charset declaration (``) must be included completely
34 | within the
35 | [first 1024 bytes of the document](https://html.spec.whatwg.org/multipage/semantics.html#charset)
36 | and should be specified as early as possible.
37 |
38 | ### Meta Description
39 |
40 | The `description` meta tag provides a short description of the page. In some
41 | situations this description is used as a part of the snippet shown in the search
42 | results.
43 |
44 | ```html
45 |
46 | ```
47 |
48 | Google's
49 | [Create good meta descriptions](https://support.google.com/webmasters/answer/35624?hl=en#meta-descriptions)
50 | documentation has useful tips on creating an effective description.
51 |
52 | ### Mobile Viewport
53 |
54 | There are a few different options that you can use with the
55 | [`viewport` meta tag](https://docs.google.com/present/view?id=dkx3qtm_22dxsrgcf4
56 | "Viewport and Media Queries - The Complete Idiot's Guide").
57 | You can find out more in [
58 | the MDN Web Docs](https://developer.mozilla.org/en-US/docs/Web/HTML/Viewport_meta_tag).
59 | HTML5 Boilerplate comes with a simple setup that strikes a good balance for general use cases.
60 |
61 | ```html
62 |
63 | ```
64 |
65 | If you want to take advantage of edge-to-edge displays of iPhone X/XS/XR you
66 | can do so with additional viewport parameters.
67 | [Check the WebKit blog](https://webkit.org/blog/7929/designing-websites-for-iphone-x/) for
68 | details.
69 |
70 | ### Open Graph Metadata
71 |
72 | The [Open Graph Protocol](https://ogp.me/) allows you to define the way your
73 | site is presented when referenced on third party sites and applications
74 | (Facebook, Twitter, LinkedIn). The protocol provides a series of meta elements
75 | that define the details of your site. The required attributes define the title,
76 | preview image, URL, and [type](https://ogp.me/#types) (e.g., video, music,
77 | website, article).
78 |
79 | ```html
80 |
81 |
82 |
83 |
84 | ```
85 |
86 | In addition to these four attributes there are many more attributes you can use
87 | to add more richness to the description of your site. This just represents the
88 | most basic implementation.
89 |
90 | To see a working example, the following is the open graph metadata for the HTML5
91 | Boilerplate site. In addition to the required fields we add `og:description` to
92 | describe the site in more detail.
93 |
94 | ```html
95 |
96 |
97 |
98 |
99 |
100 | ```
101 |
102 | ### Web App Manifest
103 |
104 | HTML5 Boilerplate includes a simple web app manifest file.
105 |
106 | The web app manifest is a simple JSON file that allows you to control how your
107 | app appears on a device's home screen, what it looks like when it launches in
108 | that context and what happens when it is launched. This allows for much greater
109 | control over the UI of a saved site or web app on a mobile device.
110 |
111 | It's linked to from the HTML as follows:
112 |
113 | ```html
114 |
115 | ```
116 |
117 | Our
118 | [site.webmanifest](https://github.com/h5bp/html5-boilerplate/blob/main/src/site.webmanifest)
119 | contains a very skeletal "app" definition, just to show the basic usage. You
120 | should fill this file out with
121 | [more information about your site or application](https://developer.mozilla.org/en-US/docs/Web/Manifest)
122 |
123 | ### Favicons and Touch Icon
124 |
125 | The shortcut icons should be put in the root directory of your site.
126 | `favicon.ico` is automatically picked up by browsers if it's placed in the root.
127 | HTML5 Boilerplate comes with a default set of icons (include favicon and one
128 | Apple Touch Icon) that you can use as a baseline to create your own.
129 |
130 | Please refer to the more detailed description in the [Extend section](extend.md)
131 | of these docs.
132 |
133 | ### The Content Area
134 |
135 | The central part of the boilerplate template is pretty much empty. This is
136 | intentional, in order to make the boilerplate suitable for both web page and web
137 | app development.
138 |
139 | ### Modernizr
140 |
141 | HTML5 Boilerplate uses a custom build of Modernizr.
142 |
143 | [Modernizr](https://modernizr.com/) is a JavaScript library which adds classes
144 | to the `html` element based on the results of feature test and which ensures
145 | that all browsers can make use of HTML5 elements (as it includes the HTML5
146 | Shiv). This allows you to target parts of your CSS and JavaScript based on the
147 | features supported by a browser.
148 |
149 | Starting with version 3 Modernizr can be customized using the
150 | [modernizr-config.json](https://github.com/h5bp/html5-boilerplate/blob/main/modernizr-config.json)
151 | and the
152 | [Modernizr command line utility](https://www.npmjs.com/package/modernizr-cli).
153 |
154 | ### What About Polyfills?
155 |
156 | If you need to include
157 | [polyfills](https://remysharp.com/2010/10/08/what-is-a-polyfill) in your
158 | project, you must make sure those load before any other JavaScript. If you're
159 | using a polyfill CDN service, like [polyfill.io](https://polyfill.io/v3/), just put
160 | it before the other scripts in the bottom of the page:
161 |
162 | ```html
163 |
164 |
165 |
166 |
167 | ```
168 |
169 | When you have a bunch of polyfills to load in, you could also
170 | create a `polyfills.js` file in the `js/vendor` directory or include the files
171 | individually and combine them using a build tool. Always ensure that the
172 | polyfills are all loaded before any other JavaScript.
173 |
174 | There are some misconceptions about Modernizr and polyfills. It's important to
175 | understand that Modernizr just handles feature checking, not polyfilling itself.
176 | The only thing Modernizr does regarding polyfills is that the team maintains
177 | [a huge list of cross Browser polyfills](https://github.com/Modernizr/Modernizr/wiki/HTML5-Cross-Browser-Polyfills).
178 |
179 | ### jQuery
180 |
181 | As of v8.0.0 we no longer include jQuery by default. Web development has
182 | changed a lot since we started this project and while many millions of sites
183 | still use jQuery there are many sites and applications that don't. 10 years ago
184 | jQuery _was_ JavaScript for most developers. That's not the case any more so
185 | we've made the decision to remove jQuery from the project.
186 |
187 | If you're interested in including it, you can easily install jQuery using the
188 | following command:
189 |
190 | ```
191 | npm install jquery
192 | ```
193 |
194 | You can then copy the minified file into the `vendor` folder and add jQuery
195 | to the `index.html` manually.
196 |
197 | To load jQuery from a CDN with a local fallback you can use the following:
198 |
199 | ```html
200 |
201 |
202 | ```
203 |
204 |
--------------------------------------------------------------------------------
/docs/js.md:
--------------------------------------------------------------------------------
1 | [HTML5 Boilerplate homepage](https://html5boilerplate.com/) | [Documentation
2 | table of contents](TOC.md)
3 |
4 | # The JavaScript
5 |
6 | Information about the default JavaScript included in the project.
7 |
8 | ## app.js
9 |
10 | This file can be used to contain or reference your site/app JavaScript code. If
11 | you're working on something more advanced you might replace this file entirely.
12 | That's cool.
13 |
14 | ## vendor
15 |
16 | This directory can be used to contain all third-party library code.
17 |
18 | Our custom build of the Modernizr library is included by
19 | default. You may wish to create your own [custom Modernizr build with the online
20 | builder](https://modernizr.com/download/) or [command line
21 | tool](https://modernizr.com/docs#command-line-config).
22 |
--------------------------------------------------------------------------------
/docs/misc.md:
--------------------------------------------------------------------------------
1 | [HTML5 Boilerplate homepage](https://html5boilerplate.com/) | [Documentation
2 | table of contents](TOC.md)
3 |
4 | # Miscellaneous
5 |
6 | * [.gitignore](#gitignore)
7 | * [.editorconfig](#editorconfig)
8 | * [Server Configuration](#server-configuration)
9 | * [robots.txt](#robotstxt)
10 | * [package.json](#packagejson)
11 |
12 | --
13 |
14 | ## .gitignore
15 |
16 | HTML5 Boilerplate includes a basic project-level `.gitignore`. This should
17 | primarily be used to avoid certain project-level files and directories from
18 | being kept under source control. Different development-environments will
19 | benefit from different collections of ignores.
20 |
21 | OS-specific and editor-specific files should be ignored using a "global
22 | ignore" that applies to all repositories on your system.
23 |
24 | For example, add the following to your `~/.gitconfig`, where the `.gitignore`
25 | in your HOME directory contains the files and directories you'd like to
26 | globally ignore:
27 |
28 | ```gitignore
29 | [core]
30 | excludesfile = ~/.gitignore
31 | ```
32 |
33 | * More on global ignores: [https://help.github.com/articles/ignoring-files/](https://help.github.com/en/github/using-git/ignoring-files)
34 | * Comprehensive set of ignores on GitHub: https://github.com/github/gitignore
35 |
36 | ## .editorconfig
37 |
38 | The `.editorconfig` file is provided in order to encourage and help you and
39 | your team define and maintain consistent coding styles between different
40 | editors and IDEs.
41 |
42 | By default, `.editorconfig` includes some basic
43 | [properties](https://editorconfig.org/#supported-properties) that reflect the
44 | coding styles from the files provided by default, but you can easily change
45 | them to better suit your needs.
46 |
47 | In order for your editor/IDE to apply the
48 | [properties](https://editorconfig.org/#supported-properties) from the
49 | `.editorconfig` file, you may need to [install a
50 | plugin]( https://editorconfig.org/#download).
51 |
52 | __N.B.__ If you aren't using the server configurations provided by HTML5
53 | Boilerplate, we highly encourage you to configure your server to block
54 | access to `.editorconfig` files, as they can disclose sensitive information!
55 |
56 | For more details, please refer to the [EditorConfig
57 | project](https://editorconfig.org/).
58 |
59 | ## robots.txt
60 |
61 | The `robots.txt` file is used to give instructions to web robots on what can
62 | be crawled from the website.
63 |
64 | By default, the file provided by this project includes the next two lines:
65 |
66 | * `User-agent: *` - the following rules apply to all web robots
67 | * `Disallow:` - everything on the website is allowed to be crawled
68 |
69 | If you want to disallow certain pages you will need to specify the path in a
70 | `Disallow` directive (e.g.: `Disallow: /path`) or, if you want to disallow
71 | crawling of all content, use `Disallow: /`.
72 |
73 | The `/robots.txt` file is not intended for access control, so don't try to
74 | use it as such. Think of it as a "No Entry" sign, rather than a locked door.
75 | URLs disallowed by the `robots.txt` file might still be indexed without being
76 | crawled, and the content from within the `robots.txt` file can be viewed by
77 | anyone, potentially disclosing the location of your private content! So, if
78 | you want to block access to private content, use proper authentication instead.
79 |
80 | For more information about `robots.txt`, please see:
81 |
82 | * [robotstxt.org](https://www.robotstxt.org/)
83 | * [How Google handles the `robots.txt` file](https://developers.google.com/search/reference/robots_txt)
84 |
85 | ## package.json
86 |
87 | `package.json` is used to define attributes of your site or application for
88 | use in modern JavaScript development. [The full documentation is available](https://docs.npmjs.com/files/package.json)
89 | if you're interested. The fields we provide are as follows:
90 |
91 | * `title` - the title of your project. If you expect to publish your application
92 | to npm, then the name needs to follow [certain guidelines](https://docs.npmjs.com/files/package.json#name)
93 | and be unique.
94 | * `version` - indicates the version of your site application using semantic
95 | versioning ([SemVer](https://semver.org/))
96 | * `description` - describes your site.
97 | * `scripts` - is a JavaScript object containing commands that can be run in a
98 | node environment. There are many [built-in keys](https://docs.npmjs.com/misc/scripts)
99 | related to the package lifecycle that node understands automatically. You can
100 | also define custom scripts for use with your application development. We
101 | provide three custom scripts that work with webpack to get you up and running
102 | quickly with a bundler for your assets and a simple development server.
103 |
104 | * `start` serves your `index.html` with a simple development server
105 |
106 | * `keywords` - an array of keywords used to discover your app in the npm
107 | registry
108 | * `author` - defines the author of a package. There is also an alternative
109 | [contributors](https://docs.npmjs.com/files/package.json#people-fields-author-contributors)
110 | field if there's more than one author.
111 | * `license` - the license for your application. Must conform to
112 | [specific rules](https://docs.npmjs.com/files/package.json#license)
113 | * `devDependencies` - development dependencies for your package. In our case
114 | we have several dependencies used by webpack, which we use as a simple development server.
115 |
--------------------------------------------------------------------------------
/docs/usage.md:
--------------------------------------------------------------------------------
1 | [HTML5 Boilerplate homepage](https://html5boilerplate.com/) | [Documentation
2 | table of contents](TOC.md)
3 |
4 | # Usage
5 |
6 | The most basic usage of HTML5 Boilerplate is to create a static site or simple
7 | app. Once you've downloaded or cloned the project, that process looks something
8 | like this:
9 |
10 | 1. Set up the basic structure of the site.
11 | 2. Add some content, style, and functionality.
12 | 3. Run your site locally to see how it looks.
13 | 4. Deploy your site.
14 |
15 | Cool, right? _It is_. That said, the smart defaults, baseline elements, default
16 | attribute values and various other utilities that HTML5 Boilerplate offers can
17 | serve as the foundation for whatever you're interested in building.
18 |
19 | Even the basic use-case of a simple static site can be enhanced by manipulating
20 | the code through an automated build process. Moving up in complexity HTML5
21 | Boilerplate can be integrated with whatever front-end framework, CMS or
22 | e-commerce platform you're working with. Mix-and-match to your heart's content.
23 | Use what you need (toss it in a blender if you need to) and discard the rest.
24 | HTML5 Boilerplate is a starting point, not a destination.
25 |
26 | ## Basic structure
27 |
28 | A basic HTML5 Boilerplate site initially looks something like this:
29 |
30 | ```
31 | .
32 | ├── css
33 | │ ├── normalize.css
34 | │ └── style.css
35 | ├── doc
36 | ├── img
37 | ├── js
38 | │ ├── app.js
39 | │ └── vendor
40 | │ └── modernizr.min.js
41 | ├── .editorconfig
42 | ├── 404.html
43 | ├── favicon.ico
44 | ├── icon.png
45 | ├── icon.svg
46 | ├── index.html
47 | ├── package.json
48 | ├── robots.txt
49 | ├── site.webmanifest
50 | ├── tile.png
51 | ├── tile-wide.png
52 | └── webpack.common.js
53 | └── webpack.config.dev.js
54 | └── webpack.config.prod.js
55 | ```
56 |
57 | What follows is a general overview of each major part and how to use them.
58 |
59 | ### css
60 |
61 | This directory should contain all your project's CSS files. It includes some
62 | initial CSS to help get you started from a solid foundation. [About the
63 | CSS](css.md).
64 |
65 | ### doc
66 |
67 | This directory contains all the HTML5 Boilerplate documentation. You can use it
68 | as the location and basis for your own project's documentation.
69 |
70 | ### js
71 |
72 | This directory should contain all your project's JS files. Libraries, plugins,
73 | and custom code can all be included here. It includes some initial JS to help
74 | get you started. [About the JavaScript](js.md).
75 |
76 | ### 404.html
77 |
78 | A helpful custom 404 to get you started.
79 |
80 | ### .editorconfig
81 |
82 | The `.editorconfig` file is provided in order to encourage and help you and your
83 | team to maintain consistent coding styles between different editors and IDEs.
84 | [Read more about the `.editorconfig` file](misc.md#editorconfig).
85 |
86 | ### index.html
87 |
88 | This is the default HTML skeleton that should form the basis of all pages on
89 | your site. If you are using a server-side templating framework, then you will
90 | need to integrate this starting HTML with your setup.
91 |
92 | Make sure that you update the URLs for the referenced CSS and JavaScript if you
93 | modify the directory structure at all.
94 |
95 | ### package.json
96 |
97 | Edit this file to describe your application, add dependencies, scripts and
98 | other properties related to node based development and the npm registry
99 |
100 | ### robots.txt
101 |
102 | Edit this file to include any pages you need hidden from search engines.
103 |
104 | ### Icons
105 |
106 | Replace the default `favicon.ico`, `tile.png`, `tile-wide.png` and Apple Touch
107 | Icon with your own.
108 |
109 | If you want to use different Apple Touch Icons for different resolutions please
110 | refer to the [according documentation](extend.md#apple-touch-icons).
111 |
112 | ### Webpack
113 |
114 | The project contains a simple [webpack](https://webpack.js.org/) configuration.
115 |
116 | To get started developing a site with a development server, run the following
117 | commands from within the `/dist/` folder in the project's repo or within the
118 | root folder of the dowloaded project files, the folder created by `npm install`
119 | or the project folder created by running [create\-html5\-boilerplate](https://github.com/h5bp/create-html5-boilerplate)
120 |
121 | ```
122 | npm install
123 | npm run start
124 | ```
125 |
126 | This will start a Webpack development server with hot reloading of edited files.
127 |
128 | To package a site for production run
129 |
130 | ```
131 | npm run build
132 | ```
133 |
134 | This command will bundle up the site's JavaScript and copy over static assets to
135 | the newly created `dist` folder.
136 |
137 |
138 | There are three files:
139 |
140 | #### webpack.common.js
141 |
142 | Both the production and development scripts inherit from this common script.
143 |
144 | #### webpack.config.dev.js
145 |
146 | This development configuration defines the behavior of development server.
147 |
148 | #### webpack.config.prod.js
149 |
150 | This production configuration defines the behavior of the production build.
151 |
152 | It copies the following files and folders to the dist folder:
153 |
154 | * css
155 | * img
156 | * js/vendor
157 | * 404.html
158 | * favicon.ico
159 | * icon.png
160 | * icon.svg
161 | * index.html
162 | * robots.txt
163 | * site.webmanifest
164 | * tile.png
165 | * tile-wide.png
166 |
167 | `js/vendor` is copied over in order to allow you to use unprocessed JS files
168 | (like Modernizr) in addition to the files bundled based on the project's entry
169 | point `app.js.`
170 |
--------------------------------------------------------------------------------
/gulpfile.mjs:
--------------------------------------------------------------------------------
1 | import fs from 'fs';
2 | import path from 'path';
3 | import gulp from 'gulp';
4 | import gulpAutoPrefixer from 'gulp-autoprefixer';
5 | import gulpEslint from 'gulp-eslint';
6 | import gulpHeader from 'gulp-header';
7 | import gulpRename from 'gulp-rename';
8 | import gulpReplace from 'gulp-replace';
9 | import archiver from 'archiver';
10 | import { globSync } from 'glob'
11 | import { deleteSync } from 'del';
12 | import modernizr from 'modernizr';
13 | import { createRequire } from 'module';
14 | const require = createRequire(import.meta.url);
15 | const pkg = require('./package.json');
16 | const modernizrConfig = require('./modernizr-config.json');
17 |
18 | const dirs = pkg['h5bp-configs'].directories;
19 |
20 | // ---------------------------------------------------------------------
21 | // | Helper tasks |
22 | // ---------------------------------------------------------------------
23 |
24 | gulp.task('archive:create_archive_dir', (done) => {
25 | fs.mkdirSync(path.resolve(dirs.archive), '0755');
26 | done();
27 | });
28 |
29 | gulp.task('archive:zip', (done) => {
30 | const archiveName = path.resolve(dirs.archive, `${pkg.name}_v${pkg.version}.zip`);
31 | const zip = archiver('zip');
32 | const files = globSync('**/*.*', {
33 | 'cwd': dirs.dist,
34 | 'ignore': [
35 | '**/node_modules/**',
36 | 'package-lock.json',
37 | '**/dist/**',
38 | '**/.cache/**',
39 | ],
40 | 'dot': true // include hidden files
41 | });
42 | const output = fs.createWriteStream(archiveName);
43 |
44 | zip.on('error', (error) => {
45 | done();
46 | throw error;
47 | });
48 |
49 | output.on('close', done);
50 |
51 | files.forEach((file) => {
52 | const filePath = path.resolve(dirs.dist, file);
53 |
54 | // `zip.bulk` does not maintain the file
55 | // permissions, so we need to add files individually
56 | zip.append(fs.createReadStream(filePath), {
57 | 'name': file,
58 | 'mode': fs.statSync(filePath).mode
59 | });
60 | });
61 |
62 | zip.pipe(output);
63 | zip.finalize();
64 | done();
65 | });
66 |
67 | gulp.task('clean', (done) => {
68 | deleteSync([
69 | dirs.archive,
70 | dirs.dist
71 | ]);
72 | done();
73 | });
74 |
75 | gulp.task('copy:index.html', () => {
76 |
77 | let modernizrVersion = pkg.devDependencies.modernizr;
78 |
79 | return gulp.src(`${dirs.src}/index.html`)
80 | .pipe(gulpReplace(/{{MODERNIZR_VERSION}}/g, modernizrVersion))
81 | .pipe(gulp.dest(dirs.dist));
82 | });
83 |
84 | gulp.task('copy:license', () =>
85 | gulp.src('LICENSE.txt')
86 | .pipe(gulp.dest(dirs.dist))
87 | );
88 |
89 | gulp.task('copy:style', () => {
90 | const banner = `/*! HTML5 Boilerplate v${pkg.version} | ${pkg.license} License | ${pkg.homepage} */\n\n`;
91 |
92 | return gulp.src('node_modules/main.css/dist/main.css')
93 | .pipe(gulpHeader(banner))
94 | .pipe(gulpAutoPrefixer({
95 | cascade: false
96 | }))
97 | .pipe(gulpRename({
98 | basename: 'style'
99 | }))
100 | .pipe(gulp.dest(`${dirs.dist}/css`));
101 | });
102 |
103 | gulp.task('copy:misc', () =>
104 | gulp.src([
105 | // Copy all files
106 | `${dirs.src}/**/*`,
107 |
108 | // Exclude the following files
109 | // (other tasks will handle the copying of these files)
110 | `!${dirs.src}/css/main.css`,
111 | `!${dirs.src}/index.html`
112 | ], {
113 | // Include hidden files by default
114 | dot: true
115 | }).pipe(gulp.dest(dirs.dist))
116 | );
117 |
118 | gulp.task('copy:normalize', () =>
119 | gulp.src('node_modules/normalize.css/normalize.css')
120 | .pipe(gulp.dest(`${dirs.dist}/css`))
121 | );
122 |
123 | gulp.task('modernizr', (done) => {
124 | // TODO: rework this flow instead of just reacting to the fact that the jQuery step is gone
125 | if (!fs.existsSync(`${dirs.dist}/js/vendor/`)){
126 | fs.mkdirSync(`${dirs.dist}/js/vendor/`);
127 | }
128 |
129 | modernizr.build(modernizrConfig, (code) => {
130 | fs.writeFile(`${dirs.dist}/js/vendor/modernizr-${pkg.devDependencies.modernizr}.min.js`, code, done);
131 | });
132 | });
133 |
134 | gulp.task('lint:js', () =>
135 | gulp.src([
136 | `${dirs.src}/js/*.js`,
137 | `${dirs.src}/*.js`,
138 | `${dirs.test}/*.mjs`
139 | ]).pipe(gulpEslint())
140 | .pipe(gulpEslint.failOnError())
141 | );
142 |
143 | // ---------------------------------------------------------------------
144 | // | Main tasks |
145 | // ---------------------------------------------------------------------
146 | gulp.task(
147 | 'copy',
148 | gulp.series(
149 | 'copy:index.html',
150 | 'copy:license',
151 | 'copy:style',
152 | 'copy:misc',
153 | 'copy:normalize'
154 | )
155 | );
156 |
157 | gulp.task(
158 | 'build',
159 | gulp.series(
160 | gulp.parallel('clean', 'lint:js'),
161 | 'copy',
162 | 'modernizr'
163 | )
164 | );
165 |
166 | gulp.task(
167 | 'archive',
168 | gulp.series(
169 | 'build',
170 | 'archive:create_archive_dir',
171 | 'archive:zip'
172 | )
173 | );
174 |
175 | gulp.task('default', gulp.series('build'));
176 |
--------------------------------------------------------------------------------
/modernizr-config.json:
--------------------------------------------------------------------------------
1 | {
2 | "minify": true,
3 | "options": [
4 | "domPrefixes",
5 | "prefixes",
6 | "addTest",
7 | "hasEvent",
8 | "mq",
9 | "prefixedCSSValue",
10 | "testAllProps",
11 | "testProp",
12 | "testStyles",
13 | "setClasses"
14 | ],
15 | "feature-detects": [
16 | ]
17 | }
18 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "html5-boilerplate",
3 | "version": "8.0.0",
4 | "homepage": "https://html5boilerplate.com/",
5 | "license": "MIT",
6 | "description": "A professional front-end template for building fast, robust, and adaptable web apps or sites.",
7 | "keywords": [
8 | "h5bp",
9 | "template",
10 | "front-end"
11 | ],
12 | "repository": {
13 | "type": "git",
14 | "url": "https://github.com/h5bp/html5-boilerplate.git"
15 | },
16 | "bugs": {
17 | "url": "https://github.com/h5bp/html5-boilerplate/issues"
18 | },
19 | "scripts": {
20 | "build": "gulp build",
21 | "test": "gulp archive && mocha --reporter spec --timeout 5000"
22 | },
23 | "devDependencies": {
24 | "archiver": "^5.3.1",
25 | "del": "^7.0.0",
26 | "eslint": "^8.35.0",
27 | "eslint-config-recommended": "^4.1.0",
28 | "eslint-plugin-mocha": "^10.1.0",
29 | "glob": "^9.2.1",
30 | "gulp": "^4.0.2",
31 | "gulp-autoprefixer": "^8.0.0",
32 | "gulp-eslint": "^6.0.0",
33 | "gulp-header": "^2.0.9",
34 | "gulp-rename": "^2.0.0",
35 | "gulp-replace": "^1.1.4",
36 | "main.css": "3.0.0",
37 | "mocha": "^10.2.0",
38 | "modernizr": "3.12.0",
39 | "normalize.css": "8.0.1",
40 | "strip-json-comments": "^5.0.0"
41 | },
42 | "engines": {
43 | "node": ">=14"
44 | },
45 | "browserslist": [
46 | "> 0.5%",
47 | "last 2 versions",
48 | "Firefox ESR",
49 | "not dead",
50 | "not IE 11"
51 | ],
52 | "h5bp-configs": {
53 | "directories": {
54 | "archive": "archive",
55 | "dist": "dist",
56 | "src": "src",
57 | "test": "test"
58 | }
59 | },
60 | "files": [
61 | "CHANGELOG.md",
62 | "LICENSE.txt",
63 | "package.json",
64 | "dist/",
65 | "modernizr-config.json",
66 | "README.md"
67 | ]
68 | }
69 |
--------------------------------------------------------------------------------
/src/.editorconfig:
--------------------------------------------------------------------------------
1 | # editorconfig.org
2 |
3 | root = true
4 |
5 | [*]
6 | charset = utf-8
7 | indent_size = 2
8 | indent_style = space
9 | insert_final_newline = true
10 | trim_trailing_whitespace = true
11 |
--------------------------------------------------------------------------------
/src/.gitattributes:
--------------------------------------------------------------------------------
1 | ## GITATTRIBUTES FOR WEB PROJECTS
2 | #
3 | # These settings are for any web project.
4 | #
5 | # Details per file setting:
6 | # text These files should be normalized (i.e. convert CRLF to LF).
7 | # binary These files are binary and should be left untouched.
8 | #
9 | # Note that binary is a macro for -text -diff.
10 | ######################################################################
11 |
12 | ## AUTO-DETECT
13 | ## Handle line endings automatically for files detected as
14 | ## text and leave all files detected as binary untouched.
15 | ## This will handle all files NOT defined below.
16 | * text=auto
17 |
18 | ## SOURCE CODE
19 | *.bat text eol=crlf
20 | *.coffee text
21 | *.css text
22 | *.htm text
23 | *.html text
24 | *.inc text
25 | *.ini text
26 | *.js text
27 | *.json text
28 | *.jsx text
29 | *.less text
30 | *.od text
31 | *.onlydata text
32 | *.php text
33 | *.pl text
34 | *.py text
35 | *.rb text
36 | *.sass text
37 | *.scm text
38 | *.scss text
39 | *.sh text eol=lf
40 | *.sql text
41 | *.styl text
42 | *.tag text
43 | *.ts text
44 | *.tsx text
45 | *.xml text
46 | *.xhtml text
47 |
48 | ## DOCKER
49 | *.dockerignore text
50 | Dockerfile text
51 |
52 | ## DOCUMENTATION
53 | *.markdown text
54 | *.md text
55 | *.mdwn text
56 | *.mdown text
57 | *.mkd text
58 | *.mkdn text
59 | *.mdtxt text
60 | *.mdtext text
61 | *.txt text
62 | AUTHORS text
63 | CHANGELOG text
64 | CHANGES text
65 | CONTRIBUTING text
66 | COPYING text
67 | copyright text
68 | *COPYRIGHT* text
69 | INSTALL text
70 | license text
71 | LICENSE text
72 | NEWS text
73 | readme text
74 | *README* text
75 | TODO text
76 |
77 | ## TEMPLATES
78 | *.dot text
79 | *.ejs text
80 | *.haml text
81 | *.handlebars text
82 | *.hbs text
83 | *.hbt text
84 | *.jade text
85 | *.latte text
86 | *.mustache text
87 | *.njk text
88 | *.phtml text
89 | *.tmpl text
90 | *.tpl text
91 | *.twig text
92 |
93 | ## LINTERS
94 | .babelrc text
95 | .csslintrc text
96 | .eslintrc text
97 | .htmlhintrc text
98 | .jscsrc text
99 | .jshintrc text
100 | .jshintignore text
101 | .prettierrc text
102 | .stylelintrc text
103 |
104 | ## CONFIGS
105 | *.bowerrc text
106 | *.cnf text
107 | *.conf text
108 | *.config text
109 | .browserslistrc text
110 | .editorconfig text
111 | .gitattributes text
112 | .gitconfig text
113 | .gitignore text
114 | .htaccess text
115 | *.npmignore text
116 | *.yaml text
117 | *.yml text
118 | browserslist text
119 | Makefile text
120 | makefile text
121 |
122 | ## HEROKU
123 | Procfile text
124 | .slugignore text
125 |
126 | ## GRAPHICS
127 | *.ai binary
128 | *.bmp binary
129 | *.eps binary
130 | *.gif binary
131 | *.ico binary
132 | *.jng binary
133 | *.jp2 binary
134 | *.jpg binary
135 | *.jpeg binary
136 | *.jpx binary
137 | *.jxr binary
138 | *.pdf binary
139 | *.png binary
140 | *.psb binary
141 | *.psd binary
142 | *.svg text
143 | *.svgz binary
144 | *.tif binary
145 | *.tiff binary
146 | *.wbmp binary
147 | *.webp binary
148 |
149 | ## AUDIO
150 | *.kar binary
151 | *.m4a binary
152 | *.mid binary
153 | *.midi binary
154 | *.mp3 binary
155 | *.ogg binary
156 | *.ra binary
157 |
158 | ## VIDEO
159 | *.3gpp binary
160 | *.3gp binary
161 | *.as binary
162 | *.asf binary
163 | *.asx binary
164 | *.fla binary
165 | *.flv binary
166 | *.m4v binary
167 | *.mng binary
168 | *.mov binary
169 | *.mp4 binary
170 | *.mpeg binary
171 | *.mpg binary
172 | *.ogv binary
173 | *.swc binary
174 | *.swf binary
175 | *.webm binary
176 |
177 | ## ARCHIVES
178 | *.7z binary
179 | *.gz binary
180 | *.jar binary
181 | *.rar binary
182 | *.tar binary
183 | *.zip binary
184 |
185 | ## FONTS
186 | *.ttf binary
187 | *.eot binary
188 | *.otf binary
189 | *.woff binary
190 | *.woff2 binary
191 |
192 | ## EXECUTABLES
193 | *.exe binary
194 | *.pyc binary
195 |
--------------------------------------------------------------------------------
/src/.gitignore:
--------------------------------------------------------------------------------
1 | # Include your project-specific ignores in this file
2 | # Read about how to use .gitignore: https://help.github.com/articles/ignoring-files
3 | # Useful .gitignore templates: https://github.com/github/gitignore
4 | node_modules
5 | dist
6 | .cache
--------------------------------------------------------------------------------
/src/404.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | Page Not Found
7 |
8 |
54 |
55 |
56 |
57 |
Page Not Found
58 |
Sorry, but the page you were trying to view does not exist.