Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b91d54d

Browse files
committed
Replace Generated Files with Static HTML and CSS
To serve as placeholder content for future commits, this commit commits the site's index page, along with some foundational CSS rules. The static content was generated by transforming the project's `README.md` through Markdown into HTML. Desktop: Collapsed history --- ![git-read in desktop dimensions with the history collapsed][desktop-collapsed] Desktop: Expanded history --- ![git-read in desktop dimensions with the history expanded][desktop-expanded] Mobile: Collapsed history --- ![git-read in mobile dimensions with the history collapsed][mobile-collapsed] Mobile: Expanded history --- ![git-read in mobile dimensions with the history expanded][mobile-expanded] [desktop-collapsed]: https://user-images.githubusercontent.com/2575027/78400048-ff44e880-75c3-11ea-9b36-5431a66e332a.png [desktop-expanded]: https://user-images.githubusercontent.com/2575027/78400051-ff44e880-75c3-11ea-8086-21156ad8e4e0.png [mobile-collapsed]: https://user-images.githubusercontent.com/2575027/78400052-ffdd7f00-75c3-11ea-962e-f5ea35b87786.png [mobile-expanded]: https://user-images.githubusercontent.com/2575027/78400053-ffdd7f00-75c3-11ea-98f2-26f8472b7e54.png
1 parent 4b5836d commit b91d54d

5 files changed

Lines changed: 152 additions & 47 deletions

File tree

source/index.html.erb

Lines changed: 63 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,69 @@
11
---
2-
title: Welcome to Middleman
2+
title: Elaborate on the project's goals in the README.md
33
---
44

5-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 400 340" class="middleman-logo" aria-labelledby="middleman-logo__title" role="img">
6-
<title id="middleman-logo__title">Middleman</title>
7-
<path class="middleman-logo__top-left-bar" fill-opacity=".45" d="M0 40L200 0v30L0 60z"/>
8-
<path class="middleman-logo__top-right-bar" fill="#fff" d="M200 0l200 40v20L200 30z"/>
9-
<path class="middleman-logo__left-m" fill-opacity=".45" d="M0 78v184l45 5V152l45 83 47-83v129l53 7V52l-57 8-43 83-43-70z"/>
10-
<path class="middleman-logo__right-m" fill="#fff" d="M400 78v184l-45 5V152l-45 83-47-83v129l-53 7V52l57 8 43 83 43-70z"/>
11-
<path class="middleman-logo__bottom-left-bar" fill-opacity=".45" d="M0 300l200 40v-30L0 280z"/>
12-
<path class="middleman-logo__bottom-right-bar" fill="#fff" d="M200 340l200-40v-20l-200 30z"/>
13-
</svg>
14-
155
<h1>
16-
Middleman is Running
6+
git-read
177
</h1>
188

19-
<%= link_to(
20-
"Read Documentation",
21-
"https://middlemanapp.com/basics/templating_language/",
22-
target: "_blank"
23-
) %>
9+
<p>
10+
Generate a website based on a project's Git history.
11+
</p>
12+
13+
<ul>
14+
<li>
15+
Serve the project's
16+
<code>README.md</code>
17+
as the homepage
18+
</li>
19+
<li>
20+
Index the history through its commits
21+
</li>
22+
<li>
23+
Transforms commit messages HTML through a syntax-aware Markdown parser
24+
</li>
25+
<li>
26+
Display the commits alongside their code changes
27+
</li>
28+
</ul>
29+
30+
<h2>
31+
Command-line Interface
32+
</h2>
33+
34+
<p>
35+
Once installed, make sure that the
36+
<code>bin/git-read</code>
37+
executable is available on
38+
your path so that the
39+
<a href="http://mirrors.edge.kernel.org/pub/software/scm/git/docs/howto/new-command.html">
40+
<code>git</code> program can invoke it as a subcommand
41+
</a>.
42+
</p>
43+
44+
<p>
45+
To learn of the ways to to invoke the command, execute
46+
<code>git read --help</code>
47+
:
48+
</p>
49+
50+
<code>
51+
<pre>
52+
usage: git read [--help] [-v|--verbose] [-s|--server|--serve]
53+
[-g | --git-dir &lt;path&gt;] [-o | --output-dir &lt;path&gt;]
54+
Generate HTML from your project's Git history
55+
56+
OPTIONS
57+
--output-dir
58+
specify the directory where the site will be built
59+
--git-dir
60+
specify the parent directory of the project's .git/ directory
61+
--verbose
62+
print debugging information during the build process
63+
--server
64+
build and serve assets with a server available at
65+
http://127.0.0.1:4567
66+
--help
67+
generate this help output
68+
</pre>
69+
</code>

