diff --git a/2.html b/2.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/home.html b/home.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/server.js b/server.js index 3d5cece3abd..c13790612cb 100644 --- a/server.js +++ b/server.js @@ -1,24 +1,1041 @@ -var express = require('express'); -var morgan = require('morgan'); -var path = require('path'); - -var app = express(); -app.use(morgan('combined')); - -app.get('/', function (req, res) { - res.sendFile(path.join(__dirname, 'ui', 'index.html')); -}); - -app.get('/ui/style.css', function (req, res) { - res.sendFile(path.join(__dirname, 'ui', 'style.css')); -}); - -app.get('/ui/madi.png', function (req, res) { - res.sendFile(path.join(__dirname, 'ui', 'madi.png')); -}); - - -var port = 8080; // Use 8080 for local development because you might already have apache running on 80 -app.listen(8080, function () { - console.log(`IMAD course app listening on port ${port}!`); -}); +var express = require('express'); +var morgan = require('morgan'); +var path = require('path'); + +var app = express(); +app.use(morgan('combined')); + +var article={ + 'html': { + title:'HTML TRICKS | Learn HTML', + heading:'HTML', + date:'', + content:` + + + + + +

Let's Start with HTML

+ + +
+
+

1.

+ +

The title attribute

+ +

+Mouse over this paragraph, to display the title attribute as a tooltip. +

+ +

+ +
+
+ +

2.

+ +

This text is bold

+

This text is italic

+

This is subscript and superscript

+ +
+
+ +

3.

+ +

HTML LINK

+ +

Visit our HTML tutorial

+ +

+ + + +
+
+ +

4.

+ +

Input Type Button

+ + + + + +

+ +
+
+ +

5.

+ +

HTML IMAGES

+ +

Spectacular Mountain

+Mountain View + + +

+ +
+
+ + + +

6.

+

Colouring Some Lines

+ + + + + + + +

My Important Heading

+

This is some important text.

+ + + + + +

+ +
+
+ +

7.

+

HTML Forms

+ + + + +
+ First name:
+ +
+ Last name:
+ +

+ +
+ +

If you click the "Submit" button, the form-data will be sent to a page called "action_page.php".

+ + + + +

+
+
+ +

8.

+

HTML 5 Canvas(Stroke Text )

+ + + + + + + +Your browser does not support the HTML5 canvas tag. + + + + + + + +

+ +
+
+ +

9.

+

HTML Google Map

+ + + + + +

My First Google Map

+ +
+ + + + + + + + + +

+ +
+
+ +

10.

+

HTML plug-Ins (Bookmark)

+ + + + + + + + + + +

+ +
+
+ + + +

Thank You..

+ + + + + + + +

+

` + + + + + + + }, + 'css': { + title:'CSS | Learn CSS', + heading:'', + date:'', + content:` + + +

CSS

+
+
+ +

1.

+ +

Inline CSS

+

An inline CSS is used to apply a unique style to a single HTML element. + +An inline CSS uses the style attribute of an HTML element. + +This example sets the text color of the element to blue:

+ + +

This is a Blue Heading

+ + +

+ + + +
+
+ + +

2.

+

CSS Syntax

+ + + + + + + +

Hello World!

+

These paragraphs are styled with CSS.

+ + + + +

+ +
+
+ +

3.

+

CSS Icons

+ + + +Bootstrap Icons + + + + + +

Some Bootstrap icons:

+ + + + + +

+ +

Styled Bootstrap icons (size and color):

+ + + + + + + + +

+ +
+
+ +

4.

+

CSS Links

+ + + + + + + +

This is a link

+

Note: a:hover MUST come after a:link and a:visited in the CSS definition in order to be effective.

+

Note: a:active MUST come after a:hover in the CSS definition in order to be effective.

+ + + + + +

+
+
+ +

5.

+

Using CSS to style a HTML Form

+ + + + + + + + +
+
+ + + + + + + + + + +
+
+ + + + +

+ +
+
+ +

6.

+

CSS ToolTip

+ + + + + +

Right Tooltip

+

Move the mouse over the text below:

+ +
Hover over me 123 + Tooltip text +
+ + + + + + +

+ +
+
+ +

7.

+

Rounded Images

+ + + + + + + +

Rounded Images

+

Use the border-radius property to create circled images:

