Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: mobile-nixos/mobile-nixos
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 6be1a3bf0ca7
Choose a base ref
...
head repository: mobile-nixos/mobile-nixos
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 23fbc6b8176c
Choose a head ref
  • 3 commits
  • 4 files changed
  • 1 contributor

Commits on May 6, 2020

  1. Copy the full SHA
    232053d View commit details
  2. Copy the full SHA
    446eec1 View commit details
  3. Merge pull request #139 from samueldr-wip/fix/site-articles

    Misc. fixes for the site articles
    samueldr authored May 6, 2020
    Copy the full SHA
    23fbc6b View commit details
Showing with 23 additions and 5 deletions.
  1. +1 −0 doc/_support/converter/lib/processor/page.rb
  2. +10 −1 doc/_support/news_article.erb
  3. +6 −2 doc/_support/styles/base.less
  4. +6 −2 doc/_support/styles/news.less
1 change: 1 addition & 0 deletions doc/_support/converter/lib/processor/page.rb
Original file line number Diff line number Diff line change
@@ -128,6 +128,7 @@ def handle_special_news()
template = ERB.new(File.read(File.join($options["root"], "_support/news_article_header.erb")))

image = @doc.attributes["image"]
image = nil if image == ""
header_styles =
if @doc.attributes["header_prefers"] then
" background-position: #{@doc.attributes["header_prefers"]} center;"
11 changes: 10 additions & 1 deletion doc/_support/news_article.erb
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
<article>
<header style="background-image: url('<%= image %>');<%= header_styles %>">
<header class="<%= [
if image
"with-image"
else
"without-image"
end
].compact.join(" ") %>" style="<%= [
if image then "background-image: url('#{image}')" end,
header_styles,
].compact.join(";") %>">
<div class="details">
<h3><a href="<%= url %>"><%= title %></a></h3>
<% if date %><div class="date"><%= date %></div><% end %>
8 changes: 6 additions & 2 deletions doc/_support/styles/base.less
Original file line number Diff line number Diff line change
@@ -26,8 +26,12 @@ tt, code, kbd, samp, pre, span.command {

// Without this slight adjustment, the monospaced text seems too smushed
// with the non-monospaced text.
padding-left: 0.4ex;
padding-right: 0.4ex;
// (Using a padding will cause weirdness on newlines.)
&::before, &::after {
content: " ";
display: inline;
font-size: 0.4em;
}

// The monospace font often has a character height that's visually bigger
// than the non-monospaced ones. This adjusts for that.
8 changes: 6 additions & 2 deletions doc/_support/styles/news.less
Original file line number Diff line number Diff line change
@@ -13,6 +13,12 @@ section.news {
}
}

body.news-article > .article-header,
section.news article > header.with-image:first-child {
padding-bottom: @gutter/2;
padding-top: calc(12% + 2*@gutter + 1rem);
}

body.news-article > .article-header,
section.news article > header:first-child {
position: relative;
@@ -24,10 +30,8 @@ section.news article > header:first-child {
margin-left: -@gutter;
margin-right: -@gutter;
margin-bottom: @gutter;
padding: @gutter/2;
padding-left: @gutter;
padding-right: @gutter;
padding-top: calc(12% + 2*@gutter + 1rem);

h1, h2, h3 {
font-size: 1.2rem;