Repository: mdn/beginner-html-site-scripted Branch: main Commit: f223f1e21105 Files: 18 Total size: 21.3 KB Directory structure: gitextract_5qiuvvv5/ ├── .editorconfig ├── .github/ │ ├── CODEOWNERS │ ├── ISSUE_TEMPLATE/ │ │ ├── bug.yml │ │ └── config.yml │ ├── PULL_REQUEST_TEMPLATE │ ├── dependabot.yml │ └── labels.json ├── .prettierrc.json ├── CODEOWNERS ├── CODE_OF_CONDUCT.md ├── CONTRIBUTING.md ├── LICENSE ├── README.md ├── REVIEWING.md ├── SECURITY.md ├── index.html ├── scripts/ │ └── main.js └── styles/ └── style.css ================================================ FILE CONTENTS ================================================ ================================================ FILE: .editorconfig ================================================ # EditorConfig is awesome: https://EditorConfig.org # top-most EditorConfig file root = true [*] indent_style = space indent_size = 2 end_of_line = lf charset = utf-8 trim_trailing_whitespace = true insert_final_newline = true ================================================ FILE: .github/CODEOWNERS ================================================ # ---------------------------------------------------------------------------- # CODEOWNERS # ---------------------------------------------------------------------------- # Order is important. The last matching pattern takes precedence. # See: https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners # ---------------------------------------------------------------------------- /.github/workflows/ @mdn/engineering /.github/CODEOWNERS @mdn/engineering /SECURITY.md @mdn/engineering ================================================ FILE: .github/ISSUE_TEMPLATE/bug.yml ================================================ name: "Bug report" description: Report an unexpected problem or unintended behavior. labels: ["needs triage"] body: - type: markdown attributes: value: | ### Before you start **Want to fix the problem yourself?** This project is open source and we welcome fixes and improvements from the community! ↩ Check the project [CONTRIBUTING.md](../blob/main/CONTRIBUTING.md) guide to see how to get started. --- - type: textarea id: problem attributes: label: What information was incorrect, unhelpful, or incomplete? validations: required: true - type: textarea id: expected attributes: label: What did you expect to see? validations: required: true - type: textarea id: references attributes: label: Do you have any supporting links, references, or citations? description: Link to information that helps us confirm your issue. - type: textarea id: more-info attributes: label: Do you have anything more you want to share? description: For example, steps to reproduce a bug, screenshots, screen recordings, or sample code ================================================ FILE: .github/ISSUE_TEMPLATE/config.yml ================================================ blank_issues_enabled: true contact_links: - name: Content or feature request url: https://github.com/mdn/mdn/issues/new/choose about: Propose new content for MDN Web Docs or submit a feature request using this link. - name: MDN GitHub Discussions url: https://github.com/orgs/mdn/discussions about: Does the issue involve a lot of changes, or is it hard to split it into actionable tasks? Start a discussion before opening an issue. - name: MDN Web Docs on Discourse url: https://discourse.mozilla.org/c/mdn/learn/250 about: Need help with assessments on MDN Web Docs? We have a support community for this purpose on Discourse. - name: Help with code url: https://stackoverflow.com/ about: If you are stuck and need help with code, StackOverflow is a great resource. ================================================ FILE: .github/PULL_REQUEST_TEMPLATE ================================================ ### Description ### Motivation ### Additional details ### Related issues and pull requests ================================================ FILE: .github/dependabot.yml ================================================ version: 2 updates: - package-ecosystem: github-actions directory: / schedule: interval: weekly commit-message: prefix: "ci(deps): " ================================================ FILE: .github/labels.json ================================================ [ { "name": "good first issue", "color": "028c46", "description": "A good issue for newcomers to get started with." }, { "name": "help wanted", "color": "028c46", "description": "If you know something about this, we would love your help!" }, { "name": "needs info", "color": "028c46", "description": "This needs more information to review or act on." }, { "name": "needs triage", "color": "028c46", "description": "Triage needed by staff and/or partners. Automatically applied when an issue is opened." }, { "name": "expert help needed", "color": "028c46", "description": "This needs more information from a subject matter expert (SME)." }, { "name": "idle", "color": "028c46", "description": "Issues and pull requests with no activity for three months." }, { "name": "on hold", "color": "028c46", "description": "Waiting on something else before this can be moved forward." }, { "name": "for later", "color": "028c46", "description": "Not planned at this time." }, { "name": "needs content update", "color": "028c46", "description": "Needs update to the content to support this change." }, { "name": "chore", "color": "028c46", "description": "A routine task." }, { "name": "enhancement", "color": "028c46", "description": "Improves an existing feature." }, { "name": "bug", "color": "c05964", "description": "Indicates an unexpected problem or unintended behavior." }, { "name": "wontfix", "color": "c05964", "description": "Deemed to be outside the scope of the project or would require significant time and resources to fix." }, { "name": "effort: small", "color": "866dc1", "description": "Task is a small effort." }, { "name": "effort: medium", "color": "866dc1", "description": "Task is a medium effort." }, { "name": "effort: large", "color": "866dc1", "description": "Task is large effort." }, { "name": "p0", "color": "6e8bc1", "description": "Urgent. We will address this as soon as possible." }, { "name": "p1", "color": "6e8bc1", "description": "We will address this soon and will provide capacity from our team for it in the next few releases." }, { "name": "p2", "color": "6e8bc1", "description": "We want to address this but may have other higher priority items." }, { "name": "p3", "color": "6e8bc1", "description": "We don't have visibility when this will be addressed." } ] ================================================ FILE: .prettierrc.json ================================================ {} ================================================ FILE: CODEOWNERS ================================================ # These owners are the default owners for everything in this repo. * @mdn/content-team ================================================ FILE: CODE_OF_CONDUCT.md ================================================ # Community Participation Guidelines This repository is governed by Mozilla's code of conduct and etiquette guidelines. For more details, please read the [Mozilla Community Participation Guidelines](https://www.mozilla.org/about/governance/policies/participation/). ## How to Report For more information on how to report violations of the Community Participation Guidelines, please read our '[How to Report](https://www.mozilla.org/about/governance/policies/participation/reporting/)' page. ================================================ FILE: CONTRIBUTING.md ================================================ # Contribution guide ![github-profile](https://user-images.githubusercontent.com/10350960/166113119-629295f6-c282-42c9-9379-af2de5ad4338.png) - [Ways to contribute](#ways-to-contribute) - [Finding an issue](#finding-an-issue) - [Asking for help](#asking-for-help) - [Pull request process](#pull-request-process) - [Forking and cloning the project](#forking-and-cloning-the-project) Welcome 👋 Thank you for your interest in contributing to MDN Web Docs. We are happy to have you join us! 💖 As you get started, you are in the best position to give us feedback on project areas we might have forgotten about or assumed to work well. These include, but are not limited to: - Problems found while setting up a new developer environment - Gaps in our documentation - Bugs in our automation scripts If anything doesn't make sense or work as expected, please open an issue and let us know! ## Ways to contribute We welcome many different types of contributions including: - Identifying and filing issues. - Providing feedback on existing issues. - Engaging with the community and answering questions. - Contributing documentation or code. - Promoting the project in personal circles and social media. ## Finding an issue We have issues labeled `good first issue` for new contributors and `help wanted` suitable for any contributor. Good first issues have extra information to help you make your first contribution a success. Help wanted issues are ideal when you feel a bit more comfortable with the project details. Sometimes there won't be any issues with these labels, but there is likely still something for you to work on. If you want to contribute but don't know where to start or can't find a suitable issue, speak to us on [Matrix](https://matrix.to/#/#mdn:mozilla.org), and we will be happy to help. Once you find an issue you'd like to work on, please post a comment saying you want to work on it. Something like "I want to work on this" is fine. Also, mention the community team using the `@mdn/community` handle to ensure someone will get back to you. ## Asking for help The best way to reach us with a question when contributing is to use the following channels in the following order of precedence: - [Start a discussion](https://github.com/orgs/mdn/discussions) - Ask your question or highlight your discussion on [Matrix](https://matrix.to/#/#mdn:mozilla.org). - File an issue and tag the community team using the `@mdn/community` handle. ## Pull request process The MDN Web Docs project has a well-defined pull request process which is documented in the [Pull request guidelines](https://developer.mozilla.org/en-US/docs/MDN/Community/Pull_requests). Make sure you read and understand this process before you start working on a pull request. ## Forking and cloning the project The first step in setting up your development environment is to [fork the repository](https://docs.github.com/en/get-started/quickstart/fork-a-repo) and [clone](https://docs.github.com/en/get-started/quickstart/fork-a-repo#cloning-your-forked-repository) the repository to your local machine. ================================================ FILE: LICENSE ================================================ CC0 1.0 Universal Statement of Purpose The laws of most jurisdictions throughout the world automatically confer exclusive Copyright and Related Rights (defined below) upon the creator and subsequent owner(s) (each and all, an "owner") of an original work of authorship and/or a database (each, a "Work"). Certain owners wish to permanently relinquish those rights to a Work for the purpose of contributing to a commons of creative, cultural and scientific works ("Commons") that the public can reliably and without fear of later claims of infringement build upon, modify, incorporate in other works, reuse and redistribute as freely as possible in any form whatsoever and for any purposes, including without limitation commercial purposes. These owners may contribute to the Commons to promote the ideal of a free culture and the further production of creative, cultural and scientific works, or to gain reputation or greater distribution for their Work in part through the use and efforts of others. For these and/or other purposes and motivations, and without any expectation of additional consideration or compensation, the person associating CC0 with a Work (the "Affirmer"), to the extent that he or she is an owner of Copyright and Related Rights in the Work, voluntarily elects to apply CC0 to the Work and publicly distribute the Work under its terms, with knowledge of his or her Copyright and Related Rights in the Work and the meaning and intended legal effect of CC0 on those rights. 1. Copyright and Related Rights. A Work made available under CC0 may be protected by copyright and related or neighboring rights ("Copyright and Related Rights"). Copyright and Related Rights include, but are not limited to, the following: i. the right to reproduce, adapt, distribute, perform, display, communicate, and translate a Work; ii. moral rights retained by the original author(s) and/or performer(s); iii. publicity and privacy rights pertaining to a person's image or likeness depicted in a Work; iv. rights protecting against unfair competition in regards to a Work, subject to the limitations in paragraph 4(a), below; v. rights protecting the extraction, dissemination, use and reuse of data in a Work; vi. database rights (such as those arising under Directive 96/9/EC of the European Parliament and of the Council of 11 March 1996 on the legal protection of databases, and under any national implementation thereof, including any amended or successor version of such directive); and vii. other similar, equivalent or corresponding rights throughout the world based on applicable law or treaty, and any national implementations thereof. 2. Waiver. To the greatest extent permitted by, but not in contravention of, applicable law, Affirmer hereby overtly, fully, permanently, irrevocably and unconditionally waives, abandons, and surrenders all of Affirmer's Copyright and Related Rights and associated claims and causes of action, whether now known or unknown (including existing as well as future claims and causes of action), in the Work (i) in all territories worldwide, (ii) for the maximum duration provided by applicable law or treaty (including future time extensions), (iii) in any current or future medium and for any number of copies, and (iv) for any purpose whatsoever, including without limitation commercial, advertising or promotional purposes (the "Waiver"). Affirmer makes the Waiver for the benefit of each member of the public at large and to the detriment of Affirmer's heirs and successors, fully intending that such Waiver shall not be subject to revocation, rescission, cancellation, termination, or any other legal or equitable action to disrupt the quiet enjoyment of the Work by the public as contemplated by Affirmer's express Statement of Purpose. 3. Public License Fallback. Should any part of the Waiver for any reason be judged legally invalid or ineffective under applicable law, then the Waiver shall be preserved to the maximum extent permitted taking into account Affirmer's express Statement of Purpose. In addition, to the extent the Waiver is so judged Affirmer hereby grants to each affected person a royalty-free, non transferable, non sublicensable, non exclusive, irrevocable and unconditional license to exercise Affirmer's Copyright and Related Rights in the Work (i) in all territories worldwide, (ii) for the maximum duration provided by applicable law or treaty (including future time extensions), (iii) in any current or future medium and for any number of copies, and (iv) for any purpose whatsoever, including without limitation commercial, advertising or promotional purposes (the "License"). The License shall be deemed effective as of the date CC0 was applied by Affirmer to the Work. Should any part of the License for any reason be judged legally invalid or ineffective under applicable law, such partial invalidity or ineffectiveness shall not invalidate the remainder of the License, and in such case Affirmer hereby affirms that he or she will not (i) exercise any of his or her remaining Copyright and Related Rights in the Work or (ii) assert any associated claims and causes of action with respect to the Work, in either case contrary to Affirmer's express Statement of Purpose. 4. Limitations and Disclaimers. a. No trademark or patent rights held by Affirmer are waived, abandoned, surrendered, licensed or otherwise affected by this document. b. Affirmer offers the Work as-is and makes no representations or warranties of any kind concerning the Work, express, implied, statutory or otherwise, including without limitation warranties of title, merchantability, fitness for a particular purpose, non infringement, or the absence of latent or other defects, accuracy, or the present or absence of errors, whether or not discoverable, all to the greatest extent permissible under applicable law. c. Affirmer disclaims responsibility for clearing rights of other persons that may apply to the Work or any use thereof, including without limitation any person's Copyright and Related Rights in the Work. Further, Affirmer disclaims responsibility for obtaining any necessary consents, permissions or other rights required for any use of the Work. d. Affirmer understands and acknowledges that Creative Commons is not a party to this document and has no duty or obligation with respect to this CC0 or use of the Work. For more information, please see ================================================ FILE: README.md ================================================ # Beginner HTML (HyperText Markup Language) site scripted A simple one page website created to help complete beginners learn HTML basics, which in this repo has also had some script added to help beginners learn JavaScript basics. The scripting is explained over the course of the [JavaScript basics](https://developer.mozilla.org/en-US/Learn/Getting_started_with_the_web/JavaScript_basics) course. ## Live site [Run the example live](https://mdn.github.io/beginner-html-site-scripted/). ================================================ FILE: REVIEWING.md ================================================ # Reviewing guide ## Values and guidelines All reviewers must abide by the [Code of Conduct](CODE_OF_CONDUCT.md); they are also protected by the Code of Conduct. A reviewer should not tolerate poor behavior and is encouraged to [report any behavior](CODE_OF_CONDUCT.md#Reporting_violations) that violates the Code of Conduct. Everyone participating must follow our [Community Participation Guidelines](CODE_OF_CONDUCT.md#Community_Participation_Guidelines) ## Review process The MDN Web Docs team has a well-defined review process that must be followed by reviewers in all repositories under the GitHub MDN organization. This process is described in detail on the [Pull request guidelines](https://developer.mozilla.org/en-US/docs/MDN/Community/Pull_requests) page. ================================================ FILE: SECURITY.md ================================================ # Security Policy ## Overview This policy applies to MDN's website (`developer.mozilla.org`), backend services, and GitHub repositories in the [`mdn`](https://github.com/mdn) organization. Issues affecting other Mozilla products or services should be reported through the [Mozilla Security Bug Bounty Program](https://www.mozilla.org/en-US/security/bug-bounty/). For non-security issues, please file a [content bug](https://github.com/mdn/content/issues/new/choose), a [website bug](https://github.com/mdn/fred/issues/new/choose) or a [content/feature suggestion](https://github.com/mdn/mdn/issues/new/choose). ## Reporting a Vulnerability If you discover a potential security issue, please report it privately via . If you prefer not to use HackerOne, you can report it via . ## Bounty Program Vulnerabilities in MDN may qualify for Mozilla's Bug Bounty Program. Eligibility and reward amounts are described on . Please use the above channels even if you are not interested in a bounty reward. ## Responsible Disclosure Please do not publicly disclose details until Mozilla's security team and the MDN engineering team have verified and fixed the issue. We appreciate your efforts to keep MDN and its users safe. ================================================ FILE: index.html ================================================ My test page

