diff --git a/models/type.rdfs:Resource/html.queries/main.query b/models/type.rdfs:Resource/html.queries/main.query deleted file mode 100644 index 2f315c7c5e89f64ea6ed61f19505e523b64b03d0..0000000000000000000000000000000000000000 --- a/models/type.rdfs:Resource/html.queries/main.query +++ /dev/null @@ -1,18 +0,0 @@ -SELECT ?s2 ?p2 ?s1 ?p1 WHERE { -{ -GRAPH ?g{ - { - <{{uri}}> ?s1 ?p1 . - }UNION{ - ?s2 ?p2 <{{uri}}> . - - } -} -}UNION{ { - <{{uri}}> ?s1 ?p1 . - }UNION{ - ?s2 ?p2 <{{uri}}> . - - } -} -} diff --git a/models/type.rdfs:Resource/html.queries/po.query b/models/type.rdfs:Resource/html.queries/po.query new file mode 100644 index 0000000000000000000000000000000000000000..f573aab3fcafc3c5e00ee35cea1f50dcb8bb1598 --- /dev/null +++ b/models/type.rdfs:Resource/html.queries/po.query @@ -0,0 +1,9 @@ +SELECT ?p ?o WHERE { + { + GRAPH ?g{ + <{{uri}}> ?p ?o. + } + }UNION{ + <{{uri}}> ?p ?o . + } +} diff --git a/models/type.rdfs:Resource/html.queries/sp.query b/models/type.rdfs:Resource/html.queries/sp.query new file mode 100644 index 0000000000000000000000000000000000000000..3b5b69fb13293b740abd2407957cad96b2f9866f --- /dev/null +++ b/models/type.rdfs:Resource/html.queries/sp.query @@ -0,0 +1,9 @@ +SELECT ?s ?p WHERE { + { + GRAPH ?g{ + ?s ?p <{{uri}}> . + } + }UNION{ + ?s ?p <{{uri}}> . + } +} diff --git a/static/css/basic.css b/static/css/basic.css index b44283a4e162b4c1cd7e190715db34c01af35cd9..026c093d6f5b396860efdec8793a74949a6d0f1f 100644 --- a/static/css/basic.css +++ b/static/css/basic.css @@ -3,7 +3,7 @@ body { } h1{ - font-size: 45px; + font-size: 24px; } h1,h2,body { @@ -29,9 +29,7 @@ a:hover{ table tr td { - border-width: thin; padding: 2px; - border-style: dotted; border-color: gray; background-color: white; } diff --git a/views/type.rdfs:Resource/html.template b/views/type.rdfs:Resource/html.template index 6b5a78bde0888e15c32443f3933f6808e61c4e76..7639943f31c1db95cf503b5e278368513c8e0142 100644 --- a/views/type.rdfs:Resource/html.template +++ b/views/type.rdfs:Resource/html.template @@ -12,40 +12,43 @@ <link rel="alternate" type="application/json" title="RDFJSON Version" href="{{lodspk.this.value}}.json" /> </head> <body about="{{lodspk.this.value}}"> - <h1>Page about <a href='{{lodspk.this.value}}'>{{lodspk.this.curie}}</a></h1> - {{lodspk.endpoint.local}} - <div> - <h2>Information from {{lodspk.this.curie}}</h2> + <h1>Default view</h1> + + <div style='margin-top: 40px'> <table> - {% for row in models.main %} + <tr><th>Subject</th><th>Predicate</th><th>Object</th></tr> + {% for row in models.po %} + <tr> +<td>{%if forloop.first%}<a href='{{lodspk.this.value}}'>{{lodspk.this.curie}}</a>{%endif%}</td> + <td style='background-color:#c9f9c9'><a href='{{row.p.value}}'>{{row.p.curie}}</a></td> + + <td style='background-color:#c9f9c9'> + {%if row.o.uri == 1%} + <a rev='[{{row.p.curie}}]' href='{{row.o.value}}'>{{row.o.curie}}</a> + {%else%} + {{row.o.value}} + {%endif%} + </td> - {% if row.s1%} - <tr> - <td><a href='{{row.s1.value}}'>{{row.s1.curie}}</a></td> + </tr> + {% endfor %} +<tr><td></td><td><a href='{{lodspk.this.value}}'>{{lodspk.this.curie}}</a></td><td></td></tr> - {% if row.p1.uri == 1 %} - <td><a rel='{{row.s1.curie}}' href='{{row.p1.value}}'>{{row.p1.curie}}</a></td> - {% else %} - <td><span property='{{row.s1.curie}}'>{{row.p1.value}}</span></td> - {% endif %} + {% for row in models.sp %} + <tr> + <td style='background-color:#c9f9c9'><a href='{{row.s.value}}'>{{row.s.curie}}</a></td> + <td style='background-color:#c9f9c9'><a rel='{{row.s.curie}}' href='{{row.p.value}}'>{{row.p.curie}}</a></td> +<td>{%if forloop.first%}<a href='{{lodspk.this.value}}'>{{lodspk.this.curie}}</a>{%endif%}</td> </tr> - {% endif %} {% endfor %} - </table> + <tr><th>Subject</th><th>Predicate</th><th>Object</th></tr> - <br/><br/> - <h2>Information pointing to {{lodspk.this.curie}}</h2> - <table> - {% for row in models.main %} - {% if row.s2%} - <tr> - <td><a href='{{row.s2.value}}'>{{row.s2.curie}}</a></td> - <td><a rev='[{{row.p2.curie}}]' href='{{row.s2.value}}'>{{row.p2.curie}}</a></td> - </tr> - {%endif %} - {% endfor %} </table> </div> + </div> + + + <br/> </body> </html>