Tables in content should display better

This commit is contained in:
echarp 2020-02-08 21:52:58 +01:00
parent 19826f581a
commit 6138156eb6
14 changed files with 53537 additions and 12 deletions

View File

@ -3,7 +3,6 @@
white-space: nowrap white-space: nowrap
table table
clear: both
border-spacing: 2px border-spacing: 2px
th th
font-weight: normal font-weight: normal

View File

@ -2,11 +2,6 @@
%em.fa.fa-history %em.fa.fa-history
= title t '.title' = title t '.title'
.links
= link_to versions_path(format: :rss) do
%em.fa.fa-rss
= t '.feed'
%table.list.autopagerize_page_element %table.list.autopagerize_page_element
%thead %thead
%th.event %th.event
@ -14,7 +9,9 @@
%th.object= sort_link @search, :object_id %th.object= sort_link @search, :object_id
%th.changeset= sort_link @search, :changeset %th.changeset= sort_link @search, :changeset
%th.created_at= sort_link @search, :created_at %th.created_at= sort_link @search, :created_at
%th.view/ %th.view
= link_to versions_path(format: :rss), title: t('.feed') do
%em.fa.fa-rss
%tbody %tbody
- @versions.each do |version| - @versions.each do |version|

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1 @@
.quantity{text-align:right !important;white-space:nowrap}table{border-spacing:2px}table th{font-weight:normal}table th a:link,table th a:visited{color:#003;padding:0 0.6em}table.list tbody tr:nth-child(odd){background-color:#def}table.list tbody tr:nth-child(even){background-color:#eee}table.list tbody tr.view{cursor:pointer}table.list tbody tr.view:hover{background-color:lightgrey}table.list td{padding:0.2em;text-align:left}table.list td.kind,table.list td.updated_at{text-align:center}dl dt{clear:left;float:left;padding:0.2em 1em;min-width:12em;text-align:right}dl dd{padding:0.2em 1em;text-align:left}dl dd.quantity{padding-right:16em}dl dd h3{display:inline}ul.counters{text-align:center}ul.counters li{display:inline}ul.counters li a:link,ul.counters li a:visited{color:white;padding:0.4em 1em;display:inline-block;box-shadow:0 0 2px black;border-radius:0.4em;background-color:#258}.edit_link:link,.delete_link:link{display:none}

View File

@ -0,0 +1,24 @@
(function() {
$(document).on('turbolinks:load', function() {
return tinyMCE.init({
width: '100%',
height: '40em',
menubar: false,
branding: false,
language: 'fr_FR',
selector: 'input.description',
content_css: '/assets/application-fffac4f8dc2466271b1e210e8c876b665a819c7d6b3b3ef39f9efd570298dc2e.css',
entity_encoding: 'raw',
add_unload_trigger: true,
browser_spellcheck: true,
style_formats_autohide: true,
toolbar: [' cut copy paste | undo redo | link image media charmap table | code visualblocks searchreplace', ' removeformat bold italic strikethrough superscript subscript | bullist numlist outdent indent | alignleft aligncenter alignright alignjustify alignnone'],
plugins: 'lists advlist autolink link image charmap paste print preview table fullscreen searchreplace media insertdatetime visualblocks wordcount code'
});
});
$(document).on('turbolinks:before-cache', function() {
return tinymce.remove();
});
}).call(this);