Commits

michaelb  committed 34136ab Draft

.

  • Participants
  • Parent commits 4e6703b

Comments (0)

Files changed (8)

File doc/planning/leebre_release.md

     * Fix HTML export for all elements
     * Fix edit mode for all elements
 
-5. Export features
-    * Re-implement exporting to ePub, AZW
-    * Re-implement exporting to cover
-
 6. New features:
     * Fill out help for new edit toolbar
 
 * Get nvm set up on server to run node 10 (or install node 0.10 globally, maybe
   via ppa or something)
 
-New features:
-
-* While filling out meta-data, create a link to the help dialog on the toolbar
-  in lieu of the edit toolbar. Fill out help info on all meta data.
-
-* Allow wide page mode, since narrow page is dorky
-
 Minor bugs:
 
 * For some reason selecting book publishing style twice it will break

File doc/planning/leebre_release_done.md

 
 DONE
 
-1. Edit mode for asses:
+1. Edit mode for assets:
     * Show toolbar that has two buttons:
         * One to select an asset (AssetManager dialog)
         * Two to customize its appearance (AssetEditor dialog)
 
+5. Export features
+    * Re-implement exporting to ePub, AZW
+    * Re-implement exporting to cover
 
-5. New features:
+6. New features:
     * Allow wide page mode, since narrow page can be dorky
     * PUBLISHING: a link to the help dialog on the toolbar in lieu of the
       edit toolbar.  Fill out help info on all meta data
+

File js/style/style.js

 
         if (_.isUndefined(this.templates[tagname])) {
             //throw new TemplateError("'"+tagname+"' not found in style.");
-            console.error("Error: template not found for:", tagname, this.templates[tagname]);
+            console.error("Error: template not found for:", tagname);
             //console.log("Out of: ", _.keys(this.templates));
             return "<< TEMPLATE NOT FOUND >>";
         }

File node/render.js

 
     var do_it = function (the_style_list) {
         style_list = the_style_list;
-        render_browser_html();
+        //render_browser_html();
+        render_cover();
 
         // small todo: do render_browser_html at the same time as render_cover,
         // since the only requirement is that render_cover is completed before
                         // After both epub and azw are executed it will run "done"
                         // (that way these operations are done asynchronously, yay ^_^)
                         var callback = _.after(2, done);
-                        render_epub(callback);
-                        render_azw(callback);
+                        //render_epub(callback);
+                        //render_azw(callback);
                     });
                 });
     };

File sbstyle/book/core/base_export_html.sbstyle

 		False
 	{% endif %}
 EOF
-_target = epub azw
 
 html_stylesheets = 
 

File sbstyle/cover/core/base_headers.sbstyle

 
 <div class="textwrapper">
 {% if style.ordering == "author_first" %}
-	<h2>{{ info.authorname|default:"Author Name" }}</h2>
-	<h1>{{ info.booktitle|default:"Book Title" }}</h1>
+	<h2>{{ self|find__author|find__name|text }}</h2>
+	<h1>{{ self|find__title|text }}</h1>
 {% else %}
-	<h1>{{ info.booktitle|default:"Book Title" }}</h1>
-	<h2>{{ info.authorname|default:"Author Name" }}</h2>
+	<h1>{{ self|find__title|text }}</h1>
+	<h2>{{ self|find__author|find__name|text }}</h2>
 {% endif %}
 </div>
 
-{{ include.opt_border_html }}
+{# {{ include.opt_border_html }} #}
+{{ self|rendered_as("opt_border_html") }}
 
 {% if style.text_scaling2 %}
 <script type="text/javascript">

File sbstyle/cover/core/base_html.sbstyle

 author = michaelb
 display = False
 
-[Style2]
-cover : EOF 
+[Style]
+sembook : EOF 
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
 <html>
 <head>
 <title>Rendered Cover</title>
 
 <!-- TOTAL HACK -->
+{#
 <link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}typefaces/gentium/stylesheet.css" />
 <link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}typefaces/gentium/style.css" />
 <link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}typefaces/knewave/stylesheet.css" />
 <link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}typefaces/junction/stylesheet.css" />
 <link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}typefaces/orbitron/stylesheet.css" />
 <link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}typefaces/blackout/stylesheet.css" />
