git.gnu.io has moved to IP address 209.51.188.249 -- please double check where you are logging in.

Commit d4dc2887 authored by Alexei's avatar Alexei

WIP commit

parent 1324c8fc
body {
/*body {
background-color: #e0e0e0;
}*/
.main-layout .main-header {
padding: 0px;
}
.main-layout .main-header {
bottom: 19px;
}
.main-drawer {
border: none;
}
.main-drawer .user-avatar {
width: 48px;
height: 48px;
border-radius: 24px;
}
.mdl-layout__drawer .avatar {
margin-bottom: 16px;
}
.main-drawer .mdl-menu .mdl-menu__item {
display: flex;
align-items: center;
}
.main-drawer-header {
box-sizing: border-box;
display: flex;
flex-direction: column;
justify-content: flex-end;
padding: 16px;
height: 151px;
}
.main-drawer-header .user-avatar-dropdown {
display: flex;
position: relative;
flex-direction: row;
align-items: center;
width: 100%;
}
.main-navigation {
flex-grow: 1;
}
.main-layout .main-navigation .mdl-navigation__link {
display: flex !important;
flex-direction: row;
align-items: center;
color: rgba(255, 255, 255, 0.56);
font-weight: 500;
}
.main-layout .main-navigation .mdl-navigation__link:hover {
background-color: #00BCD4;
color: #37474F;
}
.main-content {
max-width: 1080px;
}
.quip-card {
margin: 0 auto;
width: 350px;
width: 960px;
}
.quip-card .mdl-card__title {
......@@ -49,4 +114,38 @@ body {
.quip-card > .mdl-card__actions {
display: flex;
}
.user-card {
width: 100%;
}
.user-card .mdl-card__title {
background: url('https://quitter.se/file/mcscx-20141005-cover-j6kn.jpg') center / cover;
}
.user-card .mdl-card__title-text {
display: block;
font-weight: 500;
color: rgba(255, 255, 255, .87);
}
.user-card .mdl-list__item-avatar {
vertical-align: middle;
margin: auto 10px auto 0;
width: 48px;
height: 48px;
}
.user-card .mdl-card__title-text .user-id {
display: inline-block;
vertical-align: middle;
font-size: 14px;
margin: auto 0 auto 5px;
}
.user-card .mdl-card__title-text .mdl-card__subtitle-text {
display: block;
color: rgba(255, 255, 255, .87);
font-size: 12px;
}
\ No newline at end of file
'use strict'
const remote = require('electron').remote;
const {Menu, MenuItem} = require('electron').remote;
let toggleDevTools = (menuItem, browserWindow) => {
if (browserWindow)
browserWindow.webContents.toggleDevTools();
}
let menu = new Menu();
menu.append(new MenuItem({
label: 'Toggle Developer Tools',
id: 'devTools',
click: toggleDevTools
}));
console.log(menu);
window.addEventListener('contextmenu', e => {
e.preventDefault();
menu.popup(remote.getCurrentWindow());
}, false);
\ No newline at end of file
'use strict';
const {ipcRenderer} = require('electron');
const {ipcRenderer, shell} = require('electron');
const $ = require('jquery');
const api = require('../src/common/endpoints');
const url = require('url');
const OAuth = require('oauth');
const contextMenu = require('../renderer/js/context-menu');
let apiEndpoint = null;
let oauth = null;
......@@ -24,7 +25,7 @@ ipcRenderer.on('rec-oauth-obj', (event, data, tokens) => {
resolvePromises();
});
// Resolve our promises
let resolvePromises = () => {
promises.oauth.then(data => {
......@@ -44,7 +45,7 @@ let resolvePromises = () => {
promises.token.then(data => {
access_token = data;
loadPublicTimeline();
//loadPublicTimeline();
}).catch(err => {
console.error(err.stack);
});
......@@ -118,7 +119,7 @@ let loadPublicTimeline = () => {
let actionButton = document.createElement('label');
actionButton.type = 'button'
actionButton.className = 'mdl-button mdl-js-button mdl-button--icon mdl-js-ripple-effect';
actionButton.className = 'mdl-button mdl-js-button mdl-button--icon mdl-js-ripple-effect mdl-button--colored';
let icon = document.createElement('i');
icon.className = 'material-icons mdl-badge';
icon.textContent = 'reply';
......@@ -127,7 +128,7 @@ let loadPublicTimeline = () => {
actionButton = document.createElement('label');
actionButton.type = 'button'
actionButton.className = 'mdl-button mdl-js-button mdl-button--icon mdl-js-ripple-effect';
actionButton.className = 'mdl-button mdl-js-button mdl-button--icon mdl-js-ripple-effect mdl-button--colored';
icon = document.createElement('i');
icon.className = 'material-icons mdl-badge';
icon.textContent = 'repeat';
......@@ -137,7 +138,7 @@ let loadPublicTimeline = () => {
actionButton = document.createElement('label');
actionButton.type = 'button'
actionButton.className = 'mdl-button mdl-js-button mdl-button--icon mdl-js-ripple-effect';
actionButton.className = 'mdl-button mdl-js-button mdl-button--icon mdl-js-ripple-effect mdl-button--colored';
icon = document.createElement('i');
icon.className = 'material-icons mdl-badge';
icon.textContent = 'star_rate';
......@@ -150,8 +151,8 @@ let loadPublicTimeline = () => {
cardDiv.appendChild(innerDiv2);
cardDiv.appendChild(innerDiv3);
document.body.appendChild(cardDiv);
document.body.appendChild(document.createElement('br'));
document.querySelector('#timeline').appendChild(cardDiv);
document.querySelector('#timeline').appendChild(document.createElement('br'));
}
});
}
......
......@@ -12,6 +12,79 @@
</head>
<body>
<br>
<div class="main-layout mdl-layout mdl-js-layout mdl-layout--fixed-drawer mdl-layout--fixed-header">
<header class="main-header mdl-layout__header">
<div class="mdl-layout__header-row">
<span class="mdl-layout-title">Home</span>
</div>
</header>
<div class="main-drawer mdl-layout__drawer mdl-color--blue-grey-500 mdl-color-text--blue-grey-50">
<header class="main-drawer-header">
<img src="images/qvitter.png" class="user-avatar">
<div class="user-avatar-dropdown">
<span class="user-name">alexivanov@quitter.no</span>
<div class="mdl-layout-spacer"></div>
<button id="accbtn" class="mdl-button mdl-js-button mdl-js-ripple-effect mdl-button--icon">
<i class="material-icons" role="presentation">arrow_drop_down</i>
<span class="visuallyhidden">Accounts</span>
</button>
<ul class="mdl-menu mdl-menu--bottom-right mdl-js-menu mdl-js-ripple-effect" for="accbtn">
<li class="mdl-menu__item">hello@example.com</li>
<li class="mdl-menu__item">info@example.com</li>
<li class="mdl-menu__item"><i class="material-icons">add</i>Add another account...</li>
</ul>
</div>
</header>
<nav class="main-navigation mdl-navigation mdl-color--blue-grey-400">
<a class="mdl-navigation__link" href="https://git.gnu.io/alexivanov/qvitter.js/issues">Feedback</a>
<a class="mdl-navigation__link" href="https://git.gnu.io/alexivanov/qvitter.js/">Report a Bug</a>
</nav>
</div>
<main class="mdl-layout__content mdl-color--grey-100">
<div class="mdl-grid main-content">
<p class="mdl-cell mdl-cell--12-col">Lorem ipsum dolor sit amet</p>
<!--<div class="mdl-grid">
<div class="mdl-cell mdl-cell--3-col">
<div class="user-card mdl-card mdl-shadow--2dp">
<div class="mdl-card__title mdl-card--border">
<img class="mdl-list__item-avatar" src="https://quitter.se/avatar/113454-96-20130601134715.jpeg"></img>
<div class="mdl-card__title-text">
<span class="user-name">McScx</span>
<span class="user-id">@mcscx</span>
<div class="mdl-card__subtitle-text">
Location: Germany
<br>
Website: https://google.com
</div>
</div>
</div>
<div class="mdl-card__supporting-text">
(♂) this acct is mostly used for English. Account für Deutsch: status.vinilox.eu/mcscx2
</div>
</div>
</div>
<div class="mdl-cell mdl-cell--8-col" id="timeline">
</div>
<div class="mdl-cell mdl-cell--1-col">
<button class="mdl-button mdl-js-button mdl-button--fab mdl-js-ripple-effect mdl-button--colored">
<i class="material-icons">create</i>
</button>
</div>
</div> -->
</div>
</main>
</div>
<script>
let navLinks = document.querySelector(".main-navigation").children;
if (navLinks != null) {
for (var i = 0; i < navLinks.length; i++) {
navLinks[i].onclick = function() {
shell.openExternal(navLinks[i].href);
}
};
}
</script>
</body>
</html>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment