From 9da8093b0cb68407c7ac65e2fd35f6598e4058af Mon Sep 17 00:00:00 2001 From: Robert Tice Date: Wed, 22 Nov 2017 14:26:52 -0500 Subject: [PATCH] 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. --- compile_server/app/templates/book_base.html | 2 +- compile_server/app/templates/book_list.html | 2 +- compile_server/app/templates/readerpage.html | 6 ++--- compile_server/app/views.py | 1 + .../pages/part1-chapter1.md | 26 ++++++++++++------- .../pages/references.md | 2 ++ 6 files changed, 24 insertions(+), 15 deletions(-) create mode 100644 resources/books/Ada_For_The_C_Developer/pages/references.md diff --git a/compile_server/app/templates/book_base.html b/compile_server/app/templates/book_base.html index 4bcfc9e..7fb8174 100644 --- a/compile_server/app/templates/book_base.html +++ b/compile_server/app/templates/book_base.html @@ -7,7 +7,7 @@ Ada for the C Programmer - + diff --git a/compile_server/app/templates/book_list.html b/compile_server/app/templates/book_list.html index 58ff669..8bc2f02 100644 --- a/compile_server/app/templates/book_list.html +++ b/compile_server/app/templates/book_list.html @@ -15,7 +15,7 @@
diff --git a/compile_server/app/templates/readerpage.html b/compile_server/app/templates/readerpage.html index f32649c..76a9028 100644 --- a/compile_server/app/templates/readerpage.html +++ b/compile_server/app/templates/readerpage.html @@ -19,7 +19,7 @@ {% else %}
  • {% endif %} - {{ c.title }} + {{ c.title }}
  • {% endfor %} @@ -47,10 +47,10 @@ diff --git a/compile_server/app/views.py b/compile_server/app/views.py index 9d54451..a2fec1f 100644 --- a/compile_server/app/views.py +++ b/compile_server/app/views.py @@ -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) diff --git a/resources/books/Ada_For_The_C_Developer/pages/part1-chapter1.md b/resources/books/Ada_For_The_C_Developer/pages/part1-chapter1.md index 11a823d..03420af 100644 --- a/resources/books/Ada_For_The_C_Developer/pages/part1-chapter1.md +++ b/resources/books/Ada_For_The_C_Developer/pages/part1-chapter1.md @@ -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 -
    +
    --- diff --git a/resources/books/Ada_For_The_C_Developer/pages/references.md b/resources/books/Ada_For_The_C_Developer/pages/references.md new file mode 100644 index 0000000..ad81eaf --- /dev/null +++ b/resources/books/Ada_For_The_C_Developer/pages/references.md @@ -0,0 +1,2 @@ +C99 Rationale document: http://www.open-std.org/JTC1/SC22/WG14/www/docs/C99RationaleV5.10.pdf +