Skip to content

Commit 2bbfefe

Browse files
committed
add about content
1 parent 157c205 commit 2bbfefe

15 files changed

Lines changed: 193 additions & 344 deletions

File tree

notebookjs/src/app.js

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ var cookieParser = require('cookie-parser');
55
var logger = require('morgan');
66

77
var indexRouter = require('./routes/index');
8-
var usersRouter = require('./routes/users');
98

109
var app = express();
1110

@@ -19,16 +18,29 @@ app.use(express.urlencoded({ extended: false }));
1918
app.use(cookieParser());
2019
app.use(express.static(path.join(__dirname, 'public')));
2120

22-
app.use('/', indexRouter);
23-
app.use('/users', usersRouter);
21+
22+
23+
app.get('/', function(req, res) {
24+
res.render('index', { title: 'Danfo Notebooks | Interactive Notebook Interface for JavaScript Developers' });
25+
});
26+
27+
28+
app.get('/getting-started', function (req, res) {
29+
res.render('getting-started', { title: 'Getting Started with Danfo Notebooks | Interactive Notebook Interface for JavaScript Developers' });
30+
});
31+
32+
app.get('/about', function (req, res) {
33+
res.render('about', { title: 'About Danfo Notebooks | Interactive Notebook Interface for JavaScript Developers' });
34+
});
35+
2436

