Skip to content

Initial Frontpage, with Polymer #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"extends": ["eslint:recommended", "google"],
"env": {
"browser": true
},
"plugins": [
"html"
],
"rules": {
"no-var": "off",
"new-cap": ["error", { "capIsNewExceptions": ["Polymer"] }]
},
"globals": {
"Polymer": true
}
}
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* text=auto
33 changes: 33 additions & 0 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<!-- Instructions: https://github.com/PolymerElements/polymer-starter-kit/CONTRIBUTING.md#filing-issues -->
### Description
<!-- Example: The `paper-foo` element causes the page to turn pink when clicked. -->

### Expected outcome

<!-- Example: The page stays the same color. -->

### Actual outcome

<!-- Example: The page turns pink. -->

### Live Demo
<!-- Example: https://jsbin.com/cagaye/edit?html,output -->

### Steps to reproduce

<!-- Example
1. Put a `paper-foo` element in the page.
2. Open the page in a web browser.
3. Click the `paper-foo` element.
-->

### Browsers Affected
<!-- Check all that apply -->
- [ ] Chrome
- [ ] Firefox
- [ ] Safari 9
- [ ] Safari 8
- [ ] Safari 7
- [ ] Edge
- [ ] IE 11
- [ ] IE 10
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
bower_components/
build/
node_modules/
yarn.lock
19 changes: 19 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
language: node_js
sudo: required
dist: trusty
addons:
firefox: latest
apt:
sources:
- google-chrome
packages:
- google-chrome-stable
node_js:
- '6'
- '5'
- '4'
before_script:
- npm install -g bower polymer-cli
- bower install
script:
- xvfb-run npm test
56 changes: 56 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# JVMDeveloper.id Website

Website for JVMDeveloper.id. Readme will be updated accordingly.

## Pre Requirement

You must have:

* NodeJS version `6.9.0+`
* Bower
* Polymer-CLI

Download NodeJS at [nodejs.org](https://nodejs.org). Bower and polymer-cli
can be install with:

```
$ npm install -g bower
$ npm install -g polymer-cli
```

### Running Website Locally

This command serves the app at `http://localhost:8080` and provides basic URL
routing for the app:

polymer serve --open

### Build

This command performs HTML, CSS, and JS minification on the application
dependencies, and generates a service-worker.js file with code to pre-cache the
dependencies based on the entrypoint and fragments specified in `polymer.json`.
The minified files are output to the `build/unbundled` folder, and are suitable
for serving from a HTTP/2+Push compatible server.

In addition the command also creates a fallback `build/bundled` folder,
generated using fragment bundling, suitable for serving from non
H2/push-compatible servers or to clients that do not support H2/Push.

polymer build

### Preview the build

This command serves the minified version of the app at `http://localhost:8080`
in an unbundled state, as it would be served by a push-compatible server:

polymer serve build/unbundled

This command serves the minified version of the app at `http://localhost:8080`
generated using fragment bundling:

polymer serve build/bundled

### Finalize Build for Deployment

TBD (build script needs to be created)
26 changes: 26 additions & 0 deletions bower.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"name": "polymer-starter-kit",
"authors": [
"The Polymer Authors"
],
"license": "https://polymer.github.io/LICENSE.txt",
"dependencies": {
"app-layout": "PolymerElements/app-layout#^0.10.0",
"app-route": "PolymerElements/app-route#^0.9.0",
"iron-flex-layout": "PolymerElements/iron-flex-layout#^1.0.0",
"iron-icon": "PolymerElements/iron-icon#^1.0.0",
"iron-iconset-svg": "PolymerElements/iron-iconset-svg#^1.0.0",
"iron-localstorage": "PolymerElements/iron-localstorage#^1.0.0",
"iron-media-query": "PolymerElements/iron-media-query#^1.0.0",
"iron-pages": "PolymerElements/iron-pages#^1.0.0",
"iron-selector": "PolymerElements/iron-selector#^1.0.0",
"paper-icon-button": "PolymerElements/paper-icon-button#^1.1.4",
"polymer": "Polymer/polymer#^1.6.0",
"paper-card": "PolymerElements/paper-card#^1.1.4",
"iron-icons": "PolymerElements/iron-icons#^1.2.0"
},
"devDependencies": {
"web-component-tester": "^4.0.0"
},
"private": true
}
Binary file added images/favicon.ico
Binary file not shown.
Binary file added images/manifest/icon-144x144.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/manifest/icon-192x192.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/manifest/icon-48x48.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/manifest/icon-512x512.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/manifest/icon-72x72.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/manifest/icon-96x96.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
102 changes: 102 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="generator" content="Polymer Starter Kit">
<meta name="viewport" content="width=device-width, minimum-scale=1, initial-scale=1, user-scalable=yes">

<title>My App</title>
<meta name="description" content="My App description">

<link rel="icon" href="/images/favicon.ico">

<!-- See https://goo.gl/OOhYW5 -->
<link rel="manifest" href="/manifest.json">

<!-- See https://goo.gl/qRE0vM -->
<meta name="theme-color" content="#3f51b5">

<!-- Add to homescreen for Chrome on Android. Fallback for manifest.json -->
<meta name="mobile-web-app-capable" content="yes">
<meta name="application-name" content="My App">

<!-- Add to homescreen for Safari on iOS -->
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
<meta name="apple-mobile-web-app-title" content="My App">

<!-- Homescreen icons -->
<link rel="apple-touch-icon" href="/images/manifest/icon-48x48.png">
<link rel="apple-touch-icon" sizes="72x72" href="/images/manifest/icon-72x72.png">
<link rel="apple-touch-icon" sizes="96x96" href="/images/manifest/icon-96x96.png">
<link rel="apple-touch-icon" sizes="144x144" href="/images/manifest/icon-144x144.png">
<link rel="apple-touch-icon" sizes="192x192" href="/images/manifest/icon-192x192.png">

