2020-12-15 12:30:45 +03:00
|
|
|
<div class="w-full max-w-3xl mt-4 mx-auto flex">
|
2020-12-16 12:57:28 +03:00
|
|
|
<%= form_for @changeset, "/sites", [class: "max-w-lg w-full mx-auto bg-white dark:bg-gray-800 shadow-lg rounded px-8 pt-6 pb-8 mb-4 mt-8"], fn f -> %>
|
|
|
|
<h2 class="text-xl font-black dark:text-gray-100">Your website details</h2>
|
2020-12-15 12:30:45 +03:00
|
|
|
<div class="my-6">
|
2020-12-16 12:57:28 +03:00
|
|
|
<%= label f, :domain, class: "block text-sm font-medium text-gray-700 dark:text-gray-300" %>
|
2020-12-15 12:30:45 +03:00
|
|
|
<div class="mt-2 flex rounded-md shadow-sm">
|
2020-12-16 12:57:28 +03:00
|
|
|
<span class="inline-flex items-center px-3 rounded-l-md border border-r-0 border-gray-300 dark:border-gray-500 bg-gray-50 dark:bg-gray-850 text-gray-500 dark:text-gray-400 sm:text-sm">
|
2020-12-15 12:30:45 +03:00
|
|
|
https://
|
|
|
|
</span>
|
2020-12-16 12:57:28 +03:00
|
|
|
<%= text_input f, :domain, class: "focus:ring-indigo-500 focus:border-indigo-500 dark:bg-gray-800 flex-1 block w-full px-3 py-2 rounded-none rounded-r-md sm:text-sm border-gray-300 dark:border-gray-500 dark:bg-gray-900 dark:text-gray-300", placeholder: "example.com" %>
|
2020-12-15 12:30:45 +03:00
|
|
|
</div>
|
|
|
|
<%= error_tag f, :domain %>
|
|
|
|
</div>
|
|
|
|
<div class="my-6">
|
2020-12-16 12:57:28 +03:00
|
|
|
<%= label f, :timezone, "Reporting Timezone", class: "block text-sm font-medium text-gray-700 dark:text-gray-300" %>
|
|
|
|
<p class="text-gray-500 dark:text-gray-400 text-xs mt-1">To make sure we agree on what 'today' means</p>
|
2019-09-02 14:29:19 +03:00
|
|
|
|
2020-12-15 12:30:45 +03:00
|
|
|
<div class="inline-block relative w-full">
|
2020-12-16 12:57:28 +03:00
|
|
|
<%= select f, :timezone, Plausible.Timezones.options(), id: "tz-select", selected: "Etc/Greenwich", class: "mt-1 block w-full pl-3 pr-10 py-2 text-base border-gray-300 dark:border-gray-500 dark:bg-gray-900 dark:text-gray-300 focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm rounded-md" %>
|
2019-09-02 14:29:19 +03:00
|
|
|
</div>
|
|
|
|
</div>
|
2020-12-15 12:30:45 +03:00
|
|
|
<script>
|
|
|
|
var offset = (new Date()).getTimezoneOffset()
|
|
|
|
var option = document.querySelector('#tz-select option[offset="' + offset + '"]')
|
|
|
|
if (option) { option.selected = "selected"}
|
|
|
|
</script>
|
2019-09-02 14:29:19 +03:00
|
|
|
|
2020-12-15 12:30:45 +03:00
|
|
|
<%= submit "Add snippet →", class: "button mt-4 w-full" %>
|
|
|
|
<% end %>
|
|
|
|
|
|
|
|
<%= if @is_first_site do %>
|
|
|
|
<div class="pt-12 pl-8 hidden md:block">
|
|
|
|
<%= render(PlausibleWeb.AuthView, "_onboarding_steps.html", current_step: 2) %>
|
|
|
|
</div>
|
|
|
|
<% end %>
|
|
|
|
</div>
|