Commit 4a29ab52 authored by colm's avatar colm

the weekends work, will ref the issues later

parent 67974164

Too many changes to show.

To preserve performance only 1000 of 1000+ files are displayed.
from flask import Flask, render_template, redirect
from flask import Flask, render_template, redirect, url_for
import csv
import os
import glob
......@@ -14,6 +14,7 @@ pattern4 = r'(peut\-être)'
replace0 = r'<span class="uncertain_match">\1</span>'
replace1 = r'<span class="uncertain_match"> \1</span>'
uncertainlist = glob.glob('static/word_patterns/*.csv')
full_dict = {}
full_counter = 0
......@@ -29,8 +30,8 @@ for file in uncertainlist:
row[11] = re.sub(pattern4, replace0, row[11])
row[11] = re.sub(pattern0, replace0, row[11])
row[11] = re.sub(pattern1, replace0, row[11])
row[11] = re.sub(pattern2, replace0, row[11])
row[11] = re.sub(pattern3, replace1, row[11])
# row[11] = re.sub(pattern2, replace0, row[11])
# row[11] = re.sub(pattern3, replace1, row[11])
currentlist.append(row)
full_counter += 1
full_dict[filename] = currentlist
......@@ -54,6 +55,14 @@ def home():
return render_template("index.html", full_dict=full_dict, uncertainlist=uncertainlist, csv_file=csv_file, file=file, full_counter=full_counter, amounts=amounts)
@app.route('/collection')
def collection():
return render_template("collection.html", full_counter=full_counter, uncertainlist=uncertainlist, file=file, amounts=amounts)
@app.route('/collection/')
def redirectCollection():
return redirect(url_for('collection'))
@app.route('/collection/<uncertain>')
def word_pattern(uncertain):
uncertainlist = glob.glob('static/word_patterns/*.csv')
......@@ -74,13 +83,21 @@ def word_pattern(uncertain):
def about():
return render_template("about.html", full_counter=full_counter, uncertainlist=uncertainlist, file=file, amounts=amounts)
@app.route('/about/')
def redirectAbou():
return redirect(url_for('about'))
@app.route("/news")
def news():
return render_template("news.html", full_dict=full_dict, full_counter=full_counter, amounts=amounts)
@app.route('/news/')
def redirectNews():
return redirect(url_for('news'))
@app.errorhandler(404)
def not_found(error):
return render_template('error.html'), 404
if __name__ == '__main__':
app.run(host='0.0.0.0', port='5001')
app.run(host='0.0.0.0', port='5001', debug=True)
......@@ -8,6 +8,8 @@ var typed = new Typed('#main-title', {
loop: true
});
// expand filter area
$(".passepartout").hover(function(){
var itemNo = $(this).attr('class').split(' ')[1];
var itemTitle = $(this).attr('title')
......@@ -32,6 +34,8 @@ $("span.description").hover(function(){
$(".passepartout." + itemNo).css("filter", "greyscale(1) !important");
});
// Date & Time widgets
updateTime();
var update = setInterval(updateTime, 1000);
function updateTime(){
......@@ -46,6 +50,8 @@ function setDate(){
document.getElementById('date').innerHTML=date;
}
// chartJS in footer
var ctx = document.getElementById('myChart').getContext('2d');
var chart = new Chart(ctx, {
type: 'line',
......@@ -73,12 +79,36 @@ var chart = new Chart(ctx, {
}
});
// smooth scrolling on index
document.querySelectorAll('a[href^="#"]').forEach(anchor => {
anchor.addEventListener('click', function (e) {
e.preventDefault();
document.querySelector(this.getAttribute('href')).scrollIntoView({
behavior: 'smooth'
});
});
});
// filter by language
$(".toggle-FR").on("click", function(){
$(this).toggleClass("striked");
$(".language-Français").toggle();
});
$(".toggle-NL").on("click", function(){
$(this).toggleClass("striked");
$(".language-Nederlands").toggle();
});
$(".toggle-EN").on("click", function(){
$(this).toggleClass("striked");
$(".language-English").toggle();
});
$(document).ready(function(){
$('.expand-filters').click(function(){
$(".main-area").toggleClass("ANYTHING");
});
});
......@@ -111,14 +111,36 @@ ul {
}
div.main-nav {
min-height: 8vh;
height: 8vh;
margin-top: 0.55em;
margin-bottom: 0.55em;
min-height: 9vh;
height: 9vh;
}
.lt-ie9 div.main-nav {
margin-top: 2.2em;
margin-bottom: 1.1em;
}
@media screen and (min-width: 1364px) {
div.main-nav {
margin-top: 2.2em;
margin-bottom: 1.1em;
}
}
div.main-nav h1 {
margin-top: 0.275em;
line-height: 0.9em !important;
font-size: 1.5em;
}
.lt-ie9 div.main-nav h1 {
font-size: 2.5em;
}
@media screen and (min-width: 1364px) {
div.main-nav h1 {
font-size: 2.5em;
}
}
div.main-nav h1 span.title-uncertain {
line-height: 0.9em !important;
color: #e6e619;
}
div.main-nav .row {
......@@ -132,15 +154,37 @@ div.top-left-context ul, div.top-right-context ul {
list-style-type: none;
}
div.top-left-context ul li, div.top-right-context ul li {
font-size: 1.6em !important;
font-size: 1em !important;
margin: 0 !important;
line-height: 1em;
margin: 0 !important;
margin-bottom: 0.4em;
}
.lt-ie9 div.top-left-context ul li, .lt-ie9 div.top-right-context ul li {
font-size: 1.6em !important;
}
@media screen and (min-width: 1364px) {
div.top-left-context ul li, div.top-right-context ul li {
font-size: 1.6em !important;
}
}
div.top-right-context {
text-align: right;
}
div.top-left-context {
display: none;
}
.lt-ie9 div.top-left-context {
display: block;
}
@media screen and (min-width: 600px) {
div.top-left-context {
display: block;
}
}
span.uncertain_match {
color: #e6e619;
}
......@@ -159,9 +203,43 @@ div.hp-half::-webkit-scrollbar-thumb:vertical {
background-color: black;
}
div.white-row {
div.whiterow, div.white-row {
background-color: white;
height: 75vh;
overflow-y: scroll;
webkit-scrollbar-width: thin;
scrollbar-width: thin;
scrollbar-color: black #e6e619;
}
div.whiterow ::-webkit-scrollbar, div.white-row ::-webkit-scrollbar {
width: 6px;
height: 6px;
}
div.whiterow ::-webkit-scrollbar-track-piece, div.white-row ::-webkit-scrollbar-track-piece {
background-color: #e6e619;
}
div.whiterow ::-webkit-scrollbar-thumb:vertical, div.white-row ::-webkit-scrollbar-thumb:vertical {
height: 30px;
background-color: black;
}
.collection-page {
color: black;
}
.collection-page b {
color: black !important;
font-family: AntiqueNobleRegular;
}
.collection-page a {
color: grey;
}
.collection-page .graph {
margin-top: 2.2em;
margin-bottom: 2.2em;
}
.whiterowsmaller {
height: 60vh;
}
div.hp-half {
......@@ -191,11 +269,27 @@ div.hp-half-right div.text-container a {
color: black;
}
div.hp-half-right div.text-container .description {
font-size: 0.9em;
}
.lt-ie9 div.hp-half-right div.text-container .description {
font-size: 1.1em;
}
@media screen and (min-width: 1364px) {
div.hp-half-right div.text-container .description {
font-size: 1.1em;
}
}
div.hp-half-right div.text-container .description span {
font-size: 0.9em;
}
.lt-ie9 div.hp-half-right div.text-container .description span {
font-size: 1.1em;
}
@media screen and (min-width: 1364px) {
div.hp-half-right div.text-container .description span {
font-size: 1.1em;
}
}
div.hp-half-right div.text-container .description:hover {
color: grey;
}
......@@ -231,6 +325,7 @@ img.large-thumbnail {
}
div.reg-page-container {
overflow-y: scroll;
padding-top: 40px;
font-size: 1.2em;
color: black;
......@@ -246,9 +341,26 @@ div.reg-page-container a {
}
.lower-nav {
font-size: 0.8em;
background-color: black;
position: fixed;
width: 100%;
margin-top: 0.55em;
/* Hide the browser's default checkbox */
/* Create a custom checkbox */
/* On mouse-over, add a grey background color */
/* When the checkbox is checked, add a blue background */
/* Create the checkmark/indicator (hidden when not checked) */
/* Show the checkmark when checked */
/* Style the checkmark/indicator */
}
.lt-ie9 .lower-nav {
font-size: 1em;
}
@media screen and (min-width: 1364px) {
.lower-nav {
font-size: 1em;
}
}
.lower-nav .row {
width: 100%;
......@@ -262,6 +374,63 @@ div.reg-page-container a {
.lower-nav .language-select {
text-align: right;
}
.lower-nav .expand-filters a {
text-align: left;
}
.lower-nav .container {
display: block;
position: relative;
cursor: pointer;
padding-left: 14px;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
.lower-nav .container input {
position: absolute;
opacity: 0;
cursor: pointer;
height: 0;
width: 0;
}
.lower-nav .checkmark {
position: absolute;
top: 4px;
left: 0;
height: 10px;
width: 10px;
background-color: white;
}
.lower-nav .container:hover input ~ .checkmark {
background-color: #ccc;
}
.lower-nav .container input:checked ~ .checkmark {
background-color: #e6e619;
}
.lower-nav .checkmark:after {
content: "";
position: absolute;
display: none;
}
.lower-nav .container input:checked ~ .checkmark:after {
display: block;
}
.lower-nav .container .checkmark:after {
left: 4px;
top: 0px;
width: 4px;
height: 10px;
border: solid black;
border-width: 0 3px 3px 0;
-webkit-transform: rotate(45deg);
-ms-transform: rotate(45deg);
transform: rotate(45deg);
}
.striked {
text-decoration: line-through;
}
/* ::Import styles */
/* ------------------------------------------------------------ */
......@@ -906,9 +1075,9 @@ input[type="checkbox"]:focus {
display: inline-block;
}
}
@media screen and (min-width: 1300px) {
@media screen and (min-width: 1364px) {
.row {
width: 1300px;
width: 1364px;
}
}
.lt-ie9 .row {
......
......@@ -21,7 +21,7 @@ $b-vp : 420px; // up one
$c-vp : 600px; // up two
$d-vp : 900px; // up three
$e-vp : 1100px; // up four
$f-vp : 1300px; // up five
$f-vp : 1364px; // up five
$ie-fixed-vp : 980px; // Viewport for IE fixed width
$max-vp : $f-vp; // max viewport. Syntactically makes for a nicer option
......
......@@ -45,14 +45,26 @@ ul{
list-style-type: none !important;
}
div.main-nav{
min-height: 8vh;
height: 8vh;
@include leader(8);
@include leader(2);
@include trailer(2);
min-height: 9vh;
height: 9vh;
@include respond-to($f-vp){
@include leader(8);
@include trailer(4);
}
h1{
// text-align: center;
font-size: 2.5em;
@include leader(1);
line-height: 0.9em !important;
font-size: 1.5em;
@include respond-to($f-vp){
font-size: 2.5em;
}
span.title-uncertain{
line-height: 0.9em !important;
color: $project-yellow;
@include respond-to($f-vp){
}
}
}
.row{
......@@ -65,20 +77,29 @@ div.top-left-context, div.top-right-context{
ul{
list-style-type: none;
li{
font-size: 1.6em !important;
font-size: 1em !important;
margin: 0 !important;
line-height: 1em;
@include respond-to($f-vp){
font-size: 1.6em !important;
}
margin: 0 !important;
margin-bottom: 0.4em;
}
}
}
div.top-left-context{
}
div.top-right-context{
text-align: right;
}
div.top-left-context{
display: none;
@include respond-to($c-vp){
display: block;
}
}
span.uncertain_match{
color: $project-yellow;
}
......@@ -87,17 +108,55 @@ div.hp-half::-webkit-scrollbar {
width: 6px;
height: 6px;
}
div.hp-half::-webkit-scrollbar-track-piece {
background-color: $sb-backg;
}
div.hp-half::-webkit-scrollbar-thumb:vertical {
height: 30px;
background-color: $sb-forg;
}
div.white-row{
div.whiterow, div.white-row{
background-color: white;
height: 75vh;
overflow-y: scroll;
webkit-scrollbar-width: thin;
scrollbar-width: thin;
scrollbar-color: $sb-forg $sb-backg;
::-webkit-scrollbar {
width: 6px;
height: 6px;
}
::-webkit-scrollbar-track-piece {
background-color: $sb-backg;
}
::-webkit-scrollbar-thumb:vertical {
height: 30px;
background-color: $sb-forg;
}
}
.collection-page{
color: black;
b{
color: black !important;
font-family: AntiqueNobleRegular;
}
a{
color: grey;
}
.graph{
@include leader(8);
@include trailer(8);
}
}
.whiterowsmaller{
height: 60vh;
}
div.hp-half{
......@@ -125,10 +184,16 @@ div.hp-half-right{
color: black;
}
.description{
font-size: 1.1em;
span{
font-size: 0.9em;
@include respond-to($f-vp){
font-size: 1.1em;
}
span{
font-size: 0.9em;
@include respond-to($f-vp){
font-size: 1.1em;
}
}
}
.description:hover{
color: grey;
......@@ -172,6 +237,7 @@ img.large-thumbnail{
}
div.reg-page-container{
overflow-y: scroll;
padding-top: 40px;
font-size: 1.2em;
color: black;
......@@ -187,6 +253,11 @@ div.reg-page-container{
}
.lower-nav{
font-size: 0.8em;
background-color: black;
@include respond-to($f-vp){
font-size: 1em;
}
position: fixed;
width: 100%;
@include leader(2);
......@@ -202,6 +273,79 @@ div.reg-page-container{
.language-select{
text-align: right;
}
.expand-filters{
a{
text-align: left;
}
}
.container {
display: block;
position: relative;
cursor: pointer;
padding-left: 14px;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
/* Hide the browser's default checkbox */
.container input {
position: absolute;
opacity: 0;
cursor: pointer;
height: 0;
width: 0;
}
/* Create a custom checkbox */
.checkmark {
position: absolute;
top: 4px;
left: 0;
height: 10px;
width: 10px;
background-color: white;
}
/* On mouse-over, add a grey background color */
.container:hover input ~ .checkmark {
background-color: #ccc;
}
/* When the checkbox is checked, add a blue background */
.container input:checked ~ .checkmark {
background-color: $project-yellow;
}