Some CSS overhaul (RIP diff viewers)

This commit is contained in:
swagg boi 2023-11-02 14:30:07 -04:00
parent 97543815dd
commit b74112b452
3 changed files with 123 additions and 135 deletions

View file

@ -105,3 +105,38 @@
text-align: center;
padding: 0.25em 0;
}
/* New header stuff */
.header {
display: flex;
flex-flow: column;
text-align: center;
border: outset var(--light-warm-gray) 0.18rem;
background-color: var(--light-warm-gray);
padding: 0 0.25em 0.5em 0.25em;
margin-top: 1.25em;
}
.header__nav {
display: flex;
flex-flow: row wrap;
gap: 0.25em;
text-align: left;
}
.header__nav--moderator {
margin: 0.5em 0 0 0;
align-items: center;
}
.header__nav > .click {
flex: 1;
padding: 0 0.5em;
}
.header__search {
display: flex;
flex-flow: row;
gap: 0.25em;
margin-top: 0.5em;
}

View file

@ -13,35 +13,6 @@
background-color: var(--dark-blue);
}
.site-header {
display: flex;
flex-flow: column;
gap: 1em;
}
.site-title {
text-align: center;
border: outset var(--light-warm-gray) 0.18rem;
background-color: var(--light-warm-gray);
padding: 0.5em 0;
margin-bottom: 0.15em;
overflow-wrap: anywhere;
}
.site-nav {
display: flex;
flex-flow: row wrap;
gap: 0.25em;
border: outset var(--light-warm-gray) 0.18rem;
padding: 0.5em 0.25em;
background-color: var(--light-warm-gray);
}
.site-nav > .click {
flex: 1;
padding: 0 0.5em 0 0.5em;
}
.site-footer {
text-align: center;
border: outset var(--light-warm-gray) 0.18rem;
@ -119,22 +90,6 @@
background-color: var(--dark-blue);
}
.search-body {
background-color: var(--light-warm-gray);
border: outset var(--light-warm-gray) 0.18rem;
padding: 0.5em 0.5em;
display: flex;
flex-flow: column;
gap: 1em;
margin-top: 0.25em;
}
.search-field {
display: flex;
flex-flow: row;
gap: 0;
}
#search {
width: 100%;
border: inset var(--dark-warm-gray) 0.18rem;

View file

@ -32,9 +32,9 @@
<%= asset 'app.css' %>
</head>
<body>
<header class="site-header">
<h1 class="site-title">Post::Text</h1>
<nav class="site-nav">
<header class="header">
<h1 class="header__title">Post::Text</h1>
<nav class="header__nav">
<%= link_to List => threads_list => {list_page => 1},
(class => 'click') %>
<%= link_to New => post_thread => (class => 'click') %>
@ -43,7 +43,7 @@
<%= link_to Feeds => feeds_page => (class => 'click') %>
</nav>
<% if (is_mod) { =%>
<nav class="site-nav">
<nav class="header__nav header__nav--moderator">
<span>Moderate:</span>
<%= link_to Flagged => flagged_list => (class => 'click') %>
<%= link_to Hidden => hidden_list => (class => 'click') %>
@ -52,7 +52,7 @@
</nav>
<% } =%>
<% if (is_admin) { =%>
<nav class="site-nav">
<nav class="header__nav header__nav--moderator">
<span>Admin:</span>
<%= link_to Create => create_mod => (class => 'click') %>
<%= link_to Reset => admin_reset => (class => 'click') %>
@ -62,8 +62,7 @@
<%= link_to Demote => demote_admin => (class => 'click') %>
</nav>
<% } =%>
<%= form_for search_page => (class => 'search-body'), begin %>
<div class="search-field">
<%= form_for search_page => (class => 'header__search'), begin %>
<% if (my $error = validation->error('q')) { =%>
<p class="field-with-error">Must be between <%= $error->[2] %>
and <%= $error->[3] %> characters.</p>
@ -75,7 +74,6 @@
required => undef
) %>
<button type="submit" class="search-button">Search</button>
</div>
<% end %>
</header>
<% if (flash 'error') { =%>