UX: Style edits (#19927)

This commit is contained in:
Jordan Vidrine 2023-02-15 11:02:16 -06:00 committed by GitHub
parent c20b381508
commit d40143371b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 87 additions and 31 deletions

View File

@ -5,6 +5,34 @@
body.crawler,
body > noscript {
font-family: serif;
h1,
h2,
h3,
h4,
h5,
h6 {
font-family: serif;
}
&.browser-update {
header {
height: 50px;
margin-bottom: 1em;
}
.buorg {
position: absolute;
top: 50px;
width: 100%;
background: #fdf2ab;
text-align: center;
font-family: sans-serif;
color: #000;
font-size: 14px;
margin-bottom: 10px;
}
#topic-title {
margin-top: 2em;
}
}
&:after,
&:before {
@ -52,6 +80,9 @@ body > noscript {
table-layout: fixed;
overflow: hidden;
margin: 2em 0;
.posters > a {
float: none;
}
thead {
border-bottom: 1px solid #ddd;
@ -59,39 +90,51 @@ body > noscript {
th {
padding: 0 0 0.5em;
}
th:first-of-type {
width: 40%;
th:nth-child(2) {
display: none;
}
@media screen and (min-width: 500px) {
th {
&.replies,
&.views {
width: 10%;
}
}
th:first-of-type {
width: 50%;
}
th:last-of-type {
width: 15%;
}
th:first-of-type {
width: 60%;
padding-left: 0;
}
th:last-of-type,
th.replies,
th.views {
text-align: center;
}
th:last-of-type,
th.replies {
width: 20%;
}
th.posters {
display: none;
}
}
td {
padding: 10px 0;
&.posters {
padding: 10px 20px;
}
}
th:first-of-type {
padding-left: 0;
td.posters {
display: none;
}
td:last-of-type,
td.replies,
td.views {
text-align: center;
}
td:first-of-type {
width: 60%;
}
td:last-of-type,
td.replies {
width: 20%;
}
@media (max-width: 850px) {
table-layout: auto;
margin: 0;
td {
word-break: break-all;
word-break: break-word;
&.posters {
a:not(:last-of-type) {
display: none;
@ -129,6 +172,9 @@ body > noscript {
td.main-link {
padding-right: 1em;
}
p.excerpt {
font-size: var(--font-down-1);
}
}
}
@ -158,6 +204,9 @@ body > noscript {
height: auto;
}
}
.topic-body {
float: unset;
}
}
.crawler-post {
@ -191,9 +240,6 @@ body > noscript {
[itemprop="position"] {
float: left;
margin-right: 0.5em;
&:before {
content: "#";
}
}
}
@ -218,7 +264,6 @@ body > noscript {
display: block;
}
h1 {
font-size: 2em;
margin-bottom: 0.25em;
}
}
@ -286,3 +331,17 @@ body > noscript {
}
}
}
.buorg div {
padding: 8px;
}
.buorg a,
.buorg a:visited {
color: #e25600;
text-decoration: underline;
}
@media print {
.buorg {
display: none !important;
}
}

View File

@ -9,12 +9,9 @@
<%= theme_lookup("head_tag") %>
<%= render_google_universal_analytics_code %>
<%= yield :head %>
<% if show_browser_update? %>
<style>.buorg {position:absolute; z-index:111111; width:100%; top:0px; left:0px; background:#FDF2AB; text-align:left; font-family: sans-serif; color:#000; font-size: 14px;} .buorg div {padding: 8px;} .buorg a, .buorg a:visited {color:#E25600; text-decoration: underline;} @media print { .buorg { display: none !important; } }</style>
<% end %>
<%= build_plugin_html 'server:before-head-close-crawler' %>
</head>
<body class="crawler">
<body class="crawler <% if show_browser_update? %>browser-update<% end %>">
<%= theme_lookup("header") %>
<%= render partial: "layouts/noscript_header" %>
<div id="main-outlet" class="wrap" role="main">

View File

@ -38,7 +38,7 @@
<% end %>
<% end %>
<div itemscope itemtype='http://schema.org/ItemList'>
<div class="topic-list-container" itemscope itemtype='http://schema.org/ItemList'>
<meta itemprop='itemListOrder' content='http://schema.org/ItemListOrderDescending'>
<table class='topic-list'>
@ -109,7 +109,7 @@
</div>
<% if @list.topics.length > 0 && @list.more_topics_url %>
<div role='navigation' itemscope itemtype='http://schema.org/SiteNavigationElement'>
<div class="navigation" role='navigation' itemscope itemtype='http://schema.org/SiteNavigationElement'>
<% if params[:page].to_i > 0 %>
<span itemprop='name'><a href='<%= @list.prev_topics_url %>' rel='prev' itemprop='url'><%= t 'prev_page' %></a> &nbsp;</span>
<% end %>