Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

redesign policy pages #1099

Merged
merged 5 commits into from
Jan 13, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions assets/css/app.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@
@import "tailwindcss/utilities";
@import "./components/navbar.css";
@import "./components/general.css";
@import "./components/policies.css";
/* csslint ignore:end */
5 changes: 2 additions & 3 deletions assets/css/components/general.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
@layer components {

.heading-h2 {
@apply font-bold text-4xl text-center text-gray-900;
}
Expand All @@ -20,7 +19,7 @@
@apply italic font-medium text-sm text-red-600;
}

.form-input-error {
.form-input-error {
@apply border-red-600;
}

Expand All @@ -31,4 +30,4 @@
.faq-p {
@apply text-xl font-medium text-gray-700;
}
}
}
2 changes: 1 addition & 1 deletion assets/css/components/navbar.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
@apply font-sans text-sm font-medium;
}

.dropdown-menu{
.dropdown-menu {
@apply hover:text-gray-700 font-medium text-sm text-gray-400;
}
}
Expand Down
29 changes: 29 additions & 0 deletions assets/css/components/policies.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
@layer components {
.policy h2 {
@apply text-gray-900 text-4xl font-bold pt-5 pb-2;
}

.policy h3 {
@apply text-gray-700 text-2xl font-semibold pt-5 pb-2;
}

.policy h4 {
@apply text-gray-700 text-xl font-medium pt-5 pb-2;
}

.policy h6 {
@apply text-gray-600 text-lg font-light text-justify pt-5 pb-2;
}

.policy p, .policy ol, .policy ul {
@apply text-gray-600 text-base font-normal text-justify pb-4;
}

.policy ol {
@apply list-decimal pl-4;
}

.policy ul {
@apply list-disc;
}
}
39 changes: 9 additions & 30 deletions lib/hexpm_web/controllers/policy_controller.ex
Original file line number Diff line number Diff line change
Expand Up @@ -2,47 +2,26 @@ defmodule HexpmWeb.PolicyController do
use HexpmWeb, :controller

def coc(conn, _params) do
render(
conn,
"coc.html",
title: "Code of Conduct",
container: "container page page-sm policies"
)
render_layout(conn, "coc.html", "Code of Conduct")
end

def copyright(conn, _params) do
render(
conn,
"copyright.html",
title: "Copyright Policy",
container: "container page page-sm policies"
)
render_layout(conn, "copyright.html", "Copyright Policy")
end

def privacy(conn, _params) do
render(
conn,
"privacy.html",
title: "Privacy Policy",
container: "container page page-sm policies"
)
render_layout(conn, "privacy.html", "Privacy Policy")
end

def tos(conn, _params) do
render(
conn,
"tos.html",
title: "Terms of Service",
container: "container page page-sm policies"
)
render_layout(conn, "tos.html", "Terms of Service")
end

def dispute(conn, _params) do
render(
conn,
"dispute.html",
title: "Dispute policy",
container: "container page page-sm policies"
)
render_layout(conn, "dispute.html", "Naming Dispute Policy")
end

defp render_layout(conn, view, title) do
render(conn, "layout.html", view: view, title: title, container: nil)
end
end
4 changes: 1 addition & 3 deletions lib/hexpm_web/templates/policy/coc.html.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
## Code of Conduct

Hex exists to facilitate sharing code, by making it easy for Erlang ecosystem developers to publish and distribute packages.

Hex is a piece of technology, but more importantly, it is a community.
Expand All @@ -12,7 +10,7 @@ Hex is the set of formats and APIs that makes up the specification of Hex. Hex.p

The goal of the Code of Conduct is to specify a baseline standard of behavior so that people with different social values and communication styles can talk about Hex effectively, productively, and respectfully, even in face of disagreements. The Code of Conduct also provides a mechanism for resolving conflicts in the community when they arise.

### tl;dr
### TLDR

* Be respectful.
* We're here to help: <support@hex.pm>
Expand Down
10 changes: 4 additions & 6 deletions lib/hexpm_web/templates/policy/copyright.html.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
## Copyright Policy
###### Hex takes copyright infringement seriously. If you notice copyright infringing material on hex.pm or related services controlled by Hex you can submit a Digital Millennium Copyright Act (DMCA) takedown notice to <copyright@hex.pm>. Similarly, if you have received a takedown notice for your content you can submit a counter notice to the same address. Instructions for how to do so are outlined below.

