diff --git a/app/forms.py b/app/forms.py
index c3aacd0..6083f5a 100755
--- a/app/forms.py
+++ b/app/forms.py
@@ -25,7 +25,6 @@ class UploadForm(FlaskForm):
sameness = DecimalRangeField('sameness', default=0)
diversity = DecimalRangeField('diversity', default=0)
gender = DecimalRangeField('gender', default=50)
- time = StringField('time', [validators.Length(max=5)],default=None)
choices = [('Student', 'Student'),
('Librarian', 'Librarian'),
('Pirate', 'Pirate'),
@@ -43,6 +42,17 @@ class EditForm(FlaskForm):
year_published = StringField('year published', [validators.Length(max=4)],default=None)
file = FileField()
message = StringField('message')
+ sameness = DecimalRangeField('sameness', default=0)
+ diversity = DecimalRangeField('diversity', default=0)
+ gender = DecimalRangeField('gender', default=50)
+ choices = [('Student', 'Student'),
+ ('Librarian', 'Librarian'),
+ ('Pirate', 'Pirate'),
+ ('Teacher', 'Teacher'),
+ ('Institution', 'Institution'),
+ ('All of the above', 'All of the above'),
+ ('None of the above', 'None of the above')]
+ who = SelectField('', choices=choices, default='Student')
class ChatForm(FlaskForm):
message = StringField('message', validators=[InputRequired()])
@@ -66,7 +76,8 @@ class SearchForm(FlaskForm):
('Title', 'Title'),
('Author', 'Author'),
('Category', 'Category'),
- ('Stack', 'Stack')]
+ ('Stack', 'Stack'),
+ ('Outliers', 'Outliers')]
select = SelectField('', choices=choices, default='All')
search = StringField('', validators=[InputRequired()])
grid = SubmitField('Grid')
diff --git a/app/models.py b/app/models.py
index 68b7a23..77cb93f 100755
--- a/app/models.py
+++ b/app/models.py
@@ -46,10 +46,9 @@ class Book(db.Model):
diversity = db.Column(db.Numeric())
gender = db.Column(db.Numeric())
who = db.Column(db.String(255))
- time = db.Column(db.Numeric())
- def __init__(self, title, file, cover, fileformat, category, year_published, message, sameness, diversity, gender, who, time):
+ def __init__(self, title, file, cover, fileformat, category, year_published, message, sameness, diversity, gender, who):
self.title = title
self.file = file
self.cover = cover
@@ -64,7 +63,6 @@ class Book(db.Model):
self.diversity = diversity
self.gender = gender
self.who = who
- self.time = time
def __repr__(self):
diff --git a/app/static/css/style.css b/app/static/css/style.css
index f6d64ec..6007a9f 100755
--- a/app/static/css/style.css
+++ b/app/static/css/style.css
@@ -121,6 +121,10 @@ display: inline-block;
font-size: 10px;
}
+#ascii {
+ text-align: center;
+}
+
.library_table tr:nth-child(even){
background-color: #fafafa;
@@ -391,7 +395,7 @@ box-sizing: border-box;
justify-items: center;
}
-@media screen and (max-width: 900px) {
+@media screen and (max-width: 1000px) {
.grid{
display: grid;
grid-template-columns: 1fr 1fr 1fr 1fr;
@@ -400,11 +404,13 @@ box-sizing: border-box;
justify-items: center;
}
}
-@media screen and (max-width: 400px) {
+
+@media screen and (max-width: 600px) {
.grid{
display: grid;
- grid-template-columns: 1fr;
- align-items: center;
+ grid-template-columns: 1fr 1fr 1fr;
+ grid-gap: 2px;
+ align-items: top;
justify-items: center;
}
}
@@ -415,6 +421,7 @@ box-sizing: border-box;
align-items: center;
justify-items: center;
}
+
.gridbox:hover{
opacity: 0.5;
}
diff --git a/app/static/js/app.js b/app/static/js/app.js
index 10eb513..0a59cea 100755
--- a/app/static/js/app.js
+++ b/app/static/js/app.js
@@ -63,13 +63,34 @@ function generateTitle(elem) {
}
$(function() {
- $("#tabs").tabs().addClass("ui-tabs-vertical ui-helper-clearfix");
+ var index = 'ui-tabs-active';
+// Define friendly data store name
+var dataStore = window.sessionStorage;
+var oldIndex = 0;
+// Start magic!
+try {
+ // getter: Fetch previous value
+ oldIndex = dataStore.getItem(index);
+} catch(e) {}
+
+ $("#tabs").tabs({
+ active: oldIndex,
+ activate: function(event, ui) {
+ // Get future value
+ var newIndex = ui.newTab.parent().children().index(ui.newTab);
+ // Set future value
+ try {
+ dataStore.setItem( index, newIndex );
+ } catch(e) {}
+ }
+ });
+
+ $("#tabs").addClass("ui-tabs-vertical ui-helper-clearfix");
$("#tabs li").removeClass("ui-corner-top").addClass("ui-corner-left");
});
-
$(".no_cover").each(function() {
var string = $(this).attr('id')
var randomColor = colorHash(string).rgb
@@ -201,7 +222,7 @@ var btn = document.getElementById("myBtn");
// Get the element that closes the modal
var span = document.getElementsByClassName("close")[0];
-// When the user clicks on the button, open the modal
+// When the user clicks on the button, open the modal
btn.onclick = function() {
modal.style.display = "block";
}
diff --git a/app/templates/about.html b/app/templates/about.html
index 67aae18..67ab4db 100755
--- a/app/templates/about.html
+++ b/app/templates/about.html
@@ -6,13 +6,14 @@
XPPL is a project aimed at people who are studying the field of media culture, or as we like to call them: knowledge comrades.
-This digital library gathers all the books and articles floating around on the shelves of the Piet Zwart Institute, and our hard drives and memory sticks, so that they can be shared, annotated and grouped together into stacks...
+This digital library gathers all the books and articles floating around on the shelves of the Piet Zwart Institute, and our hard drives and memory sticks, so that they can be shared, annotated and grouped together into stacks... Its web interface hosts a curated catalogue of books and articles, and its distributed architecture provides instances for uploading and downloading.
- Its web interface hosts a curated catalogue of books and articles, and its distributed architecture provides instances for uploading and downloading.
+ It starts at XPUB, but can go anywhere we want it to.
- It starts at XPUB, but can go anywhere we want it to.
{{ stack.stack_description }}
-Created by: +
Created by: {% if stack.stack_author == None %} anon
{% else %} {{ stack.stack_author }} {% endif %}+ {% for book in stack.books %} + {% if loop.length >= 5 %} + {% if loop.index == 6 %} +
Your stack is getting a little too big. Are these next books really relevant?
+- Edit title and/or description
- - - + + + diff --git a/app/templates/show_stack_detail_tab.html b/app/templates/show_stack_detail_tab.html index cf32045..045c5d6 100644 --- a/app/templates/show_stack_detail_tab.html +++ b/app/templates/show_stack_detail_tab.html @@ -17,17 +17,12 @@ {{ stack.stack_author }} {% endif %} - -Books in this stack: {% for book in stack.books %} - +
Books in this stack: {% for book in stack.books %}