Commit c1dba2ab authored by colm's avatar colm

initial commit:

* flask website structure
* virtualenv requirements (too generous probably but started offline)
* one scraped example using 'probalb*' for starter data
* a static folder for website resoures
parent 41dc19b2
Pipeline #449 canceled with stages
from flask import Flask, render_template, redirect
import csv
# from feeds import commits
app = Flask(__name__)
@app.route("/")
def home():
path_to_imgs='probabl/'
data_file = open('scrape_probabl.csv')
csv_file = csv.reader(data_file)
return render_template("index.html", csv_file=csv_file, path_to_imgs=path_to_imgs)
# , all_found_items=all_found_items, collectionName=collectionName, inventoryNb=inventoryNb, objectTitle=objectTitle, objectCulture=objectCulture, geography=geography, dating=dating, material=material, technique=technique, dimensions=dimensions, legalRightOwner=legalRightOwner, url=url, imageurl=imageurl, image=image
@app.errorhandler(404)
def not_found(error):
return render_template('error.html'), 404
if __name__ == '__main__':
app.run(host='0.0.0.0', debug=True)
APScheduler==3.3.1
beautifulsoup4==4.6.0
bs4==0.0.1
click==6.7
feedparser==5.2.1
Flask==0.12.2
itsdangerous==0.24
Jinja2==2.9.6
MarkupSafe==1.0
#pkg-resources==0.0.0
pytz==2017.2
six==1.10.0
tzlocal==1.4
urllib3==1.21.1
Werkzeug==0.12.2
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
document.addEventListener("DOMContentLoaded",function(){console.log("document loaded"),$(".toggle-visible").click(function(){console.log(this),$(this).removeAttr("href"),$(this).next("div.commit-content").slideToggle()}),$(".more-commits").click(function(){$(this).removeAttr("href"),$("div.more-git-commits").slideToggle()}),$(".more-commits").click(function(){"↓ more commits"==$(this).text()?$(this).text("↑ less commits"):$(this).text("↓ more commits")}),$("#about").click(function(){$(this).removeAttr("href"),$("div.about").slideToggle()})});
\ No newline at end of file
This diff is collapsed.
# Require any additional compass plugins here.
# -----------------------------------------------------------------------------
project_path = File.expand_path("..",File.dirname(__FILE__))
# Set this to the root of your project when deployed:
# -----------------------------------------------------------------------------
http_path = "/"
css_dir = "./static/build"
sass_dir = "./static/css"
images_dir = "./static/imgs"
javascripts_dir = "./static/js"
#svg_dir = "assets/svg"
#fonts_dir = "assets/fonts"
# Output style and comments
# -----------------------------------------------------------------------------
# You can select your preferred output style here (can be overridden via the command line):
# output_style = :expanded or :nested or :compact or :compressed
# Over-ride with force compile to change output style with: compass compile --output-style compressed --force
output_style = :expanded
line_comments = false
cache = true
color_output = false # required for Mixture
require 'sass-globbing'
# SASS core
# -----------------------------------------------------------------------------
# Chrome needs a precision of 7 to round properly
Sass::Script::Number.precision = 7
{"version":3,"sources":["css"],"names":[],"mappings":";;AAEA;EACE,kBAAkB;EAClB,eAAe;EACf,cAAc;EACd,+CAA+C;EAC/C,yBAAyB;CAC1B;;AAED;EACE,qBAAqB;EACrB,mBAAmB;EACnB,qBAAc;EAAd,qBAAc;EAAd,cAAc;CACf;;AAED;EACE,eAAe;CAChB;;AACD;EACE;IACE,WAAW;GACZ;CACF","file":"css","sourcesContent":["\n\n.grid {\n max-width: 1600px;\n margin: 0 auto;\n display: grid;\n grid-template-columns: 16% 16% 16% 16% 16% 16%;\n outline: 1px dashed grey;\n}\n\n.item__detail {\n grid-column-start: 1;\n grid-column-end: 2;\n display: flex;\n}\n\n.item {\n grid-column: 3;\n}\n@media print {\n html {\n width: 50%;\n }\n}\n:root {\n --mainColor: red;\n}"]}
\ No newline at end of file
@import "libs/settings";
@import "libs/mixins";
@import "libs/placeholders";
@include grid; // Include the grid mixin
// ------------------------------------------------------------
// Standard row
// Rows should contain columns as children
// You can use multiple grid denominations within each breakpoint, but each breakpoint must have unique column set-up
// For example, you can have a 6 and 8 column grid at breakpoint b, but you can't use 6 or eight columns in other breakpoints
.row {
@extend %pie-clearfix;
position: relative;
margin-left: auto;
margin-right: auto;
padding-left: $internal-spacing/2; // Narrower for smaller screens
padding-right: $internal-spacing/2; // Narrower for smaller screens
@include respond-to($b-vp, $IE9: false) {
min-width: $b-vp;
@include grid_columns(2); // Two column grid
}
@include respond-to($c-vp, $IE9: false) {
padding-left: $internal-spacing;
padding-right: $internal-spacing;
min-width: $c-vp;
@include grid_columns(6); // Six column grid
}
@include respond-to($d-vp, $IE9: false) {
min-width: $d-vp;
@include grid_columns(8); // Eight column grid
}
@include respond-to($e-vp, $IE9: false) {
min-width: $e-vp;
@include grid_columns(12); // Twelve column grid
}
@include respond-to($max-vp, $IE9: false) {
width: $f-vp;
}
// IE less than 9
.lt-ie9 & {
@include grid_columns(12); // Twelve column grid
width: $ie-fixed-vp;
}
}
// Drag row left to allow for equal spaced grid. AKA gutters
// Gutters set in mixins.scss file
.row__colspaced {
position: relative;
@extend %pie-clearfix;
@include respond-to($start-columns) {
min-width: (100% + $internal-spacing-percent);
left: -$internal-spacing-percent;
}
.lt-ie9 & {
max-width: 100%;
min-width: auto;
left: auto;
}
}
\ No newline at end of file
@import "libs/settings";
@import "libs/mixins";
@import "libs/placeholders";
// ------------------------------------------------------------
// Typset size modules
// ------------------------------------------------------------
.as-heading__headline { @include adjust-font-size-to($alpha); }
.as-heading__largest { @include adjust-font-size-to($beta); }
.as-heading__large { @include adjust-font-size-to($gamma); }
.as-heading__medium { @include adjust-font-size-to($delta); }
.as-heading__normal { @include adjust-font-size-to($epsilon); }
.as-heading__small { @include adjust-font-size-to($zeta); }
.as-heading__smallest { @include adjust-font-size-to($eta); }
.as-blockquote { @include adjust-font-size-to($quote); line-height: normal; p { margin: 0; font-style: italic; } }
.as-para { @include adjust-font-size-to($para); }
// ------------------------------------------------------------
// Typesetting & rhythm matching
// ------------------------------------------------------------
// Set rhythm for headers
.as-heading__headline--typeset { margin: 0 0 rhythm(3, $alpha) 0; }
.as-heading__largest--typeset { margin: 0 0 rhythm(3, $beta) 0; }
.as-heading__large--typeset { margin: 0 0 rhythm(3, $gamma) 0; }
.as-heading__medium--typeset { margin: 0 0 rhythm(3, $delta) 0; }
.as-heading__normal--typeset { margin: 0 0 rhythm(3, $epsilon) 0; }
.as-heading__small--typeset { margin: 0 0 rhythm(3, $zeta) 0; }
.as-heading__smallest--typeset { margin: 0 0 rhythm(3, $eta) 0; }
// Set rhythm for paragraphs and lists
.as-para--typeset { margin: 0 0 rhythm(2, $para) 0; }
.as-list--typeset { margin: 0 0 rhythm(2, $para) 0; }
.as-unordered-list--typeset { @extend .as-list--typeset; margin-left: 1em; @include unordered; }
.as-ordered-list--typeset { @extend .as-unordered-list--typeset; @include ordered; }
.as-blockquote--typeset { @extend .as-blockquote; margin: rhythm(6, $quote) 0; }
// Use on parent element to style elements within. E.g an article page
.is-typeset {
.headline { @extend .as-heading__headline; @extend .as-heading__headline--typeset; }
h1 { @extend .as-heading__largest; @extend .as-heading__largest--typeset; }
h2 { @extend .as-heading__large; @extend .as-heading__large--typeset; }
h3 { @extend .as-heading__medium; @extend .as-heading__medium--typeset; }
h4 { @extend .as-heading__normal; @extend .as-heading__normal--typeset; }
h5 { @extend .as-heading__small; @extend .as-heading__small--typeset; }
h6 { @extend .as-heading__smallest; @extend .as-heading__smallest--typeset; }
p { @extend .as-para--typeset; }
ol { @extend .as-ordered-list--typeset; }
ul { @extend .as-unordered-list--typeset; }
li { @extend .as-list--typeset; }
blockquote { @extend .as-blockquote--typeset; }
}
ul.feedEkList{
list-style-type: none;
margin-left: 0px;
margin-top: -6px;
}
.feedEkList li{
border-bottom:1px dashed $action;
padding-top:5px;
padding-bottom:5px;
}
.feedEkList li:last-child{border-bottom:none;}
div.itemTitle{
a{
border: 2px solid #000;
padding: 8px;
margin-top: 10px;
line-height: 60px;
font-size: 1.5em;
}
}
div#divgithub{
div.itemDate{
display: none;
}
.feedEkList li:last-child{
border-bottom:none;
}
.itemDate{
font-size:11px;
color:#AAAAAA;
}
}
div.itemDate{
}
div.itemContent{
ul{
list-style-type: none;
}
img{
display: none;
}
a{
text-decoration: underline;
}
.a:before {
content: "https://github.com/";
}
blockquote{
font-size: 1.2em;
}
}
section.feed-aggregation{
div.itemTitle{
a{
border: 2px solid #000;
padding: 4px;
margin-top: 10px;
line-height: 34px;
font-size: 1em;
}
}
}
// ------------------------------------------------------------
// Forms
// ------------------------------------------------------------
label, legend, select {
display: block;
}
input[type="search"]::-webkit-search-decoration,
input[type="search"]::-webkit-search-cancel-button {
-webkit-appearance: none;
}
textarea {
overflow: auto;
vertical-align: top;
}
input[type="radio"],
input[type="checkbox"] {
margin: 4px 0 0;
margin-top: 1px \9;
*margin-top: 0;
line-height: normal;
cursor: pointer;
}
input[type="file"],
input[type="image"],
input[type="submit"],
input[type="reset"],
input[type="button"],
input[type="radio"],
input[type="checkbox"] {
width: auto;
}
select,
input[type="file"] {
*margin-top: 4px; /* In IE7, the height of the select element cannot be changed by height, only font-size */
}
select:focus,
input[type="file"]:focus,
input[type="radio"]:focus,
input[type="checkbox"]:focus {
outline: thin dotted #333;
outline: 5px auto -webkit-focus-ring-color;
outline-offset: -2px;
}
\ No newline at end of file
// ------------------------------------------------------------
// Mixins
// ------------------------------------------------------------
// -------------------------------------------------------
// List styles
// -------------------------------------------------------
// Mixins for list style types
@mixin unordered {
list-style-position: outside;
list-style-type: disc;
}
@mixin unordered-inside {
list-style-position: inside;
list-style-type: disc;
}
@mixin ordered {
list-style-position: outside;
list-style-type: decimal;
}
@mixin ordered-inside {
list-style-position: inside;
list-style-type: decimal;
}
@mixin nobullet {
list-style-type: none;
}
// -------------------------------------------------------
// Transitions
// -------------------------------------------------------
@mixin _transition($prop:all, $duration:0.2s, $timing:ease-in-out, $delay:0s) {
@include transition($prop $duration $timing $delay);
}
// -------------------------------------------------------
// Link hover styles
// -------------------------------------------------------
@mixin link-active-styles {
&:hover, &:focus, &:active {
@content;
}
}
// -------------------------------------------------------
// Align things vertically (http://zerosixthree.se/vertical-align-anything-with-just-3-lines-of-css/)
// -------------------------------------------------------
@mixin vertical-align {
position: relative;
top: 50%;
-webkit-transform: translateY(-50%);
-ms-transform: translateY(-50%);
transform: translateY(-50%);
}
// -------------------------------------------------------
// Media queries
// -------------------------------------------------------
// Reference widths from settings file
@mixin respond-to($media-min, $IE9: true) {
@if $IE9 == true {
.lt-ie9 & {
@content;
}
@media screen and (min-width: $media-min) {
@content;
}
}
@else {
@media screen and (min-width: $media-min) {
@content;
}
}
}
@mixin respond-to-max($media-max, $IE9: true) {
@if $IE9 == true {
.lt-ie9 & {
@content;
}
@media screen and (max-width: $media-max - 1px) {
@content;
}
}
@else {
@media screen and (max-width: $media-max - 1px) {
@content;
}
}
}
@mixin respond-to-min-max($media-min, $media-max, $IE9: true) {
@if $IE9 == true {
.lt-ie9 & {
@content;
}
@media screen and (min-width: $media-min) and (max-width: $media-max) {
@content;
}
}
@else {
@media screen and (min-width: $media-min) and (max-width: $media-max) {
@content;
}
}
}
// -------------------------------------------------------
// Retina images
// -------------------------------------------------------
// Usage: Send path, image name, and width and height.
// Name retina images [name]2x.
@mixin image-2x($image, $width, $height) {
@media (min--moz-device-pixel-ratio: 1.3),
(-o-min-device-pixel-ratio: 2.6/2),
(-webkit-min-device-pixel-ratio: 1.3),
(min-device-pixel-ratio: 1.3),
(min-resolution: 1.3dppx) {
/* on retina, use image that's scaled by 2 */
background-image: url($image);
background-size: $width $height;
}
}
// -------------------------------------------------------
// HEX to RGB
// -------------------------------------------------------
// http://codepen.io/sturobson/pen/hdKyv
@mixin rgba($color, $value) {
background-color: $color;
background-color: rgba($color, $value);
}
// -------------------------------------------------------
// Grid
// -------------------------------------------------------
// Generate columns names span-#
// Called by: @include grid_columns(#) where # is the amount of columns needed
// Perfect for use in breakpoints to use different columns
@mixin grid_columns($columns){
@for $i from 1 through $columns{
.colspan#{$columns}-#{$i}{
width: ((100% / $columns)*$i);
}
}
@for $i from 1 through $columns{
.push#{$columns}-#{$i}{
margin-left: ((100% / $columns)*$i);
}
}
@for $i from 1 through $columns{
.pull#{$columns}-#{$i}{
margin-right: ((100% / $columns)*$i);
}
}
.push-disable#{$columns}{
margin-left: 0;
}
.pull-disable#{$columns}{
margin-right: 0;
}
.hide-at#{$columns} {
display: none;
}
.block-show-at#{$columns} {
display: block;
}
.inline-show-at#{$columns} {
display: inline;
display: inline-block;
}
}
@mixin grid {
// Widths
*[class*="colspan"] {
width: 100%;
display: block;
}
// Floats
*[class*="as-grid"] {
float: left;
display: inline;
display: inline-block;
}
// Gutters
*[class*="with-gutter"] {
@include respond-to($start-columns) {
padding-left: $internal-spacing-percent;
}
}
}
\ No newline at end of file
// ------------------------------------------------------------
// Placeholders
// ------------------------------------------------------------
// Show / hides
%is-hidden { display: none; }
%is-shown-block { display: block; }
%is-shown-inline { display: inline; display: inline-block; }
// Type and rhythm
%is-uppercase { text-transform: uppercase; letter-spacing: 1px; }
%is-lowercase { text-transform: lowercase; }
%is-titlecase { letter-spacing: -1px; }
%no-leader { margin-top: 0; }
%no-trailer { margin-bottom: 0; }
// Clearfixes
%clearfix { @include clearfix; }
%pie-clearfix { @include pie-clearfix; }
// Images
%max-width { max-width: 100%; height: auto; }
@import "compass/typography/vertical_rhythm";
@import "compass/css3";
@import "compass/utilities";
\ No newline at end of file
// Global reset
// -----------------------------------------------------------
*, *:before, *:after { @include box-sizing(border-box); }
html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, canvas, details, embed, figure, figcaption, footer, header, hgroup, menu, nav, output, ruby, section, summary, time, mark, audio, video { margin: 0; padding: 0; border: 0; font: inherit; font-size: 100%; vertical-align: baseline; }
table { border-collapse: collapse; border-spacing: 0; }
caption, th, td { text-align: left; font-weight: normal; vertical-align: middle; }
q, blockquote { quotes: none; }
q:before, q:after, blockquote:before, blockquote:after { content: ""; content: none; }
a img { border: none; }
article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section, summary { display: block; }
// Forms. If no forms, remove these bad boys
// -----------------------------------------------------------
button, input { line-height: normal; }
button, input, select, textarea { font-size: 100%; margin: 0; vertical-align: baseline; *vertical-align: middle; }
button, input[type="button"], input[type="reset"], input[type="submit"] { cursor: pointer; *overflow: visible; }
button::-moz-focus-inner, input::-moz-focus-inner { border: 0; padding: 0; }
textarea { overflow: auto; vertical-align: top; resize: vertical; }
\ No newline at end of file
// ------------------------------------------------------------
// Settings
// :: Breakpoints
// :: Colour
// :: Typography
// :: Borders
// :: Spacing
// ------------------------------------------------------------
// ------------------------------------------------------------
// :: Breakpoints
// ------------------------------------------------------------
// a-z viewports. Place where design should change, not always on device widths
// Hat-tip to @hereinthehive for getting us thinking about naming suggestions
$a-vp : 300px; // first viewport
$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
$ie-fixed-vp : 980px; // Viewport for IE fixed width
$max-vp : $f-vp; // max viewport. Syntactically makes for a nicer option
// At some point, you'll want to switch from a one column view to multi-column.
// This variable is used in the grid to dictate when you make that switch
$start-columns : $b-vp;
// ------------------------------------------------------------