diff --git a/ozgursozluk/api.py b/ozgursozluk/api.py index 58ce358..3f88dd9 100644 --- a/ozgursozluk/api.py +++ b/ozgursozluk/api.py @@ -66,6 +66,7 @@ class Topic: pagecount: int permalink: str entrys: Iterator[Entry] + nice: bool | None = None def title_id(self) -> str: return _unicode_tr(f"{self.title}--{self.id}") @@ -129,6 +130,7 @@ class Eksi: int(pager.attrs["data-pagecount"]) if pager is not None else 0, self.base_url + h1.find("a", href=True)["href"], self._get_entrys(soup), + a == "nice", ) def get_entry(self, id: str) -> Topic: diff --git a/ozgursozluk/templates/topic.html b/ozgursozluk/templates/topic.html index 8e9623b..29aeb5e 100644 --- a/ozgursozluk/templates/topic.html +++ b/ozgursozluk/templates/topic.html @@ -6,8 +6,14 @@

- {{ topic.title }} - şükela: + {{ topic.title }} - şükela: + {% if topic.nice %} + + nice + + {% else %} nice + {% endif %}