2537
// catch 404 and forward to error handler
26-
app.use(function(req, res, next) {
38+
app.use(function (req, res, next) {
2739
next(createError(404));
2840
});
2941

3042
// error handler
31-
app.use(function(err, req, res, next) {
43+
app.use(function (err, req, res, next) {
3244
// set locals, only providing error in development
3345
res.locals.message = err.message;
3446
res.locals.error = req.app.get('env') === 'development' ? err : {};

notebookjs/src/bin/www

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,14 @@
77
var app = require('../app');
88
var debug = require('debug')('src:server');
99
var http = require('http');
10+
var opn = require('opn');
11+
1012

1113
/**
1214
* Get port from environment and store in Express.
1315
*/
1416

15-
var port = normalizePort(process.env.PORT || '3000');
17+
var port = normalizePort(process.env.PORT || '4400');
1618
app.set('port', port);
1719

1820
/**
@@ -87,4 +89,8 @@ function onListening() {
8789
? 'pipe ' + addr
8890
: 'port ' + addr.port;
8991
debug('Listening on ' + bind);
92+
console.log(`Server open at port: ${port}`);
93+
console.log(`Open http://localhost:${port} in your preferred browser to start dnotebooks`);
94+
opn(`http://localhost:${port}`);
95+
9096
}
6.24 KB
Loading
44.4 KB
Loading

notebookjs/src/public/stylesheets/style.css

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
body {
1+
/* body {
22
font: 14px "Lucida Grande", Helvetica, Arial, sans-serif;
3-
}
3+
} */
44

55
a {
66
color: #00B7FF;
@@ -57,4 +57,17 @@ a {
5757
position: absolute;
5858
left: -90px;
5959
outline: none;
60+
}
61+
62+
table.df-table {
63+
white-space: pre;
64+
}
65+
66+
table.df-table th, td {
67+
padding: 2px 5px;
68+
font-variant-numeric: tabular-nums;
69+
}
70+
71+
table.df-table .float32, .int32 {
72+
text-align: right;
6073
}

notebookjs/src/routes/index.js

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,16 @@ var router = express.Router();
33

44
/* GET home page. */
55
router.get('/', function(req, res, next) {
6-
res.render('index', { title: 'Express' });
6+
res.render('index', { title: 'Danfo Notebooks | Interactive Notebook Interface for JavaScript Developers' });
77
});
88

9+
/* GET home page. */
10+
router.get('/getting-started', function(req, res, next) {
11+
res.render('getting-started', { title: 'Getting Started with Danfo Notebooks | Interactive Notebook Interface for JavaScript Developers' });
12+
});
13+
14+
/* GET home page. */
15+
router.get('/about', function(req, res, next) {
16+
res.render('about', { title: 'About Danfo Notebooks | Interactive Notebook Interface for JavaScript Developers' });
17+
});
918
module.exports = router;

notebookjs/src/routes/users.js

Lines changed: 0 additions & 9 deletions
This file was deleted.

notebookjs/src/views/about.hbs

Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
<div class="container">
2+
<div class="row">
3+
<div class="col-md-8">
4+
<div class="jumbotron jumbotron-fluid">
5+
<div class="container">
6+
<h1 class="">About Dnotebook</h1>
7+
<p class="">
8+
Danfo Notebook (Dnotebook) is an open-source project, born out of the need to perform quick and
9+
interactive experimentation/prototyping with <a href="https://danfo.jsdata.org/">Danfo.js</a>.
10+
DNotebook is a similar to the popular <a href="https://jupyter.org/">Jupyter Notebook</a>
11+
but is customized for the JavaScript environment. Dnotebook is part of our grand vision at
12+
<a href="https://github.com/opensource9ja">JSdata</a> to bring more Data Science and Machine
13+
Learning tools to the JavaScript ecosystem.
14+
</p>
15+
</div>
16+
</div>
17+
</div>
18+
<div class="col-md-4">
19+
<img style="width: 400px; height: 300px; border-radius: 100px;" src="images/dnotebook.png" />
20+
</div>
21+
</div>
22+
<hr>
23+
<div class="row">
24+
<div class="col-md-8">
25+
<h3> What can it be used for?</h3>
26+
<p>
27+
DNotebook allows you to create and share pages that contain live code, text and visualizations in textbook-like manner.
28+
</p>
29+
</div>
30+
<div class="col-md-6">
31+
<div class="card mb-3" style="max-width: 540px;">
32+
<div class="row no-gutters">
33+
34+
<div class="col-md-12">
35+
<div class="card-body">
36+
<h5 class="card-title">Data Science/Analysis</h5>
37+
<p class="card-text">Easily perform interactive data exploration and analysis using efficient JavaScript
38+
packages like Danfo.js.
39+
</p>
40+
</div>
41+
</div>
42+
</div>
43+
</div>
44+
</div>
45+
<div class="col-md-6">
46+
<div class="card mb-3" style="max-width: 540px;">
47+
<div class="row no-gutters">
48+
49+
<div class="col-md-12">
50+
<div class="card-body">
51+
<h5 class="card-title">Machine Learning</h5>
52+
<p class="card-text">Easily build, train and prototype machine learning models using different tools like Tensorflow.js</p>
53+
</div>
54+
</div>
55+
</div>
56+
</div>
57+
</div>
58+
<div class="col-md-6">
59+
<div class="card mb-3" style="max-width: 540px;">
60+
<div class="row no-gutters">
61+
62+
<div class="col-md-12">
63+
<div class="card-body">
64+
<h5 class="card-title">Learning JavaScript Interactively</h5>
65+
<p class="card-text">Learn/teach JavaScript in an interactive/visual style. This can hasten learning and understanding.</p>
66+
</div>
67+
</div>
68+
</div>
69+
</div>
70+
</div>
71+
<div class="col-md-6">
72+
<div class="card mb-3" style="max-width: 540px;">
73+
<div class="row no-gutters">
74+
75+
<div class="col-md-12">
76+
<div class="card-body">
77+
<h5 class="card-title">Plain Experimentation/Prototype</h5>
78+
<p class="card-text">Any experimentation performed in JavaScript can run on Dnotebooks. </p>
79+
</div>
80+
</div>
81+
</div>
82+
</div>
83+
</div>
84+
</div>
85+
<hr>
86+
<div class="row">
87+
<div class="col-md-8">
88+
<h3> Creators and Core Maintainers</h3>
89+
90+
<p class="">
91+
Dnotebooks was created by <a href="https://twitter.com/risingodegua">Rising Odegua</a> and <a href="https://twitter.com/steveoni">Stephen Oni</a>. It is actively maintained by them as
92+
well. If you're looking to contribute to making it better, you can raise issues here.
93+
94+
Dnotebook is hosted on <a href="https://github.com/opensource9ja/notebookjs">GitHub</a>.
95+
</p>
96+
</div>
97+
</div>
98+
</div>

notebookjs/src/views/error.hbs

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1-
<h1>{{message}}</h1>
1+
{{!-- <h1>{{message}}</h1>
22
<h2>{{error.status}}</h2>
3-
<pre>{{error.stack}}</pre>
3+
<pre>{{error.stack}}</pre> --}}
4+
5+
<div class="container">
6+
<div class="row">
7+
<div class="col-md-12 text-center">
8+
<img src="images/error.png"/>
9+
</div>
10+
</div>
11+
</div>
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
gettt

0 commit comments

Comments
 (0)