+ +Paris + + + + + +

+ + +
+
+ + +

8.

+

Text Decoration

+ +
+sample link +sample text +

+to be cut text +wavy line + +

+ +
+
+ +

9.

+

Select a fruit

+ +
+ Select a fruit + +
+ +
+ +
+
+ +

+ +
+
+ +

10.

+ +

Quoting A Quote

+ +

+ By your powers combined I am Captain Planet + +

+captain planet + + +

+
+
+ +

Thanks.....

+ + + +
+
+ + +
+ + + + + + + + + + + + + + + + + + + + +

+

` + }, + 'javascript': { + title:'JAVASCRIPT | Learn JS', + heading:'', + date:'', + content:` + + +

JAVASCRIPT

+
+
+ + + + + + + + + +

+ + + + +

Thanks...

+ +
+
+ + +
+ + + + + + + + +

+

` + + + + + + + + + + + + }, + 'about-me': { + title:'ABOUT ME | Suryan', + heading:'', + date:'', + content:` + +

ABOUT ME

+
+
+ + + + + + + About ME + + + +
+ + + +
+
+ +
+

What You'll Find Here

+

This is my space. Here are some of my interests:

+
    +
  • HTML
  • +
  • JAVASCRIPT
  • +
  • CSS
  • +
  • Coding
  • +
  • Website Building
  • +
+
+ +

+ + + +

+
+
+
+ +
+
+ +
+ + + + + + + + +

+ + + + +
+
+ + +
+ + + + + + + + + + + + + +

+

` + + + + }, + 'contact-me': { + title:'CONTACT ME | Suryan', + heading:'', + date:'', + content:` + + + + + +

CONTACT ME

+
+
+ + + + + +

+ + + + + + + + + + + +

+

` + + + + }, + 'register': { + title:'REGISTER | HTML TRICKS', + heading:'', + date:'', + content:` + + +

REGISTER

+ + + + + + +

Click the below button to Register...

+ + + +

+ + + + + + + + + + + + + + + + + + + + +

+

` + + + + + }, + 'login': { + title:'LOGIN | HTML TRICKS', + heading:'', + date:'', + content:` + + + + + + + + + +

Click the below button to Log in...

+ + + +

+ + + + + + + + + + + + + + +

+

` + + + } + + +}; + +function createTemplate(data){ + var title=data.title; + var heading=data.heading; + var date=data.date; + var content=data.content; + var htmlTemplate=` + + + + ${title} + + + + + +
+
+ HOME + + HTML + + CSS + + JAVASCRIPT + + ABOUT ME + + CONTACT ME + + REGISTER + + LOG IN +
+

+ ${heading} +

+
+ ${date} +
+
+

+ ${content} +

