From c91873e854a88488ce2f0d9f9a2ff4c9ad60f314 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sun, 3 Apr 2016 16:31:23 -0400 Subject: [PATCH] wip bootstrap theme The only real blocker to merging this is that it's using the CDN for bootstrap, tether, and font-awesome. ikiwiki as a matter of policy does not make sites that rely on offsite resources, so those need to be pulled into the package (or dependencies of the debian package). Also, other parts of ikiwiki use jquery 1.6.2, and I guess that would need to be upgraded for use by bootstrap. I don't know what the jquery compatability story is like, so worry that upgrading it could break the parts of ikiwiki that use it. Also, it's missing a few bits of styles from ikiwiki's style.css for ikiwiki's login page, the calendar plugin, etc. --- Makefile.PL | 3 + debian/changelog | 2 + ikiwiki.spec | 2 +- po/ikiwiki.pot | 56 +++++----- templates/comment.tmpl | 31 +++++- templates/feedlink.tmpl | 15 +++ templates/googleform.tmpl | 9 +- templates/inlinepage.tmpl | 93 +++++++++++++++- templates/page.tmpl | 196 +++++++++++++++++++++++++++++++++ templates/searchform.tmpl | 14 ++- themes/bootstrap/fullstyle.css | 115 +++++++++++++++++++ 11 files changed, 495 insertions(+), 41 deletions(-) create mode 100644 themes/bootstrap/fullstyle.css diff --git a/Makefile.PL b/Makefile.PL index bee9dfa11..f9c0cc96a 100755 --- a/Makefile.PL +++ b/Makefile.PL @@ -112,11 +112,14 @@ underlay_install: # Themes have their base.css (if present) and then # style.css appended to the normal one. + # Or, fullstyle.css in a theme replaces the normal style.css. for theme in themes/*; do \ install -d $(DESTDIR)$(PREFIX)/share/ikiwiki/$$theme; \ for file in $$theme/*; do \ if echo "$$file" | grep -q style.css; then \ (cat doc/style.css; cat $$theme/base.css 2>/dev/null; cat $$file) > $(DESTDIR)$(PREFIX)/share/ikiwiki/$$theme/style.css; \ + elif echo "$$file" | grep -q fullstyle.css; then \ + cp $$file $(DESTDIR)$(PREFIX)/share/ikiwiki/$$theme/style.css; \ elif echo "$$file" | grep -q base.css; then \ :; \ elif [ -f "$$file" ]; then \ diff --git a/debian/changelog b/debian/changelog index ea77c6e3d..f70be1d82 100644 --- a/debian/changelog +++ b/debian/changelog @@ -8,6 +8,8 @@ ikiwiki (3.20160122) UNRELEASED; urgency=medium * loginselector: When only openid and emailauth are enabled, but passwordauth is not, avoid showing a "Other" box which opens an empty form. + * Added bootstrap theme, based on ikistrap by Guus Sliepen, + and using bootstrap 4. This theme only works in html5 mode. [ Amitai Schlair ] * mdwn: Process .md like .mdwn, but disallow web creation. diff --git a/ikiwiki.spec b/ikiwiki.spec index 6de6cb27c..c0ffd4502 100644 --- a/ikiwiki.spec +++ b/ikiwiki.spec @@ -1,5 +1,5 @@ Name: ikiwiki -Version: 3.20160121 +Version: 3.20160122 Release: 1%{?dist} Summary: A wiki compiler diff --git a/po/ikiwiki.pot b/po/ikiwiki.pot index f13acc8fb..f48db3bf1 100644 --- a/po/ikiwiki.pot +++ b/po/ikiwiki.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-01-21 09:43+0000\n" +"POT-Creation-Date: 2016-04-03 20:53+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -244,66 +244,66 @@ msgstr "" msgid "Comment Moderation" msgstr "" -#: ../IkiWiki/Plugin/comments.pm:381 ../IkiWiki/Plugin/comments.pm:385 +#: ../IkiWiki/Plugin/comments.pm:382 ../IkiWiki/Plugin/comments.pm:386 msgid "email replies to me" msgstr "" -#: ../IkiWiki/Plugin/comments.pm:419 ../IkiWiki/Plugin/editpage.pm:96 +#: ../IkiWiki/Plugin/comments.pm:420 ../IkiWiki/Plugin/editpage.pm:96 #: ../IkiWiki/Plugin/editpage.pm:102 msgid "bad page name" msgstr "" -#: ../IkiWiki/Plugin/comments.pm:422 +#: ../IkiWiki/Plugin/comments.pm:423 #, perl-format msgid "commenting on %s" msgstr "" -#: ../IkiWiki/Plugin/comments.pm:439 +#: ../IkiWiki/Plugin/comments.pm:440 #, perl-format msgid "page '%s' doesn't exist, so you can't comment" msgstr "" -#: ../IkiWiki/Plugin/comments.pm:449 +#: ../IkiWiki/Plugin/comments.pm:450 #, perl-format msgid "comments on page '%s' are not allowed" msgstr "" -#: ../IkiWiki/Plugin/comments.pm:456 +#: ../IkiWiki/Plugin/comments.pm:457 #, perl-format msgid "comments on page '%s' are closed" msgstr "" -#: ../IkiWiki/Plugin/comments.pm:583 +#: ../IkiWiki/Plugin/comments.pm:584 msgid "comment stored for moderation" msgstr "" -#: ../IkiWiki/Plugin/comments.pm:585 +#: ../IkiWiki/Plugin/comments.pm:586 msgid "Your comment will be posted after moderator review" msgstr "" -#: ../IkiWiki/Plugin/comments.pm:598 +#: ../IkiWiki/Plugin/comments.pm:599 msgid "Added a comment" msgstr "" -#: ../IkiWiki/Plugin/comments.pm:602 +#: ../IkiWiki/Plugin/comments.pm:603 #, perl-format msgid "Added a comment: %s" msgstr "" -#: ../IkiWiki/Plugin/comments.pm:676 ../IkiWiki/Plugin/userlist.pm:55 +#: ../IkiWiki/Plugin/comments.pm:677 ../IkiWiki/Plugin/userlist.pm:55 #: ../IkiWiki/Plugin/websetup.pm:272 msgid "you are not logged in as an admin" msgstr "" -#: ../IkiWiki/Plugin/comments.pm:735 +#: ../IkiWiki/Plugin/comments.pm:736 msgid "Comment moderation" msgstr "" -#: ../IkiWiki/Plugin/comments.pm:776 +#: ../IkiWiki/Plugin/comments.pm:777 msgid "comment moderation" msgstr "" -#: ../IkiWiki/Plugin/comments.pm:941 +#: ../IkiWiki/Plugin/comments.pm:942 #, perl-format msgid "%i comment" msgid_plural "%i comments" @@ -313,7 +313,7 @@ msgstr[1] "" #. translators: Here "Comment" is a verb; #. translators: the user clicks on it to #. translators: post a comment. -#: ../IkiWiki/Plugin/comments.pm:951 +#: ../IkiWiki/Plugin/comments.pm:952 msgid "Comment" msgstr "" @@ -347,14 +347,14 @@ msgstr "" msgid "email comments to me" msgstr "" -#: ../IkiWiki/Plugin/editpage.pm:319 +#: ../IkiWiki/Plugin/editpage.pm:320 #, perl-format msgid "creating %s" msgstr "" -#: ../IkiWiki/Plugin/editpage.pm:337 ../IkiWiki/Plugin/editpage.pm:356 -#: ../IkiWiki/Plugin/editpage.pm:367 ../IkiWiki/Plugin/editpage.pm:414 -#: ../IkiWiki/Plugin/editpage.pm:456 +#: ../IkiWiki/Plugin/editpage.pm:338 ../IkiWiki/Plugin/editpage.pm:357 +#: ../IkiWiki/Plugin/editpage.pm:368 ../IkiWiki/Plugin/editpage.pm:415 +#: ../IkiWiki/Plugin/editpage.pm:457 #, perl-format msgid "editing %s" msgstr "" @@ -560,15 +560,15 @@ msgstr "" msgid "Other" msgstr "" -#: ../IkiWiki/Plugin/loginselector.pm:107 +#: ../IkiWiki/Plugin/loginselector.pm:106 msgid "Password" msgstr "" -#: ../IkiWiki/Plugin/mdwn.pm:52 +#: ../IkiWiki/Plugin/mdwn.pm:53 msgid "multimarkdown is enabled, but Text::MultiMarkdown is not installed" msgstr "" -#: ../IkiWiki/Plugin/mdwn.pm:97 +#: ../IkiWiki/Plugin/mdwn.pm:98 #, perl-format msgid "failed to load Markdown.pm perl module (%s) or /usr/bin/markdown (%s)" msgstr "" @@ -956,24 +956,24 @@ msgstr "" msgid "rename %s" msgstr "" -#: ../IkiWiki/Plugin/rename.pm:164 +#: ../IkiWiki/Plugin/rename.pm:165 msgid "Also rename SubPages and attachments" msgstr "" -#: ../IkiWiki/Plugin/rename.pm:266 +#: ../IkiWiki/Plugin/rename.pm:267 msgid "Only one attachment can be renamed at a time." msgstr "" -#: ../IkiWiki/Plugin/rename.pm:269 +#: ../IkiWiki/Plugin/rename.pm:270 msgid "Please select the attachment to rename." msgstr "" -#: ../IkiWiki/Plugin/rename.pm:379 +#: ../IkiWiki/Plugin/rename.pm:380 #, perl-format msgid "rename %s to %s" msgstr "" -#: ../IkiWiki/Plugin/rename.pm:605 +#: ../IkiWiki/Plugin/rename.pm:606 #, perl-format msgid "update for rename of %s to %s" msgstr "" diff --git a/templates/comment.tmpl b/templates/comment.tmpl index c16ca7c81..8c3a1e2e4 100644 --- a/templates/comment.tmpl +++ b/templates/comment.tmpl @@ -1,23 +1,46 @@ + diff --git a/templates/feedlink.tmpl b/templates/feedlink.tmpl index c67ad9c2b..ea4b4127b 100644 --- a/templates/feedlink.tmpl +++ b/templates/feedlink.tmpl @@ -1,8 +1,23 @@ +
id="" class="feedlink"> + +
id="" class="feedlink btn-group"> + + RSS + +RSS + + Atom + +Atom +
+ +

