about summary refs log tree commit diff
path: root/app/views/domain_policy
diff options
context:
space:
mode:
authormultiple creatures <dev@multiple-creature.party>2019-07-30 16:35:53 -0500
committermultiple creatures <dev@multiple-creature.party>2019-07-30 16:36:24 -0500
commitccb84572d6300c0ed69a59653b98ced89582452a (patch)
tree23609bf14d544836f7ef5177f70a52719ae53592 /app/views/domain_policy
parent3f327a3ea75e0c635b88418e5b92454873815f9d (diff)
add a domain policy viewer at `/policies`
Diffstat (limited to 'app/views/domain_policy')
-rw-r--r--app/views/domain_policy/show.html.haml58
1 files changed, 58 insertions, 0 deletions
diff --git a/app/views/domain_policy/show.html.haml b/app/views/domain_policy/show.html.haml
new file mode 100644
index 000000000..4b4b121fd
--- /dev/null
+++ b/app/views/domain_policy/show.html.haml
@@ -0,0 +1,58 @@
+- content_for :page_title do
+  = "#{site_hostname} Domain Policies"
+
+- content_for :header_tags do
+  = render partial: 'shared/og'
+
+.grid-3
+  .column-0
+    .public-account-header.public-account-header--no-bar
+      .public-account-header__image
+        = image_tag @instance_presenter.hero&.file&.url || @instance_presenter.thumbnail&.file&.url || asset_pack_path('media/images/preview.jpg'), alt: @instance_presenter.site_title, class: 'parallax'
+
+  .column-1
+    .landing-page__call-to-action{ dir: 'ltr' }
+      .row
+        .row__information-board
+          .information-board__section
+            %span= t 'about.user_count_before'
+            %strong= number_with_delimiter @instance_presenter.user_count
+            %span= t 'about.user_count_after', count: @instance_presenter.user_count
+          .information-board__section
+            %span= t 'about.status_count_before'
+            %strong= number_with_delimiter @instance_presenter.status_count
+            %span= t 'about.status_count_after', count: @instance_presenter.status_count
+        .row__mascot
+          .landing-page__mascot
+            = image_tag @instance_presenter.mascot&.file&.url || asset_pack_path('media/images/elephant_ui_plane.svg'), alt: ''
+
+  .column-2
+    .landing-page__information.contact-widget
+      %p
+        %strong= t 'about.administered_by'
+
+      = account_link_to(@instance_presenter.contact_account)
+
+      - if @instance_presenter.site_contact_email.present?
+        %p.contact-widget__mail
+          %strong
+            = succeed ':' do
+              = t 'about.contact'
+          %br/
+          = mail_to @instance_presenter.site_contact_email, nil, title: @instance_presenter.site_contact_email
+
+  .column-3
+    .box-widget
+      .rich-formatting
+        %h1= "#{@instance_presenter.site_title} Domain Policies"
+
+        .table-wrapper
+          %table.table
+            %thead
+              %tr
+                %th= "Domain"
+                %th= "Policy"
+                %th= "Additional"
+                %th= "Reason"
+            %tbody
+              = render @domain_policies