View improvements.
parent
4cb5dd95ef
commit
e635ab2c1b
|
@ -20,10 +20,14 @@ $("document").ready( function(){
|
||||||
<p>
|
<p>
|
||||||
Select a subject from navigation bar menu. Then you will be able to see, which notes are uploaded.There is link, view and download buttons click on anything you are interested in.
|
Select a subject from navigation bar menu. Then you will be able to see, which notes are uploaded.There is link, view and download buttons click on anything you are interested in.
|
||||||
</p>
|
</p>
|
||||||
<h1>Why? What for?</h1>
|
<h1>Why? What for? Motivation</h1>
|
||||||
<p>
|
<p>
|
||||||
I like digital notes. But I encountered some problems, it wasn't very comfortable. I wanted to improve it. I wanted to share, to have easy access and automated updates and maintainence. So I made nooz. I am still working on it.
|
I like digital notes. But I encountered some problems, it wasn't very comfortable. I wanted to improve it. I wanted to share, to have easy access and automated updates and maintainence. So I made nooz. I am still working on it.
|
||||||
</p>
|
</p>
|
||||||
|
<h1>How was it made?</h1>
|
||||||
|
<p>
|
||||||
|
Whole app is written in python. I used flask, amazing, fast, simple python web framework as backend. To make it look somehow I used twitter bootstrap. As database I use sqlite3.
|
||||||
|
</p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
<h2>{{ key }}</h2>
|
<h2>{{ key }}</h2>
|
||||||
{%- if subject %}
|
{%- if subject %}
|
||||||
{% for note in subject %}
|
{% for note in subject %}
|
||||||
<a href="/view/{{note.subject}}/{{note.datestring }}" ><img src="{{ url_for('static', filename=note.subject + '/' + note.datestring + '/' + note.name) }}" height="30%" class="img img-rounded" width="30%" alt=""></a>
|
<a href="/view/{{note.subject}}/{{note.datestring }}" ><img src="{{ url_for('static', filename='mini/' + note.subject + '/' + note.datestring + '/' + note.name) }}" class="img img-rounded" alt=""></a>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
|
|
|
@ -2,9 +2,62 @@
|
||||||
{% block body %}
|
{% block body %}
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
//Change active button in navbar
|
//Change active button in navbar
|
||||||
|
|
||||||
$("document").ready( function(){
|
$("document").ready( function(){
|
||||||
$("li").removeClass("active");
|
$("li").removeClass("active");
|
||||||
$("#home").addClass("active");
|
$("#home").addClass("active");
|
||||||
|
|
||||||
|
pages = [];
|
||||||
|
i=1;
|
||||||
|
$(".image").each( function() {
|
||||||
|
pages.push($(this).attr("rel"))
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
$(".image").click(function() {
|
||||||
|
var image = $(this).attr("rel");
|
||||||
|
$('#display').hide();
|
||||||
|
$('#display').fadeIn('slow');
|
||||||
|
$('#display').attr("src", image);
|
||||||
|
return false;
|
||||||
|
});
|
||||||
|
|
||||||
|
previous_page = "";
|
||||||
|
console.log(pages);
|
||||||
|
next_page = pages[1];
|
||||||
|
$(function() {
|
||||||
|
$("#newer").click(function() {
|
||||||
|
if(i < pages.length)
|
||||||
|
{
|
||||||
|
previous_page = pages[i-1];
|
||||||
|
$('#display').hide();
|
||||||
|
$('#display').fadeIn('slow');
|
||||||
|
$('#display').attr("src", next_page);
|
||||||
|
|
||||||
|
i++;
|
||||||
|
next_page = pages[i];
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
});
|
||||||
|
$("#older").click(function() {
|
||||||
|
if(i >= 2)
|
||||||
|
{
|
||||||
|
$('#display').hide();
|
||||||
|
$('#display').fadeIn('slow');
|
||||||
|
$('#display').attr("src", previous_page);
|
||||||
|
|
||||||
|
previous_page = pages[i-3];
|
||||||
|
next_page = pages[i-1]
|
||||||
|
i--;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
});
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
@ -16,13 +69,21 @@ $("document").ready( function(){
|
||||||
<a href="#" id="image">
|
<a href="#" id="image">
|
||||||
<img id="display" src="{{ url_for('static', filename=main_page_src) }}" alt="">
|
<img id="display" src="{{ url_for('static', filename=main_page_src) }}" alt="">
|
||||||
</a>
|
</a>
|
||||||
|
<ul class="pager">
|
||||||
|
<li class="previous">
|
||||||
|
<a href="" id="older">← Older</a>
|
||||||
|
</li>
|
||||||
|
<li class="next">
|
||||||
|
<a href="" id="newer">Newer →</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li class="span2">
|
<li class="span2">
|
||||||
{% for thumb in thumbs %}
|
{% for thumb in thumbs %}
|
||||||
<a href="#" rel="{{ url_for('static', filename=thumb.href) }}" class="thumbnail image">
|
<a href="#" rel="{{ url_for('static', filename=thumb.href) }}" class="thumbnail image">
|
||||||
<img src="{{ url_for('static', filename=thumb.src) }}" alt="">
|
<img src="{{ url_for('static', filename='mini/' + thumb.src) }}" alt="">
|
||||||
</a>
|
</a>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
<ul>
|
<ul>
|
||||||
<h4>Other dates...</h4>
|
<h4>Other dates...</h4>
|
||||||
|
@ -33,14 +94,18 @@ $("document").ready( function(){
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
<p>
|
<script type="text/javascript">
|
||||||
What I want todo.
|
$(function() {
|
||||||
4. make it easy download upload of notes
|
$(".image").click(function() {
|
||||||
5. add tagging and searching and subjects
|
var image = $(this).attr("rel");
|
||||||
</p>
|
$('#display').hide();
|
||||||
{% endblock %}
|
$('#display').fadeIn('slow');
|
||||||
|
$('#display').attr("src", image);
|
||||||
|
return false;
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
|
@ -11,17 +11,7 @@
|
||||||
<script src="{{ url_for('static', filename='bootstrap/js/bootstrap.js') }}"></script>
|
<script src="{{ url_for('static', filename='bootstrap/js/bootstrap.js') }}"></script>
|
||||||
<link rel=stylesheet type=text/css href="{{ url_for('static', filename='bootstrap/css/bootstrap.css') }}">
|
<link rel=stylesheet type=text/css href="{{ url_for('static', filename='bootstrap/css/bootstrap.css') }}">
|
||||||
|
|
||||||
<script type="text/javascript">
|
|
||||||
$(function() {
|
|
||||||
$(".image").click(function() {
|
|
||||||
var image = $(this).attr("rel");
|
|
||||||
$('#display').hide();
|
|
||||||
$('#display').fadeIn('slow');
|
|
||||||
$('#display').attr("src", image);
|
|
||||||
return false;
|
|
||||||
});
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
<script type=text/javascript>
|
<script type=text/javascript>
|
||||||
$SCRIPT_ROOT = {{ request.script_root|tojson|safe }};
|
$SCRIPT_ROOT = {{ request.script_root|tojson|safe }};
|
||||||
</script>
|
</script>
|
||||||
|
@ -29,8 +19,20 @@
|
||||||
<script >
|
<script >
|
||||||
|
|
||||||
$("document").ready( function() {
|
$("document").ready( function() {
|
||||||
|
$('.submenu').hover(function () {
|
||||||
|
console.log("hover");
|
||||||
|
$(this).children('ul').removeClass('submenu-hide').addClass('submenu-show');
|
||||||
|
|
||||||
|
}, function () {
|
||||||
|
console.log("hide");
|
||||||
|
$(this).children('ul').removeClass('.submenu-show').addClass('submenu-hide');
|
||||||
|
}).find("a:first").append(" » ");
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
|
@ -39,6 +41,46 @@ $("document").ready( function() {
|
||||||
padding-top: 40px;
|
padding-top: 40px;
|
||||||
padding-bottom: 40px;
|
padding-bottom: 40px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.submenu-show
|
||||||
|
{
|
||||||
|
border-radius: 3px;
|
||||||
|
display: block;
|
||||||
|
left: 95%;
|
||||||
|
margin-top: -30px !important;
|
||||||
|
moz-border-radius: 3px;
|
||||||
|
position: absolute;
|
||||||
|
webkit-border-radius: 3px;
|
||||||
|
}
|
||||||
|
.submenu-hide
|
||||||
|
{
|
||||||
|
display: none !important;
|
||||||
|
float: right;
|
||||||
|
position: relative;
|
||||||
|
top: auto;
|
||||||
|
}
|
||||||
|
.navbar .submenu-show:before
|
||||||
|
{
|
||||||
|
border-bottom: 7px solid transparent;
|
||||||
|
border-left: none;
|
||||||
|
border-right: 7px solid rgba(0, 0, 0, 0.2);
|
||||||
|
border-top: 7px solid transparent;
|
||||||
|
left: 7px;
|
||||||
|
top: 10px;
|
||||||
|
padding-left: 5px;
|
||||||
|
position: absolute;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.navbar .submenu-show:after
|
||||||
|
{
|
||||||
|
border-bottom: 6px solid transparent;
|
||||||
|
border-left: none;
|
||||||
|
border-right: 6px solid #fff;
|
||||||
|
border-top: 6px solid transparent;
|
||||||
|
left: 10px;
|
||||||
|
top: 11px;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
|
@ -77,19 +119,59 @@ $("document").ready( function() {
|
||||||
<div class="dropdown">
|
<div class="dropdown">
|
||||||
<a class="btn dropdown-toggle" data-toggle="dropdown" href="#">
|
<a class="btn dropdown-toggle" data-toggle="dropdown" href="#">
|
||||||
Date
|
Date
|
||||||
<span class="caret"></span>
|
<span class="caret"></span>
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
<ul class="dropdown-menu" role="menu" aria-labelledby="dLabel">
|
|
||||||
{% for date in all_dates %}
|
<ul class="dropdown-menu" role="menu" aria-labelledby="dLabel">
|
||||||
|
<li> submenu
|
||||||
|
<ul class="dropdown-submenu">
|
||||||
|
<li>n</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
{% for date in all_dates %}
|
||||||
<li><a href="/date/{{date }}">{{date }}</a> </li>
|
<li><a href="/date/{{date }}">{{date }}</a> </li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
<li>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
<ul class="dropdown-menu">
|
||||||
|
<li class="dropdown submenu">
|
||||||
|
<a href="#" class="dropdown-toggle" id="levelone" data-toggle="dropdown">Level 1</a>
|
||||||
|
<ul class="dropdown-menu submenu-hide">
|
||||||
|
<li class="dropdown submenu">
|
||||||
|
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Level 1.1</a>
|
||||||
|
<ul class="dropdown-menu submenu-show submenu-hide">
|
||||||
|
<li><a href="#">Level 1.1.1</a></li>
|
||||||
|
<li><a href="#">Level 1.1.2</a></li>
|
||||||
|
<li><a href="#">Level 1.1.3</a></li>
|
||||||
|
<li><a href="#">Level 1.1.4</a></li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li class="dropdown submenu">
|
||||||
|
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Level 1.2</a>
|
||||||
|
<ul class="dropdown-menu submenu-hide">
|
||||||
|
<li><a href="#">Level 1.2.1</a></li>
|
||||||
|
<li><a href="#">Level 1.2.2</a></li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li><a href="#">Level 1.3</a></li>
|
||||||
|
<li><a href="#">Level 1.4</a></li>
|
||||||
|
<li><a href="#">Level 1.5</a></li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
{% for date in all_dates %}
|
||||||
|
<li><a href="/date/{{date }}">{{date }}</a> </li>
|
||||||
|
{% endfor %}
|
||||||
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
|
|
||||||
<li>
|
<li>
|
||||||
<li id="search" ><a href="/search" >Advanced search</a></li>
|
<li id="search" ><a href="/search" >Advanced search</a></li>
|
||||||
</li>
|
</li>
|
||||||
|
@ -97,6 +179,8 @@ $("document").ready( function() {
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<br />
|
||||||
|
<br />
|
||||||
{% block body %}
|
{% block body %}
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
|
@ -1,11 +0,0 @@
|
||||||
import numpy as np
|
|
||||||
import scipy
|
|
||||||
import pylab
|
|
||||||
import pymorph
|
|
||||||
import mahotas
|
|
||||||
from scipy import ndimage
|
|
||||||
|
|
||||||
dna = mahotas.imread('dna.jpeg')
|
|
||||||
|
|
||||||
pylab.imshow(dna)
|
|
||||||
pylab.show()
|
|
Loading…
Reference in New Issue