diff --git a/web/app/services/__init__.py b/web/app/services/__init__.py index 6732fd88..ef3c3ed2 100644 --- a/web/app/services/__init__.py +++ b/web/app/services/__init__.py @@ -5,7 +5,7 @@ SERVICES = { 'corpus_analysis': { 'name': 'Corpus analysis' }, - 'file-setup': { + 'file_setup': { 'name': 'File setup', 'versions': { 'latest': '1.0.0b', diff --git a/web/app/services/forms.py b/web/app/services/forms.py index 5d9f5ede..aba0b8c3 100644 --- a/web/app/services/forms.py +++ b/web/app/services/forms.py @@ -77,7 +77,7 @@ class AddFileSetupJobForm(AddJobForm): '| .tif') def __init__(self, *args, **kwargs): - version = kwargs.pop('version', SERVICES['file-setup']['versions']['latest']) + version = kwargs.pop('version', SERVICES['file_setup']['versions']['latest']) super().__init__(*args, **kwargs) - self.version.choices = [(x, x) for x in SERVICES['file-setup']['versions'] if x != 'latest'] # noqa + self.version.choices = [(x, x) for x in SERVICES['file_setup']['versions'] if x != 'latest'] # noqa self.version.default = version diff --git a/web/app/services/views.py b/web/app/services/views.py index 4aaac006..d83921d2 100644 --- a/web/app/services/views.py +++ b/web/app/services/views.py @@ -20,18 +20,18 @@ def service(service): if service == 'corpus_analysis': return render_template('services/{}.html.j2'.format(service), title=SERVICES[service]['name']) - elif service == 'file-setup': + elif service == 'file_setup': form = AddFileSetupJobForm(prefix='add-file-setup-job-form') elif service == 'nlp': version = request.args.get('version') - if version is None or version not in SERVICES['nlp']['versions']: + if version is None or version not in SERVICES[service]['versions']: form = AddNLPJobForm(prefix='add-nlp-job-form') else: form = AddNLPJobForm(prefix='add-nlp-job-form', version=version) form.version.data = version elif service == 'ocr': version = request.args.get('version') - if version is None or version not in SERVICES['ocr']['versions']: + if version is None or version not in SERVICES[service]['versions']: form = AddOCRJobForm(prefix='add-ocr-job-form') else: form = AddOCRJobForm(prefix='add-ocr-job-form', version=version) diff --git a/web/app/static/css/material_icons.css b/web/app/static/css/material_icons.css index 0e5303b5..6590c25c 100644 --- a/web/app/static/css/material_icons.css +++ b/web/app/static/css/material_icons.css @@ -4,7 +4,6 @@ font-family: 'Material Icons'; font-style: normal; font-weight: 400; - src: url(../fonts/material_icons/MaterialIcons-Regular.eot); /* For IE6-8 */ src: local('Material Icons'), local('MaterialIcons-Regular'), url(../fonts/material_icons/MaterialIcons-Regular.ttf) format('truetype'), diff --git a/web/app/static/css/materialize.sticky-footer.css b/web/app/static/css/materialize.sticky-footer.css deleted file mode 100644 index 49b8f5b8..00000000 --- a/web/app/static/css/materialize.sticky-footer.css +++ /dev/null @@ -1,13 +0,0 @@ -/* - * Force the footer to always stay on the bottom of the page regardless of how - * little content is on the page. - */ -body { - display: flex; - min-height: 100vh; - flex-direction: column; -} - -main { - flex: 1 0 auto; -} diff --git a/web/app/static/css/nopaque.css b/web/app/static/css/nopaque.css index 3bf1b42c..de92409f 100644 --- a/web/app/static/css/nopaque.css +++ b/web/app/static/css/nopaque.css @@ -1,6 +1,6 @@ /* Fix material icon vertical alignment when nested in various elements */ -h1 .material-icons, h2 .material-icons, h3 .material-icons, h4 .material-icons, -.tab .material-icons { +h1 .nopaque-icons, h2 .nopaque-icons, h3 .nopaque-icons, h4 .nopaque-icons, +.tab .nopaque-icons, .tab .material-icons { line-height: inherit; } @@ -8,12 +8,27 @@ main { margin-top: 48px; } +/* + * Force the footer to always stay on the bottom of the page regardless of how + * little content is on the page. + */ +body { + display: flex; + min-height: 100vh; + flex-direction: column; +} + +main { + flex: 1 0 auto; +} + + table.ressource-list tr { cursor: pointer; } .parallax-container .parallax { - z-index: auto; + z-index: 0; } /* add custom bold class */ @@ -117,66 +132,19 @@ indicator will show up how the column is sorted right now.; */ cursor: pointer; } -/* styles for resource lists */ -.analyse-link[href=""] { - display: none; -} - .btn-scale-x2 { transform: scale(2); } -.btn-scale-x2 .service-icon { +.btn-scale-x2 .nopaque-icons.service-icon { font-size: 2.5rem; } -.service-icon[data-service]:before { - content: "help"; -} -.service-icon[data-service="corpus-analysis"]:before { - content: "H"; -} -.service-icon[data-service="file-setup"]:before { - content: "E"; -} -.service-icon[data-service="nlp"]:before { - content: "G"; -} -.service-icon[data-service="ocr"]:before { - content: "F"; -} +.nopaque-icons.service-icon[data-service="corpus-analysis"]:empty:before {content: "H";} +.nopaque-icons.service-icon[data-service="file-setup"]:empty:before {content: "E";} +.nopaque-icons.service-icon[data-service="nlp"]:empty:before {content: "G";} +.nopaque-icons.service-icon[data-service="ocr"]:empty:before {content: "F";} .status-text[data-status]:before { content: attr(data-status); } - -.status-color[data-status] { - background-color: #f44336 !important; /* ~materialize "red" */ -} -.status-color[data-status="unprepared"] { - background-color: #9e9e9e !important; /* ~materialize grey */ -} -.status-color[data-status="submitted"] { - background-color: #9e9e9e !important; /* ~materialize grey */ -} -.status-color[data-status="queued"] { - background-color: #2196f3 !important; /* ~materialize blue */ -} -.status-color[data-status="running"] { - background-color: #ffc107 !important; /* ~materialize amber */ -} -.status-color[data-status="complete"] { - background-color: #4caf50 !important; /* ~materialize green */ -} -.status-color[data-status="prepared"] { - background-color: #4caf50 !important; /* ~materialize green */ -} -.status-color[data-status="start analysis"] { - background-color: #2196f3 !important; /* ~materialize blue */ -} -.status-color[data-status="analysing"] { - background-color: #4caf50 !important; /* ~materialize green */ -} -.status-color[data-status="stop analysis"] { - background-color: #ff5722 !important; /* ~materialize deep-orange */ -} diff --git a/web/app/static/css/nopaque_icons.css b/web/app/static/css/nopaque_icons.css index 395b8bc6..f3e49752 100644 --- a/web/app/static/css/nopaque_icons.css +++ b/web/app/static/css/nopaque_icons.css @@ -1,5 +1,3 @@ -/* https://google.github.io/material-design-icons/#setup-method-2-self-hosting */ - @font-face { font-family: 'nopaque Icons'; font-style: normal; @@ -33,57 +31,3 @@ /* Support for IE. */ font-feature-settings: 'liga'; } - -.breadcrumb i.nopaque-icons { - display: inline-block; - float: left; - font-size: 24px; -} - -.nopaque-icons { - text-rendering: optimizeLegibility; - -webkit-font-feature-settings: 'liga'; - -moz-font-feature-settings: 'liga'; - font-feature-settings: 'liga'; -} - -nav i.nopaque-icons { - display: block; - font-size: 24px; - height: 56px; - line-height: 56px; -} - -nav .brand-logo i.nopaque-icons { - float: left; - margin-right: 15px; -} - -nav ul a.btn > .nopaque-icons, nav ul a.btn-large > .nopaque-icons, nav ul a.btn-small > .nopaque-icons, nav ul a.btn-large > .nopaque-icons, nav ul a.btn-flat > .nopaque-icons, nav ul a.btn-floating > .nopaque-icons { - height: inherit; - line-height: inherit; -} - -.input-field input[type=search]:focus:not(.browser-default) ~ .nopaque-icons { - color: #444; -} - -.input-field input[type=search] ~ .nopaque-icons { - position: absolute; - top: 0; - right: 1rem; - color: transparent; - cursor: pointer; - font-size: 2rem; - -webkit-transition: .3s color; - transition: .3s color; -} - -.sidenav li > a > i.nopaque-icons { - float: left; - height: 48px; - line-height: 48px; - margin: 0 32px 0 0; - width: 24px; - color: rgba(0, 0, 0, 0.54); -} diff --git a/web/app/static/css/materialize.sidenav-fixed.css b/web/app/static/css/sidenav_fixed.css similarity index 100% rename from web/app/static/css/materialize.sidenav-fixed.css rename to web/app/static/css/sidenav_fixed.css diff --git a/web/app/static/js/nopaque/RessourceLists/CorpusList.js b/web/app/static/js/nopaque/RessourceLists/CorpusList.js index 0d5b2eb7..fadb4fa1 100644 --- a/web/app/static/js/nopaque/RessourceLists/CorpusList.js +++ b/web/app/static/js/nopaque/RessourceLists/CorpusList.js @@ -81,7 +81,7 @@ class CorpusList extends RessourceList { } CorpusList.options = { item: `