Skip to content

Commit

Permalink
Merge pull request #42 from Joe-Brady/templating
Browse files Browse the repository at this point in the history
  • Loading branch information
George Adams committed Mar 23, 2017
2 parents 6b82aba + 5293039 commit acc536a
Show file tree
Hide file tree
Showing 23 changed files with 1,062 additions and 344 deletions.
29 changes: 24 additions & 5 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,38 @@
npm install
```

3. Start the live compile / concat / minify scripts
3. Start the auto-build scripts

```
npm start
```

4. Make your changes in the root and `/src` directories.
Please note that there are some files, notably `api.js`, that appear only in `/dist` and should be edited there.
4. Make changes **only** in the `/src` directory
> Please note that `api.js` is an exception to this rule: it appears only in `/dist`, and should be edited there.
5. Open `/index.html` in any browser, and refresh the page after saving your changes to `/src`.

---

## Contribution guidelines

### HTML (Handlebars) pt.1
* **Do not** edit the `.html` files in the root directory. They are created and updated by the build process.
* Instead, edit the `.handlebars` files in the `/src/handlebars` directory.
* 'Handlebars' files should only include the `<main>` element, containing the page's content, and `{{> header}}` / `{{> footer }}` tags.

### HTML (Handlebars) pt.2 (creating a new .handlebars file)
* The header, footer, metadata, and more, are contained within 'partials' (`/src/handlebars/partials`).
* This way, repeated content (e.g. header and footer) only has to be maintained in one place.
* Any new pages should have the header and footer partials inserted above and below the `<main>` tags respectively.
* When you insert the header partial into a `.handlebars` file, you should pass in a variable for the page title, e.g. `{{> header title='Releases - AdoptOpenJDK' }}`.
* When you insert the footer partial into a `.handlebars` file, you can pass in a variable for any page-specific JavaScript that you have written to be run 'on page load', e.g. `{{> footer script='<script>onIndexLoad();</script>' }}`. See the 'JS' section below for details on this system.
* If you are unsure, it is best to begin by copying an existing `.handlebars` file, and deleting the content between the `<main>` tags.

### Menu system
* The menu contents can be changed in `/src/handlebars/partials/header.handlebars`.
* Add or update the entries within `<div id='menu-content'>...</div>`.

### SCSS
* Only use the units `rem` and `%`. __Do not__ use `em` or `px`.
* Try to use only the colours that exist as variables at the top of each stylesheet, such as `$mainblue`.
Expand All @@ -38,9 +57,9 @@ Please note that there are some files, notably `api.js`, that appear only in `/d
### JS
* Use `global.js` for global JavaScript functions.
* Use individual `.js` files for functions that are specific to a page, such as `nightly.js`. For any functions that should happen 'on page load', call them from within the root function for that page, e.g. `onNightlyLoad(){...}`.
* If you create a new `.html` page that requires new JavaScript functions:
* If you create a new `.handlebars` file that requires new JavaScript functions:
1. Create a new `.js` file inside `/src/js` to match the page's name.
2. Re-run `npm start` to add this new file to the `/dist` directory.
3. Write a new root function in this file such as `function onNightlyLoad(){...}`.
4. Any functions that you want to run after the page has loaded should be called from here.
5. Add a `<script>` tag to the bottom of your new `.html` page's `<body>` element to run this root function, such as `<script>onNightlyLoad();</script>`.
5. Refer to the 'HTML (Handlebars)' section above for guidance on how to call this root function.
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
[![Build Status](https://travis-ci.org/AdoptOpenJDK/openjdk-website.svg?branch=master)](https://travis-ci.org/AdoptOpenJDK/openjdk-website)
# Readme
# README

## https://openjdk.github.io/openjdk-website/index
This repo contains the source code for http://www.adoptopenjdk.net, which itself is the custom domain ontop of GitHub Pages for this repo.

# Developers

See the [Contribution Guidelines](CONTRIBUTING.md).

When pull requests are reviewed, accepted and merged they are automatically deployed to the live site (as part of the GitHub Pages mechanism).

---

## Using the releases API _(work in progress)_
Expand Down
154 changes: 154 additions & 0 deletions about.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,154 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>About - AdoptOpenJDK</title>
<link rel="shortcut icon" href="dist/assets/favicon.ico" type="image/x-icon">
<link rel="icon" href="dist/assets/favicon.ico" type="image/x-icon">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/5.0.0/normalize.min.css">
<link rel="stylesheet" href="dist/css/styles.min.css">
<link href="https://fonts.googleapis.com/css?family=Open+Sans:300,400" rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/3.5.2/animate.min.css">
</head>

<body class="blue-bg">

<div id="menu-container" class="grey-bg hide slideInLeft">
<div id="menu-header">
<i id="menu-close" class="fa fa-arrow-circle-left" aria-hidden="true"></i>
</div>
<div id="menu-content">
<p><a href="./index.html">Home</a></p>
<p><a href="./releases.html">Latest release</a></p>
<p><a href="./releases.html#archive">Release archive</a></p>
<p><a href="./nightly.html">Nightly builds</a></p>
<p><a href="./installation.html">Installation</a></p>
<p><a href="./getinvolved.html">Get involved</a></p>
<p><a href="./support.html">Support</a></p>
<!--<p><a href="./about.html">About</a></p>--> <!-- TO-DO: UN COMMENT TO ADD ABOUT PAGE TO MENU -->
</div>
</div>

<nav>
<i id="menu-button" class="fa fa-bars" aria-hidden="true"></i>
<a id="logo" href="./index.html" class="a-button">
<div><img src="dist/assets/squares-logo.png"></div>
<div><span>AdoptOpenJDK</span></div>
</a>
</nav>

<!-- TODO Style should match installation page, it doesn't quite... -->
<main class="grey-bg about">

<h1 class="margin-bottom large-title">About</h1>

<div id="support-container">

<!-- TOOD this might be renamed to GetOpenJDK to avoid confusion -->
<div class="margin-bottom">
<h2 class="bold">About AdoptOpenJDK - GetOpenJDK</h2>
<p>
This initiative came about following a discussion about the general lack of an open and reproducible build & test system for the OpenJDK source
across multiple platforms. Practically, it's a reboot of the work that has already been done for a while in the OpenJDK project producing binaries
for developers and end users.
</p>

<p>
The intention is to provide binaries and hardware access for all of the major platforms, for the purposes of:
<ul>
<li>Research and Development by academics, researchers and enthusiasts.</li>
<li>An open, common, audited, build infrastructure for vendors to use (if they wish).</li>
<li>Providing binaries for bleeding edge early adopters.</li>
<li>Providing a place to try out build infrastructure ideas that might one day be moved to OpenJDK proper.</li>
</ul>
</p>

<p>
Although we will be making the binaries to the highest quality possible via jtreg, jcov test coverage and possibly other donated test
suites. It is <strong>not</strong> the intention that the binaries produced will be professionally supported. See
<a href="./support.html">Support</a> for details.
</p>

<p>
There may be some areas of overlap with other past/present efforts, but that's OK. We expect any duplication to converge in due course and have
started working with other platform specific OpenJDK build efforts.
</p>

<p>
Discussions will take place on the <a href="http://mail.openjdk.java.net/mailman/listinfo/adoption-discuss">Mailing List</a>, or via
the <a href="https://github.com/AdoptOpenJDK/openjdk-build/issues">Github issues</a>; and consensus recorded on this project website or the appropriate GitHub repo wiki as appropriate.
</p>
</div>

<div class="margin-bottom">
<h2 class="bold">Supported Forests</h2>
<p>
We'll start with jdk8u (effectively Java 8) with test coverage from the open jtreg tests, providing jcov test coverage reports. Later on other popular
forests such as jdk9, jdk10, valhalla, shenandoah etc will be added.
</p>
</div>

<div class="margin-bottom">
<h2 class="bold">Supported Platforms</h2>
<p>
We currently have Linux x64 and Mac OS X and are looking to rapidly add the other common Linux variants + Windows and Solaris. We envisage some
strong collaboration can form here with IcedTea and other specific platform efforts!
</p>
</div>

<div class="margin-bottom">
<h2 class="bold">About the AdoptOpenJDK Community</h2>
<p>
<a href="https://java.net/projects/adoptopenjdk/">AdoptOpenJDK</a> is a community of Java user group members, Java developers, Vendors who are
advocates of <a href="http://openjdk.java.net">OpenJDK</a>, the open source project which forms the basis of the Java™ programming language and
platform.
</p>
<p>
Part of the group's activities occur at the <a href="http://openjdk.java.net/groups/adoption/">Adoption Group</a> on OpenJDK proper where you
can also join the <a href="http://mail.openjdk.java.net/mailman/listinfo/adoption-discuss">Mailing List</a>.
</p>
</div>

<div class="margin-bottom">
<h2 class="bold">License</h2>
<p>
Build scripts and other code to product the binaries, the website and other build infrastructure are licensed under
<a href="https://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.
OpenJDK code itself is licensed under <a href="http://openjdk.java.net/legal/gplv2+ce.html">GPL v2 with Classpath Exception</a>.
</p>
</div>

<div style="margin-top: 3rem;">
<a href="http://mail.openjdk.java.net/mailman/listinfo/adoption-discuss" id="dev-button" class="no-underline home-links dark-link">
<h2 class="inline-block zero-margin">Mailing List&nbsp;<i class="fa fa-arrow-circle-o-right" aria-hidden="true"></i></h2>
</a>
<a href="https://github.com/AdoptOpenJDK/openjdk-build/issues" class="no-underline home-links dark-link">
<h2 class="inline-block zero-margin">Submit an Issue&nbsp;<i class="fa fa-arrow-circle-o-right" aria-hidden="true"></i></h2>
</a>
</div>

</div>

</main>

<footer>
<div class="align-center" style="margin-bottom: 1rem;">
<a href="https://github.com/AdoptOpenJDK" target="_blank" class="light-link no-underline">
<img src="dist/assets/GitHub.png" alt="" class="github-logo">
<p class="margin-auto">GitHub build repo</p>
</a>
</div>
<a href="https://github.com/AdoptOpenJDK/openjdk-build/issues" target="_blank"class="light-link no-underline">
<p class="inline-block zero-margin" style="margin-bottom: 1rem;">Having issues?&nbsp;<i class="fa fa-arrow-circle-o-right" aria-hidden="true"></i></p>
</a>
<p>Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners.</p>
</footer>

<script src="dist/js/app.min.js"></script>


</body>
</html>
15 changes: 15 additions & 0 deletions dist/css/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -558,3 +558,18 @@ main .support {
max-width: 40rem;
margin: 0 auto;
width: 80%; }

main.about p, main.about ul {
max-width: 40rem;
margin: 1rem auto;
width: 80%;
text-align: left;
line-height: 1.8rem; }

main.about a {
text-decoration: none;
color: #3D70B2; }

main.about a:hover {
text-decoration: underline;
color: #3D70B2; }
Loading

0 comments on commit acc536a

Please sign in to comment.