From a3fb80f103fec8335a7003c8a2fbbd83c8a04ab8 Mon Sep 17 00:00:00 2001 From: Wruczek Date: Wed, 26 Oct 2016 01:21:34 +0200 Subject: [PATCH] Refreshed example news files + Markdown guide --- config/news/README.txt | 16 +- config/news/news1.md | 46 +- config/news/news2.md | 1014 ++++++++++++++++++++++++++++++---------- config/news/news3.md | 145 ------ 4 files changed, 795 insertions(+), 426 deletions(-) delete mode 100644 config/news/news3.md diff --git a/config/news/README.txt b/config/news/README.txt index 309c2eb..1d72c20 100644 --- a/config/news/README.txt +++ b/config/news/README.txt @@ -1,15 +1 @@ -Informacje na temat systemu newsów: - -Jeśli chcesz, możesz dodawać, zmieniać oraz usuwać newsy w domyślnym podfolderze news ulokowanym w folderze config. Folder ten jest do zmiany w pliku config.php -Aktualnie newsy są tworzone przy użyciu Markdown mieszanego z HTMLem. Może potem dodam jakiś panel jak mi się zachcę Xd - -Prosty poradnik na temat Markdown od GitHuba: https://guides.github.com/features/mastering-markdown/ - -Przydatne informacje: -- Newsy wczytywane są z folderu w kolejności alfabetycznej -- Każdy plik z newsami musi mieć rozszerzenie .md (Markdown) -- Format plikow z newsami: - - Pierwsza linijka: tytuł newsa - - Druga linijka: autor i data - - Trzecia linijka: pusta (taki seperator) - - Reszta pliku: treść newsa (Markdown + HTML) +Visit your freshly installed the website to see instructions about news system diff --git a/config/news/news1.md b/config/news/news1.md index 5e8a636..92eceb4 100644 --- a/config/news/news1.md +++ b/config/news/news1.md @@ -1,14 +1,36 @@ -Informacje na temat systemu newsów -Wruczek, 2016-06-24, 21:00 +About the news system +Wruczek, 2016-10-26, 21:00 -Jeśli chcesz, możesz dodawać, zmieniać oraz usuwać newsy w domyślnym podfolderze news ulokowanym w folderze config. Lokalizację folderu możesz zminić na dowolną w pliku konfiguracyjnym. -Aktualnie newsy są tworzone przy użyciu Markdown mieszanego z HTMLem. Może potem dodam jakiś panel, a na razie polecam [prosty poradnik na temat Markdown od GitHuba](https://guides.github.com/features/mastering-markdown/). +You can add, change and remove news as a separate Markdown files located in `config/news` folder with extension `.md`. -Przydatne informacje: -- Newsy wczytywane są z folderu w kolejności alfabetycznej -- Każdy plik z newsami musi mieć rozszerzenie .md (Markdown) -- Format plikow z newsami: - - Pierwsza linijka: tytuł newsa - - Druga linijka: autor i data - - Trzecia linijka: pusta (taki seperator) - - Reszta pliku: treść newsa (Markdown + HTML) +I recommend following John Gruber's excellent markdown guide, found right under this text . It's really worth reading. To view the code that makes up the guide, go to `config/news/news2.md`. + +I can also recommend GitHub's ["Mastering Markdown"](https://guides.github.com/features/mastering-markdown/) guide. + +**PS**: You can mix Markdown with HTML to add cool stuff like icons , or even a full YouTube player with video! + + + +#### Informations: +- News are read from the `config/news` folder, alphabetically sorted by file name. (news A.md will be at top of the page while Z.md at the bottom) +- Every news file need to have `.md` (Markdown) extension +- News file syntax: + - First line: News title + - Second line: author and date + - Third line: empty (seperator) + - The rest of the file is Markdown code + + + +#### Example news file: + + News system test + Wruczek, 26-10-2016 + + Hello **world**! + + I am the *news file*, you can save me in **config/news** folder with an **.md** extension to see my on the page! + + + +*Good luck and Happy writing! -Wruczek* diff --git a/config/news/news2.md b/config/news/news2.md index ead9218..2e1901d 100644 --- a/config/news/news2.md +++ b/config/news/news2.md @@ -1,378 +1,884 @@ -jQuery Readme - system test -jQuery, 2016-06-24, 21:00 +Markdown Syntax - example Markdown test file +John Gruber, daringfireball.net + +Markdown: Syntax +================ + +* [Overview](#overview) + * [Philosophy](#philosophy) + * [Inline HTML](#html) + * [Automatic Escaping for Special Characters](#autoescape) +* [Block Elements](#block) + * [Paragraphs and Line Breaks](#p) + * [Headers](#header) + * [Blockquotes](#blockquote) + * [Lists](#list) + * [Code Blocks](#precode) + * [Horizontal Rules](#hr) +* [Span Elements](#span) + * [Links](#link) + * [Emphasis](#em) + * [Code](#code) + * [Images](#img) +* [Miscellaneous](#misc) + * [Backslash Escapes](#backslash) + * [Automatic Links](#autolink) + +* * * + +

Overview

+ +

Philosophy

+ +Markdown is intended to be as easy-to-read and easy-to-write as is feasible. + +Readability, however, is emphasized above all else. A Markdown-formatted +document should be publishable as-is, as plain text, without looking +like it's been marked up with tags or formatting instructions. While +Markdown's syntax has been influenced by several existing text-to-HTML +filters -- including [Setext] [1], [atx] [2], [Textile] [3], [reStructuredText] [4], +[Grutatext] [5], and [EtText] [6] -- the single biggest source of +inspiration for Markdown's syntax is the format of plain text email. -[jQuery](https://jquery.com/) — New Wave JavaScript -================================================== + [1]: http://docutils.sourceforge.net/mirror/setext.html + [2]: http://www.aaronsw.com/2002/atx/ + [3]: http://textism.com/tools/textile/ + [4]: http://docutils.sourceforge.net/rst.html + [5]: http://www.triptico.com/software/grutatxt.html + [6]: http://ettext.taint.org/doc/ -Contribution Guides --------------------------------------- +To this end, Markdown's syntax is comprised entirely of punctuation +characters, which punctuation characters have been carefully chosen so +as to look like what they mean. E.g., asterisks around a word actually +look like \*emphasis\*. Markdown lists look like, well, lists. Even +blockquotes look like quoted passages of text, assuming you've ever +used email. -In the spirit of open source software development, jQuery always encourages community code contribution. To help you get started and before you jump into writing code, be sure to read these important contribution guidelines thoroughly: -1. [Getting Involved](https://contribute.jquery.org/) -2. [Core Style Guide](https://contribute.jquery.org/style-guide/js/) -3. [Writing Code for jQuery Foundation Projects](https://contribute.jquery.org/code/) +

Inline HTML

-Environments in which to use jQuery --------------------------------------- +Markdown's syntax is intended for one purpose: to be used as a +format for *writing* for the web. -- [Browser support](https://jquery.com/browser-support/) -- jQuery also supports Node, browser extensions, and other non-browser environments. +Markdown is not a replacement for HTML, or even close to it. Its +syntax is very small, corresponding only to a very small subset of +HTML tags. The idea is *not* to create a syntax that makes it easier +to insert HTML tags. In my opinion, HTML tags are already easy to +insert. The idea for Markdown is to make it easy to read, write, and +edit prose. HTML is a *publishing* format; Markdown is a *writing* +format. Thus, Markdown's formatting syntax only addresses issues that +can be conveyed in plain text. +For any markup that is not covered by Markdown's syntax, you simply +use HTML itself. There's no need to preface it or delimit it to +indicate that you're switching from Markdown to HTML; you just use +the tags. -What you need to build your own jQuery --------------------------------------- +The only restrictions are that block-level HTML elements -- e.g. `
`, +``, `
`, `

`, etc. -- must be separated from surrounding +content by blank lines, and the start and end tags of the block should +not be indented with tabs or spaces. Markdown is smart enough not +to add extra (unwanted) `

` tags around HTML block-level tags. -In order to build jQuery, you need to have the latest Node.js/npm and git 1.7 or later. Earlier versions might work, but are not supported. +For example, to add an HTML table to a Markdown article: -For Windows, you have to download and install [git](https://git-scm.com/downloads) and [Node.js](https://nodejs.org/en/download/). + This is a regular paragraph. -OS X users should install [Homebrew](http://brew.sh/). Once Homebrew is installed, run `brew install git` to install git, -and `brew install node` to install Node.js. +

+ + + +
Foo
-Linux/BSD users should use their appropriate package managers to install git and Node.js, or build from source -if you swing that way. Easy-peasy. + This is another regular paragraph. +Note that Markdown formatting syntax is not processed within block-level +HTML tags. E.g., you can't use Markdown-style `*emphasis*` inside an +HTML block. -How to build your own jQuery ----------------------------- +Span-level HTML tags -- e.g. ``, ``, or `` -- can be +used anywhere in a Markdown paragraph, list item, or header. If you +want, you can even use HTML tags instead of Markdown formatting; e.g. if +you'd prefer to use HTML `` or `` tags instead of Markdown's +link or image syntax, go right ahead. -Clone a copy of the main jQuery git repo by running: +Unlike block-level HTML tags, Markdown syntax *is* processed within +span-level tags. -```bash -git clone git://github.com/jquery/jquery.git -``` -Enter the jquery directory and run the build script: -```bash -cd jquery && npm run build -``` -The built version of jQuery will be put in the `dist/` subdirectory, along with the minified copy and associated map file. +

Automatic Escaping for Special Characters

-If you want to create custom build or help with jQuery development, it would be better to install [grunt command line interface](https://github.com/gruntjs/grunt-cli) as a global package: +In HTML, there are two characters that demand special treatment: `<` +and `&`. Left angle brackets are used to start tags; ampersands are +used to denote HTML entities. If you want to use them as literal +characters, you must escape them as entities, e.g. `<`, and +`&`. -``` -npm install -g grunt-cli -``` -Make sure you have `grunt` installed by testing: -``` -grunt -V -``` +Ampersands in particular are bedeviling for web writers. If you want to +write about 'AT&T', you need to write '`AT&T`'. You even need to +escape ampersands within URLs. Thus, if you want to link to: -Now by running the `grunt` command, in the jquery directory, you can build a full version of jQuery, just like with an `npm run build` command: -``` -grunt -``` + http://images.google.com/images?num=30&q=larry+bird -There are many other tasks available for jQuery Core: -``` -grunt -help -``` +you need to encode the URL as: -### Modules + http://images.google.com/images?num=30&q=larry+bird -Special builds can be created that exclude subsets of jQuery functionality. -This allows for smaller custom builds when the builder is certain that those parts of jQuery are not being used. -For example, an app that only used JSONP for `$.ajax()` and did not need to calculate offsets or positions of elements could exclude the offset and ajax/xhr modules. +in your anchor tag `href` attribute. Needless to say, this is easy to +forget, and is probably the single most common source of HTML validation +errors in otherwise well-marked-up web sites. -Any module may be excluded except for `core`, and `selector`. To exclude a module, pass its path relative to the `src` folder (without the `.js` extension). +Markdown allows you to use these characters naturally, taking care of +all the necessary escaping for you. If you use an ampersand as part of +an HTML entity, it remains unchanged; otherwise it will be translated +into `&`. -Some example modules that can be excluded are: +So, if you want to include a copyright symbol in your article, you can write: -- **ajax**: All AJAX functionality: `$.ajax()`, `$.get()`, `$.post()`, `$.ajaxSetup()`, `.load()`, transports, and ajax event shorthands such as `.ajaxStart()`. -- **ajax/xhr**: The XMLHTTPRequest AJAX transport only. -- **ajax/script**: The `