Add shecoded page (#1968)

* Add shecoded page

* Fix copy
This commit is contained in:
Ben Halpern 2019-03-04 07:50:49 -08:00 committed by GitHub
parent a08b6f18a6
commit 263b698686
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 207 additions and 1 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.8 KiB

View file

@ -1,6 +1,6 @@
class PagesController < ApplicationController
# No authorization required for entirely public controller
before_action :set_cache_control_headers, only: %i[rlyweb now events membership survey badge]
before_action :set_cache_control_headers, only: %i[rlyweb now events membership survey badge shecoded]
def now
set_surrogate_key_header "now_page"
@ -60,6 +60,11 @@ class PagesController < ApplicationController
)
end
def shecoded
render layout: false
set_surrogate_key_header "shecoded_page"
end
private # helpers
def latest_published_welcome_thread

View file

@ -0,0 +1,200 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
<title>#SheCoded 👩🏿‍💻👩‍💻👩🏾‍💻 - DEV Community</title>
<style>
* {
padding: 0;
margin: 0;
box-sizing: border-box;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
color: #46286e;
}
html,
body {
height: 100%;
background: url(<%= asset_path "SheCodedBackground.png" %>);
background-color: #cabde6;
background-repeat: repeat;
width: 100%;
position: fixed;
}
.mobile-only {
display: none;
}
.content {
width: 80%;
max-width: 1000px;
background-color: white;
height: 100%;
margin: 0 auto;
padding: 20px 0;
display: flex;
flex-direction: column;
justify-content: center;
}
h1 {
font-weight: 500;
font-size: calc(1.7vw + 22px);
text-align: center;
padding-bottom: 10px;
}
img {
/* max-width: 400px; */
width: 40%;
/* max-height: 40%; */
margin: 0 auto;
display: block;
}
.text {
padding: 0 5% 30px 5%;
max-width:650px;
margin: 0px auto;
}
.text > * {
padding-top: 20px;
font-size: 16px;
}
.button {
display: block;
width: 400px;
padding: 20px 30px;
text-align: center;
margin: 10px auto;
text-decoration: none;
font-weight: bold;
box-shadow: 3px 3px 2px #bababa;
border-radius: 3px;
}
.lavender {
background-color: #cabde6;
}
.purple {
background-color: #46286e;
color: #cabde6;
}
.logo-link,
.logo {
margin: 0 auto;
display: block;
}
.logo {
width: 66px;
height: 42px;
padding: 7px 8px 6px 10px;
fill: white;
margin-top: 10px;
border-radius: 3px;
background: #cabde6;
}
@media only screen and (max-width: 600px) {
.content {
width: 100%;
padding-top: 40px;
background-color: rgba(256, 256, 256, 0.8);
}
html,
body {
background: none;
}
img {
display: none;
}
.button {
width: 80%;
}
.mobile-only {
display: initial;
text-align: center;
font-size: 50px;
}
}
@media only screen and (max-height: 800px) {
html,
body {
position: initial;
height: initial;
width: initial;
}
img {
height: 300px;
}
.content {
height: 100%;
}
}
@media only screen and (max-width: 400px) {
html,
body {
position: initial;
height: initial;
width: initial;
}
.content {
padding: 20px 10px;
}
}
</style>
</head>
<body>
<div class="content">
<h1>Nevertheless, She Coded</h1>
<img src="<%= asset_path "SheCodedLogo.png" %>" alt="shecoded logo" />
<h2 class="mobile-only">👩🏿‍💻👩‍💻👩🏾‍💻</h2>
<div class="text">
<b>International Women's Day is this week and we want to celebrate the
heck out of it.</b>
<p>
Since Balance for Better is the official 2019 theme for IWD, we're
excited to celebrate women and non-binary people's bragging rights in
software development and gather advice for allies to take action. For
those of you who participated last year, we encourage you to submit
another post. And if you're new to the celebration, we welcome you to
contribute to the collective.
</p>
<p>
On Friday March 8th, we'll be boosting your stories all over dev.to
and across our social channels.
</p>
</div>
<a href="/new/shecoded" class="button lavender">WRITE A #SheCoded POST</a>
<a href="/new/shecodedally" class="button purple">WRITE A #SheCodedAlly POST</a>
<a href="/" class="logo-link" id="logo-link" aria-label="DEV Home">
<svg
xmlns="http://www.w3.org/2000/svg"
version="1"
width="20%"
height="20%"
viewBox="0 0 132.000000 65.000000"
class="logo">
<path d="M0 33v32h11.3c12.5 0 17.7-1.6 21.5-6.5 3.8-4.8 4.4-9 4-28-.3-16.8-.5-18.2-2.7-21.8C30.3 2.5 26.1 1 12 1H0v32zm23.1-19.1c2.3 1.9 2.4 2.3 2.4 18.5 0 15.7-.1 16.7-2.2 18.8-1.7 1.6-3.5 2.2-7 2.2l-4.8.1-.3-20.8L11 12h4.9c3.3 0 5.6.6 7.2 1.9zM46.1 3.6c-2 2.6-2.1 3.9-2.1 29.6v26.9l2.5 2.4c2.3 2.4 2.9 2.5 16 2.5H76V54.1l-10.2-.3-10.3-.3v-15l6.3-.3 6.2-.3V27H55V12h21V1H62.1c-13.9 0-14 0-16 2.6zM87 15.2c2.1 7.9 5.5 20.8 7.6 28.8 3.2 12.3 4.3 15 7 17.7 1.9 2 4.2 3.3 5.7 3.3 3.1 0 7.1-3.1 8.5-6.7 1-2.6 15.2-55.6 15.2-56.8 0-.3-2.8-.5-6.2-.3l-6.3.3-5.6 21.5c-3.5 13.6-5.8 20.8-6.2 19.5C105.9 40 96 1.9 96 1.4c0-.2-2.9-.4-6.4-.4h-6.4L87 15.2z"></path>
</svg>
</a>
</div>
</body>
</html>

View file

@ -216,6 +216,7 @@ Rails.application.routes.draw do
get "/swagnets" => "pages#swagnets"
get "/welcome" => "pages#welcome"
get "/badge" => "pages#badge"
get "/shecoded" => "pages#shecoded"
get "/💸", to: redirect("t/hiring")
get "/security", to: "pages#bounty"
get "/survey", to: redirect("https://dev.to/ben/final-thoughts-on-the-state-of-the-web-survey-44nn")