diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/blog.html.erb | 7 | ||||
-rw-r--r-- | src/blog/welcome.html | 29 | ||||
-rw-r--r-- | src/index.html.erb | 22 | ||||
-rw-r--r-- | src/post-template.html.erb | 2 | ||||
-rw-r--r-- | src/projects.html | 10 | ||||
-rw-r--r-- | src/style.css | 67 | ||||
-rw-r--r-- | src/template.html.erb | 39 |
7 files changed, 176 insertions, 0 deletions
diff --git a/src/blog.html.erb b/src/blog.html.erb new file mode 100644 index 0000000..d89494a --- /dev/null +++ b/src/blog.html.erb @@ -0,0 +1,7 @@ +<ul> +<% posts.each do |post| %> + <li> + <a href=<%= path_to post['title'] %>><%= post['title'] %></a> <%= post['date'] %> + </li> +<% end %> +</ul> diff --git a/src/blog/welcome.html b/src/blog/welcome.html new file mode 100644 index 0000000..98de4f5 --- /dev/null +++ b/src/blog/welcome.html @@ -0,0 +1,29 @@ +title: Welcome! +date: June 26, 2019 +--- +<p> +Hello, internet! In the spirit of +<a href='http://www.alwaysownyourplatform.com/'> +<pre> +(•_•) +<) )╯Always +/ \ + +\(•_•) + ( (> Own + / \ + + (•_•) +<) )> Your Platform + / \ +</pre> +</a> +I've decided to launch my own website and blog. +</p> +<p> +In the spirit of minimalism, it's (as you can see) very bare-bones. +</p> +<p> +In the spirit of self-reliance, it's built with a custom static site generator +(which is really just a few glorified Ruby scripts) that (again, in the spirit +of minimalism) do only what I need them to do (and hopefully do so well!). diff --git a/src/index.html.erb b/src/index.html.erb new file mode 100644 index 0000000..23f08bc --- /dev/null +++ b/src/index.html.erb @@ -0,0 +1,22 @@ +<p> + I am a software engineer, writing smart contracts and other fun things + for <a href='https://celo.org'>Celo</a>. I got my bachelor's in computer + science at the University of Warsaw. +</p> + +<h2>Recent posts:</h2> + +<ul> +<% posts.take(5).each do |post| %> + <li> + <a href='<%= path_to post['title'] %>'><%= post['title'] %></a> <%= post['date'] %> + </li> +<% end %> +</ul> + +<hr /> +<ul class='links'> + <li><a href='mailto:marcin.j.chrzanowski@gmail.com'>Email</a></li> + <li><a href='https://github.com/m-chrzan'>GitHub</a></li> + <li><a href='https://linkedin.com/in/marcin-chrzanowski'>LinkedIn</a></li> +</ul> diff --git a/src/post-template.html.erb b/src/post-template.html.erb new file mode 100644 index 0000000..ece1545 --- /dev/null +++ b/src/post-template.html.erb @@ -0,0 +1,2 @@ +<h2 style='display: inline'><%= post['title'] %></h2> (<%= post['date'] %>) +<%= post['content'] %> diff --git a/src/projects.html b/src/projects.html new file mode 100644 index 0000000..61363a1 --- /dev/null +++ b/src/projects.html @@ -0,0 +1,10 @@ +<ul> + <li><a href='https://github.com/m-chrzan/dicebag'>Dicebag</a>: a dice + expression parser and roller. + </li> + <li><a href='#'>This website</a>: a small + mess of simple scripts for static site generation. I probably should've + used Jekyll, but I wanted to play around and build something minimal for + personal use. I'm not a webdev. + </li> +</ul> diff --git a/src/style.css b/src/style.css new file mode 100644 index 0000000..70fc10b --- /dev/null +++ b/src/style.css @@ -0,0 +1,67 @@ +body { + margin: 40px auto; + max-width: 800px; + line-height: 1.6; + font-size: 18px; + padding: 0 10px; +} + +a { + color: darkblue; + text-decoration: none; +} + +a:hover { + color: #55f; +} + +ul { + list-style-type: '—'; +} + +li { + margin-top: 10px; + margin-bottom: 10px; + text-indent: 0.7em; +} + +h1, h2, h3 { + line-height: 1.2 +} + +ul.links { + list-style-type: none; + display: flex; + align-items: stretch; + justify-content: space-evenly; +} + +.links li { + margin-top: 0px; + margin-bottom: 0px; +} + +/* note stuff */ +.note { + position: relative; + vertical-align: baseline; +} + +.note-content { + display: none; + position: absolute; + border: 1px solid black; + word-wrap: break-word; + background-color: white; + font-size: 14px; + min-width: 30em; + left: 1em; + bottom: 0px; +} + +.foot-down a { + position: relative; + z-index: 1; + padding: 10px; + margin: -10px; +} diff --git a/src/template.html.erb b/src/template.html.erb new file mode 100644 index 0000000..d61054e --- /dev/null +++ b/src/template.html.erb @@ -0,0 +1,39 @@ +<head> + <title><%= head_title %></title> + <link rel='stylesheet' type='text/css' href='<%= path_to 'style' %>'> + <meta charset='utf8'> +</head> +<body> + <h1><%= h1_title %></h1> + + <hr /> + + <ul class='links'> + <li><a href='<%= path_to 'index' %>'>Home</a></li> + <li><a id='writings' href='<%= path_to 'blog' %>'>Writings</a></li> + <li><a href='<%= path_to 'projects' %>'>Projects</a></li> + </ul> + + <hr /> + + <%= content %> + + <script type='text/javascript'> + var synonyms = [ + 'Writings', + 'Blog', + 'Articles', + 'Posts', + 'Notes', + 'Memos', + 'Thoughths', + 'Words' + ] + var writings = document.getElementById('writings') + writings.addEventListener('mouseenter', function (event) { + + writings.innerHTML = + synonyms[Math.floor(Math.random() * synonyms.length)] + }) + </script> +</body> |