Skip to content

Commit 3071caf

Browse files
author
gporpino
committed
Translating to PT
1 parent dd8f1fb commit 3071caf

File tree

251 files changed

+11651
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

251 files changed

+11651
-0
lines changed

sites/pt/docs/docs.step

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
message <<MARKDOWN
2+
Este site é mantido por voluntários do RailsBridge. Caso você identifique alguma melhoria, por favor faça um [pull request](https://github.com/railsbridge/docs) ou [deixe-nos uma nota](https://github.com/railsbridge/docs/issues/new) via GitHub Issues (não são necessários conhecimentos tecnológicos).
3+
MARKDOWN
4+
5+
h1 'Configurações'
6+
7+
site_desc 'installfest', <<-MARKDOWN
8+
Instruções para instalar Ruby e Rails no seu computador. Você precisa fazer isto antes de ir a um Rails workshop!
9+
MARKDOWN
10+
11+
h1 'Rails'
12+
13+
site_desc 'intro-to-rails', <<-MARKDOWN
14+
O curriculum "clássico" do RailsBridge (Suggestotron). Mostra passo a passo como fazer uma aplicação Rails, um comando de cada vez, usando helpers como `rails generate scaffold`.
15+
MARKDOWN
16+
17+
site_desc 'intermediate-rails', <<-MARKDOWN
18+
Curriculum para estudantes que já fizeram o Suggestotron mais de uma vez. O 'Easy mode' está desligado agora - este curriculum não vai te dizer o que escrever!
19+
MARKDOWN
20+
21+
h1 'Frontend'
22+
23+
site_desc 'frontend', <<-MARKDOWN
24+
HTML + CSS para iniciantes. Faça um website, não é necessário servidor!
25+
MARKDOWN
26+
27+
site_desc 'intro-to-javascript', <<-MARKDOWN
28+
A Javascript specific curriculum that walks you through [building a simple game](http://snake-tutorial.zeespencer.com/).
29+
MARKDOWN
30+
31+
h1 'Ruby'
32+
33+
site_desc 'learn-to-code', <<-MARKDOWN
34+
A course which teaches how to code from the ground up, using Alex's [Learn To Code In Ruby](http://codelikethis.com/lessons/learn_to_code) curriculum. It's geared towards people who may never have written code before and teaches just enough Ruby to get across basic principles like variables, objects, and the command line.
35+
MARKDOWN
36+
37+
site_desc 'ruby', <<-MARKDOWN
38+
A ruby-specific curriculum, expanded from the "Ruby for Beginners" slide deck. Still new, with room for your contributions.
39+
MARKDOWN
40+
41+
h1 'Other'
42+
43+
site_desc 'workshop', <<-MARKDOWN
44+
The Railsbridge junkyard! Slide decks for opening/closing presentations, teacher training.
45+
MARKDOWN
46+
47+
message <<MARKDOWN
48+
# RailsBridge curriculum-related FAQ
49+
50+
### Can I use the RailsBridge curricula at my event?
51+
52+
Anyone can use this site! It's under a Creative Commons license ([CC-BY, specifically](http://creativecommons.org/licenses/by/3.0/)), which means you're welcome to share, remix, or use our content commercially. We just ask for attribution.
53+
54+
Slightly different: if you're organizing an event and wonder if it could be considered a RailsBridge Workshop, we just have two requests:
55+
56+
* The event should be free of charge.
57+
* The event should work toward making tech more welcoming!
58+
59+
If you're not doing those two things, you can totally still use the site, we just ask that you not call your event a RailsBridge workshop.
60+
(Charity workshops have used "Rails Workshop featuring the RailsBridge curriculum" in the past, which is neat.)
61+
62+
63+
### I want to help, but I don't know how.
64+
65+
First, [make a GitHub account](https://github.com/). Then, [create an issue](https://github.com/railsbridge/docs/issues) with the idea you have. We'll help you turn it into reality (assuming it's in line with our lofty goals :D).
66+
67+
Don't know what you could work on? Browse the [issues list](https://github.com/railsbridge/docs/issues) and the [To Do list](https://github.com/railsbridge/docs/wiki/RailsBridge-To-Do-List). Those have lots of ideas.
68+
69+
70+
### I have a different question about RailsBridge.
71+
72+
The [RailsBridge website](http://www.railsbridge.org) probably has an answer!
73+
74+
MARKDOWN
Lines changed: 152 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,152 @@
1+
goals do
2+
goal "Code some common HTML attributes"
3+
goal "Use class and id attributes as hooks for CSS styles"
4+
end
5+
6+
overview do
7+
8+
message <<-MARKDOWN
9+
10+
## Why do we need attributes?
11+
12+
HTML tags first give your browser information about the content they wrap. They can also be extended to include other information about the content, like what type of form input the tag is, or like the `media` attribute, which we saw on the last page can be used to indicate whether the content will be displayed on a screen or printed out.
13+
14+
When creating a form, you'll use attributes to tell the browser what type of input they are,
15+
and the results will be easy to tell apart. This input:
16+
17+
MARKDOWN
18+
source_code :html, "<input type='radio' name='rando-radio'>"
19+
message <<-MARKDOWN
20+
21+
looks like a radio button: <input type='radio' name='rando-radio'>, but
22+
23+
MARKDOWN
24+
source_code :html, "<input type='password' name='fake-password' value='ick'>"
25+
message <<-MARKDOWN
26+
27+
looks like a password text input: <input type='password' name='rando-radio' value='ick'> even though they use the same **tag**.
28+
29+
## How do CSS and HTML connect?
30+
31+
Tags and attributes, mostly!
32+
33+
So far we've only applied styles to HTML tags like `<p>` and `<h1>`. But what if we want to apply a style to only a few of the instances of a given tag? We don't want _every_ paragraph to look special, so we can't add our style directly to the `<p>` tag.
34+
35+
This is where `class=` and `id=` attributes come in. Adding a class or ID to an HTML attribute allows you to add CSS styles to just that attribute.
36+
37+
38+
MARKDOWN
39+
40+
end
41+
42+
steps do
43+
44+
step do
45+
message "Let's add some classes and ids to our HTML. Start by adding one or two more paragraphs of text to the bottom of your HTML document. The last lines might look like this:"
46+
source_code :html, <<HTML
47+
<h1>Hello <em>World</em>!</h1>
48+
<p>My name is Rachel.</p>
49+
<p>I like:</p>
50+
<ul>
51+
<li>Polka Dots</li>
52+
<li>Soccer</li>
53+
<li>Programming</li>
54+
</ul>
55+
<p>I hear RailsBridge needs volunteers, should I volunteer!?!</p>
56+
HTML
57+
end
58+
59+
step do
60+
message "Add the class 'special' to your first paragraph. It'll look something like this:"
61+
source_code :html, <<HTML
62+
<h1>Hello <em>World</em>!</h1>
63+
<p class="special">My name is Rachel.</p>
64+
<p>I like:</p>
65+
<ul>
66+
<li>Polka Dots</li>
67+
<li>Soccer</li>
68+
<li>Programming</li>
69+
</ul>
70+
<p>I hear RailsBridge needs volunteers, should I volunteer!?!</p>
71+
HTML
72+
message "Refresh the page in the browser. You should see any new paragraphs you added, but no styling changes."
73+
message "Many HTML attributes, like classes and ids, don't directly convey visual information. Your site will look the exact same until we use the class to add CSS styling."
74+
end
75+
76+
step do
77+
message "To add a style rule that will apply to a class, use the syntax `.class-name` for your selector. It will be almost the same as the styles that you added to `<h1>` and `<p>`, but with a period at the beginning of your class name."
78+
message "Try giving the 'special' class a green border. Add this rule inside of your `style` tag:"
79+
source_code :css, <<CSS
80+
.special {
81+
border: 1px solid green;
82+
}
83+
CSS
84+
message "Refresh the page in the browser. You'll see something like this:"
85+
img src: 'img/css_class.png'
86+
end
87+
88+
step do
89+
message "Let's wrap your name in a `span` tag and give that an ID of 'user-name'. It'll look something like this:"
90+
source_code :html, <<HTML
91+
<h1>Hello <em>World</em>!</h1>
92+
<p class="special">My name is
93+
<span id="user-name">Rachel</span>
94+
</p>
95+
<p>I like:</p>
96+
<ul>
97+
<li>Polka Dots</li>
98+
<li>Soccer</li>
99+
<li>Programming</li>
100+
</ul>
101+
<p>I hear RailsBridge needs volunteers, should I volunteer!?!</p>
102+
HTML
103+
message "Save and refresh the page in the browser. Again, you shouldn't see any difference."
104+
end
105+
106+
step do
107+
message "Now, add the corresponding style rule for your ID, using the syntax `#id-name` for your selector. Try making the 'user-name' id look bold. Add this rule inside of your `style` tag:"
108+
source_code :css, <<CSS
109+
#user-name {
110+
font-weight: bold;
111+
}
112+
CSS
113+
message <<-MARKDOWN
114+
(Note: The span is just an element that lets you apply a class, id, or other attribute to a string of text without adding any line breaks. Browsers won't give it any styling by default.)
115+
116+
Once you add your style rule and refresh the page in the browser, you'll see something rather ugly like this:
117+
MARKDOWN
118+
img src: 'img/css_id.png'
119+
end
120+
121+
end
122+
123+
124+
explanation do
125+
message <<-MARKDOWN
126+
127+
## When should I use a class, and when should I use an ID?
128+
129+
### Classes
130+
A **class** attribute should be used to group elements that _could_ exist
131+
more than once on a given page. For example, you might give certain
132+
paragraphs a class of `"special"` and use that class to highlight them.
133+
Even if you only have one paragraph that's special now, you might
134+
want to add more later.
135+
136+
A class attribute will look like `class="special"` in the HTML and `.special` in the CSS. Don't mix up where the dot goes!
137+
138+
### IDs
139+
An **id** is a unique label. Use it to identify things you'd only have one
140+
of. For example, if you ran a news website, you would only have one element
141+
on a page that would serve as a masthead, and you could give it an id
142+
like `id="handsome-header"`
143+
144+
An id attribute will look like `id="handsome-header"` in the HTML, and `#handsome-header` in the CSS.
145+
146+
Within these guidelines, when you use classes and IDs is a matter of style / taste.
147+
MARKDOWN
148+
149+
end
150+
151+
next_step "dev_tools"
152+
Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
goals do
2+
goal "Add standard HTML head and body tags"
3+
goal "Add a page title"
4+
goal "Understand the use of non-visible tags like head"
5+
end
6+
7+
overview do
8+
9+
message <<-MARKDOWN
10+
11+
## The HTML tag and Doctype
12+
13+
The line `<!DOCTYPE html>` is called the doctype, and it tells the browser which flavor of HTML you're using. `<!DOCTYPE html>` tells your browser you're using HTML5, the latest version of HTML.
14+
15+
(You may see older doctypes out there that are longer and a lot more complicated, from when people
16+
used various HTML and XHTML versions, but those are annoying, and you can usually just
17+
use this short version for new websites.)
18+
19+
The `<html>` encloses all the rest of your page, and states unequivocally, "Here is my HTML!!!"
20+
21+
## Pages, Like People, Have a Head and a Body
22+
23+
MARKDOWN
24+
source_code :html, <<HTML
25+
<!DOCTYPE html>
26+
<html>
27+
<head>Invisible, Important Stuff</head>
28+
<body>Actual Visible Content</body>
29+
</html>
30+
HTML
31+
message <<-MARKDOWN
32+
33+
### The Head
34+
35+
The head contains information _about_ the document, including:
36+
37+
* what language or character set you're using
38+
* what the page title should be
39+
* what CSS and JavaScript files to include (and where they are)
40+
41+
Information in the `<head>` section is __not__ displayed.
42+
43+
It can also contain metadata tags that can tell a search engine or another
44+
program more about the file, like who wrote it or what keywords are relevant.
45+
46+
### The Body
47+
48+
The Body contains the actual content of your file, the things you'll want your users
49+
to be able to see, read, or interact with!
50+
51+
MARKDOWN
52+
53+
end
54+
55+
steps do
56+
57+
step do
58+
message <<-MARKDOWN
59+
Let's add the doctype, HTML, head, and body tags to your file. It should look like this:
60+
61+
<img src='img/hello_structure.png'>
62+
63+
Save the file and refresh your browser. Everything should look mostly the same.
64+
65+
MARKDOWN
66+
end
67+
68+
step do
69+
message "Let's add a title to our page within the `<head>` section. Add this line:"
70+
source_code :html, "<title>My Sample HTML page</title>"
71+
message <<-MARKDOWN
72+
When you refresh your browser, you should see the title on the tab in Chrome.
73+
74+
<img src='img/hello_title.png'>
75+
76+
(If it doesn't show up, double check that you put the line between the opening and closing head tags, and that you saved your file before refreshing.)
77+
MARKDOWN
78+
end
79+
80+
end
81+
82+
next_step "basic_CSS"
83+

0 commit comments

Comments
 (0)