Initial commit.

Spent too much time getting the Makefile to be nice and non-redundant.
Learned more than I wanted to about Makefiles...and now I know the pain
of Makefiles.
pull/4/head
Adam Porter 9 years ago
commit dd3c8a8518

@ -0,0 +1,22 @@
# ** Variables
VPATH = .:sites
CSS_DIR := css
COLORS := light dark
COMMON_FILES := $(wildcard *.styl)
SITES := $(patsubst sites/%.styl,%,$(wildcard sites/*.styl))
# ** Functions
make_site = for color in $(COLORS); do stylus --import $$color.styl -p sites/$(1).styl >$(CSS_DIR)/solarized-$(1)-$$color.css; done
# ** Rules
.PHONY: all
all: $(SITES)
$(CSS_DIR):
mkdir $(CSS_DIR)
$(SITES): %: $(CSS_DIR)/solarized-%-dark.css $(CSS_DIR)/solarized-%-light.css
$(foreach color, $(COLORS), $(CSS_DIR)/solarized-%-$(color).css): sites/%.styl $(COMMON_FILES) | $(CSS_DIR)
$(call make_site,$*)

@ -0,0 +1,18 @@
// ** Solarized colors
// From https://github.com/altercation/solarized
base03 = #002b36
base02 = #073642
base01 = #586e75
base00 = #657b83
base0 = #839496
base1 = #93a1a1
base2 = #eee8d5
base3 = #fdf6e3
yellow = #b58900
orange = #cb4b16
red = #dc322f
magenta = #d33682
violet = #6c71c4
blue = #268bd2
cyan = #2aa198
green = #859900

@ -0,0 +1,13 @@
@require "colors"
// ** Colors
color-background = base03
color-background-highlight = base02
color-background-highlight-extra = base01
color-background-highlight-extra-less = lighten(color-background-highlight, 4%)
color-background-highlight-extra-less-less = lighten(color-background-highlight, 2%)
color-border = base00
color-text = base0
comment = base01
emphasized = base1

@ -0,0 +1,11 @@
@require "colors"
// ** Colors
color-background = base3
color-background-highlight = base2
color-background-highlight-extra = base1
color-background-highlight-extra-less = darken(color-background-highlight, 2%)
color-border = base0
color-text = base00
comment = base1
emphasized = base01

@ -0,0 +1,7 @@
// * all-sites.styl
// All site-specific rules in one file
// Strange that this requires "sites/". It seems that the --import
// option changes the directory used for @require. Maybe a bug?
@require 'sites/*'

@ -0,0 +1,43 @@
// * generic.styl
// Generic rules for sites
i = !important
// ** Mixins
a()
color blue i
background-color(c = color-background)
if c is "highlight"
c = color-background-highlight
if c is "highlight-extra"
c = color-background-highlight-extra
background-color c i
bold()
font-weight bold i
border-color(args...)
if args
c = args
else
c = color-border
border-color c i
color(c = color-text)
color c i
// ** HTML elements
*
border-color()
a
a()
body
background-color()
color()
input
textarea
background-color highlight
color()

@ -0,0 +1,134 @@
// * mediawiki.styl
// For Wikipedia and other MediaWiki sites
@require generic
body
*
border-color color-background-highlight-extra-less
// ** Main content
#content
background-color()
color()
// ** Header and left-side menu
#mw-head
#mw-panel
background-color highlight
color emphasized
div.portal
background-image none i
#mw-head
background-color highlight
background-image linear-gradient(to bottom, color-background, color-background-highlight) i
#mw-panel, #p-logo
background-image linear-gradient(to right, color-background, color-background-highlight) i
div.vectorTabs
background-image linear-gradient(to bottom, color-background, color-background-highlight) i
ul
background-image linear-gradient(to bottom, color-background, color-background-highlight) i
ul li
background-color highlight
background-image none i
// Pseudo-border between tabs using padding
padding 0px 1px 0px 1px i
span
background-color highlight
background-image linear-gradient(to bottom, color-background, color-background-highlight) i
li.selected, li.selected span
background-color transparent
background-image linear-gradient(to bottom, color-background-highlight, color-background) i
// *** Logo
.mw-wiki-logo
filter opacity(50%)
// *** Search box
div#simpleSearch #searchInput
background-color()
// This prevents the bottom border of the search box from being covered up
padding 0.05em 0px 0.2em 0.2em i
// ** Boxes
.ambox
.infobox
#toc
#toctitle
.toclevel-1
background-color highlight
border-color color-background-highlight-extra-less
color emphasized
// *** End-of-page
.catlinks
background-color highlight
border-color color-background-highlight-extra-less
color emphasized
// **** Navbox
.navbox
background-color highlight
border-color color-background-highlight-extra-less
color emphasized
.th, .navbox-title
background-color color-background-highlight-extra-less
.navbox-abovebelow, th.navbox-group, .navbox-subgroup, .navbox-title
background-color color-background-highlight-extra-less-less
.navbox-even
background-color()
// ** Headings
h1, h2, h3, h4, h5, h6
border-color color-background-highlight-extra-less
color emphasized
// ** Code
code
background-color color-background-highlight-extra-less
border-color color-background-highlight-extra-less
color emphasized
// ** Images
div.thumbinner
background-color highlight
border-color color-background-highlight-extra-less
img
filter opacity(75%)
img.thumbimage
border-color color-background-highlight-extra-less
// ** Links
.mw-body .external
opacity 0.5 i
// ** Tables
table.wikitable
background-color()
border-color color-background-highlight-extra-less
color()
// *** Headers
table.wikitable > * > tr > th
background-color highlight
Loading…
Cancel
Save