47 |
48 |
49 |
--------------------------------------------------------------------------------
/source/core/definitions.rst:
--------------------------------------------------------------------------------
1 | Definitions
2 | ===========
3 |
4 | Here are some terms to get familiar with, before we dive into making a website.
5 |
6 | HTML - HyperText Markup Language
7 | --------------------------------
8 |
9 | HTML is the main markup language for creating web pages and other
10 | information that can be displayed in a web browser. You can write your
11 | web application in any programming languages, but in the end it will
12 | always be transformed into HTML because that’s the language of the
13 | browser. It is a hierarchical language.
14 |
15 | A short bit of history
16 | ----------------------
17 |
18 | HTML was developed at the CERN in Switzerland. Its inventor is Tim
19 | Berners-Lee. In 1980 he wrote his first hypertext system for personal
20 | use - the predecessor of HTML. With the first browser and server
21 | software the very young internet and HTML made their way to conquer
22 | the world. In 1992 two copies of a free web browser were downloaded
23 | from a computer at CERN to a computer in the USA. In 1995 the first
24 | Internet Explorer was published.
25 |
26 | How about HTML5? What’s that?
27 | -----------------------------
28 |
29 | This is just the latest version of HTML. There is a lot of interest
30 | about it, because it improves and adds many HTML elements, making it
31 | easier to write and to use.
32 |
33 | CSS - Cascading Style Sheets
34 | ----------------------------
35 |
36 | CSS is a language used for describing the look and formatting of a
37 | document written in a markup language. It is closely connected with
38 | HTML, since it gives style to HTML elements. In contrast to HTML, CSS
39 | has no hierarchy and can be written in the order that we choose.
40 |
41 | **CSS3** is the last released version of CSS, and it also improves CSS a
42 | lot. For example, it gives the possibility to animate an element.
43 |
44 |
--------------------------------------------------------------------------------
/source/core/resources.rst:
--------------------------------------------------------------------------------
1 | Resources
2 | =========
3 |
4 | Here are some useful resources to keep around as you work through the workshop:
5 |
6 | Cheat Sheet
7 | -----------
8 |
9 | Cheat sheets are an invaluable resource when learning HTML and CSS. We
10 | suggest opening the PDF cheat sheets at these links and keeping them
11 | around to refer to as you work through the workshop.
12 |
13 | - `HTML5`_ - Use this sheet for try out new HTML tag.
14 | - `CSS3`_ - Use this sheet for try out new CSS selectors.
15 | - `CSS Lint`_ - Use this site to let your CSS be checked automatically
16 | for mistakes.
17 |
18 | .. _HTML5: http://www.smashingmagazine.com/2009/07/06/html-5-cheat-sheet-pdf/
19 | .. _CSS3: http://coding.smashingmagazine.com/2009/07/13/css-3-cheat-sheet-pdf/
20 | .. _CSS Lint: http://csslint.net/
21 |
22 | Reference material
23 | ------------------
24 |
25 | The Mozilla Developer Network (MDN), by the people who make Firefox, host
26 | some great resources:
27 |
28 | - `HTML Portal`_ - Guides, intros, tutorials, references, elements,
29 | attributes...
30 | - `HTML Reference`_ - Every HTML element listed, find out about them all,
31 | and make use of them!
32 | - `CSS Portal`_ - Tutorials for writing effective CSS, demos of CSS3, and
33 | much more.
34 | - `CSS Reference`_ - More CSS properties and classes than you can shake a
35 | stick at.
36 | - `Google Fonts`_ - Here you can play around with Font and apply it to
37 | your project without downloading it.
38 |
39 | .. _HTML Portal: https://developer.mozilla.org/en-US/docs/Web/HTML
40 | .. _HTML Reference: https://developer.mozilla.org/en-US/docs/Web/HTML/Element
41 | .. _CSS Portal: https://developer.mozilla.org/en-US/docs/Web/CSS
42 | .. _CSS Reference: https://developer.mozilla.org/en-US/docs/Web/CSS/Reference
43 | .. _Google Fonts: http://www.google.com/fonts
44 |
45 | Learning resources
46 | ------------------
47 |
48 | - `CodeAcademy`_ - A good hands-on tutorial to keep you learning.
49 |
50 | .. _CodeAcademy: http://www.codecademy.com/tracks/web
51 |
--------------------------------------------------------------------------------
/source/extras/developertools.rst:
--------------------------------------------------------------------------------
1 | Helpful tools for HTML/CSS creation
2 | ===================================
3 |
4 | Browser Consoles
5 | ----------------
6 |
7 | The web browsers
8 | `Firefox `__ and `Google
9 | Chrome `__ both include a browser console
10 | tool which can help you create web pages.
11 |
12 | If you're not using either of these browsers you may want to download
13 | one (they're both free) and use it for some of the exercises in this
14 | workshop.
15 |
16 | In either browser, you can right-click any element on your page and
17 | choose "*Inspect Element*\ " to show it in the console. It's called the
18 | "Inspector" tab of the "Web Console" in Firefox and the "Elements" tab
19 | of the "Developer Tools" in Chrome, but they're both basically the same.
20 | This gives you a display of how the browser sees your page.
21 |
22 | Try it with the page you've created so far, right-click something on
23 | your page and choose "*Inspect Element*\ ":
24 |
25 | The console that pops should look like this (this is FireFox, Chrome is
26 | different but similar):
27 |
28 | .. image:: images/webconsole.png
29 |
30 | You can also click the little triangle arrows next to elements in the
31 | web console to look inside the structure of the HTML page, and click on
32 | other HTML elements to see them highlighted in the browser view.
33 |
34 | Click around the HTML elements in the console to get a look at how the
35 | browser processes the HTML page you created. Don't be afraid to explore.
36 | The console has a lot of features so don't worry if not everything makes
37 | sense.
38 |
39 | When you're done, you can **close the console** by clicking the "X" on
40 | the far-right end.
41 |
42 | More information on working with the console can be found in the
43 | `Firefox
44 | documentation `__
45 | and also the `Chrome
46 | documentation `__.
47 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # OpenTechSchool HTML & CSS Introduction
2 |
3 | This is a friendly how-to for contributors to the HTML and CSS workshop
4 | at OpenTechSchool.
5 | About the course:
6 |
7 | A HTML and CSS basic workshop for beginners that have never written HTML/CSS
8 | before and want to know how to start.
9 |
10 | ## Class format
11 |
12 | At OpenTechSchool we tend to go *practical* and *at your own pace*.
13 |
14 | At your own pace means that we provide access to the complete course notes at
15 | the beginning of the session. Then students can progress individually. Some
16 | students will get through very quickly, others will take some time, and others
17 | will finish the core work with time to spare. The core work should be
18 | completable by everyone. To keep things interesting we supply various
19 | additional topics which are entirely optional.
20 |
21 | A class schedule looks like this:
22 |
23 | 1100 - Students still arriving, writing name tags, setting up laptops.
24 | 1230 - Introductions, wifi instructions and location of coursework.
25 | 1235 - Students learn stuff.
26 | 1800 - Thankyous, maybe demonstrations.
27 |
28 |
29 | ## Author Guide
30 |
31 | This material is built with the help of [Sphinx][sphinx], [Invoke][invoke],
32 | and translated with [Transifex][transifex].
33 |
34 | To get started, you should have the python packages needed. To do this, use
35 | [pip][pip] like so (probably in a virtualenv you've made to work on this):
36 |
37 | pip install -r requirements.txt
38 |
39 | You can then use the invoke task runner to run things. E.g, build the project
40 | from the source files you've edited:
41 |
42 | invoke build -l en
43 |
44 | (builds them in English). To serve the built sphinx project on your own computer,
45 | you can run:
46 |
47 | invoke serve
48 |
49 | And visit the url that your console prints to view the result.
50 |
51 | The `setup` invoke task should git checkout the `gh-pages` branch correctly, should
52 | you wish to push to that branch to publish a new version of the workshop.
53 |
54 | Translation should be coming soon.
55 |
56 | [sphinx]: https://pypi.python.org/pypi/Sphinx/
57 | [invoke]: https://pypi.python.org/pypi/invoke/
58 | [transifex]: http://transifex.com/
59 | [pip]: https://pip.pypa.io/en/latest/
60 |
--------------------------------------------------------------------------------
/presentation/themes/gim/styles/fonts.css:
--------------------------------------------------------------------------------
1 | /* PTSans */
2 | @font-face {
3 | font-family:'PT Sans';
4 | src:local('PT Sans'), local('PTSansRegular'),
5 | url(../fonts/PTSans.woff) format('woff'),
6 | url(../fonts/PTSans.ttf) format('truetype'),
7 | url(../fonts/PTSans.svg#PTSans-Regular) format('svg');
8 | }
9 | @font-face {
10 | font-weight:bold;
11 | font-family:'PT Sans';
12 | src:local('PT Sans Bold'), local('PTSansBold'),
13 | url(../fonts/PTSans.Bold.woff) format('woff'),
14 | url(../fonts/PTSans.Bold.ttf) format('truetype'),
15 | url(../fonts/PTSans.Bold.svg#PTSans-Bold) format('svg');
16 | }
17 | @font-face {
18 | font-style:italic;
19 | font-family:'PT Sans';
20 | src:local('PT Sans Italic'), local('PTSansItalic'),
21 | url(../fonts/PTSans.Italic.woff) format('woff'),
22 | url(../fonts/PTSans.Italic.ttf) format('truetype'),
23 | url(../fonts/PTSans.Italic.svg#PTSans-Italic) format('svg');
24 | }
25 | @font-face {
26 | font-style:italic;
27 | font-weight:bold;
28 | font-family:'PT Sans';
29 | src:local('PT Sans Bold Italic'), local('PTSansBoldItalic'),
30 | url(../fonts/PTSans.Bold.Italic.woff) format('woff'),
31 | url(../fonts/PTSans.Bold.Italic.ttf) format('truetype'),
32 | url(../fonts/PTSans.Bold.Italic.svg#PTSans-BoldItalic) format('svg');
33 | }
34 | @font-face {
35 | font-family:'PT Sans Narrow';
36 | src:local('PT Sans Narrow'), local('PTSansNarrow'),
37 | url(../fonts/PTSans.Narrow.woff) format('woff'),
38 | url(../fonts/PTSans.Narrow.ttf) format('truetype'),
39 | url(../fonts/PTSans.Narrow.svg#PTSans-Narrow) format('svg');
40 | }
41 | @font-face {
42 | font-family:'PT Sans Narrow';
43 | font-weight:bold;
44 | src:local('PT Sans Narrow Bold'), local('PTSansNarrowBold'),
45 | url(../fonts/PTSans.Narrow.Bold.woff) format('woff'),
46 | url(../fonts/PTSans.Narrow.Bold.ttf) format('truetype'),
47 | url(../fonts/PTSans.Narrow.Bold.svg#PTSans-NarrowBold) format('svg');
48 | }
49 |
50 | /* PT Mono */
51 | @font-face {
52 | font-family:'PT Mono';
53 | src:local('PT Mono'), local('PTMonoRegular'),
54 | url(../fonts/PTMono.woff) format('woff'),
55 | url(../fonts/PTMono.ttf) format('truetype'),
56 | url(../fonts/PTMono.svg#PTMono) format('svg');
57 | }
58 |
59 | /* Linker */
60 | @font-face {
61 | font-family:'Target Blank';
62 | src:url(../fonts/TargetBlank.otf) format('opentype'),
63 | url(../fonts/TargetBlank.svg#TargetBlank) format('svg');
64 | }
--------------------------------------------------------------------------------
/presentation/themes/ribbon/styles/fonts.css:
--------------------------------------------------------------------------------
1 | /* PTSans */
2 | @font-face {
3 | font-family:'PT Sans';
4 | src:local('PT Sans'), local('PTSansRegular'),
5 | url(../fonts/PTSans.woff) format('woff'),
6 | url(../fonts/PTSans.ttf) format('truetype'),
7 | url(../fonts/PTSans.svg#PTSans-Regular) format('svg');
8 | }
9 | @font-face {
10 | font-weight:bold;
11 | font-family:'PT Sans';
12 | src:local('PT Sans Bold'), local('PTSansBold'),
13 | url(../fonts/PTSans.Bold.woff) format('woff'),
14 | url(../fonts/PTSans.Bold.ttf) format('truetype'),
15 | url(../fonts/PTSans.Bold.svg#PTSans-Bold) format('svg');
16 | }
17 | @font-face {
18 | font-style:italic;
19 | font-family:'PT Sans';
20 | src:local('PT Sans Italic'), local('PTSansItalic'),
21 | url(../fonts/PTSans.Italic.woff) format('woff'),
22 | url(../fonts/PTSans.Italic.ttf) format('truetype'),
23 | url(../fonts/PTSans.Italic.svg#PTSans-Italic) format('svg');
24 | }
25 | @font-face {
26 | font-style:italic;
27 | font-weight:bold;
28 | font-family:'PT Sans';
29 | src:local('PT Sans Bold Italic'), local('PTSansBoldItalic'),
30 | url(../fonts/PTSans.Bold.Italic.woff) format('woff'),
31 | url(../fonts/PTSans.Bold.Italic.ttf) format('truetype'),
32 | url(../fonts/PTSans.Bold.Italic.svg#PTSans-BoldItalic) format('svg');
33 | }
34 | @font-face {
35 | font-family:'PT Sans Narrow';
36 | src:local('PT Sans Narrow'), local('PTSansNarrow'),
37 | url(../fonts/PTSans.Narrow.woff) format('woff'),
38 | url(../fonts/PTSans.Narrow.ttf) format('truetype'),
39 | url(../fonts/PTSans.Narrow.svg#PTSans-Narrow) format('svg');
40 | }
41 | @font-face {
42 | font-family:'PT Sans Narrow';
43 | font-weight:bold;
44 | src:local('PT Sans Narrow Bold'), local('PTSansNarrowBold'),
45 | url(../fonts/PTSans.Narrow.Bold.woff) format('woff'),
46 | url(../fonts/PTSans.Narrow.Bold.ttf) format('truetype'),
47 | url(../fonts/PTSans.Narrow.Bold.svg#PTSans-NarrowBold) format('svg');
48 | }
49 |
50 | /* PT Mono */
51 | @font-face {
52 | font-family:'PT Mono';
53 | src:local('PT Mono'), local('PTMonoRegular'),
54 | url(../fonts/PTMono.woff) format('woff'),
55 | url(../fonts/PTMono.ttf) format('truetype'),
56 | url(../fonts/PTMono.svg#PTMono) format('svg');
57 | }
58 |
59 | /* Linker */
60 | @font-face {
61 | font-family:'Target Blank';
62 | src:url(../fonts/TargetBlank.otf) format('opentype'),
63 | url(../fonts/TargetBlank.svg#TargetBlank) format('svg');
64 | }
--------------------------------------------------------------------------------
/tasks.py:
--------------------------------------------------------------------------------
1 | import sys
2 | from os import path, chdir
3 | from invoke import run, task
4 |
5 | if sys.version_info[0] < 3:
6 | import SimpleHTTPServer as httpserver
7 | import SocketServer as socketserver
8 | else:
9 | import http.server as httpserver
10 | import socketserver
11 |
12 | languages = ['en', 'de']
13 |
14 | BASE_DIR = path.realpath(path.dirname(__file__))
15 | BUILD_DIR = path.join(BASE_DIR, 'build')
16 | SOURCE_DIR = path.join(BASE_DIR, 'source')
17 | LOCALE_DIR = path.join(SOURCE_DIR, 'locale',
18 | '%s', 'LC_MESSAGES')
19 | LANGUAGES = set(['en', 'de'])
20 | MAIN_TARGET = 'html'
21 | REPOSITORY = 'git@github.com:%s/html-css-beginners.git'
22 | SERVE_PORT = 8000
23 |
24 |
25 | @task
26 | def clean(language=None, target=MAIN_TARGET):
27 | """Clean the sphinx build folder"""
28 | if language is not None:
29 | run('rm -rf %s' % path.join(BUILD_DIR, target, language))
30 | else:
31 | run('rm -rf %s' % path.join(BUILD_DIR, target))
32 |
33 |
34 | @task(clean)
35 | def setup(owner='OpenTechSchool'):
36 | """Recreate the build html folder, under a new gh-pages branch checkout"""
37 | repo = REPOSITORY % owner
38 | target_dir = path.join(BUILD_DIR, MAIN_TARGET)
39 | run('mkdir -p %s' % target_dir)
40 | run('git clone %s -b %s --single-branch %s' %
41 | (repo, 'gh-pages', target_dir))
42 |
43 |
44 | @task
45 | def build(language=None, target=MAIN_TARGET):
46 | """Build the sphinx project for a specific language"""
47 | if language is None:
48 | print('Please build a specific language; one of: %s' %
49 | ', '.join(LANGUAGES))
50 | print('e.g: invoke build -l en')
51 | exit()
52 | elif language not in LANGUAGES:
53 | exit('Language %s not available.' % language)
54 | args = [
55 | 'sphinx-build',
56 | '-b', target, # builder type
57 | '-d', path.join(BUILD_DIR, 'doctrees'), # doctree path
58 | '-D', 'language=%s' % language, # language
59 | SOURCE_DIR,
60 | path.join(BUILD_DIR, target, language), # output path
61 | ]
62 | run(' '.join(args))
63 | if 'html' in target:
64 | static_files = path.join(BASE_DIR, '_static', '*')
65 | target_dir = path.join(BUILD_DIR, target)
66 | run('cp %s %s' % (static_files, target_dir))
67 |
68 |
69 | @task
70 | def serve(port=SERVE_PORT, serve_dir=None):
71 | """Run a web server to serve the built project"""
72 | if serve_dir is None:
73 | serve_dir = path.join(BUILD_DIR, MAIN_TARGET)
74 | port = int(port)
75 | chdir(serve_dir)
76 | handler = httpserver.SimpleHTTPRequestHandler
77 | httpd = socketserver.TCPServer(("", port), handler)
78 | print("serving on http://%s:%s" % httpd.server_address)
79 | httpd.serve_forever()
80 |
--------------------------------------------------------------------------------
/source/core/style.rst:
--------------------------------------------------------------------------------
1 | Your first styled Hello World!
2 | ==============================
3 |
4 | Writing CSS
5 | -----------
6 |
7 | There are two ways to write CSS for a document.
8 |
9 | An internal CSS code can be typed in the head section of the code. The
10 | coding starts with the style tag, written just before the closing
11 | ```` tag.
12 |
13 | ::
14 |
15 |
18 |
19 | This way is good when you do not have many styles. In such a case, it is
20 | easier to refer to because the browser has no need to load another file.
21 |
22 | The second way to write CSS for a document is with an "external" CSS
23 | file.
24 |
25 | Open a new file in your editor and save it with a ``.css`` extension in the
26 | same directory as your HTML file (give it a name like ``styles.css`` for
27 | now.)
28 |
29 | Then you can link that to an HTML document using the following syntax.
30 | Write it just after the meta tag, before the closing ```` tag.
31 |
32 | ::
33 |
34 |
35 |
36 | This is the best way if you have a lot of CSS to write and you want to
37 | keep it organized.
38 |
39 | **TIP:** The link reference ("href") to ``"styles.css"`` is a path
40 | relative to the HTML document, same as the ``src`` for the ```` tag
41 | in the previous chapter.
42 |
43 | Let's add some colors!
44 | ----------------------
45 |
46 | CSS has a simple syntax. The file consists of a list of rules. Each rule
47 | consists of one or more selectors and a declaration block.
48 |
49 | **Selectors** are used to declare which part of the markup a style
50 | applies to. Let's take the h1 title we wrote in our HTML file and give
51 | it a nice red color.
52 |
53 | ::
54 |
55 | h1 {
56 | color: red;
57 | }
58 |
59 | ``h1`` is the selector, the HTML element we want to style. ``color`` is one of
60 | the properties that we can give to our selector, and ``red`` is the value
61 | of this property. The right syntax is:
62 |
63 | ::
64 |
65 | selector {
66 | property: value; /* remember always to write a ; after your value */
67 | property: value;
68 | }
69 |
70 | Refresh your browser and see how the colour of your title has changed.
71 |
72 | Isn't it nice? To give a background colour to our paragraph, write
73 |
74 | ::
75 |
76 | p {
77 | background-color: #ddd;
78 | }
79 |
80 | Troubleshooting
81 | ---------------
82 |
83 | Did the title text colour not change when you refreshed?
84 |
85 | Double check the name of the CSS file in the ```` tag, and also
86 | double check that the CSS file is in the same directory as the HTML
87 | file.
88 |
89 | Also make sure that all rules end with a ``;`` and are placed inside of the
90 | curly brackets of the selector you want to style.
91 |
92 | --------------
93 |
94 | Web colours are colours used in designing web pages. Colours may be
95 | specified as an RGB triplet or in hexadecimal format (a hex triplet).
96 | Hexadecimal color codes begin with a number sign (#). This number can be
97 | picked from a graphics software or from some nice web tool, such as,
98 | `Color picker `_, for example. When you
99 | have chosen your color, copy the number that starts with # and paste
100 | that in your CSS file.
101 |
102 | Good to know: ``#000`` is black and ``#fff`` is white.
103 |
104 | --------------
105 |
106 | Let's try now to give a nice border to our image, that we added to our
107 | page in the :doc:`first chapter `.
108 |
109 | ::
110 |
111 | img {
112 | border: 1px solid #000;
113 | }
114 |
115 | Here we are giving the following style to all the img tags we have: a
116 | 1-pixel thick, solid black border to all four edges of our images. If we
117 | want to give the style to just one of the four edges, for example, the
118 | top edge, we would write
119 |
120 | ::
121 |
122 | img {
123 | border-top: 1px solid #000;
124 | }
125 |
126 | Look at the `CSS cheat
127 | sheet `_
128 | and give some more styles to your images.
129 |
130 | A short note on hierarchy
131 | -------------------------
132 |
133 | As you learned in the :doc:`structure section ` in HTML you can
134 | nest your tags inside of one another like so:
135 |
136 | ::
137 |
138 |
139 |
The h1 tag indicates the primary header of the document.
140 |
Some text.
141 |
142 |
143 | In CSS you can apply hierarchical styling like this:
144 |
145 | ::
146 |
147 | p {
148 | color: black;
149 | }
150 | div p {
151 | color: red;
152 | }
153 |
154 | So we have two rules here. The first says the text colour in paragraphs
155 | should be black. The second rule is more *specific* - it says the text in
156 | paragraphs should be red, but only if those paragraphs are inside of a
157 | div tag. A more specific rule always beats a less specific rule.
158 |
--------------------------------------------------------------------------------
/Makefile:
--------------------------------------------------------------------------------
1 | # Makefile for Sphinx documentation
2 | #
3 |
4 | # You can set these variables from the command line.
5 | SPHINXOPTS =
6 | SPHINXBUILD = sphinx-build
7 | PAPER =
8 | BUILDDIR = build
9 |
10 | # User-friendly check for sphinx-build
11 | ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1)
12 | $(error The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed, then set the SPHINXBUILD environment variable to point to the full path of the '$(SPHINXBUILD)' executable. Alternatively you can add the directory with the executable to your PATH. If you don't have Sphinx installed, grab it from http://sphinx-doc.org/)
13 | endif
14 |
15 | # Internal variables.
16 | PAPEROPT_a4 = -D latex_paper_size=a4
17 | PAPEROPT_letter = -D latex_paper_size=letter
18 | ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source
19 | # the i18n builder cannot share the environment and doctrees with the others
20 | I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source
21 |
22 | .PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext
23 |
24 | help:
25 | @echo "Please use \`make ' where is one of"
26 | @echo " html to make standalone HTML files"
27 | @echo " dirhtml to make HTML files named index.html in directories"
28 | @echo " singlehtml to make a single large HTML file"
29 | @echo " pickle to make pickle files"
30 | @echo " json to make JSON files"
31 | @echo " htmlhelp to make HTML files and a HTML help project"
32 | @echo " qthelp to make HTML files and a qthelp project"
33 | @echo " devhelp to make HTML files and a Devhelp project"
34 | @echo " epub to make an epub"
35 | @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
36 | @echo " latexpdf to make LaTeX files and run them through pdflatex"
37 | @echo " latexpdfja to make LaTeX files and run them through platex/dvipdfmx"
38 | @echo " text to make text files"
39 | @echo " man to make manual pages"
40 | @echo " texinfo to make Texinfo files"
41 | @echo " info to make Texinfo files and run them through makeinfo"
42 | @echo " gettext to make PO message catalogs"
43 | @echo " changes to make an overview of all changed/added/deprecated items"
44 | @echo " xml to make Docutils-native XML files"
45 | @echo " pseudoxml to make pseudoxml-XML files for display purposes"
46 | @echo " linkcheck to check all external links for integrity"
47 | @echo " doctest to run all doctests embedded in the documentation (if enabled)"
48 |
49 | clean:
50 | rm -rf $(BUILDDIR)/*
51 |
52 | html:
53 | $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
54 | @echo
55 | @echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
56 |
57 | dirhtml:
58 | $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
59 | @echo
60 | @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."
61 |
62 | singlehtml:
63 | $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml
64 | @echo
65 | @echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml."
66 |
67 | pickle:
68 | $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle
69 | @echo
70 | @echo "Build finished; now you can process the pickle files."
71 |
72 | json:
73 | $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json
74 | @echo
75 | @echo "Build finished; now you can process the JSON files."
76 |
77 | htmlhelp:
78 | $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp
79 | @echo
80 | @echo "Build finished; now you can run HTML Help Workshop with the" \
81 | ".hhp project file in $(BUILDDIR)/htmlhelp."
82 |
83 | qthelp:
84 | $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp
85 | @echo
86 | @echo "Build finished; now you can run "qcollectiongenerator" with the" \
87 | ".qhcp project file in $(BUILDDIR)/qthelp, like this:"
88 | @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/BasicWebSiteConstruction.qhcp"
89 | @echo "To view the help file:"
90 | @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/BasicWebSiteConstruction.qhc"
91 |
92 | devhelp:
93 | $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp
94 | @echo
95 | @echo "Build finished."
96 | @echo "To view the help file:"
97 | @echo "# mkdir -p $$HOME/.local/share/devhelp/BasicWebSiteConstruction"
98 | @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/BasicWebSiteConstruction"
99 | @echo "# devhelp"
100 |
101 | epub:
102 | $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub
103 | @echo
104 | @echo "Build finished. The epub file is in $(BUILDDIR)/epub."
105 |
106 | latex:
107 | $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
108 | @echo
109 | @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."
110 | @echo "Run \`make' in that directory to run these through (pdf)latex" \
111 | "(use \`make latexpdf' here to do that automatically)."
112 |
113 | latexpdf:
114 | $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
115 | @echo "Running LaTeX files through pdflatex..."
116 | $(MAKE) -C $(BUILDDIR)/latex all-pdf
117 | @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
118 |
119 | latexpdfja:
120 | $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
121 | @echo "Running LaTeX files through platex and dvipdfmx..."
122 | $(MAKE) -C $(BUILDDIR)/latex all-pdf-ja
123 | @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
124 |
125 | text:
126 | $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text
127 | @echo
128 | @echo "Build finished. The text files are in $(BUILDDIR)/text."
129 |
130 | man:
131 | $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man
132 | @echo
133 | @echo "Build finished. The manual pages are in $(BUILDDIR)/man."
134 |
135 | texinfo:
136 | $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
137 | @echo
138 | @echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo."
139 | @echo "Run \`make' in that directory to run these through makeinfo" \
140 | "(use \`make info' here to do that automatically)."
141 |
142 | info:
143 | $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
144 | @echo "Running Texinfo files through makeinfo..."
145 | make -C $(BUILDDIR)/texinfo info
146 | @echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo."
147 |
148 | gettext:
149 | $(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale
150 | @echo
151 | @echo "Build finished. The message catalogs are in $(BUILDDIR)/locale."
152 |
153 | changes:
154 | $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes
155 | @echo
156 | @echo "The overview file is in $(BUILDDIR)/changes."
157 |
158 | linkcheck:
159 | $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
160 | @echo
161 | @echo "Link check complete; look for any errors in the above output " \
162 | "or in $(BUILDDIR)/linkcheck/output.txt."
163 |
164 | doctest:
165 | $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
166 | @echo "Testing of doctests in the sources finished, look at the " \
167 | "results in $(BUILDDIR)/doctest/output.txt."
168 |
169 | xml:
170 | $(SPHINXBUILD) -b xml $(ALLSPHINXOPTS) $(BUILDDIR)/xml
171 | @echo
172 | @echo "Build finished. The XML files are in $(BUILDDIR)/xml."
173 |
174 | pseudoxml:
175 | $(SPHINXBUILD) -b pseudoxml $(ALLSPHINXOPTS) $(BUILDDIR)/pseudoxml
176 | @echo
177 | @echo "Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml."
178 |
--------------------------------------------------------------------------------
/presentation/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | HTML and CSS for beginners
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
Welcome to Open Tech School
15 |
16 |
17 |
18 |
19 |
20 |
21 |
HTML and CSS for beginners
22 |
23 |
24 |
25 |
26 |
27 |
A short history of the Internet
28 |
29 |
30 |
Developed at CERN
31 |
Tim Berners-Lee
32 |
Starting in 1989
33 |
Computer service system for communication
34 |
Not only make information available, but link it
35 |
Thus creating a web of informations
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
History of HTML I
44 |
45 |
46 |
Developed at CERN (again)
47 |
Tim Berners-Lee
48 |
In 1980 first hypertext System "Enquire" for personal use
49 |
Late 1980s Hypercards for Macintosh
50 |
In 1990 Berners-Lee developed browser and server
51 |
Never officially adopted by CERN
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
History of HTML II
60 |
61 |
62 |
1991: Open discussions about HTML in the Internet
63 |
1992: Two copies of a free web browser beeing downloaded
64 |
1993: Companies thought the Internet was for academics
65 |
1994: First WWW-Conference in Geneva, Netscape is formed, W3C
`` tag.
131 |
132 | Inside that tag you can write some text that will be displayed to the
133 | user.
134 |
135 | For example: ``
Hi I am Mr. Smith. Feel free to contact me.
``
136 |
137 | You also can add a linebreak after the first sentence with a `` ``
138 | tag and maybe you want to highlight your name by making it italic:
139 | ``Mr. Smith``.
140 |
141 | If you want to add more styling to the paragraph you should do that in
142 | the CSS file. Just add a class to the paragraph
143 | ``
`` and over in the CSS file add some styling
144 | to the text:
145 |
146 | ::
147 |
148 | .contact-intro {
149 | font-size: 20px;
150 | font-family: Arial;
151 | margin: 10px;
152 | }
153 |
154 | That's it for the short introduction. Now let's get to the links where
155 | visitors of your site can actually contact you.
156 |
157 | Just create a list for the different contact options using the
158 | ``
`` tag (ul for unordered list) and also add a class to the
159 | list so you can style it later on: ``
``.
160 |
161 | For now we want to add links to Mail, Twitter, Facebook and Github. So
162 | you have to create four list items with ``
`` tags.
163 |
164 | Inside each item you add a link tag so the user of your site can click
165 | on something. You can do that using an ```` tag. You
166 | can ignore the ``href`` attribute for now. We will cover that later to
167 | make the links actually work.
168 |
169 | In general you can use everything as a link. A button element, an image
170 | or just plain text. But let's create a stylish icon using CSS here.
171 |
172 | For doing so add the first letter of the name of each link in the link
173 | tag and add some classes to the links so you can style them. Add one
174 | class ``contact-link`` to each link to apply styles to all links and add
175 | a unique class for each link (``mail``, ``twitter``, ``facebook``,
176 | ``github``). The whole list should look like the following:
177 |
178 | ::
179 |
180 |
186 |
187 | If you like you can replace each # above with the URL to your respective
188 | social network account.
189 |
190 | And now you can style the links using CSS.
191 |
192 | You can change the font, create a box for each link in a different
193 | colour and position the letter pixel perfect for each link individually.
194 |
195 | Here is some simple styling. Have a look at it and adjust it to your
196 | needs:
197 |
198 | ::
199 |
200 | .contact-links {
201 | padding: 0;
202 | list-style-type: none;
203 | }
204 |
205 | .contact-link {
206 | display: block;
207 | float: left;
208 | margin: 10px;
209 | text-decoration: none;
210 | color: white;
211 | font-family: Arial;
212 | font-weight: 900;
213 | font-size: 35px;
214 | }
215 |
216 | .mail {
217 | background: #dd1812;
218 | width: 39px;
219 | height: 45px;
220 | padding: 1px 0 0 9px;
221 | }
222 |
223 | .twitter {
224 | background: #00acee;
225 | width: 30px;
226 | height: 42px;
227 | padding: 4px 0 0 18px;
228 | }
229 |
230 | .facebook {
231 | background: #3B5998;
232 | width: 30px;
233 | height: 42px;
234 | padding: 4px 0 0 18px;
235 | }
236 |
237 | .github {
238 | background: #171515;
239 | width: 35px;
240 | height: 46px;
241 | padding: 0 0 0 13px;
242 | }
243 |
244 | That's it for this section. Feel free to extend and customize the
245 | contact page in every way you can imagine.
246 |
247 | tag
248 | -------
249 |
250 | Good! Our portfolio is almost ready. Now we need just one more thing: to
251 | link all your pages together. To do that there is a special tag: a tag
252 | (anchor) that defines a hyperlink. The most important attribute of the <
253 | a > element is the href attribute, which indicates the link’s
254 | destination. So the HTML syntrax for a link look like this:
255 |
256 | ::
257 |
258 | Link text
259 |
260 | There are different types of links. You can create an **external link**,
261 | a link that go to another web site. This link is absolute and basically
262 | need all the line that usually you see or type in the Url bar of your
263 | browser. If we want to link our web site to the OTS site, it look like
264 | this:
265 |
266 | ::
267 |
268 | OpenTechSchool
269 |
270 | Also very important is the Internal link or rather a link that point on
271 | your own web site, point just to another page of the same website. And
272 | that one is also the one we need right now, so let's proceed with our
273 | portfolio. In our nav menu, we need to add an ```` tag to our li elements:
274 |
275 | ::
276 |
277 |
278 |
279 | Be careful to type the url right. If the page to which you are going to
280 | link is not in the same root, in the same folder of your file, you need
281 | to specify in which one it can be found. For example, if I have the
282 | contact page in a contact folder I write:
283 |
284 | ::
285 |
286 |