diff --git a/res/main.less b/res/main.less index 4018f07..62fb76a 100644 --- a/res/main.less +++ b/res/main.less @@ -225,7 +225,7 @@ color: @gray; } .example-frequency { - color: @red; + color: @darkred; } diff --git a/src/model/example.py b/src/model/example.py index 8e1a153..9ab6a6d 100644 --- a/src/model/example.py +++ b/src/model/example.py @@ -55,6 +55,9 @@ class Example(Editable): return 2 else: return 3 + + def get_other_attributes(self): + return self.inner.other_attributes class CorpusExample: diff --git a/src/view/view.py b/src/view/view.py index 05dbf2d..048e50e 100644 --- a/src/view/view.py +++ b/src/view/view.py @@ -131,11 +131,11 @@ class View: example_text_inner_tag = "span.example-text-{}".format(example.get_view_type()) example_content.append(h(example_text_inner_tag, {}, example.text())) - if "frequency" in example.other_attributes: - example_content.append(h("span.example-frequency", {}, example.other_attributes["frequency"])) - - if "logDice" in example.other_attributes: - example_content.append(h("span.example-logdice", {}, example.other_attributes["logDice"])) + other_attributes = example.get_other_attributes() + if "frequency" in other_attributes: + example_content.append(h("span.example-frequency", {}, other_attributes["frequency"])) + if "logDice" in other_attributes: + example_content.append(h("span.example-logdice", {}, other_attributes["logDice"])) parent_display = "inherit" if not model.examples_shown and not example.is_multiword():