<!-- Tile icon for Windows 8 (144x144 + tile color) -->
<meta name="msapplication-TileImage" content="/images/manifest/icon-144x144.png">
<meta name="msapplication-TileColor" content="#3f51b5">
<meta name="msapplication-tap-highlight" content="no">

<script>
// Setup Polymer options
window.Polymer = {
dom: 'shadow',
lazyRegister: true,
};

// Load webcomponentsjs polyfill if browser does not support native
// Web Components
(function() {
'use strict';

var onload = function() {
// For native Imports, manually fire WebComponentsReady so user code
// can use the same code path for native and polyfill'd imports.
if (!window.HTMLImports) {
document.dispatchEvent(
new CustomEvent('WebComponentsReady', {bubbles: true})
);
}
};

var webComponentsSupported = (
'registerElement' in document
&& 'import' in document.createElement('link')
&& 'content' in document.createElement('template')
);

if (!webComponentsSupported) {
var script = document.createElement('script');
script.async = true;
script.src = '/bower_components/webcomponentsjs/webcomponents-lite.min.js';
script.onload = onload;
document.head.appendChild(script);
} else {
onload();
}
})();

// Load pre-caching Service Worker
if ('serviceWorker' in navigator) {
window.addEventListener('load', function() {
navigator.serviceWorker.register('/service-worker.js');
});
}
</script>

<link rel="import" href="/src/templates/jvm-developer-id.html">

<style>
body {
margin: 0;
font-family: 'Roboto', 'Noto', sans-serif;
line-height: 1.5;
min-height: 100vh;
background-color: #eeeeee;
}
</style>
</head>
<body>
<jvm-developer-id></jvm-developer-id>
</body>
</html>
20 changes: 20 additions & 0 deletions manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"name": "My App",
"short_name": "My App",
"start_url": "/?homescreen=1",
"display": "standalone",
"theme_color": "#3f51b5",
"background_color": "#3f51b5",
"icons": [
{
"src": "images/manifest/icon-192x192.png",
"sizes": "192x192",
"type": "image/png"
},
{
"src": "images/manifest/icon-512x512.png",
"sizes": "512x512",
"type": "image/png"
}
]
}
13 changes: 13 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"name": "polymer-starter-kit",
"license": "BSD-3-Clause",
"devDependencies": {
"eslint": "^3.12.0",
"eslint-config-google": "^0.7.1",
"eslint-plugin-html": "^1.7.0"
},
"scripts": {
"lint": "eslint . --ext js,html --ignore-path .gitignore",
"test": "npm run lint && polymer test"
}
}
16 changes: 16 additions & 0 deletions polymer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"entrypoint": "index.html",
"shell": "src/templates/jvm-developer-id.html",
"fragments": [
"src/about.html"
],
"sourceGlobs": [
"src/**/*",
"images/**/*",
"bower.json"
],
"includeDependencies": [
"manifest.json",
"bower_components/webcomponentsjs/webcomponents-lite.min.js"
]
}
15 changes: 15 additions & 0 deletions service-worker.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
/**
* @license
* Copyright (c) 2016 The Polymer Project Authors. All rights reserved.
* This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
* The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
* The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
* Code distributed by Google as part of the polymer project is also
* subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
*/

/* eslint no-console: ["error", { allow: ["info"] }] */

console.info(
'Service worker disabled for development, will be generated at build time.'
);
20 changes: 20 additions & 0 deletions src/404-page.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<link rel="import" href="../bower_components/polymer/polymer.html">

<dom-module id="404-page">
<template>
<style>
:host {
display: block;
padding: 10px 20px;
}
</style>

Halaman tidak ditemukan :(. <a href="https://jvmdeveloper.id/">Kembali ke halaman utama.</a>
</template>

<script>
Polymer({
is: '404-page',
});
</script>
</dom-module>
41 changes: 41 additions & 0 deletions src/about-page.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
<link rel="import" href="../bower_components/polymer/polymer.html">
<link rel="import" href="../bower_components/iron-icons/iron-icons.html">
<link rel="import" href="../bower_components/iron-icons/social-icons.html">
<link rel="import" href="../bower_components/paper-card/paper-card.html">
<link rel="import" href="../bower_components/paper-icon-button/paper-icon-button.html">

<link rel="import" href="templates/jvm-developer-id.html">

<dom-module id="about-page">
<template>
<paper-card heading="Tentang Kami" elevation="1" animated-shadow="false">
<div class="card-content">
<p>
Maecenas faucibus mollis interdum. Duis mollis, est non commodo luctus,
nisi erat porttitor ligula, eget lacinia odio sem nec elit. Aenean lacinia
bibendum nulla sed consectetur. Nullam quis risus eget urna mollis ornare
vel eu leo. Lorem ipsum dolor sit amet, consectetur adipiscing elit.
Nullam id dolor id nibh ultricies vehicula ut id elit. Aenean eu leo quam.
Pellentesque ornare sem lacinia quam venenatis vestibulum.
</p>

<p>
Nulla vitae elit libero, a pharetra augue. Cras mattis consectetur purus sit
amet fermentum. Cras mattis consectetur purus sit amet fermentum.
Maecenas faucibus mollis interdum. Aenean lacinia bibendum nulla sed
consectetur.
</p>
</div>
<div class="card-actions">
<paper-icon-button icon="bookmark"></paper-icon-button>
<paper-icon-button icon="social:share"></paper-icon-button>
</div>
</paper-card>
</template>

<script>
Polymer({
is: 'about-page',
})
</script>
</dom-module>
Loading