-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Andre Lopez
committed
Apr 11, 2017
0 parents
commit 7116782
Showing
11 changed files
with
224 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#directories | ||
bower_components | ||
node_modules | ||
dist | ||
|
||
#files | ||
*.tgz | ||
*.log | ||
|
||
#:) | ||
haters |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
*{ | ||
margin:0; | ||
padding:0; | ||
} | ||
|
||
html{ | ||
background: #14243d; | ||
background: radial-gradient(ellipse at center, #14243d 0%,#030611 100%); | ||
position: absolute; | ||
top:0; | ||
left:0; | ||
width:100%; | ||
height:100%; | ||
} | ||
|
||
body{ | ||
font: 14px/1.5 Arial, Helvetica, sans-serif; | ||
color:#fff; | ||
} | ||
|
||
a, a:visited, a:hover{ | ||
color:#fff; | ||
text-decoration: none; | ||
} | ||
|
||
|
||
/* The cover flow slider */ | ||
|
||
.flipster { | ||
margin-top:120px; | ||
} | ||
|
||
.flipster ul li { | ||
text-align: center; | ||
} | ||
|
||
.flipster ul li a { | ||
text-align: center; | ||
} | ||
|
||
.flipster ul li a:after{ | ||
content:'oo'; | ||
letter-spacing: -2px; | ||
font-size: 12px; | ||
color:orange; | ||
margin-left:5px; | ||
font-weight: bold; | ||
} | ||
|
||
.flip-item img{ | ||
margin-bottom: 10px; | ||
} | ||
|
||
/* Stats */ | ||
|
||
.stats{ | ||
text-align: center; | ||
margin-top: 80px; | ||
color: #8C91A0; | ||
font-size: 13px; | ||
} | ||
|
||
.stats span{ | ||
font-weight: bold; | ||
color: #A2A9BD; | ||
margin-right: 10px; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<title>Enupal</title> | ||
</head> | ||
<body> | ||
<h2>Hello world from ENUPAL</h2> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<title>Hello Electron</title> | ||
<link rel="stylesheet" href="./css/jquery.flipster.min.css"> | ||
<link rel="stylesheet" href="./css/styles.css"> | ||
</head> | ||
<body> | ||
|
||
<div class="flipster"> | ||
<ul> | ||
</ul> | ||
</div> | ||
|
||
<p class="stats"></p> | ||
|
||
<h1> Enupal Feed</h1> | ||
<script>window.$ = window.jQuery = require('./js/jquery.min.js');</script> | ||
<script src="./js/jquery.flipster.min.js"></script> | ||
<script> require('./index.js') </script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
const remote = require('electron').remote | ||
const main = remote.require('./main.js') | ||
|
||
$(function(){ | ||
|
||
const os = require('os') | ||
const prettyBytes = require('pretty-bytes') | ||
|
||
$('.stats').append('Numero de procesadores: <span>'+ os.cpus().length +'</span>') | ||
$('.stats').append('Memoria: <span>'+ prettyBytes(os.freemem()) +'</span>') | ||
|
||
|
||
const ul = $('.flipster ul'); | ||
|
||
$.get('http://enupal.com/blog/rss', function(response){ | ||
|
||
const rss = $(response) | ||
|
||
rss.find('item').each(function(){ | ||
const item = $(this) | ||
|
||
const content = item.find('description').html().split('</a></div>')[0]+'</a></div>' | ||
|
||
const urlRegex = /(http|ftp|https):\/\/[\w\-_]+(\.[\w\-_]+)+([\w\-\.,@?^=%&:/~\+#]*[\w\-\@?^=%&/~\+#])?/g; | ||
|
||
const imageSource = content.match(urlRegex)[1]; | ||
|
||
const li = $('<li><img /><a target="_blank"></a></li>') | ||
|
||
li.find('a') | ||
.attr('href', item.find('link').text()) | ||
.html('<br>'+item.find('title').text()) | ||
|
||
li.find('img').attr('src', imageSource) | ||
li.find('img').attr('width', 400) | ||
li.find('img').attr('height', 300) | ||
|
||
li.appendTo(ul) | ||
}); | ||
|
||
// init plugin | ||
$('.flipster').flipster({ | ||
style: 'carousel' | ||
}); | ||
|
||
}); | ||
}); |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
const electron = require('electron') | ||
const {app, BrowserWindow} = electron | ||
|
||
const path = require('path') | ||
const url = require('url') | ||
|
||
let win | ||
|
||
function createWindow(){ | ||
win = new BrowserWindow ({width: 800, height:600}) | ||
win.loadURL(url.format({ | ||
pathname: path.join(__dirname, 'index.html'), | ||
protocol: 'file', | ||
slashes: true | ||
})) | ||
|
||
win.webContents.openDevTools() | ||
} | ||
|
||
exports.openWindow = () => { | ||
let newWin = new BrowserWindow ({width: 400, height:200}) | ||
newWin.loadURL(url.format({ | ||
pathname: path.join(__dirname, 'enupal.html'), | ||
protocol: 'file', | ||
slashes: true | ||
})) | ||
} | ||
|
||
app.on('ready', createWindow) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"name": "enupal-electron", | ||
"version": "1.0.0", | ||
"description": "", | ||
"main": "index.js", | ||
"scripts": { | ||
"start" : "electron main.js" | ||
}, | ||
"author": "", | ||
"license": "ISC" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
Enupal Feed | ||
=============== | ||
|
||
Enupal Feed is an Electron app that shows the feed of enupal.com/blog | ||
|
||
|
||
Basic Usage | ||
--------------- | ||
|
||
**Step 1**: Hit composer update: | ||
```bash | ||
composer update | ||
``` | ||
|
||
**Step 2**: Execute electron: | ||
```bash | ||
npm start | ||
``` |