add: user ads
This commit is contained in:
parent
46b3e66cd4
commit
2cb7d08ddc
41 changed files with 1095 additions and 29 deletions
|
@ -894,7 +894,7 @@
|
|||
(div
|
||||
("class" "flex gap_2")
|
||||
(button
|
||||
(text "{{ text \"communities:action.create\" }}"))
|
||||
(str (text "communities:action.create")))
|
||||
|
||||
(text "{% if drawing_enabled -%}")
|
||||
(button
|
||||
|
@ -2494,6 +2494,11 @@
|
|||
(li
|
||||
(text "Create and sell CSS snippet products"))
|
||||
|
||||
(text "{% if config.enable_user_ads -%}")
|
||||
(li
|
||||
(text "No ads"))
|
||||
(text "{%- endif %}")
|
||||
|
||||
(text "{% if config.security.enable_invite_codes -%}")
|
||||
(li
|
||||
(text "Create up to 48 invite codes")
|
||||
|
@ -2709,3 +2714,33 @@
|
|||
(icon (text "badge-cent"))
|
||||
(text "{{ product.price }}")))
|
||||
(text "{%- endmacro %}")
|
||||
|
||||
(text "{% macro ad_listing_card(ad) -%}")
|
||||
(a
|
||||
("class" "card button lowered w_full flex flex_col gap_2")
|
||||
("href" "/product/ad/{{ ad.id }}/edit")
|
||||
(b
|
||||
("class" "flex gap_2 items_center")
|
||||
("style" "height: 24px; text-decoration: {% if not ad.is_running -%} line-through {%- else -%} none {%- endif %}")
|
||||
(icon (text "link"))
|
||||
(text "{{ ad.target }}"))
|
||||
(b
|
||||
("style" "height: 18px")
|
||||
(text "{% if ad.is_running -%}")
|
||||
(span
|
||||
("class" "green flex gap_2 items_center")
|
||||
(icon (text "circle-check"))
|
||||
(text "Running"))
|
||||
(text "{% else %}")
|
||||
(span
|
||||
("class" "red flex gap_2 items_center")
|
||||
(icon (text "circle-x"))
|
||||
(text "Not running"))
|
||||
(text "{%- endif %}")))
|
||||
(text "{%- endmacro %}")
|
||||
|
||||
(text "{% macro advertisement(size=\"Leaderboard\") -%}")
|
||||
(text "{% if not is_supporter and config.enable_user_ads -%}")
|
||||
(object ("class" "tetratto_ad") ("data-ad-size" "{{ size }}"))
|
||||
(text "{%- endif %}")
|
||||
(text "{%- endmacro %}")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue