@@ -8,12 +8,91 @@ authors: Talha Mansoor
88Category : Components
99---
1010
11- Elegant uses [ Solarized] ( http://ethanschoonover.com/solarized ) theme for syntax
12- highlighting. Line numbers have a different background color so that they
13- appear distinct from the code. Here is an example
11+ Elegant uses [ Pygment's port] ( https://github.com/daveyarwood/gruvbox-pygments )
12+ of [ Gruvbox] ( https://github.com/morhetz/gruvbox ) theme for syntax highlighting.
1413
1514 #!c
1615 int sample_function (void) {
1716 printf ("This is a sample function");
1817 return 0
1918 }
19+
20+ ## HTML Example
21+
22+ ``` html
23+ <div
24+ class =" photoswipe-gallery"
25+ itemscope
26+ itemtype =" http://schema.org/ImageGallery"
27+ >
28+ <figure
29+ itemprop =" associatedMedia"
30+ itemscope
31+ itemtype =" http://schema.org/ImageObject"
32+ >
33+ <a
34+ href =" https://i.picsum.photos/id/1019/5472/3648.jpg"
35+ itemprop =" contentUrl"
36+ data-size =" 5472x3648"
37+ >
38+ <img
39+ src =" https://i.picsum.photos/id/1019/100/100.jpg"
40+ itemprop =" thumbnail"
41+ alt =" Image description"
42+ />
43+ </a >
44+ <figcaption itemprop =" caption description" >
45+ Placeholder image from Unsplash
46+ </figcaption >
47+ </figure >
48+
49+ <figure
50+ itemprop =" associatedMedia"
51+ itemscope
52+ itemtype =" http://schema.org/ImageObject"
53+ >
54+ <a
55+ href =" https://i.picsum.photos/id/101/2621/1747.jpg"
56+ itemprop =" contentUrl"
57+ data-size =" 2621x1747"
58+ >
59+ <img
60+ src =" https://i.picsum.photos/id/101/100/100.jpg"
61+ itemprop =" thumbnail"
62+ alt =" Image description"
63+ />
64+ </a >
65+ <figcaption itemprop =" caption description" >
66+ You can write anything in the caption
67+ </figcaption >
68+ </figure >
69+ </div >
70+ ```
71+ ## C++ example
72+
73+ ``` cpp
74+ #include < algorithm>
75+ #include < iostream>
76+ #include < vector>
77+
78+ int main () {
79+ std::vector<int > eg = {0, 1, 1, 2, 3, 5, 8, 13,
80+ 21, 34, 55, 89, 144, 233, 377, 610};
81+ eg.erase(std::remove_if(
82+ eg.begin(),
83+ eg.end(),
84+ [ ] (int x) {
85+ return x > 99;
86+ }),
87+ eg.end());
88+
89+ // Print result
90+ std::for_each (eg.begin(),
91+ eg.end(),
92+ [ ] (const int &e) {
93+ std::cout << e << " ";
94+ });
95+ }
96+ ```
97+
98+
0 commit comments