+ diff --git a/templates/googleform.tmpl b/templates/googleform.tmpl index 155a08155..17fba18f5 100644 --- a/templates/googleform.tmpl +++ b/templates/googleform.tmpl @@ -1,8 +1,7 @@ -

-
+ +
- -
+ +
diff --git a/templates/inlinepage.tmpl b/templates/inlinepage.tmpl index 37d7e48c1..5e2b42cc7 100644 --- a/templates/inlinepage.tmpl +++ b/templates/inlinepage.tmpl @@ -1,5 +1,10 @@ +
+ +
+ +
@@ -11,30 +16,75 @@
+ +
+
+
+
+ +
+ + +
+
    + +
  • Edit
  • +
    + +
  • + + +
  • +
    +
    +
+
+
+
+ +
+ +
+ + +
+
+ +
+ Download +
+ + +
+
- + +
+
+ Posted + + + + + +by + + + + + + + + + + + + + + + +
License:
+ + +License: + +
+
+ + + + + + +
+ +
diff --git a/templates/page.tmpl b/templates/page.tmpl index 183d733e1..572e89175 100644 --- a/templates/page.tmpl +++ b/templates/page.tmpl @@ -12,12 +12,22 @@ + + + + + + + + + + @@ -40,6 +50,8 @@ + +
+ + + + + + + + +
+ + +
+
+ + + +
id="content" role="main">
+ +
+ +
+
+
+ +
+Download +
+ + id="comments" role="complementary"> + +
+Add a comment + + + +
Comments on this page are closed.
+
+ + + + +
+ + + + +
+
+ +
+ + +
+ + + + id="footer" class="pagefooter" role="contentinfo"> + + +
+
diff --git a/templates/searchform.tmpl b/templates/searchform.tmpl index 8cdf745f9..8b0c625ab 100644 --- a/templates/searchform.tmpl +++ b/templates/searchform.tmpl @@ -1,6 +1,10 @@ -
-
- -
+ +
+ + + + + + +
diff --git a/themes/bootstrap/fullstyle.css b/themes/bootstrap/fullstyle.css new file mode 100644 index 000000000..58daa3d95 --- /dev/null +++ b/themes/bootstrap/fullstyle.css @@ -0,0 +1,115 @@ +/* There isn't much space between the Bootstrap navbar and the page content */ +#header { + padding-bottom: 1em; +} + +/* Ensure the footer is pushed down to the bottom of the screen, + * if the main content doesn't fill it. */ +body, html { + height: 100%; +} + +#notfooter { + min-height: 100%; + padding-bottom: 2em; +} + +#footer { + position: relative; + margin-top: -2em; + height: 2em; + color: grey; + border-top: 1px solid lightgrey; +} + +#pagedate { + float: right; +} + +/* Bootstrap's navbar packs everything without margins or padding. + * Ensure the search form has some space. */ + +#searchform { + margin-left: 1em; +} + +.parentlinks { + margin-right: 1em; +} + +/* Alignment of header and footer items of the default inline pages. + * Using flexbox layout here, since it can wrap when things get too crowded. + * It's a bit better than floats. */ +.inlineheader { + display: flex; +} + +.inlineheader header { + flex: 1 1 auto; +} + +.inlineheader { + flex: 0 1 auto; +} + +.inlinefooter { + display: flex; + flex-wrap: wrap; +} + +.inlinefooter .pageinfo { + flex: 1 1 auto; +} + +.inlinefooter .tags { + flex: 0 1 auto; +} + +.inline-actions { + display: inline; +} + +.inline-actions ul, .inline-actions li { + list-style-type: none; + display: inline; +} + +/* Quick and simple table style */ +table { + border: 1px solid grey; + padding: 0.5em; +} + +/* Give RSS and Atom buttons an orange color */ +.feedbutton { + background: #ff8000; + border-color: #e07000; + color: white; + font-weight: bold; +} + +.feedbutton:hover { + background: #ffc080; + border-color: #e07000; +} + +/* Carousel alignment */ +.carousel-page { + margin: 1em; +} + +.carousel-image { + margin: auto; +} + +/* Bootstrap 4.0.0-alpha.2 forgot to define a blockquote style? */ +blockquote { + border-left: 4px solid rgba(0,0,0,.1); + padding-left: 0.5em; +} + +/* Fix image width in cards. */ +.card-img-top, .card-img-bottom { + width: 100%; + height: auto; +} -- 2.39.2