source/javascripts/site.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
import "tailwindcss/tailwind.css"
1+
import "../stylesheets/site.css"

source/layouts/layout.erb

Lines changed: 50 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,60 @@
1-
<!doctype html>
1+
<!DOCTYPE HTML>
22
<html>
33
<head>
44
<meta charset="utf-8">
55
<meta http-equiv="x-ua-compatible" content="ie=edge">
6-
<meta name="viewport"
7-
content="width=device-width, initial-scale=1, shrink-to-fit=no">
6+
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
87
<!-- Use the title from a page's frontmatter if it has one -->
98
<title><%= current_page.data.title || "Middleman" %></title>
109
<%= javascript_include_tag "site" %>
1110
</head>
12-
<body>
13-
<%= yield %>
11+
<body class="min-h-screen">
12+
<header class="flex flex-row h-12 border-b">
13+
<h1 class="flex items-center justify-center w-full md:border-r md:w-96">
14+
<a href="#">
15+
git-read
16+
</a>
17+
</h1>
18+
19+
<nav class="flex flex-grow justify-between items-center border-t p-3 fixed inset-x-0 bottom-0 bg-white z-10 md:px-4 md:py-0 md:bg-transparent md:border-0 md:relative">
20+
<a href="#">
21+
&#8592; Previous
22+
</a>
23+
24+
<a href="#">
25+
Next &#8594;
26+
</a>
27+
</nav>
28+
</header>
29+
30+
<main class="flex flex-col md:flex-row">
31+
<details class="relative pb-8 md:h-screen-fit">
32+
<summary class="cursor-pointer inset-0 top-auto list-none outline-none md:relative">
33+
<span class="sr-only open:hidden">Expand History</span>
34+
<span class="sr-only hidden open:initial">Collapse History</span>
35+
<div class="md:h-screen-fit flex flex-col border-b border-t h-8 w-full justify-center md:w-8 md:border-r md:border-l md:border-t-0 open:absolute inset-x-0 bottom-0 top-auto md:top-0 md:left-auto">
36+
<svg class="transform rotate-90 open:-rotate-90 md:rotate-0 md:open:rotate-180" viewBox="0 0 16 16" fill="currentColor" xmlns="http://www.w3.org/2000/svg">
37+
<path fill-rule="evenodd" d="M4.646 1.646a.5.5 0 01.708 0l6 6a.5.5 0 010 .708l-6 6a.5.5 0 01-.708-.708L10.293 8 4.646 2.354a.5.5 0 010-.708z" clip-rule="evenodd"/>
38+
</svg>
39+
</div>
40+
</summary>
41+
42+
<nav class="flex flex-col px-4 my-4 overflow-y-auto h-48 w-screen md:h-screen-fit md:w-96 md:my-auto md:p-2 md:pr-10 md:space-y-2">
43+
<a href="#">
44+
[GENERATED]: Scaffold the project with Middleman
45+
</a>
46+
47+
<a href="#">
48+
Elaborate on the project's goals in the README.md
49+
</a>
50+
</nav>
51+
</details>
52+
53+
<article class="flex-grow justify-center p-4 md:flex md:h-screen-fit md:p-8 md:overflow-y-auto">
54+
<section class="prose prose-lg md:prose-xl">
55+
<%= yield %>
56+
</section>
57+
</article>
58+
</main>
1459
</body>
1560
</html>

source/stylesheets/site.css

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
@tailwind base;
2+
@tailwind components;
3+
@tailwind utilities;
4+
5+
summary::-webkit-details-marker {
6+
@apply hidden;
7+
}
8+
9+
[open].open\:hidden,
10+
[open] .open\:hidden {
11+
@apply hidden;
12+
}
13+
14+
[open].open\:initial,
15+
[open] .open\:initial {
16+
display: initial;
17+
}
18+
19+
[open].open\:-rotate-90,
20+
[open] .open\:-rotate-90 {
21+
@apply -rotate-90;
22+
}
23+
24+
[open].open\:absolute,
25+
[open] .open\:absolute {
26+
@apply absolute;
27+
}
28+
29+
@screen md {
30+
.md\:h-screen-fit {
31+
height: calc(100vh - 3rem); /* 3rem is our header height */
32+
}
33+
34+
[open].md\:open\:rotate-180,
35+
[open] .md\:open\:rotate-180 {
36+
@apply rotate-180;
37+
}
38+
}

source/stylesheets/site.css.scss

Lines changed: 0 additions & 24 deletions
This file was deleted.

0 commit comments

Comments
 (0)