Skip to content

Instantly share code, notes, and snippets.

@casture
Created May 25, 2017 17:59
Show Gist options
  • Save casture/e8b2edfc53c1250b4f3f67e37630fc43 to your computer and use it in GitHub Desktop.
Save casture/e8b2edfc53c1250b4f3f67e37630fc43 to your computer and use it in GitHub Desktop.
WABS + BYU Theme + Polymer
<!--
@license
Copyright 2017 Brigham Young University
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!doctype html>
<html class="no-js" lang="">
<head>
<meta charset="utf-8">
<!-- page title and description -->
<title>mYlink</title>
<meta name="description" content="">
<!-- tell the browser that your page is designed for mobile -->
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- add your stylesheets here -->
<!-- <link rel="stylesheet" href="/css/main.css"> -->
<link type="text/css" rel="stylesheet" href="//cloud.typography.com/75214/6517752/css/fonts.css" media="all" />
<link rel="stylesheet" href="https://cdn.byu.edu/byu-theme-components/latest/byu-theme-components.min.css" />
<style>
.page-content {
margin: 0 auto;
max-width: 1200px;
width: 100%;
}
</style>
<script src="/bower_components/webcomponentsjs/webcomponents-loader.js"></script>
<script src="/node_modules/redux/dist/redux.js"></script>
<script src="/wabs/script.js"></script> <!-- recommended to keep this script -->
<script src="https://cdn.byu.edu/byu-theme-components/latest/byu-theme-components.min.js"></script>
<link rel="import" href="/src/my-content.html">
</head>
<body>
<byu-header>
<h1 slot="site-title">mYlink</h1>
<byu-user-info slot="user" id="user-info">
<a slot="login" href="javascript: void(0)" onclick="byu.auth.login()">Sign In</a>
<a slot="logout" href="javascript: void(0)" onclick="byu.auth.logout()">Sign Out</a>
<!--<span slot$="{{_userLabel(userName)}}">{{userName}}</span> <<polymer version -->
</byu-user-info>
<byu-menu slot="nav" collapsed>
<a href="/my-element">My Element</a>
<a href="/lifecycle">Lifecycle Lab</a>
<a href="/computed-sum">Computed Sum</a>
<a href="/friends">Friends</a>
<a href="/ajax-lab">AJAX Lab</a>
<a href="/fortune-cookie">Fortune Cookie</a>
</byu-menu>
</byu-header>
<div class="page-content">
<my-content></my-content>
</div>
<byu-footer></byu-footer>
<script>
if (byu.user) {
var span = document.createElement('span');
span.setAttribute('slot', 'user-name');
span.innerHTML = byu.user.preferredFirstName;
document.querySelector('#user-info').appendChild(span);
}
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment