2019-09-02 14:29:19 +03:00
< ! DOCTYPE html >
< html lang = " en " class = " h-full " >
< head >
< meta charset = " utf-8 " / >
< meta http - equiv = " X-UA-Compatible " content = " IE=edge " / >
< meta name = " viewport " content = " width=device-width, initial-scale=1.0 " / >
2020-03-20 12:41:50 +03:00
< meta name = " description " content = " Plausible is a lightweight and open-source web analytics tool. Your website data is 100% yours and the privacy of your visitors is respected. " / >
2019-09-02 14:29:19 +03:00
< link rel = " icon " type = " image/png " sizes = " 32x32 " href = " <%= PlausibleWeb.Router.Helpers.static_path(@conn, " / images / icon / plausible_favicon . png " ) %> " >
2020-07-01 10:22:26 +03:00
< link rel = " apple-touch-icon " href = " /images/icon/apple-touch-icon.png " >
2020-03-20 12:41:50 +03:00
< title > < % = assigns [ :title ] || " Plausible · Simple, privacy-friendly alternative to Google Analytics " % > < / title >
2019-09-02 14:29:19 +03:00
< link rel = " stylesheet " href = " <%= Routes.static_path(@conn, " / css / app . css " ) %> " / >
< % = render ( " _tracking.html " , assigns ) % >
2020-12-16 12:57:28 +03:00
< script type = " text/javascript " data - pref = " <%= @conn.assigns[:current_user] && @conn.assigns[:current_user].theme %> " src = " <%= Routes.static_path(@conn, " / js / applyTheme . js " ) %> " > < / script >
2019-09-02 14:29:19 +03:00
< / head >
2020-12-16 12:57:28 +03:00
< body class = " flex flex-col h-full bg-gray-50 dark:bg-gray-850 " >
2020-03-31 16:56:02 +03:00
< nav class = " relative py-8 z-10 " >
< div class = " container " >
< nav class = " relative flex items-center justify-between sm:h-10 md:justify-center " >
< div class = " flex items-center flex-1 md:absolute md:inset-y-0 md:left-0 " >
< div class = " flex items-center justify-between " >
2020-12-16 12:57:28 +03:00
< a href = " <%= home_dest(@conn) %> " >
< % = img_tag ( PlausibleWeb.Router.Helpers . static_path ( @conn , " /images/icon/plausible_logo_dark.png " ) , class : " h-8 w-auto sm:h-10 -mt-2 hidden dark:inline " , alt : " Plausible logo " ) % >
< % = img_tag ( PlausibleWeb.Router.Helpers . static_path ( @conn , " /images/icon/plausible_logo.png " ) , class : " h-8 w-auto sm:h-10 -mt-2 inline dark:hidden " , alt : " Plausible logo " ) % >
< / a >
2020-03-26 15:22:48 +03:00
< / div >
2020-03-31 16:56:02 +03:00
< / div >
< div class = " absolute flex items-center justify-end inset-y-0 right-0 " >
< % = cond do % >
< % @conn . assigns [ :current_user ] -> % >
< ul class = " flex " >
2021-01-15 11:12:00 +03:00
< % = if Application . get_env ( :plausible , :is_selfhost ) do % >
< li class = " mr-6 hidden sm:block " >
< % = link ( to : " https://github.com/plausible/analytics " , class : " font-bold rounded m-1 ml-0 p-1 hover:bg-gray-200 dark:hover:bg-gray-900 dark:text-gray-100 " , style : " line-height: 40px; " , target : " _blank " ) do % >
< svg class = " w-4 h-4 inline -mt-1 mr-px " role = " img " viewBox = " 0 0 24 24 " xmlns = " http://www.w3.org/2000/svg " > < title > GitHub icon < / title > < path d = " M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12 " / > < / svg >
Repo
< % end % >
< / li >
< % end % >
< % = if ! Application . get_env ( :plausible , :is_selfhost ) && @conn . assigns [ :current_user ] . subscription == nil do % >
2020-03-31 16:56:02 +03:00
< li class = " mr-6 hidden sm:block " >
2020-12-16 12:57:28 +03:00
< % = link ( trial_notificaton ( @conn . assigns [ :current_user ] ) , to : " /settings " , class : " font-bold text-orange-900 dark:text-yellow-900 rounded p-2 bg-orange-200 dark:bg-yellow-100 " , style : " line-height: 40px; " ) % >
2020-03-31 16:56:02 +03:00
< / li >
< % else % >
< li class = " mr-6 hidden sm:block " >
2020-12-29 12:00:41 +03:00
< % = link ( " Docs " , to : " https://docs.plausible.io " , class : " font-bold rounded m-1 p-1 hover:bg-gray-200 dark:hover:bg-gray-900 dark:text-gray-100 " , style : " line-height: 40px; " , target : " _blank " ) % >
2020-03-31 16:56:02 +03:00
< / li >
< % end % >
< li >
< div class = " relative font-bold rounded " >
2020-12-29 12:00:41 +03:00
< div data - dropdown - trigger class = " flex items-center hover:bg-gray-200 dark:hover:bg-gray-900 rounded m-1 p-1 cursor-pointer dark:text-gray-100 " >
2020-03-31 16:56:02 +03:00
< span class = " mr-2 " > < % = @conn . assigns [ :current_user ] . name || @conn . assigns [ :current_user ] . email % > < / span >
2020-04-01 12:27:26 +03:00
< svg style = " height: 18px; transform: translateY(2px); fill: # 606f7b; " xmlns = " http://www.w3.org/2000/svg " xmlns :xlink = " http://www.w3.org/1999/xlink " version = " 1.1 " x = " 0px " y = " 0px " viewBox = " 0 0 512 640 " enable - background = " new 0 0 512 512 " xml :space = " preserve " > < g > < circle cx = " 256 " cy = " 52.8 " r = " 50.8 " / > < circle cx = " 256 " cy = " 256 " r = " 50.8 " / > < circle cx = " 256 " cy = " 459.2 " r = " 50.8 " / > < / g > < / svg >
2020-03-31 16:56:02 +03:00
< / div >
2020-12-16 12:57:28 +03:00
< div data - dropdown style = " top: 42px; right: 0px; width: 185px; " class = " dropdown-content hidden absolute right-0 bg-white dark:bg-gray-800 border border-gray-300 dark:border-gray-500 rounded shadow-md z-10 " >
< % = link ( " Settings " , to : " /settings " , class : " block py-2 px-2 border-b border-gray-300 dark:border-gray-500 hover:bg-gray-100 dark:hover:bg-gray-900 dark:text-gray-100 " ) % >
< % = link ( " Log out " , to : " /logout " , method : :post , class : " block py-2 px-2 hover:bg-gray-100 dark:hover:bg-gray-900 dark:text-gray-100 " ) % >
2020-03-31 16:56:02 +03:00
< / div >
< / div >
< / li >
2021-01-08 12:08:51 +03:00
< % = if @conn . assigns [ :current_user ] . email in [ " hi@markosaric.com " , " uku@plausible.io " ] do % >
2021-01-07 16:22:51 +03:00
< li id = " changelog-notification " class = " relative py-2 " > < / li >
< % end % >
2020-03-31 16:56:02 +03:00
< / ul >
2020-07-02 11:21:11 +03:00
< % Keyword . fetch! ( Application . get_env ( :plausible , :selfhost ) , :disable_authentication ) -> % >
2020-03-31 16:56:02 +03:00
< ul class = " flex " x - show = " !document.cookie.includes('logged_in=true') " >
< li >
2020-07-02 11:21:11 +03:00
< div class = " inline-flex rounded shadow ml-6 " >
2020-11-19 15:24:08 +03:00
< a href = " / " class = " inline-flex items-center justify-center px-5 py-2 border border-transparent text-base leading-6 font-medium rounded-md text-white bg-indigo-600 hover:bg-indigo-500 focus:outline-none focus:ring transition duration-150 ease-in-out " > My Sites < / a >
2020-07-02 11:21:11 +03:00
< / div >
< / li >
< / ul >
< % Keyword . fetch! ( Application . get_env ( :plausible , :selfhost ) , :disable_registration ) -> % >
< ul class = " flex " x - show = " !document.cookie.includes('logged_in=true') " >
< li >
< div class = " inline-flex " >
2020-12-16 12:57:28 +03:00
< a href = " /login " class = " font-medium text-gray-500 dark:text-gray-200 hover:text-gray-900 focus:outline-none focus:text-gray-900 transition duration-150 ease-in-out " > Login < / a >
2020-07-02 11:21:11 +03:00
< / div >
< / li >
< / ul >
< % true -> % >
< ul class = " flex " x - show = " !document.cookie.includes('logged_in=true') " >
< li >
< div class = " inline-flex " >
2020-12-16 12:57:28 +03:00
< a href = " /login " class = " font-medium text-gray-500 dark:text-gray-200 hover:text-gray-900 focus:outline-none focus:text-gray-900 transition duration-150 ease-in-out " > Login < / a >
2020-07-02 11:21:11 +03:00
< / div >
< div class = " inline-flex rounded shadow ml-6 " >
2020-11-19 15:24:08 +03:00
< a href = " /register " class = " inline-flex items-center justify-center px-5 py-2 border border-transparent text-base leading-6 font-medium rounded-md text-white bg-indigo-600 hover:bg-indigo-500 focus:outline-none focus:ring transition duration-150 ease-in-out " > Sign up < / a >
2020-07-02 11:21:11 +03:00
< / div >
2020-03-31 16:56:02 +03:00
< / li >
< / ul >
< % end % >
< / div >
< / nav >
< / div >
2019-09-02 14:29:19 +03:00
< / nav >
2020-11-16 16:38:44 +03:00
< % = render ( " _flash.html " , assigns ) % >
2019-09-02 14:29:19 +03:00
< % = if get_flash ( @conn , :error ) do % >
2020-03-06 12:11:38 +03:00
< div id = " flash " class = " text-center bg-red-dark-500 text-red-100 text-sm font-bold px-4 absolute w-full transition overflow-hidden " style = " top: 91px " role = " alert " >
2019-09-02 14:29:19 +03:00
< p class = " py-3 " > < % = get_flash ( @conn , :error ) % > < / p >
< / div >
< % end % >
2020-07-07 16:36:06 +03:00
< % = if @conn . assigns [ :current_user ] && @conn . assigns [ :current_user ] . subscription && @conn . assigns [ :current_user ] . subscription . status == " past_due " do % >
< div class = " container " >
< div class = " p-2 rounded-lg bg-yellow-100 sm:p-3 " >
< div class = " flex items-center justify-between flex-wrap " >
< div class = " w-0 flex-1 flex items-center " >
< svg class = " h-6 w-6 text-yellow-800 " viewBox = " 0 0 24 24 " stroke = " currentColor " fill = " none " xmlns = " http://www.w3.org/2000/svg " >
< path d = " M12 9V11M12 15H12.01M5.07183 19H18.9282C20.4678 19 21.4301 17.3333 20.6603 16L13.7321 4C12.9623 2.66667 11.0378 2.66667 10.268 4L3.33978 16C2.56998 17.3333 3.53223 19 5.07183 19Z " stroke - width = " 2 " stroke - linecap = " round " stroke - linejoin = " round " / >
< / svg >
< p class = " ml-3 font-medium text-yellow-800 " >
Your latest payment failed . Please provide valid payment details to keep using Plausible .
< / p >
< / div >
< div class = " order-3 mt-2 flex-shrink-0 w-full sm:order-2 sm:mt-0 sm:w-auto " >
< div class = " rounded-md shadow-sm " >
2020-12-16 12:57:28 +03:00
< % = link ( " Update billing info " , to : @conn . assigns [ :current_user ] . subscription . update_url , class : " flex items-center justify-center px-4 py-2 border border-transparent text-sm leading-5 font-medium rounded-md text-gray-600 dark:text-gray-400 bg-white dark:bg-gray-800 hover:text-gray-500 dark:hover:text-gray-200 focus:outline-none focus:ring transition ease-in-out duration-150 " ) % >
2020-07-07 16:36:06 +03:00
< / div >
< / div >
< / div >
< / div >
< / div >
< % end % >
< % = if @conn . assigns [ :current_user ] && @conn . assigns [ :current_user ] . subscription && @conn . assigns [ :current_user ] . subscription . status == " paused " do % >
< div class = " container " >
< div class = " p-2 rounded-lg bg-red-100 sm:p-3 " >
< div class = " flex items-center justify-between flex-wrap " >
< div class = " w-0 flex-1 flex items-center " >
< svg class = " h-6 w-6 text-red-800 " viewBox = " 0 0 24 24 " stroke = " currentColor " fill = " none " xmlns = " http://www.w3.org/2000/svg " >
< path d = " M12 9V11M12 15H12.01M5.07183 19H18.9282C20.4678 19 21.4301 17.3333 20.6603 16L13.7321 4C12.9623 2.66667 11.0378 2.66667 10.268 4L3.33978 16C2.56998 17.3333 3.53223 19 5.07183 19Z " stroke - width = " 2 " stroke - linecap = " round " stroke - linejoin = " round " / >
< / svg >
< p class = " ml-3 font-medium text-red-800 " >
Your subscription is paused due to failed payments . Please provide valid payment details to keep using Plausible .
< / p >
< / div >
< div class = " order-3 mt-2 flex-shrink-0 w-full sm:order-2 sm:mt-0 sm:w-auto " >
< div class = " rounded-md shadow-sm " >
2020-12-16 12:57:28 +03:00
< % = link ( " Update billing info " , to : @conn . assigns [ :current_user ] . subscription . update_url , class : " flex items-center justify-center px-4 py-2 border border-transparent text-sm leading-5 font-medium rounded-md text-gray-600 dark:text-gray-400 bg-white dark:bg-gray-800 hover:text-gray-500 dark:hover:text-gray-200 focus:outline-none focus:ring transition ease-in-out duration-150 " ) % >
2020-07-07 16:36:06 +03:00
< / div >
< / div >
< / div >
< / div >
< / div >
< % end % >
2019-09-02 14:29:19 +03:00
< main class = " flex-1 " >
2021-01-13 11:31:16 +03:00
< % = Map . get ( assigns , :inner_layout ) || @inner_content % >
2019-09-02 14:29:19 +03:00
< / main >
< % = render ( " _footer.html " , assigns ) % >
< script type = " text/javascript " src = " <%= Routes.static_path(@conn, " / js / app . js " ) %> " > < / script >
< / body >
< / html >