Mozilla is cool

The Firefox logo: a flaming fox surrounding the Earth.

At Mozilla, we’re a global community of

  • technologists
  • thinkers
  • builders

working together to keep the Internet alive and accessible, so people worldwide can be informed contributors and creators of the Web. We believe this act of human collaboration across an open platform is essential to individual growth and our collective future.

Read the Mozilla Manifesto to learn even more about the values and principles that guide the pursuit of our mission.

================================================ FILE: scripts/main.js ================================================ // Image switcher code const myImage = document.querySelector("img"); myImage.addEventListener("click", () => { const mySrc = myImage.getAttribute("src"); if (mySrc === "images/firefox-icon.png") { myImage.setAttribute("src", "images/firefox2.png"); } else { myImage.setAttribute("src", "images/firefox-icon.png"); } }); // Personalized welcome message code let myButton = document.querySelector('button'); let myHeading = document.querySelector('h1'); function setUserName() { let myName = prompt('Please enter your name.'); if(!myName) { setUserName(); } else { localStorage.setItem('name', myName); myHeading.innerHTML = 'Mozilla is cool, ' + myName; } } if(!localStorage.getItem('name')) { setUserName(); } else { let storedName = localStorage.getItem('name'); myHeading.innerHTML = 'Mozilla is cool, ' + storedName; } myButton.addEventListener("click", () => { setUserName(); }); ================================================ FILE: styles/style.css ================================================ html { font-size: 10px; font-family: 'Open Sans', sans-serif; } h1 { font-size: 60px; text-align: center; } p, li { font-size: 16px; line-height: 2; letter-spacing: 1px; } html { background-color: #00539F; } body { width: 600px; margin: 0 auto; background-color: #FF9500; padding: 0 20px 20px 20px; border: 5px solid black; } h1 { margin: 0; padding: 20px 0; color: #00539F; text-shadow: 3px 3px 1px black; } img { display: block; margin: 0 auto; }