+#}
 </head>
 
 <body>
 <style type="text/css">
+{{ self|rendered_as("base_css") }}
+{#
 {{ include.base_css }}
+#}
 </style>
 
 
+{#
 <script type="text/javascript" src="{{ STATIC_URL }}js/pixastic.custom.js"> </script>
 <script type="text/javascript" src="{{ STATIC_URL }}js/jquery/jquery-1.4.4.min.js"> </script>
 <script type="text/javascript" src="{{ STATIC_URL }}js/underscore.string.js"> </script>
 <script type="text/javascript" src="{{ STATIC_URL }}js/aleth/aleth.js"> </script>
 <script type="text/javascript" src="{{ STATIC_URL }}js/jquery.titlesize/jquery.titlesize.js"> </script>
+#}
+
+{#
 {{ include.contents  }}
+#}
+{{ self|rendered_as("contents") }}
 </body>
 </html>
 EOF
 foreground_color = #f00
 background_color = #00a
 
+#header_colors : EOF 
+#	color: {{ include.foreground_color }};
+#	background-color: {{ include.foreground_color }}; 
+#EOF
 header_colors : EOF 
-	color: {{ include.foreground_color }};
-	background-color: {{ include.foreground_color }}; 
+	color: {{ self|rendered_as("foreground_color") }};
+	background-color: {{ self|rendered_as("foreground_color") }}; 
 EOF
 
 extra_css = 
 <style type="text/css">
 
 #bco-important h2, #bco-important h1 {
-	{{ include.header_colors }}
+	{{ self|rendered_as("header_colors") }};
+	{# {{ include.header_colors }} #}
 }
 
-{{ include.extra_css }}
+{{ self|rendered_as("extra_css") }};
+{# {{ include.extra_css }} #}
 
+{#
 div#bco-important img, div#bco-important canvas {
 {% if info.image %}
 	left: -{{ info.image.scaled.left }}px; 
 	top: -{{ info.image.scaled.top }}px;
 {% endif %}
-
 }
+#}
 
 </style>
 {{ include.javascript_opt_image_effect }}
+
 {# <pre>{{ info.image.scaled }}</pre> #}
 <div id="bco-important" class="book cover outerclass">
 <div class="book cover">
 
+{{ self|rendered_as("before_text_html") }}
+{{ self|rendered_as("text_html") }}
+{{ self|rendered_as("after_text_html") }}
+
+{#
 {{ include.before_text_html }}
-
 {{ include.text_html }}
-
 {{ include.after_text_html }}
+#}
 
 <div class="cover-image">
 <img 
 	height="701"
 {% endif %}
 {% if template.image_tag_extra %}
+	{{ self|rendered_as("image_tag_extra") }}
+    {#
 	{{ include.image_tag_extra }}
+    #}
 {% endif %}
 />
 </div>

File sbstyle/cover/core/opt_image_effect.sbstyle

 BLAH
 
 
-[Style2]
+[Style]
 pixastic_args : EOF
-{% comment %}
+{#
 {% spaceless %}
 	{% with settings.image_effect as i %}
 		{% ifequal i "normal" %}
 		{% endifequal %}
 	{% endwith %}
 {% endspaceless %}
-{% endcomment %}
+#}
 EOF
 
 image_tag_extra : EOF
-{% comment %}
+{#
 {% spaceless %}
 {% if settings.image_effect %}
 	{% ifnotequal settings.image_effect "normal" %}
 	{% endifnotequal %}
 {% endif %}
 {% endspaceless %}
-{% endcomment %}
+#}
 EOF