summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Shumaker <LukeShu@sbcglobal.net>2011-11-27 16:27:35 -0500
committerLuke Shumaker <LukeShu@sbcglobal.net>2011-11-27 16:27:35 -0500
commit61b167106a3a12e081e9a6378ce7d1abc2ae228c (patch)
tree39ab02c575e8f77ef0736eef956543b634d2bbdd
parentd374918177e9464b1eb1af76ca332f78d004f7db (diff)
parent0dfce348e4d118ed19bbcf8396a3f7b90fb0badc (diff)
Merge ../twentyeleven-child
Conflicts: .gitignore Makefile twentyeleven-fix.scss
-rw-r--r--.gitignore5
-rw-r--r--Makefile61
-rw-r--r--theme.mk14
-rw-r--r--twentyeleven-fix.scss59
4 files changed, 96 insertions, 43 deletions
diff --git a/.gitignore b/.gitignore
index d970373..298c205 100644
--- a/.gitignore
+++ b/.gitignore
@@ -3,8 +3,6 @@
# ignore everyting
*
# but these:
-!.gitignore
-!Makefile
!license.txt
!twentyeleven-fix.scss
!style.scss
@@ -14,3 +12,6 @@
!header.php.patch
!single.php.patch
!content-single.php
+!.gitignore
+!theme.mk
+!Makefile
diff --git a/Makefile b/Makefile
index 259fab3..b17979b 100644
--- a/Makefile
+++ b/Makefile
@@ -1,25 +1,19 @@
+pathsearch = $(firstword $(wildcard $(addsuffix /$(1),$(subst :, ,$(PATH)))))
+
RM = rm -f
CP = cp
PATCH = patch
SASS = sass
-PHP = php
+PHP := $(firstword $(call pathsearch,php5) $(call pathsearch,php))
+SVG2PNG = rsvg-convert
+PNGCRUSH = $(firstword $(call pathsearch,pngcrush) $(call pathsearch,cp))
-srcfiles = \
- .gitignore \
- Makefile \
- license.txt \
- twentyeleven-fix.scss \
- style.scss \
- functions.php \
- screenshot.png \
- index.php.patch \
- header.php.patch \
- single.php.patch \
- content-single.php
+default: all
-all: style.css .gitignore header.php index.php single.php
+include theme.mk
+srcfiles += .gitignore theme.mk Makefile
-style.css: twentyeleven-fix.scss
+all: .gitignore $(targets)
%: %.patch ../twentyeleven/%
$(RM) $@
@@ -33,12 +27,43 @@ style.css: twentyeleven-fix.scss
$(PHP) -f $< > $@
%.png: %.svg
- rsvg-convert $< > $@.$$$$ && pngcrush $@.$$$$ $@ ; $(RM) $@.$$$$
+ $(SVG2PNG) $< > $@.$$$$ && $(PNGCRUSH) $@.$$$$ $@ ; $(RM) $@.$$$$
+
+################################################################################
-.gitignore: Makefile
+in_dir = $(patsubst ./%,%,$(dir $1))
+my_dir = $(patsubst %/,%,$(dir $1))
+define gitignore_file
+$(if $(in_dir),
+ $(call gitignore_file,$(my_dir))
+ echo '$(my_dir)/*' >> '$@';
+)
+echo '!$1' >> '$@';
+endef
+
+.gitignore: Makefile theme.mk
echo "# DO NOT EDIT, this file is automatically made by \`Makefile'" >$@
echo '# ' >> '$@'
echo '# ignore everyting' >> '$@'
echo '*' >> '$@'
echo '# but these:' >> '$@'
- for file in $(srcfiles); do echo !"$$file" >> '$@'; done
+ $(foreach file,$(srcfiles),$(call gitignore_file,$(file)))
+
+################################################################################
+
+git2make = $1 $(subst *,.*,$1)
+gitignore_y = $(call git2make,$(shell sed -n 's/^[^\#!]/&/p' .gitignore))
+gitignore_n = $(call git2make,$(shell sed -n 's/^!//p' .gitignore))
+gitignore_i = . .. .git %/.. %/.
+gitignore = $(filter-out $(gitignore_i) $(wildcard $(gitignore_n)),$(wildcard $(gitignore_y)))
+
+clean: .gitignore PHONY
+ $(RM) -r $(filter-out $(targets),$(gitignore))
+distclean: .gitignore PHONY
+ $(RM) -r $(gitignore)
+
+################################################################################
+
+.PHONY: FORCE PHONY
+FORCE: ;
+PHONY: ;
diff --git a/theme.mk b/theme.mk
new file mode 100644
index 0000000..1dd69ee
--- /dev/null
+++ b/theme.mk
@@ -0,0 +1,14 @@
+srcfiles = \
+ license.txt \
+ twentyeleven-fix.scss \
+ style.scss \
+ functions.php \
+ screenshot.png \
+ index.php.patch \
+ header.php.patch \
+ single.php.patch \
+ content-single.php
+
+targets = style.css header.php index.php single.php
+
+style.css: twentyeleven-fix.scss
diff --git a/twentyeleven-fix.scss b/twentyeleven-fix.scss
index 7c1d44d..bbfa208 100644
--- a/twentyeleven-fix.scss
+++ b/twentyeleven-fix.scss
@@ -1,35 +1,42 @@
-body #page header#branding #access {
- ul {
- :hover > ul,
- :hover + ul,
- :active > ul,
- :active + ul,
- :focus > ul,
- :focus + ul {
- display: block;
+body {
+ padding: 0;
+ #page header#branding #access {
+ ul {
+ :hover > ul,
+ :hover + ul,
+ :active > ul,
+ :active + ul,
+ :focus > ul,
+ :focus + ul {
+ display: block;
+ }
}
}
}
+@mixin searchform_wide($border_width) {
+ position: relative !important;
+ top: auto !important;
+ bottom: auto !important;
+ left: auto !important;
+ right: auto !important;
+ width: 100%;
+ max-width: none;
+ .field {
+ float: none;
+ width: 100%;
+ display: block;
+ margin-left: -$border_width;
+ }
+}
+
@media (max-width: 800px) {
body #page header#branding {
.only-search, #searchform {
padding-right: 10px+28px;// matches twentyeleven values
}
#searchform {
- position: relative !important;
- top: auto !important;
- bottom: auto !important;
- left: auto !important;
- right: auto !important;
- width: 100%;
- max-width: none;
- .field {
- float: none;
- width: 100%;
- display: block;
- margin-left: -1px; // match border width
- }
+ @include searchform_wide(1px);
}
#access {
ul, div {
@@ -55,4 +62,10 @@ body #page header#branding #access {
}
}
}
-} \ No newline at end of file
+}
+
+#ie6 {
+ body #page header#branding #searchform {
+ @include searchform_wide(1px);
+ }
+}