Commit 4b83c497 authored by Murukesh Mohanan's avatar Murukesh Mohanan

updated site, new blog post!

parent b4e56414
Gemfile.lock Gemfile.lock
.*.sw?
_site/
_site/**
name: Murukesh Mohanan, IIT Bombay name: Murukesh Mohanan, IIT Bombay
markdown: kramdown markdown: kramdown
root_url: "" root_url: ""
timezone: Asia/Kolkatta
highlighter: pygments
kramdown:
input: GFM
hard_wrap: false
defaults: defaults:
- -
...@@ -8,4 +14,10 @@ defaults: ...@@ -8,4 +14,10 @@ defaults:
path: "" path: ""
values: values:
layout: "default" layout: "default"
pagestyle: "style"
pages_list:
Main: ''
Acads: 'acad'
Resources: 'resources'
Blog: 'blog'
Contact: 'contact'
...@@ -10,54 +10,54 @@ ...@@ -10,54 +10,54 @@
<title> <title>
{{ page.title }} &ndash; Muru's home page. {{ page.title }} &ndash; Muru's home page.
</title> </title>
<link rel="stylesheet" href="{{ site.root_url }}/styles/style.css" type="text/css">
<link rel="stylesheet" href="{{ site.root_url }}/styles/{{ page.pagestyle }}.css" type="text/css"> <link rel="stylesheet" href="{{ site.root_url }}/styles/{{ page.pagestyle }}.css" type="text/css">
<!-- Web Fonts FTW! --> <!-- Web Fonts FTW! -->
<link rel="stylesheet" type="text/css" href="https://fonts.googleapis.com/css?family=Ubuntu"> <link rel="stylesheet" type="text/css" href="https://fonts.googleapis.com/css?family=Ubuntu">
<script type="text/javascript" src="{{ site.root_url }}/murujs.js"></script>
</head> </head>
<body> <body>
<div id="header"> <header id="title">
<h2>Murukesh Mohanan</h2> <h1>
Murukesh Mohanan
</h1>
<ul> <ul>
<li>Third year, Master of Technology in Computer Science <li>
and Engineering</li> Third year, Master of Technology in Computer Science
<li>RA, System Administration, CSE</li> and Engineering
</li>
<li>
RA, System Administration, CSE
</li>
</ul> </ul>
</div> </header>
<div id="sidebar"> <nav>
<!-- Navigational link. -->
<h3>
<ul> <ul>
<a href="{{ site.root_url }}/"><li>Main</li></a> {% for page in site.pages_list %}
<a href="{{ site.root_url }}/acad#main"><li>Acads</li></a> <a href="{{ site.root_url }}/{{ page[1] }}#main">
<a href="{{ site.root_url }}/resources#main"><li>Resources</li></a> <li>
<a href="{{ site.root_url }}/contact#main"><li>Contact<br> <span id="contact-comment">(Please don't!)</span></li></a> {{ page[0] }}
</li>
</a>
{% endfor %}
</ul> </ul>
</h3> </nav>
</div>
<div id="vim-proposal"> <div id="vim-proposal">
<a href="http://area51.stackexchange.com/proposals/80441/vi-and-vim?referrer=cSyv9sCu62iNAfGtTTKvSg2"> <a href="http://area51.stackexchange.com/proposals/80441/vi-and-vim?referrer=cSyv9sCu62iNAfGtTTKvSg2">
<img src="http://area51.stackexchange.com/ads/proposal/80441.png" alt="Stack Exchange Q&A site proposal: Vi and vim" /> <img src="http://area51.stackexchange.com/ads/proposal/80441.png" alt="Stack Exchange Q&A site proposal: Vi and vim" />
</a> </a>
</div> </div>
<div id="main" markdown="1"> <article id="main">
{{ content }} {{ content }}
</div> </article>
<div id="footer"> <footer>
<div class="section"> <section>
<!-- Copyleft FTW! --> <!-- Copyleft FTW! -->
<img src="{{ site.root_url }}/images/Copyleft.png" style="height: 1em;" alt="copyleft"> Murukesh Mohanan. <img src="{{ site.root_url }}/images/Copyleft.png" style="height: 1em;" alt="copyleft"> Murukesh Mohanan.
<p>Permission to use content is granted under <a href="https://creativecommons.org/licenses/by-sa/3.0/" target="_blank">the CC BY-SA license</a>. <p>Permission to use content is granted under <a href="https://creativecommons.org/licenses/by-sa/3.0/" rel="license">the CC BY-SA license</a>.</p>
<p>The font used here is the Ubuntu font, via Google Web Fonts. <p>The font used here is the Ubuntu font, via Google Web Fonts.</p>
</div> </section>
</div> </footer>
</body> </body>
<script type="text/javascript">
/*
*The init() function assigns the event handlers.
*/
MuruJS.init();
</script>
</html> </html>
--- ---
layout: default layout: default
permalink: /blogs/:title pagestyle: posts
--- ---
<div class="section"> <header class="section post-title">
<h1> {{ page.title }} </h1> <h1>
<p class="meta">{{ page.date | date_to_string }}</p> <a href="{{ page.url }}">
</div> {{ page.title }}
</a>
<time datetime="{{ page.date | date_to_xmlschema }}" class="post-date">
{{ page.date | date: "%B %e, %Y" }}
</time>
</h1>
</header>
<div class="section post"> <section id="post">
{{ content }} {{ content }}
</div> </section>
---
layout: post
title: Vim as $MANPAGER
---
Long, long ago, in a hostel room far, far away, I once read about using Vim as
the pager for `man`. It involved using some script which made `vim` behave like
`less` (or something like that). I'd stumbled upon it while trying to make
reading manpages more comfortable, with syntax colouring, navigation, etc.
Of late, with [Vim.SE] for support, I've been customizing Vim more and more.
I've made a Git repo of my Vim files, taken baby steps in automating tasks I
often do, and so on. While looking through the recent posts in [Unix.SE], I came
across [this post][1] which suggested using your editor as the pager. That
kicked up the dusty cobwebs in my decrepit memory module, and I remembered that
old attempt at using Vim for reading manpages. So, I set about trying to make
Vim `man`'s pager. Why did I submit myself to such cruel and unusual punishment?
1. I *like* Vim.
2. I have it customized to my liking.
3. It is powerful. The search is way better than anything `less` or your average
manpage browser (like `yelp`) can offer.
4. It can browse to other manpages mentioned using tag navigation (`<c-]>`,
`<c-t>`).
The post suggested setting `$MANPAGER` to a combination of `col` and `vim`:
export MANPAGER="col -b | vim -c 'set ft=man nomod nolist ignorecase' -"
For decidedly non-obvious reasons, it's not likely to work for you. Why?
Because GNU `man` doesn't support piped commands in `$MANPAGER` -- BSD's `man`
does (that's +1 for you OSX folks). From [`man man`][man]:
<pre><code>MANPAGER, PAGER
If $MANPAGER or $PAGER is set ($MANPAGER is used in preference),
its value is used as the name of the program used to display the
manual page. By default, pager -s is used.
The value may be a simple command name or a command with
arguments, and may use shell quoting (backslashes, single
quotes, or double quotes). <strong>It may not use pipes to connect
multiple commands</strong>; if you need that, use a wrapper script, which
may take the file to display either as an argument or on
standard input.
</code></pre>
I tried the suggested solution (using a wrapper script), which worked fine.
However, it created a problem: I use Git to manage my dotfiles. I'd rather *not*
rely on stuff outside the repo. Stuff installed by package managers and
differences per distro are a fact of life and have to be handled, but I'd rather
not take pains over what I add to it. One obvious solution is to wrap the
command in `sh -c`:
MANPAGER='sh -c "col -b | vim -c \'set ft=man nomod nolist ignorecase\' -"'
**Ugly.** I also hate having to deal with quoting.
At this point, it struck me: Why should I run this via a pipe? Once Vim starts,
I can perfectly well use `%! col -b` to do the job. So:
MANPAGER='vim -c "%! col -b" -c "set ft=man nomod nolist ignorecase" -'
Nice!
Now, other considerations started popping up. You can easily quite `less` (and
by extension, `man`), by pressing <kbd>q</kbd>, or <kbd>Ctrl</kbd><kbd>C</kbd>.
Vim usually considers a buffer read from `stdin` to be modified. Therefore, to
quit a manpage, you'd have to do `:q!`, not just `:q`. Thankfully, one of the
options set ([`nomod`][nomod]) tells Vim that the buffer hasn't been modified.
Therefore, we can just use `:q`:
nnoremap q :q
Other considerations arise:
- The buffer is modifiable. There's no reason for it to be so.
- The buffer doesn't have a name. It would be convenient to see the name of the
manpage.
- You don't want swapfiles hanging around from manpages.
As I pondered over this, I realised that these are settings I'd want to apply to
a manpage no matter how I opened it. Hence, they should really be in Vim's
filetype settings for `man`. So, I created a `~/.vim/ftplugin/man.vim`,
containing:
{% highlight vim linenos %}
function! PrepManPager()
if !empty ($MAN_PN)
silent %! col -b
file $MAN_PN
endif
setlocal nomodified
setlocal nomodifiable
setlocal readonly
setlocal nolist
setlocal noswapfile
endfunction
autocmd VimEnter * PrepMan()
{% endhighlight %}
I picked [`VimEnter`][vimenter] since it runs after any commands specified using
`-c` are run, so I can get it to run after the filetype has been set.
However, I realised that:
- I wanted to apply some of these settings to manpages irrespective of how they
were made; and
- I'd rather not specify `set ft=man` from the command line, keeping an eye on
using Vim as a general-purpose pager
- Using `VimEnter *` felt *wrong*
A bit of experimentation later, I found that:
1. `man` doesn't seem to ever provide a filename as an argument, irrespective of
what the manpage says.
2. `man` sets `MAN_PN` to the manpage name (`man(1)`, for example)
Knowing that I'm reading from `stdin` and that `MAN_PN` is set (to the manpage
name!), I came up with this version:
{% highlight vim linenos %}
" vimrc
if !empty($MAN_PN)
autocmd StdinReadPost * set ft=man | file $MAN_PN
endif
" ftplugin/man.vim
setlocal nolist
setlocal readonly
setlocal buftype=nofile
setlocal bufhidden=hide
setlocal noswapfile
setlocal nomodifiable
function! PrepManPager()
setlocal modifiable
if !empty ($MAN_PN)
silent %! col -b
endif
setlocal nomodified
setlocal nomodifiable
endfunction
autocmd BufWinEnter $MAN_PN call PrepManPager()
nnoremap q :qa<CR>
nnoremap <Space> <PageDown>
map <expr> <CR> winnr('$') == 1 ? ':vs<CR><C-]>' : '<C-]>'
{% endhighlight %}
with:
MANPAGER="vim -"
Beautiful!
What does this do?
1. In the main `vimrc`, I check if I'm reading from `stdin` and if `MAN_PN` is
set. If so, set the filetype *and the filename*.
2. In the filetype-specific setting, use an `autocmd` the relies on the filename
being `$MAN_PN` to apply `col -b`.
3. Set `nomodified` to tell Vim that the buffer hasn't been modified, and
make it a read-only, non-modifiable, scratch buffer.
4. Also, map `q` to `:qa`, so that I can quit all opened manpages, and
<kbd>Space</kbd> to <kbd>Page Down</kbd>, in keeping with the usual behaviour
of `less`.
Finally, `man man` opens up pretty much as I'd like it to.
Why "pretty much"? `man` obeys `MANWIDTH`, so I can get a manpage formatted
exactly as wide as I want. If open a manpage within Vim, however (by navigating
the tags, for example), the page is formatted for the full width of Vim. :(
Secondly, Vim leaves this annoying message:
```
$ man man
Vim: Reading from stdin...
$
```
For the moment, I've adopted the decidedly un-Vim-like solution of opening a
split before navigating to any tags - half the terminal width is fine for me.
That's what the last mapping in the above snippet does: check if I have only one
window open, and if so, open a new window before jumping to the tag - with the
added benefit using to the thoroughly intuitive (to me) <kbd>Enter</kbd> key for
jumping to the named page. As a happy side effect, I get to see exactly where I
was in the new window! :)
I have no idea how to suppress the `stdin` message from Vim itself.
---
All told:
[![man in Vim]({{ site.root_url }}/images/vim-man.png)]({{ site.root_url }}/images/vim-man.png)
---
Footnote:
This is my first blog post using [Jekyll](http://jekyllrb.com/). Writing it, I
have learned quiet a bit, which I will write about in another post soon.
[Unix.SE]: http://unix.stackexchange.com
[Vim.SE]: http://vi.stackexchange.com
[man]: http://man7.org/linux/man-pages/man1/man.1.html
[1]: http://unix.stackexchange.com/a/1853/70524
[nomod]: http://vimhelp.appspot.com/options.txt.html#%27nomod%27
[vimenter]: http://vimhelp.appspot.com/autocmd.txt.html#VimEnter
...@@ -3,33 +3,33 @@ title: Academics ...@@ -3,33 +3,33 @@ title: Academics
pagestyle: acad pagestyle: acad
permalink: /acad/ permalink: /acad/
--- ---
<div markdown="1" class="section"> <section markdown="1">
Sem IV courses: Sem IV courses:
- HS 625: Philosophy of Education - HS 625: Philosophy of Education
- CS 691: R & D Project - CS 691: R & D Project
</div> </section>
<div markdown="1" class="section"> <section markdown="1">
Sem III courses: Sem III courses:
- [CS 601](http://www.cse.iitb.ac.in/page134?course=CS+601): Algorithms and Complexity - [CS 601](http://www.cse.iitb.ac.in/page134?course=CS+601): Algorithms and Complexity
- [CS 626](http://www.cse.iitb.ac.in/page134?course=CS+626): Speech, Natural Language Processing and the Web - [CS 626](http://www.cse.iitb.ac.in/page134?course=CS+626): Speech, Natural Language Processing and the Web
- [CS 724](http://www.cse.iitb.ac.in/page134?course=CS+724): Network Security and Cryptography - 2 - [CS 724](http://www.cse.iitb.ac.in/page134?course=CS+724): Network Security and Cryptography - 2
</div> </section>
<div markdown="1" class="section"> <section markdown="1">
Sem II courses: Sem II courses:
- CS 534: Quantum Information and Computing - CS 534: Quantum Information and Computing
- [CS 715](http://www.cse.iitb.ac.in/page134?course=CS+715): Design and Implementation of GNU Compiler Generation Framework - [CS 715](http://www.cse.iitb.ac.in/page134?course=CS+715): Design and Implementation of GNU Compiler Generation Framework
- [CS 726](http://www.cse.iitb.ac.in/page134?course=CS+726): Advanced Machine Learning - [CS 726](http://www.cse.iitb.ac.in/page134?course=CS+726): Advanced Machine Learning
</div> </section>
<div markdown="1" class="section"> <section markdown="1">
Sem I courses: Sem I courses:
- [CS 613](http://www.cse.iitb.ac.in/page134?course=CS+613): Design and Implementation of Functional Programming Languages - [CS 613](http://www.cse.iitb.ac.in/page134?course=CS+613): Design and Implementation of Functional Programming Languages
...@@ -37,11 +37,11 @@ Sem I courses: ...@@ -37,11 +37,11 @@ Sem I courses:
- [CS 621](http://www.cse.iitb.ac.in/page134?course=CS+621): Artificial Intelligence - [CS 621](http://www.cse.iitb.ac.in/page134?course=CS+621): Artificial Intelligence
- [CS 719](http://www.cse.iitb.ac.in/page134?course=CS+719): Topics in Mathematical Foundations of Formal Verification - [CS 719](http://www.cse.iitb.ac.in/page134?course=CS+719): Topics in Mathematical Foundations of Formal Verification
</div> </section>
<div markdown="1" class="section"> <section markdown="1">
Past: Past:
- Bachelor of Technology in Mechanical Engineering from IIT Guwahati - Bachelor of Technology in Mechanical Engineering from IIT Guwahati
</div> </section>
---
title: Blog
permalink: /blog/
pagestyle: posts
---
{% for post in site.posts %}
<section markdown="1">
<header class="post-title">
<h1>
<a href="{{ post.url }}#main">{{ post.title }}</a>
<time datetime="{{ post.date | date_to_xmlschema }}" class="post-date"> {{ post.date | date: "%B %e, %Y" }}</time>
</h1>
</header>
<hr>
{{ post.excerpt }}
</section>
{% endfor %}
...@@ -3,25 +3,25 @@ title: Contact ...@@ -3,25 +3,25 @@ title: Contact
permalink: /contact/ permalink: /contact/
--- ---
<div class="section" markdown="1"> <section markdown="1">
Currently at: Currently at:
- C-227, Hostel 13, IIT Bombay - C-227, Hostel 13, IIT Bombay
</div> </section>
<div class="section" markdown="1"> <section markdown="1">
Email me at: Email me at:
- murukesh.mohanan [AT] gmail.com - murukesh.mohanan [AT] gmail.com
- murukesh [AT] cse.iitb.ac.in - murukesh [AT] cse.iitb.ac.in
- m.mohanan [AT] alumni.iitg.ernet.in (defunct) - m.mohanan [AT] alumni.iitg.ernet.in (defunct)
</div> </section>
<div class="section" markdown="1"> <section markdown="1">
Online: Online:
- [Facebook](https://facebook.com/murukesh) - [Facebook](https://facebook.com/murukesh)
- [Google+](https://plus.google.com/+murukeshmohanan/) - [Google+](https://plus.google.com/+murukeshmohanan/)
- [Main Blog](http://murukeshm.blogspot.in/) - [Main Blog](http://murukeshm.blogspot.in/)
- [Second Blog](http://linuxexperiments.blogspot.in/) - [Second Blog](http://linuxexperiments.blogspot.in/)
</div> </section>
...@@ -2,22 +2,22 @@ ...@@ -2,22 +2,22 @@
title: Murukesh Mohanan title: Murukesh Mohanan
--- ---
<div markdown="1" class="section"> <section markdown="1">
Call me Muru. Call me Muru.
</div> </section>
<div markdown="1" class="section"> <section markdown="1">
I am an aspiring BOFH. Often called a psycho. I am an aspiring BOFH. Often called a psycho.
</div> </section>
<div markdown="1" class="section"> <section markdown="1">
I share the hobby of the masses - reading. :P Favourite books include *The I share the hobby of the masses - reading. :P Favourite books include *The
Green Mile*, *The Wheel of Time* series, the *Foundation* series and the *Rama* Green Mile*, *The Wheel of Time* series, the *Foundation* series and the *Rama*
series. series.
</div> </section>
<div markdown="1" class="section"> <section markdown="1">
I am a Gooner. Favourite players include "Mad Jens" Lehmann, Dennis Bergkamp I am a Gooner. Favourite players include "Mad Jens" Lehmann, Dennis Bergkamp
and Wojciech Szczęsny. I have been an Arsenal fan since the Champions League and Wojciech Szczęsny. I have been an Arsenal fan since the Champions League
final in Paris, 2006. final in Paris, 2006.
</div> </section>
...@@ -3,15 +3,15 @@ title: Resources ...@@ -3,15 +3,15 @@ title: Resources
pagestyle: cann-table pagestyle: cann-table
permalink: /resources/ permalink: /resources/
--- ---
<div markdown="1" class="section"> <section markdown="1">
A CV template in LaTeX (modified from one obtained online, original included): A CV template in LaTeX (modified from one obtained online, original included):
- (outdated) tarball: [CV-LaTeX.tar.gz]({{ site.root_url }}/files/CV-LaTeX.tar.gz) - (outdated) tarball: [CV-LaTeX.tar.gz]({{ site.root_url }}/files/CV-LaTeX.tar.gz)
- [CSE Git](https://git.cse.iitb.ac.in/murukesh/cv) - [CSE Git](https://git.cse.iitb.ac.in/murukesh/cv)
</div> </section>
<div markdown="1" class="section"> <section markdown="1">
Some stuff that I drag around with me on my various Linux boxes: Some stuff that I drag around with me on my various Linux boxes:
## Vimrc and vim plugins {#vim} ## Vimrc and vim plugins {#vim}
...@@ -25,19 +25,24 @@ Some stuff that I drag around with me on my various Linux boxes: ...@@ -25,19 +25,24 @@ Some stuff that I drag around with me on my various Linux boxes:
Currently contains a nifty `vimrc`, and some plugins: Currently contains a nifty `vimrc`, and some plugins:
- [Pathogen](http://www.vim.org/scripts/script.php?script_id=2332) - [Pathogen](http://www.vim.org/scripts/script.php?script_id=2332)
- [Syntastic](http://www.vim.org/scripts/script.php?script_id=2736) - [diffchar.vim](https://github.com/vim-scripts/diffchar.vim)
- [SuperTab](http://www.vim.org/scripts/script.php?script_id=1643) - [eregex.vim](https://github.com/othree/eregex.vim.git)
- [Align](http://www.vim.org/scripts/script.php?script_id=294) - [nerdtree](https://github.com/scrooloose/nerdtree.git)
- [AutoAlign](http://www.vim.org/scripts/script.php?script_id=884) - [supertab](https://github.com/ervandew/supertab.git)
- [Latex-Box](http://www.vim.org/scripts/script.php?script_id=3109) - [syntastic](https://github.com/scrooloose/syntastic.git)
- [Surround.vim](http://www.vim.org/scripts/script.php?script_id=1697) - [vim2hs](https://github.com/dag/vim2hs)
- [Haskell Cuteness](http://www.vim.org/scripts/script.php?script_id=2603) - [vim-surround](https://github.com/tpope/vim-surround.git)
- [Extended Regex](http://www.vim.org/scripts/script.php?script_id=3282) - [LaTeX-Box](https://github.com/LaTeX-Box-Team/LaTeX-Box.git)
- [Haskell Mode - Vim](https://github.com/lukerandall/haskellmode-vim) - [ctrlp.vim](https://github.com/kien/ctrlp.vim)
- [Vim to Haskell](https://github.com/dag/vim2hs) - [vim-airline](https://github.com/bling/vim-airline)
- [vim-colorschemes](https://github.com/flazz/vim-colorschemes.git)
- [vim-fugitive](https://github.com/tpope/vim-fugitive.git)
- [AnsiEsc.vim](https://github.com/vim-scripts/AnsiEsc.vim)
</div> </div>
You might wanna do a `git pull` on some of the plugins inside `.vim/bundle`. You might wanna do a `git pull` on some of the plugins inside `.vim/bundle`:
git submodule foreach git pull -u origin master
**Bonus**: My dotfile repos: **Bonus**: My dotfile repos:
...@@ -56,9 +61,9 @@ This script mounts all arguments in directories within `~/cdrom` (as ISO9660 ima ...@@ -56,9 +61,9 @@ This script mounts all arguments in directories within `~/cdrom` (as ISO9660 ima
</div> </div>
These and more can be found on my [Github scrips repo](https://github.com/murukeshm/scripts). These and more can be found on my [Github scrips repo](https://github.com/murukeshm/scripts).
</div> </section>
<div markdown="1" class="section"> <section markdown="1">
## [A Cann Table][cann-table] {#cann} ## [A Cann Table][cann-table] {#cann}
<div id="cann-table-area"> <div id="cann-table-area">
...@@ -74,4 +79,4 @@ Hopefully this will count as personal use. :) ...@@ -74,4 +79,4 @@ Hopefully this will count as personal use. :)
[cann-table]: http://www.sussex.ac.uk/Users/iane/cannyclubs.php [cann-table]: http://www.sussex.ac.uk/Users/iane/cannyclubs.php
[7amkickoff]: http://www.7amkickoff.com/2012/cann-tables-show-the-gap-between-arsenal-and-the-top-is-smaller-than-you-think/ [7amkickoff]: http://www.7amkickoff.com/2012/cann-tables-show-the-gap-between-arsenal-and-the-top-is-smaller-than-you-think/
[epl]: http://www.premierleague.com/en-gb/matchday/league-table.html [epl]: http://www.premierleague.com/en-gb/matchday/league-table.html
</div> </section>
@import 'style.css';
#timetable { #timetable {
/* borderColor=#000000 width="100%" cellSpacing=0 cellPadding=9 border=1*/ /* borderColor=#000000 width="100%" cellSpacing=0 cellPadding=9 border=1*/
border: 0.1em solid gray; border: 0.1em solid gray;
......
@import 'resources.css'; @import 'resources.css';
#cann-table { #cann-table {
border: 0.1em solid gray; border: 0.1em solid gray;
width: 100%; width: 100%;
......
.hll { background-color: #404040 }
.c { color: #999999; font-style: italic } /* Comment */
.err { color: #a61717; background-color: #e3d2d2 } /* Error */
.esc { color: #d0d0d0 } /* Escape */
.g { color: #d0d0d0 } /* Generic */
.k { color: #6ab825; font-weight: bold } /* Keyword */
.l { color: #d0d0d0 } /* Literal */
.n { color: #d0d0d0 } /* Name */
.o { color: #d0d0d0 } /* Operator */
.x { color: #d0d0d0 } /* Other */
.p { color: #d0d0d0 } /* Punctuation */
.cm { color: #999999; font-style: italic } /* Comment.Multiline */
.cp { color: #cd2828; font-weight: bold } /* Comment.Preproc */
.c1 { color: #999999; font-style: italic } /* Comment.Single */
.cs { color: #e50808; font-weight: bold; background-color: #520000 } /* Comment.Special */
.gd { color: #d22323 } /* Generic.Deleted */
.ge { color: #d0d0d0; font-style: italic } /* Generic.Emph */
.gr { color: #d22323 } /* Generic.Error */
.gh { color: #ffffff; font-weight: bold } /* Generic.Heading */
.gi { color: #589819 } /* Generic.Inserted */
.go { color: #cccccc } /* Generic.Output */
.gp { color: #aaaaaa } /* Generic.Prompt */
.gs { color: #d0d0d0; font-weight: bold } /* Generic.Strong */
.gu { color: #ffffff; text-decoration: underline } /* Generic.Subheading */
.gt { color: #d22323 } /* Generic.Traceback */
.kc { color: #6ab825; font-weight: bold } /* Keyword.Constant */
.kd { color: #6ab825; font-weight: bold } /* Keyword.Declaration */
.kn { color: #6ab825; font-weight: bold } /* Keyword.Namespace */
.kp { color: #6ab825 } /* Keyword.Pseudo */
.kr { color: #6ab825; font-weight: bold } /* Keyword.Reserved */
.kt { color: #6ab825; font-weight: bold } /* Keyword.Type */
.ld { color: #d0d0d0 } /* Literal.Date */
.m { color: #3677a9 } /* Literal.Number */
.s { color: #ed9d13 } /* Literal.String */
.na { color: #bbbbbb } /* Name.Attribute */
.nb { color: #24909d } /* Name.Builtin */
.nc { color: #447fcf; text-decoration: underline } /* Name.Class */
.no { color: #40ffff } /* Name.Constant */
.nd { color: #ffa500 } /* Name.Decorator */
.ni { color: #d0d0d0 } /* Name.Entity */
.ne { color: #bbbbbb } /* Name.Exception */
.nf { color: #447fcf } /* Name.Function */
.nl { color: #d0d0d0 } /* Name.Label */
.nn { color: #447fcf; text-decoration: underline } /* Name.Namespace */
.nx { color: #d0d0d0 } /* Name.Other */
.py { color: #d0d0d0 } /* Name.Property */
.nt { color: #6ab825; font-weight: bold } /* Name.Tag */
.nv { color: #40ffff } /* Name.Variable */
.ow { color: #6ab825; font-weight: bold } /* Operator.Word */
.w { color: #666666 } /* Text.Whitespace */
.mb { color: #3677a9 } /* Literal.Number.Bin */
.mf { color: #3677a9 } /* Literal.Number.Float */
.mh { color: #3677a9 } /* Literal.Number.Hex */
.mi { color: #3677a9 } /* Literal.Number.Integer */
.mo { color: #3677a9 } /* Literal.Number.Oct */
.sb { color: #ed9d13 } /* Literal.String.Backtick */
.sc { color: #ed9d13 } /* Literal.String.Char */
.sd { color: #ed9d13 } /* Literal.String.Doc */
.s2 { color: #ed9d13 } /* Literal.String.Double */
.se { color: #ed9d13 } /* Literal.String.Escape */
.sh { color: #ed9d13 } /* Literal.String.Heredoc */
.si { color: #ed9d13 } /* Literal.String.Interpol */
.sx { color: #ffa500 } /* Literal.String.Other */
.sr { color: #ed9d13 } /* Literal.String.Regex */
.s1 { color: #ed9d13 } /* Literal.String.Single */
.ss { color: #ed9d13 } /* Literal.String.Symbol */
.bp { color: #24909d } /* Name.Builtin.Pseudo */
.vc { color: #40ffff } /* Name.Variable.Class */
.vg { color: #40ffff } /* Name.Variable.Global */
.vi { color: #40ffff } /* Name.Variable.Instance */
.il { color: #3677a9 } /* Literal.Number.Integer.Long */
@import 'style.css';
#main li { #main li {
list-style-image: url("../images/not_sign.png"); list-style-image: url("../images/not_sign.png");
padding: 0.1em; padding: 0.1em;
......
@import 'code.css';
#post ul li {
padding: 0.2em;
}
.post-title a {
text-decoration: none;
}
kbd {
border: solid black 0.05em ;
box-shadow: 0 0.1em 0.1em 0.2em rgba(100,100,100,0.75);
padding: 0.1em 0.5em;
border-radius: 0.15em;
background: #FEFEFE;
margin: 0 0.2em;
}
blockquote {
padding: 0;
margin: 0;
}
img {
max-width: 100%;
}
.linenos, .lineno {
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: -moz-none;
-o-user-select: none;
user-select: none;
}
@media screen and (orientation:landscape) {
.post-date {
float: right;
border-right: solid 0.1em black;
}
}
@media screen and (orientation:portrait) {
.post-date {
font-size: initial;
display: block;
text-align: right;
}
.post-title h1 {
margin: 0;
}
}
@import 'style.css';
#plugins-list { #plugins-list {
overflow: auto; overflow: auto;
} }
......
/** Global CSS file, contains common styles. #title {
* Styles for individual pages with page-specific changes
* are provided in the styles/ directory, if needed.
* The styles are arranged thus:
* 1. divs and other named tags.
* 2. Sub-elements of the above.
* 3. Unnamed tags.
* 4. Sub-elements of the above.
*/
#header {
border-bottom: 0.2em solid white; border-bottom: 0.2em solid white;
padding: 0.1em 3%; padding: 0.1em 3%;
margin: 0; margin: 0;
font-size: 2em; font-size: x-large;
font-variant: small-caps; font-variant: small-caps;
text-align: center; text-align: center;
} }
/** The #main div is given a min-height so that it isn't /** The #main div is given a min-height so that it isn't
* squished on pages with little content, or for displays * squished on pages with little content, or for displays
* that are tall (like phones in portrait mode). * that are tall (like phones in portrait mode).
...@@ -30,15 +22,22 @@ ...@@ -30,15 +22,22 @@
margin: 0 auto; margin: 0 auto;
} }
/** To be used when CSE enables SSI. #main ul li {
* #footer-include { padding: 0.5em 0;
* clear: both; margin-left: 0.5em;
* width: 100%; list-style-image: url("../images/not_sign.png");
* overflow: auto; }
* border-top: 0.2em solid white;
* } #main li.no-marker {
*/ list-style: none;
#footer { }
#main ul {
margin: 0 0 0.75em 0.75em;
padding: 0;
}
footer {
clear: both; clear: both;
padding: 2%; padding: 2%;
padding-bottom: 1%; padding-bottom: 1%;
...@@ -49,52 +48,31 @@ ...@@ -49,52 +48,31 @@
display: none; display: none;
} }
div.bugs { #title ul {
/*list-style: none;*/
border: 0.1em gray solid;
padding: 0.5em;
color: black;
background: grey;
box-shadow: 0.1em 0.1em 0.2em 0 rgba(128,128,128,0.75);
border-radius: 0.3em;
}
#header ul {
padding: 0; padding: 0;
font-size: larger;
} }
#header li {
#title li {
list-style: none; list-style: none;
} }
#bug a, #query a{
color: black; nav li {
}
#sidebar li {
margin-bottom: 0.1em; margin-bottom: 0.1em;
padding: 0.5em 0.5em; padding: 0.5em 0.5em;
border-radius: 0.3em; border-radius: 0.3em;
background-color: #999999; background-color: #999999;
} }
#sidebar a { nav a {
text-decoration: none; text-decoration: none;
} }
#sidebar a:visited { nav a:visited {
color: black; color: black;
} }
#main li { footer img {
padding: 0.5em 0;
margin-left: 0.5em;
list-style-image: url("../images/not_sign.png");
}
#main li.no-marker {
list-style: none;
}
#main ul {
margin: 0 0 0.75em 0.75em;
padding: 0;
}
#footer img {
height: 1em; height: 1em;
} }
...@@ -118,7 +96,7 @@ body { ...@@ -118,7 +96,7 @@ body {
margin: 0 auto; margin: 0 auto;
padding: 0; padding: 0;
color: #121212; color: #121212;
background-color: #CCCCCC; background-color: silver; /*#CCCCCC;*/
width: 100%; width: 100%;
/* width: 60em;*/ /* width: 60em;*/
} }
...@@ -130,10 +108,9 @@ h3 { ...@@ -130,10 +108,9 @@ h3 {
}*/ }*/
code { code {
font-family: 'Ubuntu Mono', 'Droid Mono', monospace; font-family: 'Ubuntu Mono', 'Droid Mono', monospace;
color: #0D0; color: black;
} background-color: lavender;
span { padding: 0.05em 0.2em;
display: block;
} }
a:link { a:link {
...@@ -147,14 +124,15 @@ a:hover { ...@@ -147,14 +124,15 @@ a:hover {
font-weight: bold; font-weight: bold;
} }
ol li, ul ol li { ol li {
list-style: decimal; list-style: decimal;
} }
ul li {
/*list-style-image: url("images/not_sign.png");*/ nav ul li {
list-style: none;
} }
.section { section, .section {
background: white; background: white;
color: black; color: black;
box-shadow: 0.1em 0.1em 0.2em 0.1em rgba(128,128,128,0.75); box-shadow: 0.1em 0.1em 0.2em 0.1em rgba(128,128,128,0.75);
...@@ -163,9 +141,19 @@ ul li { ...@@ -163,9 +141,19 @@ ul li {
padding: 1em; padding: 1em;
text-align: left; text-align: left;
} }
.section li {
list-style: none; pre code {
overflow: auto;
display: block;
padding: 1em 0.5em;
color: silver;
background-color: black;
} }
pre code strong {
color: white;
}
.top { .top {
float: right; float: right;
background: rgb(213, 213, 213); background: rgb(213, 213, 213);
...@@ -178,10 +166,10 @@ ul li { ...@@ -178,10 +166,10 @@ ul li {
} }
@media screen and (orientation:landscape) { @media screen and (orientation:landscape) {
#header h1, #header h2 { header h1, header h2 {
margin: 0; margin: 0;
} }
#sidebar { nav {
padding-top: 1%; padding-top: 1%;
/* min-height: 42em; /* min-height: 42em;
display: inline-block;*/ display: inline-block;*/
...@@ -194,23 +182,19 @@ ul li { ...@@ -194,23 +182,19 @@ ul li {
width: 10em; width: 10em;
max-width: 18vw; max-width: 18vw;
} }
#sidebar ul { nav ul {
padding: 0; padding: 0;
border-top: 0.1em solid gray; border-top: 0.1em solid gray;
/*border-bottom: 0.1em solid gray; /*border-bottom: 0.1em solid gray;
border-right: 0.2em solid white;*/ border-right: 0.2em solid white;*/
border-radius: 0.3em; border-radius: 0.3em;
} }
#sidebar li { nav li {
border-bottom: 0.1em solid gray; border-bottom: 0.1em solid gray;
border-right: 0.1em solid gray; border-right: 0.1em solid gray;
} }
div.bugs {
margin: 0.5em;
display: inline-block;
}
#nav li:hover { nav li:hover {
box-shadow: 0.1em 0.1em 0.15em 0.05em rgba(100,100,100,0.75); box-shadow: 0.1em 0.1em 0.15em 0.05em rgba(100,100,100,0.75);
} }
#main { #main {
...@@ -227,7 +211,7 @@ ul li { ...@@ -227,7 +211,7 @@ ul li {
@media screen and (orientation:portrait) { @media screen and (orientation:portrait) {
#sidebar { nav {
width: 90%; width: 90%;
/* min-height: 42em;*/ /* min-height: 42em;*/
font-size: 1.5em; font-size: 1.5em;
...@@ -235,25 +219,21 @@ ul li { ...@@ -235,25 +219,21 @@ ul li {
text-align: center; text-align: center;
margin: 0 auto; margin: 0 auto;
} }
#sidebar ul { nav ul {
padding: 0; padding: 0;
border-radius: 0.3em; border-radius: 0.3em;
} }
#sidebar li { nav li {
border-bottom: 0.1em solid gray; border-bottom: 0.1em solid gray;
list-style: none; list-style: none;
border-radius: 0.3em; border-radius: 0.3em;
margin: 0.2em; margin: 0.2em;
} }
div.bugs {
margin: 0.5em;
font-size: 1.5em;
}
#main, body { #main, body {
text-align: center; text-align: center;
} }
.section { section, .section {
width: 85%; width: 85%;
font-size: 2em; font-size: 2em;
margin: 2em auto; margin: 2em auto;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment