Skip to content

Commit

Permalink
made ui ore aligned with rest of matolab tools
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomas Hanke committed Sep 18, 2023
1 parent 6669353 commit ede0fcc
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 29 deletions.
6 changes: 4 additions & 2 deletions app.py
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ def apply_mapping(
# # replace the subject URI with your new template URI
# new_iri=URIRef(str(subject).rsplit("/", 1)[-1].rsplit("#", 1)[-1])
# replace_iris(subject,new_iri,template_graph)
template_graph.serialize('template.ttl')
#template_graph.serialize('template.ttl')

# duplicate template if needed
rows = list(data_graph[: RDF.type : CSVW.Row])
Expand All @@ -362,7 +362,7 @@ def apply_mapping(
# use template to create new idivituals for every
if duplicate_for_table and rows:
# map_content=mapping_graph.serialize()
mapping_graph.serialize('map_graph.ttl')
#mapping_graph.serialize('map_graph.ttl')
tablegroup = next(data_graph[: RDF.type : CSVW.TableGroup])
column_maps = {
column: {
Expand Down Expand Up @@ -514,6 +514,7 @@ async def index(request: Request):
"start_form": start_form,
"mapping_form": "",
"result": "",
"setting": setting
},
)

Expand Down Expand Up @@ -570,6 +571,7 @@ async def convert(request: Request):
"filename": "dataset.ttl",
"payload": payload,
"result": result,
"setting": setting
},
)

Expand Down
File renamed without changes
22 changes: 22 additions & 0 deletions static/resources/favicon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 8 additions & 4 deletions templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,18 @@
<html{% block html_attribs %}{% endblock html_attribs %}>
{%- block html %}
<head>
<meta charset="utf-8" />
{%- block head %}
<title>{% block title %}{{title|default}}{% endblock title %}</title>

{%- block metas %}
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta content="origin" name="referrer">
<meta http-equiv="Cache-control" content="public">
{%- endblock metas %}

<title>{% block title %}{% endblock title %}</title>
<link rel="icon" type="image/svg+xml" href="{{ url_for('static', path='/resources/favicon.svg') }}">
<link rel="shortcut icon" href="#">
{%- block styles %}
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-rbsA2VBKQhggwzxH7pPCaAqO46MgnOM80zW1RWuH61DGLwZJEdK2Kadq2F9CUG65" crossorigin="anonymous">
{%- endblock styles %}
{%- endblock head %}
</head>
Expand All @@ -23,6 +26,7 @@
{%- endblock content %}

{% block scripts %}
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/js/bootstrap.bundle.min.js" integrity="sha384-kenU1KFdBIe4zVF0s0G1M5b4hcpxyD9F7jL+jjXkk+Q2h455rYXK/7HAuoJl+0I4" crossorigin="anonymous"></script>
{%- endblock scripts %}
{%- endblock body %}
</body>
Expand Down
28 changes: 5 additions & 23 deletions templates/index.html
Original file line number Diff line number Diff line change
@@ -1,38 +1,20 @@
{% extends "base.html" %}
{% block title %}RDFConverter{% endblock %}

{% block metas %}
<meta charset="UTF-8" />
{{ super() }}
{% endblock %}

{% block head %}
{{ super() }}
<link rel="shortcut icon" href="#">
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous">

<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());

gtag('config', 'your_analytiks_tag');
</script>
{% endblock %}
{% block html_attribs %} itemtype="http://schema.org/WebPage" lang="en"{% endblock %}

{% block html_attribs %} lang="en"{% endblock %}
{% block title %}{{ setting.name }}{% endblock title %}

{% block content %}
<header class="pb-3 mb-4 border-bottom">
<a href="/" class="d-flex align-items-center text-dark text-decoration-none m-3 pb-1">
<img class='me-3' src="{{ url_for('static', path='/resources/MatOLab-Logo.svg') }}" height="30" alt="mat-o-lab-logo"/>
<img class='me-3' src="{{ url_for('static', path='/resources/Logo.svg') }}" height="30" alt="Logo"/>
</a>
</header>
<main class="bg-light rounded-3 px-3">
<div class="container-fluid mb-3">
<h1 class="display-5 fw-bold">RDFConverter</h1>
<h1 class="display-5 fw-bold">{{ setting.name }}</h1>
<p class="col-md-12 ps-0 fs-4">
Conversion and validation of YARRRML and Chowlk files to RDF
{{ setting.desc }}
</p>
<form class='pb-3' method="post" action="{{ url_for('convert') }}">
{{ start_form.csrf_token }}
Expand Down

0 comments on commit ede0fcc

Please sign in to comment.