summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Magorsch <arzano@gentoo.org>2020-05-11 21:23:30 +0200
committerMax Magorsch <arzano@gentoo.org>2020-05-11 21:23:30 +0200
commitaeb19ab231e4cbe3d4dfda93d7b2629b37c96b6c (patch)
tree1a50a1468658025a83642d4542165d372db79643
parentUse the latest version of tyrian v1 (diff)
downloadfrontend-aeb19ab231e4cbe3d4dfda93d7b2629b37c96b6c.tar.gz
frontend-aeb19ab231e4cbe3d4dfda93d7b2629b37c96b6c.tar.bz2
frontend-aeb19ab231e4cbe3d4dfda93d7b2629b37c96b6c.zip
Start the migration to Tyrian v2
Signed-off-by: Max Magorsch <arzano@gentoo.org>
-rw-r--r--public/css/main.css3
-rw-r--r--public/js/quoting.js2
-rw-r--r--views/index.erb2
-rw-r--r--views/indexentry.erb8
-rw-r--r--views/layout.erb148
-rw-r--r--views/listmonth.erb4
-rw-r--r--views/lists.erb24
-rw-r--r--views/message.erb6
-rw-r--r--views/pagination.erb26
-rw-r--r--views/report.erb2
-rw-r--r--views/views.erb4
11 files changed, 120 insertions, 109 deletions
diff --git a/public/css/main.css b/public/css/main.css
index 449d356..d5e0f31 100644
--- a/public/css/main.css
+++ b/public/css/main.css
@@ -63,6 +63,9 @@
.ag-message-content {
clear: both;
+ background-color: #f5f5f5;
+ border: 1px solid #ccc;
+ padding: 10px;
}
.ag-message-content pre {
diff --git a/public/js/quoting.js b/public/js/quoting.js
index 0a92a55..5f59fbc 100644
--- a/public/js/quoting.js
+++ b/public/js/quoting.js
@@ -9,7 +9,7 @@ $(function() {
return;
}
- var btn = $("<button class=\"btn btn-xs btn-default hidden-xs ag-toggle-quotes\"><span class=\"fa fa-quote-left\"></span> Toggle quotes</button>");
+ var btn = $("<button class=\"btn btn-sm btn-outline-secondary d-none d-sm-block ag-toggle-quotes\"><span class=\"fa fa-quote-left\"></span> Toggle quotes</button>");
btn.insertAfter(table);
btn.click(function() {
$('.ag-quote').each(function(index) {
diff --git a/views/index.erb b/views/index.erb
index b5d2908..1443932 100644
--- a/views/index.erb
+++ b/views/index.erb
@@ -10,7 +10,7 @@
Here you can find the archives of our most important mailing lists.
</p>
<p>
- For a complete list of available archives, see the <a href="/lists" class="btn btn-primary btn-xs"><i class="fa fa-fw fa-archive"></i> All Archives</a> section.
+ For a complete list of available archives, see the <a href="/lists" class="btn btn-primary btn-sm px-1 py-0"><i class="fa fa-fw fa-archive"></i> All Archives</a> section.
</p>
<hr>
diff --git a/views/indexentry.erb b/views/indexentry.erb
index 4c8edec..335255a 100644
--- a/views/indexentry.erb
+++ b/views/indexentry.erb
@@ -1,5 +1,5 @@
<div class="row">
- <div class="col-xs-12 col-md-4">
+ <div class="col-12 col-md-4">
<h2 class="stick-top"><%= list %></h2>
<p>
<%= blurb %>
@@ -7,13 +7,13 @@
<p class="ag-index-actions">
<a class="btn btn-primary btn-block" href="/<%= list %>/threads/<%= DateTime.now.strftime '%Y-%m' %>/"><span class="fa fa-fw fa-inbox"></span> This Month's Archives</a>
- <a class="btn btn-default btn-block" href="/<%= list %>/"><span class="fa fa-fw fa-inbox"></span> Complete Archives</a>
+ <a class="btn btn-outline-secondary text-dark btn-block" href="/<%= list %>/"><span class="fa fa-fw fa-inbox"></span> Complete Archives</a>
</p>
</div>
- <div class="col-xs-12 col-md-8">
+ <div class="col-12 col-md-8">
<h3 class="ag-mostrecent-header">Most recent messages</h3>
<div class="table-responsive">
- <table class="table table-condensed table-hover ag-mostrecent-table">
+ <table class="table table-sm table-hover ag-mostrecent-table">
<tr>
<th>Subject</th>
<th class="ag-mostrecent-table-author">Author</th>
diff --git a/views/layout.erb b/views/layout.erb
index bc601ba..c2dbdd7 100644
--- a/views/layout.erb
+++ b/views/layout.erb
@@ -6,86 +6,89 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="theme-color" content="#54487a">
<meta name="description" content="The Gentoo Mailing List Archives">
- <link href="https://assets.gentoo.org/tyrian/v1/bootstrap.min.css" rel="stylesheet" media="screen">
- <link href="https://assets.gentoo.org/tyrian/v1/tyrian.min.css" rel="stylesheet" media="screen">
+ <link href="https://assets.gentoo.org/tyrian/v2/tyrian.min.css" rel="stylesheet" media="screen">
<link href="/css/main.css" rel="stylesheet" media="screen">
<link rel="icon" href="https://www.gentoo.org/favicon.ico" type="image/x-icon">
</head>
<body>
- <header>
- <div class="site-title">
- <div class="container">
- <div class="row">
- <div class="site-title-buttons">
+ <header>
+ <div class="site-title">
+ <div class="container">
+ <div class="row justify-content-between">
+ <div class="logo">
+ <a href="/" title="Back to the homepage" class="site-logo">
+ <img src="https://assets.gentoo.org/tyrian/v2/site-logo.png" alt="Gentoo" srcset="https://assets.gentoo.org/tyrian/v2/site-logo.svg">
+ </a>
+ <span class="site-label">Archives</span>
+ </div>
+ <div class="site-title-buttons">
+ <div class="btn-group btn-group-sm">
+ <a href="https://get.gentoo.org/" role="button" class="btn get-gentoo"><span class="fa fa-fw fa-download"></span>
+ <strong>Get Gentoo!</strong></a>
<div class="btn-group btn-group-sm">
- <a href="https://get.gentoo.org/" role="button" class="btn get-gentoo"><span class="fa fa-fw fa-download"></span> <strong>Get Gentoo!</strong></a>
- <div class="btn-group btn-group-sm">
- <a class="btn gentoo-org-sites dropdown-toggle" data-toggle="dropdown" data-target="#" href="#">
- <span class="fa fa-fw fa-map-o"></span> <span class="hidden-xs">gentoo.org sites</span> <span class="caret"></span>
- </a>
- <ul class="dropdown-menu dropdown-menu-right">
- <li><a href="https://www.gentoo.org/" title="Main Gentoo website"><span class="fa fa-home fa-fw"></span> gentoo.org</a></li>
- <li><a href="https://wiki.gentoo.org/" title="Find and contribute documentation"><span class="fa fa-file-text-o fa-fw"></span> Wiki</a></li>
- <li><a href="https://bugs.gentoo.org/" title="Report issues and find common issues"><span class="fa fa-bug fa-fw"></span> Bugs</a></li>
- <li><a href="https://forums.gentoo.org/" title="Discuss with the community"><span class="fa fa-comments-o fa-fw"></span> Forums</a></li>
- <li><a href="https://packages.gentoo.org/" title="Find software for your Gentoo"><span class="fa fa-hdd-o fa-fw"></span> Packages</a></li>
- <li class="divider"></li>
- <li><a href="https://planet.gentoo.org/" title="Find out what's going on in the developer community"><span class="fa fa-rss fa-fw"></span> Planet</a></li>
- <li><a href="https://archives.gentoo.org/" title="Read up on past discussions"><span class="fa fa-archive fa-fw"></span> Archives</a></li>
- <li><a href="https://sources.gentoo.org/" title="Browse our source code"><span class="fa fa-code fa-fw"></span> Sources</a></li>
- <li class="divider"></li>
- <li><a href="https://infra-status.gentoo.org/" title="Get updates on the services provided by Gentoo"><span class="fa fa-server fa-fw"></span> Infra Status</a></li>
- </ul>
+ <a class="btn gentoo-org-sites dropdown-toggle" data-toggle="dropdown" data-target="#" href="#">
+ <span class="fa fa-fw fa-map-o"></span> <span class="d-none d-sm-inline">gentoo.org sites</span>
+ <span class="caret"></span>
+ </a>
+ <div class="dropdown-menu dropdown-menu-right">
+ <a class="dropdown-item" href="https://www.gentoo.org/" title="Main Gentoo website"><span class="fa fa-home fa-fw"></span>
+ gentoo.org</a>
+ <a class="dropdown-item" href="https://wiki.gentoo.org/" title="Find and contribute documentation"><span class="fa fa-file-text-o fa-fw"></span>
+ Wiki</a>
+ <a class="dropdown-item" href="https://bugs.gentoo.org/" title="Report issues and find common issues"><span class="fa fa-bug fa-fw"></span>
+ Bugs</a>
+ <a class="dropdown-item" href="https://forums.gentoo.org/" title="Discuss with the community"><span class="fa fa-comments-o fa-fw"></span>
+ Forums</a>
+ <a class="dropdown-item" href="https://packages.gentoo.org/" title="Find software for your Gentoo"><span class="fa fa-hdd-o fa-fw"></span>
+ Packages</a>
+ <div class="dropdown-divider"></div>
+ <a class="dropdown-item" href="https://planet.gentoo.org/" title="Find out what's going on in the developer community"><span class="fa fa-rss fa-fw"></span>
+ Planet</a>
+ <a class="dropdown-item" href="https://archives.gentoo.org/" title="Read up on past discussions"><span class="fa fa-archive fa-fw"></span>
+ Archives</a>
+ <a class="dropdown-item" href="https://sources.gentoo.org/" title="Browse our source code"><span class="fa fa-code fa-fw"></span>
+ Sources</a>
+ <div class="dropdown-divider"></div>
+ <a class="dropdown-item" href="https://infra-status.gentoo.org/" title="Get updates on the services provided by Gentoo"><span class="fa fa-server fa-fw"></span>
+ Infra Status</a>
</div>
</div>
</div>
- <div class="logo">
- <a href="/" title="Back to the homepage" class="site-logo">
- <object data="https://assets.gentoo.org/tyrian/v1/site-logo.svg" type="image/svg+xml">
- <img src="https://assets.gentoo.org/tyrian/v1/site-logo.png" alt="Gentoo Linux Logo">
- </object>
- </a>
- <span class="site-label">Archives</span>
- </div>
</div>
</div>
</div>
- <nav class="tyrian-navbar" role="navigation">
- <div class="container">
- <div class="row">
- <div class="navbar-header">
- <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-main-collapse">
- <span class="sr-only">Toggle navigation</span>
- <span class="icon-bar"></span>
- <span class="icon-bar"></span>
- <span class="icon-bar"></span>
- </button>
- </div>
- <div class="collapse navbar-collapse navbar-main-collapse">
- <ul class="nav navbar-nav">
- <% if @nav == :index %>
- <li class="active"><a href="/">Home</a></li>
- <li><a href="/lists"><i class="fa fa-fw fa-archive"></i> All Archives</a></li>
- <% elsif @nav == :lists %>
- <li><a href="/">Home</a></li>
- <li class="active"><a href="/lists"><i class="fa fa-fw fa-archive"></i> All Archives</a></li>
- <% elsif params[:list] %>
- <li><a href="/">Home</a></li>
- <li><a href="/lists"><i class="fa fa-fw fa-archive"></i> All Archives</a></li>
- <li class="active"><a href="/<%= h params[:list] %>/"><i class="fa fa-fw fa-inbox"></i> <%= h params[:list] %></a></li>
- <% else %>
- <li><a href="/">Home</a></li>
- <% end %>
- </ul>
- </div>
- </div>
+ </div>
+ <nav class="tyrian-navbar navbar navbar-dark navbar-expand-lg bg-primary" role="navigation">
+ <div class="container">
+ <div class="navbar-header">
+ <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbar-main-collapse" aria-controls="navbar-main-collapse" aria-expanded="false" aria-label="Toggle navigation">
+ <span class="navbar-toggler-icon"></span>
+ </button>
</div>
- </nav>
- </header>
+ <div class="collapse navbar-collapse navbar-main-collapse" id="navbar-main-collapse">
+ <ul class="navbar-nav mr-auto">
+ <% if @nav == :index %>
+ <li class="nav-item active"><a class="nav-link" href="/">Home</a></li>
+ <li class="nav-item"><a class="nav-link" href="/lists"><i class="fa fa-fw fa-archive"></i> All Archives</a></li>
+ <% elsif @nav == :lists %>
+ <li class="nav-item"><a class="nav-link" href="/">Home</a></li>
+ <li class="nav-item active"><a class="nav-link" href="/lists"><i class="fa fa-fw fa-archive"></i> All Archives</a></li>
+ <% elsif params[:list] %>
+ <li class="nav-item"><a class="nav-link" href="/">Home</a></li>
+ <li class="nav-item"><a class="nav-link" href="/lists"><i class="fa fa-fw fa-archive"></i> All Archives</a></li>
+ <li class="nav-item active"><a class="nav-link" href="/<%= h params[:list] %>/"><i class="fa fa-fw fa-inbox"></i> <%= h params[:list] %></a></li>
+ <% else %>
+ <li class="nav-item"><a class="nav-link" href="/">Home</a></li>
+ <% end %>
+ </ul>
+ </div>
+ </div>
+ </nav>
+ </header>
<div class="container">
<div class="row">
- <div class="col-xs-12">
+ <div class="col-12">
<%= yield %>
</div>
</div>
@@ -94,31 +97,31 @@
<footer>
<div class="container">
<div class="row">
- <div class="col-xs-12 col-md-offset-2 col-md-7">
+ <div class="col-12 offset-md-2 col-md-7">
<p class="spacer">
All times displayed are in UTC (GMT+0).<br>
Contents reflect the opinion of the author, not the Gentoo project or the Gentoo Foundation.
</p>
</div>
- <div class="col-xs-12 col-md-3">
+ <div class="col-12 col-md-3">
<h3 class="footerhead">Questions or comments?</h3>
Please feel free to <a href="https://www.gentoo.org/inside-gentoo/contact/">contact us</a>.
</div>
</div>
<div class="row">
- <div class="col-xs-2 col-sm-3 col-md-2">
+ <div class="col-2 col-sm-3 col-md-2">
<ul class="footerlinks three-icons">
<li><a href="https://twitter.com/gentoo" title="@Gentoo on Twitter"><span class="fa fa-twitter fa-fw"></span></a></li>
<li><a href="https://www.facebook.com/gentoo.org" title="Gentoo on Facebook"><span class="fa fa-facebook fa-fw"></span></a></li>
<li></li>
</ul>
</div>
- <div class="col-xs-10 col-sm-9 col-md-10">
+ <div class="col-10 col-sm-9 col-md-10">
<strong>&copy; 2001&ndash;2020 Gentoo Foundation, Inc.</strong><br>
<small>
Gentoo is a trademark of the Gentoo Foundation, Inc.
The contents of this document, unless otherwise expressly stated, are licensed under the
- <a href="https://creativecommons.org/licenses/by-sa/3.0/" rel="license">CC-BY-SA-3.0</a> license.
+ <a href="https://creativecommons.org/licenses/by-sa/4.0/" rel="license">CC-BY-SA-4.0</a> license.
The <a href="https://www.gentoo.org/inside-gentoo/foundation/name-logo-guidelines.html">Gentoo Name and Logo Usage Guidelines</a> apply.
</small>
</div>
@@ -126,8 +129,9 @@
</div>
</footer>
- <script src="https://assets.gentoo.org/tyrian/v1/jquery.min.js"></script>
- <script src="https://assets.gentoo.org/tyrian/v1/bootstrap.min.js"></script>
+ <script src="https://assets.gentoo.org/tyrian/v2/jquery-3.3.slim.js"></script>
+ <script src="https://assets.gentoo.org/tyrian/v2/popper.min.js"></script>
+ <script src="https://assets.gentoo.org/tyrian/v2/bootstrap.min.js"></script>
<script src="/js/quoting.js"></script>
</body>
</html>
diff --git a/views/listmonth.erb b/views/listmonth.erb
index 337e81e..279510c 100644
--- a/views/listmonth.erb
+++ b/views/listmonth.erb
@@ -1,6 +1,6 @@
<h1 class="first-header">Gentoo Archives: <%= h list %> in <%= to_month(params[:year], params[:month]) %></h1>
-<div class="hidden-xs">
+<div class="d-none d-sm-block">
<%= partial :pagination, locals: { current_page: current_page, max_pages: max_pages } %>
</div>
@@ -18,7 +18,7 @@
<% end %>
<div class="table-responsive">
- <table class="table table-condensed table-hover ag-message-table">
+ <table class="table table-sm table-hover ag-message-table">
<tr>
<th class="ag-message-table-subject">Subject</th>
<th class="ag-message-table-from">From</th>
diff --git a/views/lists.erb b/views/lists.erb
index c2cee2c..aae8cdb 100644
--- a/views/lists.erb
+++ b/views/lists.erb
@@ -3,18 +3,20 @@
<h2>Current Mailing Lists</h2>
<div class="row">
- <div class="col-xs-12 col-md-6">
+ <div class="col-12 col-md-6">
<div class="list-group">
<% $config['active_lists'].each do |list| %>
- <a href="<%= h list %>/" class="list-group-item">
+ <a href="<%= h list %>/" class="list-group-item list-group-item-action d-flex justify-content-between align-items-center">
<span class="fa fa-fw fa-archive"></span>
<%= h list %>
- <span class="badge"><%= MessageCountCache.instance[list] %></span>
+ <h4 class="mb-0">
+ <span class="badge badge-secondary badge-pill"><%= MessageCountCache.instance[list] %></span>
+ </h4>
</a>
<% end %>
</div>
</div>
- <div class="col-xs-12 col-md-6">
+ <div class="col-12 col-md-6">
<div class="alert alert-info" role="alert">
<strong>How to Participate</strong><br>
Please see our <a href="https://www.gentoo.org/main/en/lists.xml" class="alert-link">Mailing List information page</a> for more information on
@@ -23,21 +25,23 @@
</div>
</div>
-<h2>Frozen Archives</h2>
+<h2 class="mt-5">Frozen Archives</h2>
-<div class="row">
- <div class="col-xs-12 col-md-6">
+<div class="row mb-5">
+ <div class="col-12 col-md-6">
<div class="list-group">
<% $config['frozen_lists'].each do |list| %>
- <a href="<%= h list %>/" class="list-group-item">
+ <a href="<%= h list %>/" class="list-group-item list-group-item-action d-flex justify-content-between align-items-center">
<span class="fa fa-fw fa-archive"></span>
<%= h list %>
- <span class="badge"><%= MessageCountCache.instance[list] %></span>
+ <h4 class="mb-0">
+ <span class="badge badge-secondary badge-pill"><%= MessageCountCache.instance[list] %></span>
+ </h4>
</a>
<% end %>
</div>
</div>
- <div class="col-xs-12 col-md-6">
+ <div class="col-12 col-md-6">
<div class="alert alert-warning" role="alert">
<strong>Inactive Lists</strong><br>
These mailing lists are inactive. You can not post or subscribe to them any more.
diff --git a/views/message.erb b/views/message.erb
index 523bf25..b912445 100644
--- a/views/message.erb
+++ b/views/message.erb
@@ -1,7 +1,7 @@
<h1 class="first-header">Gentoo Archives: <%= list %></h1>
<div class="table-responsive">
- <table class="table table-condensed ag-header-table">
+ <table class="table table-sm ag-header-table">
<tr>
<th class="ag-header-name-col">From:</th>
<td><%= h strip_email_headers(message['_source']['from']).first %></td>
@@ -45,7 +45,7 @@
<h3>Attachments</h3>
<div class="table-responsive">
- <table class="table table-condensed ag-attachment-table">
+ <table class="table table-sm ag-attachment-table">
<tr>
<th>File name</th>
<th>MIME type</th>
@@ -64,7 +64,7 @@
<h3>Replies</h3>
<div class="table-responsive">
- <table class="table table-condensed ag-replies-table">
+ <table class="table table-sm ag-replies-table">
<tr>
<th>Subject</th>
<th>Author</th>
diff --git a/views/pagination.erb b/views/pagination.erb
index af43309..caf9d08 100644
--- a/views/pagination.erb
+++ b/views/pagination.erb
@@ -1,37 +1,37 @@
<nav class="pull-right">
<ul class="pagination ag-pager">
<% if current_page == 1 %>
- <li class="disabled">
- <a href="#" aria-label="Previous">
+ <li class="page-item disabled">
+ <a class="page-link" href="#" aria-label="Previous">
<span aria-hidden="true">&laquo;</span>
</a>
<% else %>
- <li>
- <a href="<%= current_page - 1 %>" aria-label="Previous">
+ <li class="page-item">
+ <a class="page-link" href="<%= current_page - 1 %>" aria-label="Previous">
<span aria-hidden="true">&laquo;</span>
</a>
<% end %>
</li>
<% min = [1, current_page - 3].max ; max = [max_pages, current_page + 3].min %>
<% if min > 3 %>
- <li><a href="1">1</a></li>
- <li class="disabled"><a href="#">…</a></li>
+ <li class="page-item"><a class="page-link" href="1">1</a></li>
+ <li class="page-item disabled"><a class="page-link" href="#">…</a></li>
<% end %>
<% (min..max).each do |page| %>
- <li <% if page == current_page %><%= 'class="active"' %><% end %>><a href="<%= page %>"><%= page %></a></li>
+ <li <% if page == current_page %><%= 'class="page-item active"' %><% end %>><a class="page-link" href="<%= page %>"><%= page %></a></li>
<% end %>
<% if (max_pages - max) > 3 %>
- <li class="disabled"><a href="#">…</a></li>
- <li><a href="<%= max_pages %>"><%= max_pages %></a></li>
+ <li class="page-item disabled"><a class="page-link" href="#">…</a></li>
+ <li class="page-item"><a class="page-link" href="<%= max_pages %>"><%= max_pages %></a></li>
<% end %>
<% if current_page == max_pages %>
- <li class="disabled">
- <a href="#" aria-label="Next">
+ <li class="page-item disabled">
+ <a class="page-link" href="#" aria-label="Next">
<span aria-hidden="true">&raquo;</span>
</a>
<% else %>
- <li>
- <a href="<%= current_page + 1 %>" aria-label="Next">
+ <li class="page-item">
+ <a class="page-link" href="<%= current_page + 1 %>" aria-label="Next">
<span aria-hidden="true">&raquo;</span>
</a>
<% end %>
diff --git a/views/report.erb b/views/report.erb
index 13a8cf4..6ee3000 100644
--- a/views/report.erb
+++ b/views/report.erb
@@ -4,7 +4,7 @@
Please confirm that you want to report the message below:
</p>
-<table class="table table-condensed ag-header-table">
+<table class="table table-sm ag-header-table">
<tr>
<th>Mailing List:</th>
<td><%= h list %></td>
diff --git a/views/views.erb b/views/views.erb
index d644b43..d99e1d0 100644
--- a/views/views.erb
+++ b/views/views.erb
@@ -1,4 +1,4 @@
<div class="btn-group ag-view-selection" role="group" aria-label="Message view selection">
- <a href="/<%= h list %>/threads/<%= h params[:year] %>-<%= h params[:month] %>/" class="btn btn-<% if mode == :threads%>primary<% else %>default<% end %>">Threads</a>
- <a href="/<%= h list %>/messages/<%= h params[:year] %>-<%= h params[:month] %>/" class="btn btn-<% if mode == :messages%>primary<% else %>default<% end %>">Messages</a>
+ <a href="/<%= h list %>/threads/<%= h params[:year] %>-<%= h params[:month] %>/" class="btn btn-<% if mode == :threads%>primary<% else %>outline-secondary<% end %>">Threads</a>
+ <a href="/<%= h list %>/messages/<%= h params[:year] %>-<%= h params[:month] %>/" class="btn btn-<% if mode == :messages%>primary<% else %>outline-secondary<% end %>">Messages</a>
</div> \ No newline at end of file