Hex takes copyright infringement seriously. If you notice copyright infringing material on hex.pm or related services controlled by Hex you can submit a Digital Millennium Copyright Act (DMCA) takedown notice to <copyright@hex.pm>. Similarly, if you have received a takedown notice for your content you can submit a counter notice to the same address. Instructions for how to do so are outlined below.
###### As with all legal matters you should consult with professionals about your specific situation. Note that actions you take can limit your rights so it's always strongly recommended to take legal counsel prior.

As with all legal matters you should consult with professionals about your specific situation. Note that actions you take can limit your rights so it's always strongly recommended to take legal counsel prior.
###### Please note that all submissions will be published to the [Lumen Database](https://lumendatabase.org/) with any personal information removed.

Please note that all submissions will be published to the [Lumen Database](https://lumendatabase.org/) with any personal information removed.

Submit your takedown or takedown counter notice to <copyright@hex.pm>. You may include attachments but please include a copy of your letter in plain-text in the body of the email.
###### Submit your takedown or takedown counter notice to <copyright@hex.pm>. You may include attachments but please include a copy of your letter in plain-text in the body of the email.

### How to submit a DMCA takedown notice

Expand Down
4 changes: 1 addition & 3 deletions lib/hexpm_web/templates/policy/dispute.html.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
## Naming Dispute Policy

This document describes Hex's policy regarding disputes around package, user, and organization names.
###### This document describes Hex's policy regarding disputes around package, user, and organization names.

### When does this policy apply?

Expand Down
7 changes: 7 additions & 0 deletions lib/hexpm_web/templates/policy/layout.html.eex
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<div class="policy grid place-content-center pt-10">
<h2 class="text-center"><%= @title %></h2>

<div class="bg-white max-w-4xl mx-auto p-12 border border-solid border-gray-200 rounded-lg">
<%= render(@view) %>
</div>
</div>
6 changes: 2 additions & 4 deletions lib/hexpm_web/templates/policy/privacy.html.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
## Privacy Policy

We store information about access to and users on the [hex.pm](https://hex.pm) and [hexdocs.pm](https://hexdocs.pm) website, the hex.pm API and repository. This data is stored in the US on Heroku and Amazon AWS servers.
###### We store information about access to and users on the [hex.pm](https://hex.pm) and [hexdocs.pm](https://hexdocs.pm) website, the hex.pm API and repository. This data is stored in the US on Heroku and Amazon AWS servers.

### Websites

Expand All @@ -10,7 +8,7 @@ The logged data is only available to hex.pm's administrative team, but may be ma

The websites uses Google Analytics to monitor and analyze user behavior. This service provides hex.pm with information on users' demographics, age, location, and interest categories, when such information is available. This information is not used to identify individual users, but can in some cases be very specific. You can learn more about the information gathered and retained by this service at the [Google Analytics privacy policy](https://support.google.com/analytics/answer/2700409?hl=en&utm_id=ad). You can opt out of Google Analytics entirely with the [Google Analytics opt-out browser addon](https://support.google.com/analytics/answer/181881?hl=en&ref_topic=2919631).

#### Cookies
### Cookies

A cookie is a string of information that a website stores on a visitor’s computer, and that the visitor’s browser provides to the website each time the visitor returns.

Expand Down
28 changes: 13 additions & 15 deletions lib/hexpm_web/templates/policy/tos.html.md
Original file line number Diff line number Diff line change
@@ -1,36 +1,34 @@
## Terms of Service
###### By accessing or using the hex.pm or hexdocs.pm websites, HTTP API, repository or associated services (collectively, the "Services") you are agreeing to be bound by this Terms of Service ("Terms"). Six Colors AB ("Six Colors") operates each of these services. Any information, text, graphics or other material on Services (collectively, the "Content") is also covered by the Terms.

By accessing or using the hex.pm or hexdocs.pm websites, HTTP API, repository or associated services (collectively, the "Services") you are agreeing to be bound by this Terms of Service ("Terms"). Six Colors AB ("Six Colors") operates each of these services. Any information, text, graphics or other material on Services (collectively, the "Content") is also covered by the Terms.

### 1. Basic Terms
### Basic Terms

You are responsible for your use of the Services and any Content you post to the Services. Content you post publicly to the Services can be viewed by anyone using the Services or using third party services. All Content you post to the Services is subject to these terms.

You may use these Services only if you can form a binding contract with Six Colors. If you use the Services on behalf of another company, organization or other entity you must be authorized to do so.

You may not use the Services for any illegal or unauthorized purpose. You must not in the use of the Services violate any laws in your jurisdiction, including but not limited to copyright or trademark laws.

### 2. Account Terms
### Account Terms

Your user account may only be used by one person — in other words, a single login may not be shared by multiple people.

Additionally, we permit machine accounts. A machine account is an account set up by an individual who accepts the Terms on behalf of the account and is responsible for its actions. A machine account is used exclusively for performing automated tasks. Multiple users may direct the actions of a machine account, but the owner of the account is ultimately responsible for the machine's actions.

You are responsible for maintaining the security of your account and password. Six Colors cannot and will not be liable for any loss or damage from your failure to comply with this security obligation.

### 3. Privacy
### Privacy

Any information that you or other users provide is subject to our [Privacy Policy](privacy), which governs our collection and use of your information. As part of providing the Services we may send you information, these communications are considered part of the Services and are subject to these Terms.

### 4. API Terms
### API Terms

You may access Content via an API (Application Program Interface). Any use of the API, including use of the API through a third-party product that accesses the Services, is bound by these Terms.

Abuse or excessively frequent access to the Services through the API may result in temporary or permanent suspension of access to the API. Six Colors, will determine abuse or excessive usage of the API.

Six Colors reserves the right at any time to modify or discontinue, temporarily or permanently, your access to the API (or any part thereof) with or without notice.

### 5. Copyright and Content Ownership
### Copyright and Content Ownership

All Content, whether publicly posted or privately transmitted, is the sole responsibility of the person who originated such Content. Six Colors may not monitor or control the Content posted via the Services and, Six Colors cannot take responsibility for such Content. Any use or reliance on any Content or materials posted via the Services or obtained by you through the Services is at your own risk.

Expand All @@ -40,21 +38,21 @@ You retain your rights to any Content you submit, post or display on or through

You are responsible for your use of the Services, for any Content you provide, and for any consequences thereof, including the use of your Content by other users and third party services where such content has been published publicly via the Services. You understand that your Content (other than Private Content) may be syndicated, broadcast, distributed, or published by third party services and if you do not have the right to submit Content for such use, it may subject you to liability. Six Colors will not be responsible or liable for any use of your Content by Six Colors in accordance with these Terms. You represent and warrant that you have all the rights, power, and authority necessary to grant the rights granted herein to any Content that you submit.

### 6. Restrictions on Content and Use of the Services
### Restrictions on Content and Use of the Services

We reserve the right at all times (but will not have an obligation) to remove or refuse to distribute any Content on the Services, to suspend or terminate users, and to reclaim usernames or package names without liability to you. Subject to Section 8 below, we also reserve the right to access, read, preserve, and disclose any information as we reasonably believe is necessary to satisfy any applicable law, regulation, legal process or governmental request, enforce the Terms, including investigation of potential violations hereof, detect, prevent, or otherwise address fraud, security or technical issues, respond to user support requests, or protect the rights, property or safety of Six Color, its users and the public.

You may not do any of the following while accessing or using the Services: access, tamper with, or use non-public areas of the Services, Six Colors’s computer systems, or the technical delivery systems of Six Colors' providers; breach or circumvent any security or authentication measures; access or search or attempt to access or search the Services by any means (automated or otherwise) other than through our currently available, published interfaces that are provided by Six Colors (and only pursuant to the applicable terms and conditions), unless you have been specifically allowed to do so in a separate agreement with Six Colors (NOTE: crawling the Services is permissible if done in accordance with the provisions of the robots.txt file, however, scraping the Services without the prior consent of Six Colors is expressly prohibited); or interfere with, or disrupt, (or attempt to do so), the access of any user, host or network, including, without limitation, sending a virus, overloading, flooding, spamming, mail-bombing the Services, or by scripting the creation of Content in such a manner as to interfere with or create an undue burden on the Services.

Any Content that you submit, port or display on or through the Services is subject to our [Code of Conduct](codeofconduct), which governs your behavior and Content on the services.

### 7. Copyright Policy
### Copyright Policy

Six Colors respects the intellectual property rights of others and expects users of the Services to do the same. We will respond to notices of alleged copyright infringement that comply with applicable law and are properly provided to us. If you believe that your Content has been copied in a way that constitutes copyright infringement, please provide us with the following information: a physical or electronic signature of the copyright owner or a person authorized to act on their behalf; identification of the copyrighted work claimed to have been infringed; identification of the material that is claimed to be infringing or to be the subject of infringing activity and that is to be removed or access to which is to be disabled, and information reasonably sufficient to permit us to locate the material; your contact information; a statement by you that you have a good faith belief that use of the material in the manner complained of is not authorized by the copyright owner, its agent, or the law; and a statement that the information in the notification is accurate, and, under penalty of perjury, that you are authorized to act on behalf of the copyright owner.

We reserve the right to remove Content alleged to be infringing without prior notice, at our sole discretion, and without liability to you. In appropriate circumstances, Six Colors will also terminate a user’s account if the user is determined to be a repeat infringer. Under the U.S. Digital Millennium Copyright Act, our designated copyright agent for notice of alleged copyright infringement appearing on the Services is: <copyright@hex.pm>.

### 8. Private Content
### Private Content

Any Content you submit to the Services for a "private package", including but not limited package contents, associated documentation, or package metadata (such Content being "Private Content") shall constitute your confidential information. For the duration of these Terms, and on an on-going basis following termination or expiry hereof, Six Colors shall:

Expand All @@ -68,7 +66,7 @@ Six Colors may disclose Private Content solely if and to the extent:
3. It is known to Six Colors prior to the commencement of these Terms and you use of the Services without any restriction upon its disclosure.
4. Disclose to its legal advisers in confidence for the purpose of obtaining legal advice in connection with the Services.

### 9. Payment
### Payment

Our pricing is available at [hex.pm/pricing](/pricing). Prices are fixed during the subscription billing period, however prices are subject to change at the end of the billing period. There is no charge for using "open source" services.

Expand All @@ -84,11 +82,11 @@ Upon payment failure or cancellation of the subscription you will lose access to

By agreeing to these Terms you give us permission to charge your credit card on file. You agree to pay Six Colors any charges occurred due to the use of the Services, if you have any disputes contact <support@hexpm>. Free usage of the Services are not required to provide payment information.

### 10. Ending These Terms
### Ending These Terms

The Terms will continue to apply indefinitely or until terminated by Six Colors. If you stop using the Services the Terms will continue to apply to any information or Content you have submitted or posted to the Services, excluding Content you have explicitly removed from the Services. Nothing in this section shall affect Six Colors' rights to change, limit or stop the provision of the Services without prior notice.

### 11. Disclaimers and Limitations of Liability
### Disclaimers and Limitations of Liability

Except as expressly set out herein, your access to and use of the Services or any Content are at your own risk. You understand and agree that the Services are provided to you on an “AS IS” and “AS AVAILABLE” basis. Without limiting the foregoing, to the maximum extent permitted under applicable law, SIX COLORS DISCLAIM ALL WARRANTIES AND CONDITIONS, WHETHER EXPRESSED OR IMPLIED, OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT.

Expand All @@ -100,7 +98,7 @@ TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, Six Colors SHALL NOT BE LIABL

The failure of Six Colors to enforce any right or provision of these Terms will not be deemed a waiver of such right or provision. In the event that any provision of these Terms is held to be invalid or unenforceable, then that provision will be limited or eliminated to the minimum extent necessary, and the remaining provisions of these Terms will remain in full force and effect.

### 12. Changes
### Changes

If Six Colors makes changes to these Terms we will post a notice on the hex.pm website and notify you by email. New features, tools or resources added to the Services will be subject to the Terms. By continuing to use the Services you are agreeing to the Terms as it is subject to the changes.

Expand Down
4 changes: 4 additions & 0 deletions lib/hexpm_web/views/layout_view.ex
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ defmodule HexpmWeb.LayoutView do
end
end

def container_class(assigns) do
Map.get(assigns, :container, "container")
end

def search(assigns) do
Map.get(assigns, :search)
end
Expand Down