mirror of
https://github.com/HackPlan/github-commit-ical.git
synced 2026-06-14 22:49:50 +08:00
typo and Mac OS detect
This commit is contained in:
@@ -2,23 +2,24 @@ doctype html
|
||||
html
|
||||
head
|
||||
meta(charset="utf-8")
|
||||
title commitCal
|
||||
title CommitCal
|
||||
link(rel='icon', href='/favicon.png', type='image/png')
|
||||
link(rel='stylesheet', href='/styles/index.css', type='text/css', media='screen')
|
||||
meta(name='viewport', content='width=device-width, initial-scale=1')
|
||||
body
|
||||
.header
|
||||
.container
|
||||
h1.title.highlight commitCal
|
||||
h3 View your commit history in Calendar
|
||||
h1.title.highlight CommitCal
|
||||
h3 View your commit history in calendar
|
||||
p.star
|
||||
iframe(src="http://ghbtns.com/github-btn.html?user=HackPlan&repo=github-commit-ical&type=watch&size=large", allowtransparency="true", frameborder="0", scrolling="0", width="72", height="30")
|
||||
|
||||
.body
|
||||
.container.clearfix
|
||||
form(onsubmit="subscribe()")
|
||||
form.clearfix(onsubmit="return subscribe()")
|
||||
input#username(type="text", placeholder="Enter your GitHub username")
|
||||
button(type="submit") Subscribe to Calendar
|
||||
#subscription.clearfix(style="display:none")
|
||||
#subscription_url
|
||||
.footer
|
||||
.container.copyright.clearfix
|
||||
.left
|
||||
@@ -27,9 +28,21 @@ html
|
||||
p A
|
||||
a(href="http://hackplan.com") Hackplan
|
||||
| Project
|
||||
|
||||
script.
|
||||
function subscribe() {
|
||||
username = document.getElementById('username').value;
|
||||
window.open("webcal://commit-calendar.newsbee.io/" + username);
|
||||
if (!username) {
|
||||
return false;
|
||||
}
|
||||
url = "commit-calendar.newsbee.io/" + username;
|
||||
if (window.navigator.platform.toUpperCase().indexOf('MAC') >= 0){
|
||||
window.open("webcal://" + url);
|
||||
}else{
|
||||
link = document.getElementById('subscription_url')
|
||||
link.innerHTML = "http://" + url;
|
||||
|
||||
subscription = document.getElementById('subscription')
|
||||
subscription.style.display = "block";
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@@ -102,7 +102,7 @@ input[type=text], input[type=password], textarea {
|
||||
}
|
||||
|
||||
|
||||
button{
|
||||
button, .button{
|
||||
display: inline-block;
|
||||
margin-bottom: 0;
|
||||
font-weight: bold;
|
||||
@@ -126,12 +126,30 @@ button{
|
||||
}
|
||||
|
||||
.container{
|
||||
#subscription{
|
||||
margin-top: 1em;
|
||||
background: #5B9DD1;
|
||||
border-radius: 3px;
|
||||
padding: 0.5em 1em;
|
||||
color: #fff;
|
||||
}
|
||||
#subscription_url{
|
||||
line-height: 2em;
|
||||
float: left;
|
||||
}
|
||||
#sub_link{
|
||||
width: auto;
|
||||
background: #2173B6;
|
||||
border-color: #1E73B6;
|
||||
padding: 3px 10px;
|
||||
}
|
||||
|
||||
input{
|
||||
width: 57%;
|
||||
float: left;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
button {
|
||||
button, .button {
|
||||
width: 40%;
|
||||
float: right;
|
||||
box-sizing: border-box;
|
||||
|
||||
Reference in New Issue
Block a user