Changing all relative paths to absolute paths to fix trailing slash problem. Also updating book base to use the new name for the css file.

This commit is contained in:
Robert Tice
2017-11-22 14:26:52 -05:00
parent 96266ffc48
commit 9da8093b0c
6 changed files with 24 additions and 15 deletions

View File

@@ -7,7 +7,7 @@
<title>Ada for the C Programmer</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<link rel="stylesheet" href="{% static "common.css" %}" />
<link rel="stylesheet" href="{% static "style.css" %}" />
<link rel="stylesheet" href="{% static "book_base.css" %}" />
</head>
<body>

View File

@@ -15,7 +15,7 @@
<br>
<ul class="list-unstyled components">
{% for b in books %}
<li><a href="books/{{ b.url }}/part1-chapter1">{{ b.title }}</a></li>
<li><a href="{{ HTTP_HOST }}/books/{{ b.url }}/part1-chapter1">{{ b.title }}</a></li>
{% endfor %}
</ul>

View File

@@ -19,7 +19,7 @@
{% else %}
<li>
{% endif %}
<a href="{{ c.url }}">{{ c.title }}</a>
<a href="{{ HTTP_HOST }}/books/{{ book_url }}/{{ c.url }}">{{ c.title }}</a>
</li>
{% endfor %}
</ul>
@@ -47,10 +47,10 @@
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav navbar-right">
{% if prev_topic %}
<li><a href="{{ prev_topic.url }}">Prev - {{ prev_topic.title }}</a></li>
<li><a href="{{ HTTP_HOST }}/books/{{ book_url }}/{{ prev_topic.url }}">Prev - {{ prev_topic.title }}</a></li>
{% endif %}
{% if next_topic %}
<li><a href="{{ next_topic.url }}">Next - {{ next_topic.title }}</a></li>
<li><a href="{{ HTTP_HOST }}/books/{{ book_url }}/{{ next_topic.url }}">Next - {{ next_topic.title }}</a></li>
{% endif %}
</ul>
</div>

View File

@@ -135,6 +135,7 @@ def book_router(request, book, part, chapter):
bookdata = yaml.load(f)
htmldata = bookdata
htmldata['book_url'] = book
htmldata['sel_part'] = int(part)
htmldata['sel_chapter'] = int(chapter)

View File

@@ -1,21 +1,27 @@
# Part 1 Chapter 1
# So, what is this Ada thingy anyway?
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna
aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur
sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Since you are reading this, we will assume you are familiar with the ubiquitous programming language called C. Well, Ada is like C... except it has a fundamentally different approach to its design paradigms. To explain this further, let's look at the C99 Rationale document [1]. Specifically paragraph 15 labeled: **Keep the spirit of C**:
* Trust the programmer.
* Don't prevent the programmer from doing what needs to be done.
* Keep the language small and simple.
* Provide only one way to do an operation.
* Make it faast, even if it is not guaranteed to be portable.
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna
aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur
sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
These are the design guidelines that the designers of C use when thinking about the language. Let's now compare this to the Ada design principals:
* Stuff
* More Stuff
* This is a place holder
Let's look at some Ada.
---
### Test
This is a test of inserting code blocks in the markdown
<div example_editor="Hello world runnable example"></div>
<div example_editor="Hello World"></div>
---

View File

@@ -0,0 +1,2 @@
C99 Rationale document: http://www.open-std.org/JTC1/SC22/WG14/www/docs/C99RationaleV5.10.pdf