+
+
+ + + `; +return htmlTemplate; +} + +app.get('/', function (req, res) { + res.sendFile(path.join(__dirname, 'ui', 'index.html')); +}); + +var counter = 0; +app.get('/counter',function(req,res){ + counter++; + res.send(counter.toString()); +}); + +app.get('/favicon.ico', function(req, res){ + res.sendFile(path.join(__dirname, 'ui', 'favicon.ico')); +}); + +var names = []; +app.get('/submit-name',function(req,res){ + //Get the namefrom the request + var name = req.query.name; + names.push(name); + //JSON:Javascript Object Notation + res.send(JSON.stringify(names)); +}); +app.get('/:articleName',function (req,res){ + var articleName=req.params.articleName; + res.send(createTemplate(article[articleName])); +}); + + + + + + + + + + + + + +app.get('/ui/style.css', function (req, res) { + res.sendFile(path.join(__dirname, 'ui', 'style.css')); +}); + +app.get('/ui/main.js', function (req, res) { + res.sendFile(path.join(__dirname, 'ui', 'main.js')); +}); + +app.get('/ui/madi.png', function (req, res) { + res.sendFile(path.join(__dirname, 'ui', 'madi.png')); +}); + + +var port = 8080; // Use 8080 for local development because you might already have apache running on 80 +app.listen(8080, function () { + console.log(`IMAD course app listening on port ${port}!`); +}); + diff --git a/ui/index.html b/ui/index.html index 5a28644db45..7d6f394adef 100644 --- a/ui/index.html +++ b/ui/index.html @@ -4,14 +4,171 @@ -
- -
-
-
- Hi! I am your webapp. -
+
+
+ + + + + + +
+
+ HOME + + HTML + + JAVASCRIPT + + CSS + + ABOUT ME + + CONTACT ME + + REGISTER + + LOG IN +
+ + + +
Count:

+ + + + + +

WELCOME !!SCROLL DOWN FOR !! CHECK OUR COOL HTMl, JAVASCRIPT,CSS TRICKS

+ + +

HTML TRICKS

+ +
+
+
+ +

Welcome

+ Welcome to our website. Try our free html, javascript,css tricks... +
+
+ + +

1.

+
+
+ +

HTML

+ +

HyperText Markup Language (HTML) is the standard markup language for creating web pages and web applications. With Cascading Style Sheets (CSS), and JavaScript, it forms a triad of cornerstone technologies for the World Wide Web. Web browsers receive HTML documents from a webserver or from local storage and render them into multimedia web pages. HTML describes the structure of a web page semantically and originally included cues for the appearance of the document. + +HTML elements are the building blocks of HTML pages. With HTML constructs, images and other objects, such as interactive forms may be embedded into the rendered page. It provides a means to create structured documents by denoting structural semantics for text such as headings, paragraphs, lists, links, quotes and other items. HTML elements are delineated by tags, written using angle brackets. Browsers do not display the HTML tags, but use them to interpret the content of the page. + +HTML can embed programs written in a scripting language such as JavaScript which affect the behavior and content of web pages. Inclusion of CSS defines the look and layout of content. The World Wide Web Consortium (W3C), maintainer of both the HTML and the CSS standards, has encouraged the use of CSS over explicit presentational HTML since 1997

+ + +Web hosting + + + + +
+
+ +

2.

+ + + +

CSS

+ +

Cascading Style Sheets (CSS) is a style sheet language used for describing the presentation of a document written in a markup language.[1] Although most often used to set the visual style of web pages and user interfaces written in HTML and XHTML, the language can be applied to any XML document, including plain XML, SVG and XUL, and is applicable to rendering in speech, or on other media. Along with HTML and JavaScript, CSS is a cornerstone technology used by most websites to create visually engaging webpages, user interfaces for web applications, and user interfaces for many mobile applications. + +CSS is designed primarily to enable the separation of document content from document presentation, including aspects such as the layout, colors, and fonts. This separation can improve content accessibility, provide more flexibility and control in the specification of presentation characteristics, enable multiple HTML pages to share formatting by specifying the relevant CSS in a separate .css file, and reduce complexity and repetition in the structural content. + +Separation of formatting and content makes it possible to present the same markup page in different styles for different rendering methods, such as on-screen, in print, by voice (via speech-based browser or screen reader), and on Braille-based tactile devices. It can also display the web page differently depending on the screen size or viewing device. Readers can also specify a different style sheet, such as a CSS file stored on their own computer, to override the one the author specified. + +Changes to the graphic design of a document (or hundreds of documents) can be applied quickly and easily, by editing a few lines in the CSS file they use, rather than by changing markup in the documents. + +The CSS specification describes a priority scheme to determine which style rules apply if more than one rule matches against a particular element. In this so-called cascade, priorities (or weights) are calculated and assigned to rules, so that the results are predictable.

+ + + +
+
+ +

3.

+

JAVASCRIPT

+ +

JavaScript is a high-level, dynamic, untyped, and interpreted programming language. It has been standardized in the ECMAScript language specification. Alongside HTML and CSS, JavaScript is one of the three core technologies of World Wide Web content production; the majority of websites employ it, and all modern Web browsers support it without the need for plug-ins. JavaScript is prototype-based with first-class functions, making it a multi-paradigm language, supporting object-oriented, imperative, and functional programming styles. It has an API for working with text, arrays, dates and regular expressions, but does not include any I/O, such as networking, storage, or graphics facilities, relying for these upon the host environment in which it is embedded. + +Although there are strong outward similarities between JavaScript and Java, including language name, syntax, and respective standard libraries, the two are distinct languages and differ greatly in their design. JavaScript was influenced by programming languages such as Self and Scheme. + +JavaScript is also used in environments that are not Web-based, such as PDF documents, site-specific browsers, and desktop widgets. Newer and faster JavaScript virtual machines (VMs) and platforms built upon them have also increased the popularity of JavaScript for server-side Web applications. On the client side, developers have traditionally implemented JavaScript as an interpreted language, but more recent browsers perform just-in-time compilation. Programmers also use JavaScript in video-game development, in crafting desktop and mobile applications, and in server-side network programming with run-time environments such as Node.js.

+ + +
+
+ + +

Comment My Webapp

+ + + +
+
+ +

Rate My Webapp

+ +
Loading... ...
+ +
+
+ + + +
+
+
+

Subscribe to our mailing list

+
* indicates required
+
+ + +
+
+ + +
+ +
+
+
+
+ + +
+
+ +
+ + + + + + +
+ + + + - + \ No newline at end of file diff --git a/ui/main.js b/ui/main.js index 4cf7ed58de3..601e4c5ae8a 100644 --- a/ui/main.js +++ b/ui/main.js @@ -1 +1,3 @@ -console.log('Loaded!'); +app.get('/home', function (req, res) { +res.sendFile(path.join(__dirname, 'home.html')); +}); \ No newline at end of file diff --git a/ui/style.css b/ui/style.css index 71a5f6acc1e..4b9dcdf80b4 100644 --- a/ui/style.css +++ b/ui/style.css @@ -1,22 +1,167 @@ -body { - font-family: sans-serif; - background-color: lightgrey; - margin-top: 75px; -} - -.center { - text-align: center; -} - -.text-big { - font-size: 300%; -} - -.bold { - font-weight: bold; -} - -.img-medium { - height: 200px; -} - +body { + font-family: sans-serif; + background-color: white; + margin-top: 75px; +} + +.center { + text-align: center; +} + +.text-big { + font-size: 300%; +} + +.bold { + font-weight: bold; +} + +.img-medium { + height: 200px; + + + + + +} + + /* Layout */ + +body { + font:normal 12px/1.6em Arial, Helvetica, sans-serif; + color:#2a3845; + margin:0; + padding:0; + background:#FFFFFF; +} + +p { + margin:0; + padding:0; +} + +#wrapper { + margin:0 auto; + width:632px; + border-left:1px solid #f0e9eb; + border-right:1px solid #f0e9eb; +} + +#header { + margin:0 1px; +} + +#bg { + height:36px; + background:url('https://postimg.org/image/hypr5syfb/') repeat-x; +} + +#main-content { + margin:0 auto; +} + +#main-image { + text-align:center; +} + +#left-column { + width:300px; + padding:0 30px 30px; + float:left; +} + +#right-column { + width:270px; + float:right; +} + +.sidebar { + width:218px; + margin:0 auto; + padding:10px 25px; + background:url('http://img404.imageshack.us/img404/3092/shadowh.jpg') no-repeat top; +} + +#footer { + background:#f7f7f7; + border-top:1px solid #f0e9eb; + padding:10px 15px; + clear:both; +} + +/* Global Styling */ + +a:visited, a:link { + color:#a43b55; + text-decoration:underline; + background:none; +} + +a:hover { + color:#a43b55; + text-decoration:none; + background:none; +} + +h1 { + color:#7a2e40; + margin:0 0 10px; + padding-bottom:10px; + font:normal 17px Georgia, serif; + border-bottom:1px solid #efece7; +} + +h2 { + color:#7a2e40; + margin:20px 0 10px; + padding-bottom:10px; + font:normal 17px Georgia, serif; + border-bottom:1px solid #efece7; +} + +h3 { + color:#7a2e40; + margin:10px 0; + padding-bottom:10px; + font:bold 14px Arial, Helvetica, sans-serif; + border-bottom:1px solid #efece7; +} + +ul { + padding:0; + margin:0 0 0 17px; + list-style:square url('http://img525.imageshack.us/img525/1890/bulletr.gif'); +} + +.box { + background:#f7f7f7; + border:1px solid #f0e9eb; + padding:15px; +} + +#nav { + background:#06a; + padding:10px 20px; + text-align:right; + color:#f6dde3; +} + +#nav a { + margin: 0 10px; +} + +#nav a:visited, #nav a:link { + text-decoration:none; + color:#f6dde3; +} + +#nav a:hover { + text-decoration:underline; + color:#f6dde3; +} + +#logo { + margin-bottom:20px; + font:normal 18px Georgia, serif; + color:#fa7393; +} \ No newline at end of file