~kevang/mnemosyne-proj/grade-shortcuts-improvements

« back to all changes in this revision

Viewing changes to mnemosyne/mnemosyne/libmnemosyne/renderers/html_css.py

  • Committer: Peter.Bienstman at UGent
  • Date: 2014-01-29 19:55:28 UTC
  • Revision ID: peter.bienstman@ugent.be-20140129195528-40nn1t2q4eieceqd
More html tweaks.

Show diffs side-by-side

added added

removed removed

Lines of Context:
28
28
        self._css = {} # {card_type.id: css}
29
29
 
30
30
    def body_css(self):
 
31
        return "html, body { margin: 0px; height: 100%;  width: 100%;}\n"
31
32
        return "body { margin: 0; padding: 0; border: thin solid #8F8F8F; }\n"
32
33
 
33
34
    def card_type_css(self, card_type):
34
35
        # Set aligment of the table (but not the contents within the table).
35
36
        # Use a separate id such that user created tables are not affected.
36
37
        css = "table.mnem { height: " + self.table_height + "; width: 100%; "
 
38
        css += "border: 1px solid #8F8F8F; "
37
39
        alignment = self.config().card_type_property(\
38
40
            "alignment", card_type, default="center")
39
41
        if alignment == "left":
114
116
        css = self.css(card_type)
115
117
        body = self.body(fact_data, fact_keys, card_type, **render_args)
116
118
        return """
 
119
        <!DOCTYPE html>
117
120
        <html>
118
121
        <head>
119
 
        <meta charset=utf-8">
 
122
        <meta charset="utf-8">
120
123
        <style type="text/css">
121
124
        %s
122
125
        </style>