Commit f12aea56 authored by Klaus Stein's avatar Klaus Stein
Browse files

Improve views (CSS)

parent e839a1a9
......@@ -38,12 +38,14 @@ header.page {
list-style-type: none;
margin: 0;
padding: 0;
line-height: 2rem;
li {
margin: 0;
padding: 0;
display: block;
a.navlink {
box-sizing: border-box;
display: block;
padding: 1rem;
......@@ -51,22 +53,13 @@ header.page {
background-color: $project-contrast-color;
color: $project-color;
}
}
& > a.home {
display: flex;
align-items: baseline;
margin-right: 1rem;
img {
display: block;
height: 2rem;
margin-right: 0.5rem;
align-self: center;
}
}
&.localeswitch {
margin: 0px 1rem;
&.home {
align-self: center;
}
}
......@@ -89,12 +82,13 @@ div.page {
flex-grow: 1;
flex-shrink: 1;
padding: 1rem;
padding: 0.5rem;
}
main.show {
padding: 1rem;
padding: 0px;
margin: 0px;
input[type=text] {
box-sizing: border-box;
width: 100%;
......
......@@ -8,7 +8,6 @@
}
.place, .show.map {
margin: 1rem;
border: 2px solid grey;
padding: 1rem;
background: #fffae0;
......
main.show.place {
padding: 1rem;
display: flex;
align-items: stretch;
......@@ -120,3 +121,43 @@ main.show.place {
}
}
}
main.places {
border: 2px solid #555;
background: #f5f5f5;
max-width: 100%;
/* overflow: auto;*/
padding: 1rem;
table {
tr.place {
padding: 0px;
margin: 0px;
background: inherit;
td.name {
a {
box-sizing: border-box;
padding: 1ex 0.5rem;
display: block;
text-decoration: none;
&:hover, &:focus {
background: gold;
}
}
}
td.description {
padding: 0px 1rem;
}
.maps {
text-align: right;
padding-right: 1rem;
}
.debuginfo {
opacity: 0.2;
&:hover { opacity: 0.8; }
}
}
}
}
<header class="page">
<nav>
<ul>
<li>
<%= link_to 'https://urbanmetamapping.uni-bamberg.de/', locale: locale, class: 'home navlink', target: '_blank' do %>
<%= image_tag 'UMM-Logo.svg', alt: '' %> UMM
<li class="home">
<%= link_to 'https://urbanmetamapping.uni-bamberg.de/', locale: locale, class: 'navlink', target: '_blank' do %>
<%= image_tag 'UMM-Logo.svg', alt: 'UMM' %>
<% end %>
</li>
<li>
......
<p id="notice"><%= notice %></p>
<% if notice %><p id="notice"><%= notice %></p><% end %>
<main class="maps">
......@@ -11,6 +11,8 @@
<col id="col-title" />
<col id="col-place" />
<col id="col-categories" />
<col id="col-repo_signature" />
<col id="col-repository" />
<col id="col-description" />
<col id="col-dates" />
<col id="col-basemap" />
......@@ -23,8 +25,6 @@
<col id="col-legend" />
<col id="col-dc" />
<col id="col-doi" />
<col id="col-repository" />
<col id="col-repo_signature" />
<col id="col-copyright" />
<col id="col-copyright holder" />
<col id="col-delete" />
......@@ -35,6 +35,8 @@
<th scope="col">Title</th>
<th scope="col">Place</th>
<th scope="col" title="Categories">C.</th>
<th scope="col">Signature</th>
<th scope="col">Repository</th>
<th scope="col" class="narrow">Desc.</th>
<th scope="col" class="narrow">Date(s)</th>
<th scope="col">Basemap</th>
......@@ -47,8 +49,6 @@
<th scope="col">Legend</th>
<th scope="col" title="Damage Categories" class="narrow">#DC</th>
<th scope="col">Doi</th>
<th scope="col">Repository</th>
<th scope="col">Repo-Signature</th>
<th scope="col">Copyright</th>
<th scope="col">Copyright holder</th>
<th scope="col"></th>
......@@ -61,10 +61,13 @@
<%= td(map.title, a: map, klass: 'wide') %>
<%
place = map.place.name
place = place.to_s + " (#{map.district})" if map.district
place = place.to_s + " (#{map.district})" unless map.district.blank?
%>
<%= td(place, a: map.place, klass: 'wide') %>
<%= td(map.categories.map{|c| c.name}.join(' • '), klass: 'narrow') %>
<%= td(map.repo_doc_ref , klass: 'wide') %>
<% repo = [map.repository&.name, map.repository&.location].compact.join(', ') %>
<%= td(repo, a: map.repository , klass: 'wide') %>
<%= td(map.description, klass: 'narrow') %>
<%= td(map.dates, klass: 'narrow') %>
<%= td(map.basemap, klass: 'wide') %>
......@@ -77,9 +80,6 @@
<%= td(map.legend, klass: 'wide') %>
<%= td(map.damage_categories, klass: 'narrow right') %>
<%= td(map.doi, klass: 'wide') %>
<% repo = [map.repository&.name, map.repository&.location].compact.join(', ') %>
<%= td(repo, a: map.repository , klass: 'wide') %>
<%= td(map.repo_doc_ref , klass: 'wide') %>
<%= td(map.copyright, klass: 'wide') %>
<%= td(map.copyright_holder, klass: 'wide') %>
<td><%= destroylink map %></td>
......
<p id="notice"><%= notice %></p>
<% if notice %><p id="notice"><%= notice %></p><% end %>
<main class="show map">
<header>
......
<p id="notice"><%= notice %></p>
<% if notice %><p id="notice"><%= notice %></p><% end %>
<main class="places">
<h1>Places</h1>
<table>
<thead>
<tr>
<th>Name(s)</th>
<th>Description</th>
<th>Shape</th>
<th>Centerpoint</th>
<th colspan="3"></th>
</tr>
</thead>
<tbody>
<% @places.each do |place| %>
<tr>
<td><%= link_to place.names_as_a.join(", "), place %></td>
<td><%= place.description %></td>
<td><input title="<%= place.shape %>" type="text" size="20" value="<%= place.shape %>"></input></td>
<td><input type="text" size="20" value="<%= place.centerpoint %>"></input></td>
<h1>Places</h1>
<table>
<thead>
<tr class="place"><th></th><th></th><th></th><th></th>
<th class="maps"># maps</th>
<th class="debuginfo">Shape</th>
<th class="debuginfo">Position</th>
</tr>
</thead>
<tbody>
<% @places.each do |place| %>
<tr class="place">
<td><%= editlink place %></td>
<td><%= destroylink place %></td>
<td class="name"><%= link_to place.names_as_a.join(", "), place %></td>
<td class="description"><%= place.description %></td>
<td class="maps"><%= place.maps.count %></td>
<td class="debuginfo"><input title="<%= place.shape %>" type="text" size="20" value="<%= place.shape %>"></input></td>
<td class="debuginfo"><input type="text" size="20" value="<%= place.centerpoint %>"></input></td>
</tr>
<% end %>
</tbody>
</table>
</tbody>
</table>
<br>
<%= link_to 'New Place', new_place_path %>
</main>
<%= render partial: 'shared/icons.svg' %>
<p id="notice"><%= notice %></p>
<% if notice %><p id="notice"><%= notice %></p><% end %>
<main class="show place">
<figure class="map">
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment