Navlang A JavaScript utility for navigation bars Paul Borokhov Brian Alker Motivation: Implementing good-looking CSS website navigation bars involves writing.

Slides:



Advertisements
Similar presentations
Advance CSS (Menu and Layout). CSS Navigation MENU.
Advertisements

CSS. CSS stands for Cascading Style Sheets Styles define how to display HTML elements Styles were added to HTML 4.0 to solve a problem External Style.
Web Engineering 1 Ishaq Khan Shinwari MCS City University Peshawar.
1 Cascading Style Sheets™ (CSS) Outline 5.1 Introduction 5.2 Inline Styles 5.3 Embedded Style Sheets 5.4 Conflicting Styles 5.5 Linking External Style.
Today CSS HTML A project.
Start menu -> all program -> Microsoft Visual SourceSafe-> Microsoft Visual Studio 2010 Click.
Slide 1 CMPS 211 Internet Programming Spring 2008 Dynamic Effects with Styles Chapter 12 2/6/08.
Introduction to CSS.
Today’s Goals What is HTML?
Very quick intro HTML and CSS. Sample html A Web Title.
FORMATTING IN CONTEXT. FOLLOW UPS ANCHOR POINTS MUST BE UNIQUE  If you have more than one, how does it know where to go?  They can be repeated across.
Cascading Style Sheets. CSS stands for Cascading Style Sheets and is a simple styling language which allows attaching style to HTML elements. CSS is a.
CSS Menus and Rollovers. Agenda foil Separating style from content 3 pages in one file Rollovers in CSS Horizontal drop-downs Vertical drop-downs.
Links.  Styling Links  Links can be styled with any CSS property (e.g. color, font-family, background-color).  Special for links are that they can.
Web Development & Design Foundations with XHTML Chapter 7 Key Concepts.
Principles of Web Design 5 th Edition Chapter Nine Site Navigation.
Cascading Style Sheets By: Valerie Kuna. What are Cascading Style Sheets? Cascading Style Sheets (CSS) are a standard for specifying the presentation.
SM5312 week 11: CSS Menus & Navigation Bars1 An Introduction to Cascading Style Sheets CSS Menus and Navigation Bars Nick Foxall.
Web Development & Design Foundations with XHTML Chapter 7 Key Concepts.
Web Development & Design Foundations with XHTML Chapter 7 Key Concepts.
Advance CSS (Menu and Layout) Miftahul Huda. CSS Navigation MENU It's truly remarkable what can be achieved through CSS, especially with navigation menus.
CSS BASICS. CSS Rules Components of a CSS Rule  Selector: Part of the rule that targets an element to be styled  Declaration: Two or more parts: a.
Building a Website: Cascading Style Sheets (CSS) Fall 2013.
CIS 1310 – HTML & CSS 6 Layout. CIS 1310 – HTML & CSS Learning Outcomes  Describe & Apply the CSS Box Model  Configure Float with CSS  Designate Positioning.
Navigation Bars Level 2 Extended Certificate Unit B12 Doing Business Online.
Recognizing the Benefits of Using CSS 1. The Evolution of CSS CSS was developed to standardize display information CSS was slow to be supported by browsers.
HTML for Beginners & JavaScript Magic - Step By Step - Thrandur Arnthorsson thrandur.net.
1 Dreamweaver CS5 intermediate class by Cookie Setton Build a CSS website WITHOUT TABLES Just when you thought you were starting to understand HTML coding,
Web Pages and Style Sheets Bert Wachsmuth. HTML versus XHTML XHTML is a stricter version of HTML: HTML + stricter rules = XHTML. XHTML Rule violations:
Diliev.com & pLOVEdiv.com  DIliev.com.
กระบวนวิชา CSS. What is CSS? CSS stands for Cascading Style Sheets Styles define how to display HTML elements Styles were added to HTML 4.0 to.
Class four: the box model and positioning. is an HTML tag which allows you to create an element out of inline text. It doesn’t mean anything! try it:
Unit 20 - Client Side Customisation of Web Pages
Chapter 8 Creating Style Sheets.
CSS normally control the html elements. Three Ways to Insert CSS There are three ways of inserting a style sheet: External style sheet Internal style.
Web Design with Cascading Style Sheet Lan Vu. Overview Introduction to CSS Designing CSS Using Visual Studio to create CSS Using template for web design.
Lecture Cascading Style Sheets (CSS) Internal Style Sheets Classes.
4.01 Cascading Style Sheets
Cascading Style Sheet Basics Pepper. Looking at the HTML See the surrounding tags See head, body, paragraph, header See the ending tags See the list.
CSS My favourite ICT lesson By Federico Boschi Cascading Style Sheets.
CS 3870/CS 5870 Web Protocols, Technologies and Applications.
Cascading Style Sheets (CSS) Within the Enterprise Architecture Framework (EAF) Wes Ziegeler August 3, 2006.
Week 8 – Part 2 Page Layout Basics Key Concepts 1.
Principles of Web Design 6 th Edition Chapter 9 – Site Navigation.
Course created by Sarah Phillips BBCD Melbourne BAPDCOM Version 1 – April 2013.
Web Development & Design Foundations with HTML5 7th Edition
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 Chapter 6 Key Concepts 1 Copyright © Terry Felke-Morris.
ACM 262 INTRODUCTION TO WEB DESIGN Week-7 ACM 262 Course Notes.
Group 9: Through examples, explain how to build a css navigation bar. Presented by: Daniel Ku, Matt Iannacci & Iphia Henry.
Understanding CSS Cascading Style Sheets control the presentation of content in HTML pages Style Sheets separate formatting from the content –Styles defined.
Stylizing a Navigational Menu Web Design Section 6-3 Part or all of this lesson was adapted from the University of Washington’s “Web Design & Development.
Chapter 7.  Change body and link styles  Create a drop-down menu  Change color and font styles in the menu  Create a pop-up effect using CSS  Utilize.
>> CSS Layouts. Recall Properties of Box – Border (style, width, color) – Padding – Margin – Display – Background – Dimension Welcome Padding Area Border.
WebD Introduction to CSS By Manik Rastogi.
CSS.
Web Protocols, Technologies and Applications
Implementing Responsive Design
CSS Layouts: Positioning and Navbars
Creating Page Layouts with CSS
Display Property.
Cascading Style Sheets (Layout)
>> CSS Layouts.
Chapter 7 Page Layout Basics Key Concepts
Cascading Style Sheets
Basics of Web Design Chapter 7 Page Layout Basics Key Concepts
Laying out a website using CSS and HTML
Fixed Positioning.
Web Protocols, Technologies and Applications
Web Client Side Technologies Raneem Qaddoura
Presentation transcript:

Navlang A JavaScript utility for navigation bars Paul Borokhov Brian Alker Motivation: Implementing good-looking CSS website navigation bars involves writing a lot of plumbing code unrelated to the actual navigation bar design. Navlang allows developers to easily create sophisticated navigation bars without writing extraneous code.

Domain The raw CSS and HTML required to generate the simple navbar to the right looks like this: One Two Fun ul { margin: 0px auto; padding: 0px; list-style: none; min-width: 15em; text-align: center; } li { display: inline; margin: 0px; padding: 0px; } li a { padding: 0.25em 0.5em; margin: 0px; text- decoration: none; } li a { color: #82c753; } li a:hover { background: white; text-decoration: underline; } The goal of Navlang is to reduce this sort of code down to only those elements essential to the design of the navbar.

The Language There are two basic language constructs in Navlang: Formatting definitions of the form “{k1:v1; k2:v2;...}”. These set the format of subsequent navbar items using CSS properties. Navbar items are of the form “*Text | URL”. Text sets the navbar’s displayed text, and URL sets the item’s link. The pipe and URL can be omitted for a non-linking menu item. The number of leading asterisks can be incremented on subsequent items to put those items in a sub-menu.

Demo { color: #82c753; background: #6d6d6d; text-decoration: none; padding: 0.35em 0.5em; hover: { background: white; text-decoration: underline; }; layout: horizontal; } *One | /one.htm *Two | /two.htm *Fun | /fun/ The code from two slides ago reduces to this snippet of Navlang:

Implementation The input file containing the navbar specification is read using a JavaScript parser created by the JS/CC parser generator and our grammar. The resulting AST is given to the interpreter. The interpreter walks through the AST to generate properly-cascaded CSS definitions and HTML, including overrides, along with JavaScript to show/hide submenus

Proud of: Navlang has the potential to actually be very useful to web developers. At the very least, its developers plan to use it to build some websites in the future. Mistakes: Inheritance may be too aggressive, especially for overrides. What we would change: Give developers control over certain parts of the CSS formatting that are currently hardcoded or inaccessible