Skip to content

Commit

Permalink
remove Stylus, convert modernized theme to use CSS variables fixes #1052
Browse files Browse the repository at this point in the history
  • Loading branch information
RogerHaase committed Aug 6, 2020
1 parent 398b589 commit 7369f9d
Show file tree
Hide file tree
Showing 11 changed files with 106 additions and 864 deletions.
2 changes: 1 addition & 1 deletion docs/admin/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ Typing "./m" (or "m" on Windows) will display a menu similar to:
dump-html * create a static HTML image of wiki *options, see docs
index delete and rebuild indexes

css run Stylus and lessc to update theme CSS files
css run lessc to update basic theme CSS files
tests * run tests, log output (-v -k my_test)
coding-std correct scripts that taint the repository with trailing spaces..

Expand Down
10 changes: 1 addition & 9 deletions docs/devel/development.rst
Original file line number Diff line number Diff line change
Expand Up @@ -86,12 +86,6 @@ add more tools, exercise tools

* On Ubuntu 14.04 or any distribution based on Ubuntu you need to install "npm" and "nodejs-legacy" (to get the "node" command).

* install stylus::

sudo npm install stylus@0.42.2 -g # Windows: npm install stylus@0.42.2 -g
# we need 0.42.2 because with more recent versions, --compress compresses
# complete output to 1 line (0.42.2 compresses to 1 line per rule)
stylus -V # show version number to prove it works
* install lessc ("less" below is not a typo)::

sudo npm install less -g # Windows: npm install less -g
Expand Down Expand Up @@ -359,9 +353,7 @@ also be given directly to the render call.

Each theme has a ``static/css`` directory. Stylesheets for the Basic theme in
MoinMoin are compiled using the source ``theme.less`` file in the Basic theme's
``static/custom-less`` directory. Stylesheets for the Modernized and Foobar
themes are compiled using the ``theme.styl files`` in their respective ``static/css/stylus``
directories. To compile CSS for all themes::
``static/custom-less`` directory.

./m css # Windows: m css

Expand Down
2 changes: 1 addition & 1 deletion docs/man/moin.rst
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ the menu::
dump-html * create a static HTML image of wiki *options, see docs
index delete and rebuild indexes

css run Stylus and lessc to update theme CSS files
css run lessc to update basic theme CSS files
tests * run tests, output to pytest.txt *options (-v -k my_test)
coding-std correct scripts that taint the repository with trailing spaces..
api update moin api docs (files are under git version control)
Expand Down
19 changes: 2 additions & 17 deletions quickinstall.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@
dump-html * create a static HTML image of wiki *options, see docs
index delete and rebuild indexes
css run Stylus and lessc to update theme CSS files
css run lessc to update basic theme CSS files
tests * run tests, log output (-v -k my_test)
coding-std correct scripts that taint the repository with trailing spaces..
Expand Down Expand Up @@ -505,26 +505,11 @@ def cmd_dump_html(self, *args):
self.run_time('HTML Dump')

def cmd_css(self, *args):
"""run Stylus and lessc to update CSS files"""
# Note: we use / below within file paths; this works in Windows XP, 2000, 7, 8, 10
"""run lessc to update basic theme CSS files"""
bootstrap_loc = get_bootstrap_data_location().strip() + '/less'
pygments_loc = get_pygments_data_location().strip() + '/css'
modernized_loc = 'src/moin/themes/modernized/static/css/stylus'
basic_loc = 'src/moin/themes/basic/static/custom-less'

print('Running Stylus to update Modernized theme CSS files...')
command = 'cd {0}{1}stylus --include {2} --include-css --compress < theme.styl > ../theme.css'.format(modernized_loc, SEP, pygments_loc)
result = subprocess.call(command, shell=True)
if result == 0:
print('Success: Modernized CSS files updated.')
else:
print('Error: stylus failed to update css files, see error messages above.')
# stylus adds too many blank lines at end of modernized theme.css, fix it by running coding_std against css directory
command = 'python scripts/coding_std.py src/moin/themes/modernized/static/css'
result = subprocess.call(command, shell=True)
if result != 0:
print('Error: failure running coding_std.py against modernized css files')

print('Running lessc to update Basic theme CSS files...')
if WINDOWS_OS:
data_loc = '{0};{1}'.format(bootstrap_loc, pygments_loc)
Expand Down
34 changes: 18 additions & 16 deletions src/moin/themes/modernized/static/css/blog.css
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
#moin-blog-header{margin:1em 0 -1em 0;font-size:20px;padding-bottom:10px}
#moin-blog-content{padding:0 2em 0 0;display:table-cell;width:80%}
#moin-blog-body{display:table;width:100%}
#moin-blog-content h1 a{text-decoration:none;font-size:30px}
.moin-blog-entry{border:2px solid #aed4fa;padding-left:10px;padding-right:10px;padding-bottom:10px;border-radius:10px;background-color:#eef1f6}
.moin-blog-icon{font-size:1.6em}
.moin-blog-entry-info{font-size:.8em;color:#737373}
.moin-blog-entry-modify{font-size:.8em;margin:0;float:right}
ul.moin-blog-entry-tags{list-style:none;display:inline;margin:0;}
ul.moin-blog-entry-tags li{display:inline;}
ul.moin-blog-entry-tags li:after{content:","}
.moin-blog-entry h1{border-bottom:none;margin-top:.1em}
#moin-blog-sidebar{display:table-cell;width:20%}
ul.moin-blog-entry-tags li:last-child:after{content:""}
.moin-noblogentry-message{padding-top:20px}
.moin-blog-entry-bottominfo{font-size:.8em;color:#737373}
#moin-blog-header { margin: 1em 0 -1em 0; font-size: 20px; padding-bottom: 10px; }
#moin-blog-content { padding: 0 2em 0 0; display: table-cell; width: 80%; }
#moin-blog-body { display: table; width: 100%; }
#moin-blog-content h1 a { text-decoration: none; font-size: 30px; }
.moin-blog-entry { border: 2px solid #aed4fa; border: 2px solid var(--base_color);
padding-left: 10px; padding-right: 10px; padding-bottom: 10px; border-radius: 10px;
background-color: #eef1f6; background-color: var(--table_bg_color); }
.moin-blog-icon { font-size: 1.6em; }
.moin-blog-entry-info { font-size: .8em; color: #737373; color: var(--footer_color); }
.moin-blog-entry-modify { font-size: .8em; margin: 0; float: right; }
ul.moin-blog-entry-tags { list-style: none; display: inline; margin: 0; }
ul.moin-blog-entry-tags li { display: inline; }
ul.moin-blog-entry-tags li: after { content: ","; }
.moin-blog-entry h1 { border-bottom: none; margin-top: .1em; }
#moin-blog-sidebar { display: table-cell; width: 20%; }
ul.moin-blog-entry-tags li: last-child: after { content: ""; }
.moin-noblogentry-message { padding-top: 20px; }
.moin-blog-entry-bottominfo { font-size: .8em; color: #737373; color: var(--footer_color); }
72 changes: 0 additions & 72 deletions src/moin/themes/modernized/static/css/stylus/blog.styl

This file was deleted.

25 changes: 0 additions & 25 deletions src/moin/themes/modernized/static/css/stylus/color_palette.styl

This file was deleted.

14 changes: 0 additions & 14 deletions src/moin/themes/modernized/static/css/stylus/notice.css

This file was deleted.

Loading

0 comments on commit 7369f9d

Please sign in to comment.