This repository uses the largefiles extension.
Please enable it in your Mercurial config file.
pull받으려는 소스들이 largefiles들을 사용한다는 의미.
Files > Settings
'CI&CD' 카테고리의 다른 글
[Appium] not found: carthage (0) | 2020.01.23 |
---|---|
Confluence 편집, 수정 (0) | 2017.03.10 |
This repository uses the largefiles extension.
Please enable it in your Mercurial config file.
pull받으려는 소스들이 largefiles들을 사용한다는 의미.
Files > Settings
[Appium] not found: carthage (0) | 2020.01.23 |
---|---|
Confluence 편집, 수정 (0) | 2017.03.10 |
It’s September! Which means fall is here, the pumpkin spice lattes are flowing, and the end of 2014 is in sight. We can now begin to look at the web design trends of 2014 (so far) and make some predictions as to what will have staying power in 2015. At least that’s what I plan to attempt in today’s post. And of course, since Elegant Themes exists at the intersection of web design and WordPress, I’ll be talking throughout about how these trends have and will impact the WordPress Community–from existing WordPress themes and plugins to the new opportunities these trends will provide. Let’s get into it!
Ok, so maybe you don’t have to go home. Maybe you have a really good reason for not using responsive design? I just doubt it. Over the last few years responsive design has solidified itself as the new standard for web design in general and WordPress themes in particular. Sure, there are still arguments over implementation, but no one is saying, “let’s get rid of responsive design” and in fact more and more sites are opting to go in that direction. That was certainly the case in 2014 and I wouldn’t look for it to go anywhere in 2015. This one has ceased to be a trend and can now be considered the new norm.
Ghost buttons are a prominent design feature in Divi–the flagship theme here at Elegant Themes–and it’s easy to see why. They’re minimal, stylish, and with the subtle hover animation they’re a delight to use. Look for this trend to continue into 2015; especially considering how well they pair with the large background images and videos we’ll talk about in #4.
Traditionally web type-kits that allowed for beautiful fonts and typefaces to be used on websites have been expensive. Meaning that sites leaning heavily on typographic design tended to require larger budgets–leaving the small guys (and most WordPress users) out of the fun. That however, is changing. Type kits are becoming more affordable (or free in the case of Google Fonts) and that means there is more freedom for designers working with a smaller budget to bring their typography skills to the web design table. Additionally, this allows WordPress theme designers to include more typographic flexibility in their themes, making stylish type-centric design attainable for anyone with a well designed WordPress theme.
Another staple of Divi which has been and will continue to be a big hit are the large, beautiful background images and videos. One of the simplest ways to make your site stand out is by having great content displayed prominently. This trend is a wonderful way to accomplish that and when folded into a larger design style/philosophy it doesn’t feel gimmicky but powerful and elegant.
As the mobile web continues to grow and web design continues to skew in the direction of a more effective and enjoyable mobile experience, scrolling will continue to dominate clicking. It’s more intuitive, easier to do, cuts down on load times and allows for more dynamic interaction to take place between the user and the website.
“Card” design, while not new, has proven to be a great tool for designers working on responsive websites. Cards are a great way to keep things modular, rearrange columns without things getting sloppy or disorganized, to browse a lot of general data, but also to prompt users to drill down and see more. In short, cards are clean and simple with a lot of versatility. Exactly what the web needs. So expect to see more of it in the remainder of 2014 and throughout 2015.
Flat design has achieved a lot of momentum over the last year or two and it appears to have staying power into 2015. However, it might be possible that as a concept, flat design is growing up. Perhaps into material design. So, what is material design?
Material design is something Google unveiled this year as their new direction for mobile (and design in general). “Material,” to quote their brief, “is the metaphor. A material metaphor is the unifying theory of rationalized space and a system of motion. Our material is grounded in tactile reality, inspired by our study of paper and ink, yet open to imagination and magic.”
Outside of marketing speak (and including the observation that they’ve settled on something that might otherwise be called “almost flat design”) we can see that what the designers at Google mean when they say Material Design is a mostly flat design that uses very subtle gradients, layering, and animation to retain a sense of the tangible world (physical space and objects) while still achieving all the advantages of flat design. Some may disagree but personally, I think this is where flat design as a whole is headed and I look forward to seeing more companies and individuals adopt it in the remainder of 2014 and beyond.
Microinteractions are a good trend to talk about after material design. What are microinteractions? They are contained experiences or moments within a product (or perhaps a module on a website) that revolve around a single use case. One example of this is the email signup box that pops up on this website. It sort of wiggles back and forth on the screen, giving a playful personality to an otherwise static graphic. This microinteraction promotes an increase in user engagement; which in this particular case means more email signups. I’d look for this theory to further permeate web design in the coming years. I’d love to see more WordPress theme and plugin developers begin to think in this vein. In particular, I’d like to see plugins that don’t just add new features to a WordPress website but add new experiences.
What do you get when you put all of that together? Something I’ve written about extensively here at Elegant Themes: a better platform for telling compelling stories and narratives. Now of course I do not mean that every web page has to tell a fairy tale, yarn or other bit of fiction. That’s not what I mean when I say story or narrative. What I mean is that your brand is made up of a series of concepts or values (elegance, creativity, simplicity, etc.) and everything from your page layout to your font choice to your web copy and microinteractive page elements are narrative tools with which you can tell stories that embody those concepts and values by showing them in action. A perfect example of this is the Tesla website, which I talk about below.
The idea of using cookies to help you display more relevant content to repeat visitors is nothing new. However, just as certain spammy practices (such as the popup) have made a classier return with better design and best practices in place, so too can the technique of using cookies to display certain content to repeat visitors be used for more than spam and shameless upselling. Netflix uses it to remember what you’ve recently watched. So does YouTube. Would it be so odd for a large editorial site to create a “recently read” sidebar widget for quick access to articles you may have enjoyed and/or commented on? Or perhaps hiding recently viewed content in order to highlight new posts/pages? I don’t think so and I think we’ll see more tasteful uses of this technique in the months to come. I’d also love to see that happening more in the WordPress community via plugins.
Sometimes reading about all these design concepts can make it hard to imagine them working together seamlessly “in the wild”. To help remedy that I’ve put together a short list of three examples that collectively embody all of the web design trends I’ve mentioned in this post.
1. Apple
You don’t have to be an Apple fan boy to appreciate good web design. Something that Apple has always accomplished with their trademark simplicity, and yet, continue to manage to squeeze in a remarkable number of current and future design trends. If you’re looking to learn but not mimic them, I think the thing to keep in mind is not that you have to create a site exactly like theirs but rather copy their insistency on subtlety to avoid making a trend come off as gimmick.
2. Tesla
One of my favorite websites right now, not just because I also love their products, is Tesla’s website. They combine all of my favorite trends into one fluid experience. I especially love their Go Electric page which uses large images, long scrolling, embedded infographics and interactive storytelling to explain their top five FAQ’s. It’s a brilliant bit of design chock full of delightful microinteractions that turns a traditionally boring part of most websites into a jaw-dropping showcase.
3. Divi
Finally, we have an example that is not to be drooled over and dreamed of as hopelessly out of reach, but something that we can get our hands on and work with. Divi is without a doubt the best WordPress theme for the average user with limited (or zero) coding ability to achieve all of the trends covered in this article on their very own WordPress website. It’s possibly one of the most empowering WordPress themes I’ve ever come across. The drag-and-drop page builder takes advantage of interactive modules to help you create beautiful and effective pages of any length. And of course, thanks to its responsive design, that look and work beautifully on any device.
The the dominant trends of 2014 look as if they will carry on into 2015, with a few of them maturing (perhaps in the way responsive went from a possible solution to a design problem, to a trend, to a new standard). In this case I’m speaking particularly about material design and microinteractions. The latter of which is the reason I didn’t include parallax in this post, as I would consider it a type of microinteraction that may or may not fade out in the next year but whose underlying concept will undoubtedly remain and mature.
As for what all this means for the WordPress community, I would think that we will see more themes follow the lead of Divi in creating more seamless ways for non-coding users to take advantage of these design trends. I also believe that as certain microinteractions become more popular in situations that have traditionally required custom development, the community will provide turn-key solutions via plugins; like they have with various popup form plugins.
Most of all, I think the future of these trends will be decided by how far we push them in the months to come. Where will we find limitations that require refinement or perhaps going in a new direction altogether? I know I’m looking forward to watching it all unfold.
If, however, you already have some ideas or thoughts on where things are headed in 2015 or my take on the design trends in this post, please feel free to leave them in the comments below!
Article thumbnail image by Sergey Korkin / shutterstock.com
http://www.elegantthemes.com/blog/resources/web-design-trends-to-look-out-for-in-2015
http://cimple.postype.com/post/746/2015-%EC%9B%B9%EB%94%94%EC%9E%90%EC%9D%B8-%ED%8A%B8%EB%A0%8C%EB%93%9C%E2%80%94web-design-trend-in-2015
머신러닝 공부 순서 (0) | 2019.03.11 |
---|---|
우리는 Github를 이렇게 사용한다. (0) | 2019.03.08 |
구글, “5년간 AI 개발자 5만명 교육하겠다” (0) | 2019.03.08 |
infograpic resume (0) | 2014.08.18 |
Templates (0) | 2014.08.14 |
제어판 - 프로그램 및 기능 - Windows 기능 사용/사용 안함 - 인터넷 정보 서비스 - World Wide Web 서비스 - 응용 프로그램 개발 기능 체크
[ASP.NET] 'System.Web.HttpUnhandledException' 형식의 예외가 Throw되었습니다. (0) | 2019.04.22 |
---|---|
ASP.NET MVC 만들면서 배우기- 배우자(2) – CRUD(Create, Read, Update, Delete) (232) | 2013.10.08 |
ASP.NET MVC 만들면서 배우기- 배우자(1) – Controller + Model (53) | 2013.10.08 |
ASP.NET MVC 만들면서 배우기- 배우자(1) - Controller (0) | 2013.10.08 |
ASP.NET MVC 만들면서 배우기- 배우자(1) - view (59) | 2013.10.07 |
http://lesscss.org/
Less is a CSS pre-processor, meaning that it extends the CSS language, adding features that allow variables, mixins, functions and many other techniques that allow you to make CSS that is more maintainable, themable and extendable.
Less runs inside Node, in the browser and inside Rhino. There are also many 3rd party tools that allow you to compile your files and watch for changes.
For example:
@base: #f938ab;
.box-shadow(@style, @c) when (iscolor(@c)) {
-webkit-box-shadow: @style @c;
box-shadow: @style @c;
}
.box-shadow(@style, @alpha: 50%) when (isnumber(@alpha)) {
.box-shadow(@style, rgba(0, 0, 0, @alpha));
}
.box {
color: saturate(@base, 5%);
border-color: lighten(@base, 30%);
div { .box-shadow(0 0 5px, 30%) }
}
compiles to
.box {
color: #fe33ac;
border-color: #fdcdea;
}
.box div {
-webkit-box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
}
Less can be used on the command line via npm, downloaded as a script file for the browser or used in a wide variety of third party tools. See the Usage section for more detailed information.
The easiest way to install Less on the server, is via npm, the node.js package manager, as so:
$ npm install -g less
Once installed, you can invoke the compiler from the command-line, as such:
$ lessc styles.less
This will output the compiled CSS to stdout
, you may then redirect it to a file of your choice:
$ lessc styles.less > styles.css
To output minified CSS, simply pass the -x
option. If you would like more involved minification, the Clean CSS is also available with the --clean-css
option.
To see all the command line options run lessc without parameters.
You can invoke the compiler from node, as such:
var less = require('less');
less.render('.class { width: (1 + 1) }', function (e, css) {
console.log(css);
});
which will output
.class {
width: 2;
}
you may also manually invoke the parser and compiler:
var parser = new(less.Parser);
parser.parse('.class { width: (1 + 1) }', function (err, tree) {
if (err) {
return console.error(err)
}
console.log(tree.toCSS());
});
You may pass some options to the compiler:
var parser = new(less.Parser)({
paths: ['.', './lib'], // Specify search paths for @import directives
filename: 'style.less' // Specify a filename, for better error messages
});
parser.parse('.class { width: (1 + 1) }', function (e, tree) {
tree.toCSS({
// Minify CSS output
compress: true
});
});
See the Usage section for details of other tools.
Each less.js release contains also rhino-compatible version.
Command line rhino version requires two files:
Command to run the compiler:
java -jar js.jar -f less-rhino-<version>.js lessc-rhino-<version>.js styles.less styles.css
This will compile styles.less file and save the result to styles.css file. The output file parameter is optional. If it is missing, less will output the result to stdout
.
Using less.js in the browser is great for development, but it's not recommended for production
Client-side is the easiest way to get started and good for developing with Less, but in production, when performance and reliability is important, we recommend pre-compiling using node.js or one of the many third party tools available.
To start off, link your .less
stylesheets with the rel
attribute set to "stylesheet/less
":
<link rel="stylesheet/less" type="text/css" href="styles.less" />
Next, download less.js and include it in a <script></script>
tag in the <head>
element of your page:
<script src="less.js" type="text/javascript"></script>
.less
stylesheet each of them is compiled independently. So any variables, mixins or namespaces you define in a stylesheet are not accessible in any other.Options are defined by setting them on a global less
object before the <script src="less.js"></script>
:
<!-- set options before less.js script -->
<script>
less = {
env: "development",
async: false,
fileAsync: false,
poll: 1000,
functions: {},
dumpLineNumbers: "comments",
relativeUrls: false,
rootpath: ":/a.com/"
};
</script>
<script src="less.js"></script>
Learn more about Browser Options
Less.js is released under the Apache 2 License (though there are plans to dual license it). Copyright 2009-2014, Alexis Sellier and the Less Core Team (see about). Boiled down to smaller chunks, it can be described with the following conditions.
The full Less.js license is located in the project repository for more information.
[JS] JSON.parse : Convert this string into array of objects (0) | 2016.08.20 |
---|---|
.prependTo() (0) | 2014.08.22 |
make an Interactive Website 5 coding (0) | 2014.08.22 |
margin by codecademy (0) | 2014.08.21 |
ASP.NET MVC4 WEB API (1) | 2013.10.22 |
Bootstrap uses Grunt for its build system, with convenient methods for working with the framework. It's how we compile our code, run tests, and more.
bootstrap은 프레임워크 동작의 편리를 위해 Grunt 의 빌드시스템을 사용한다. 아래는, 우리가 어떻게 코드를 컴파일하고, 테스트와 기타 외작업을 어떻게 하는지 설명한다.
To install Grunt, you must first download and install node.js (which includes npm). npm stands for node packaged modules and is a way to manage development dependencies through node.js.
Then, from the command line:
grunt-cli
globally with npm install -g grunt-cli
./bootstrap/
directory, then run npm install
. npm will look at the package.json
file and automatically install the necessary local dependencies listed there.When completed, you'll be able to run the various Grunt commands provided from the command line.
grunt-cli
을 grunt dist
(Just compile CSS and JavaScript)Regenerates the /dist/
directory with compiled and minified CSS and JavaScript files. As a Bootstrap user, this is normally the command you want.
grunt watch
(Watch)Watches the Less source files and automatically recompiles them to CSS whenever you save a change.
grunt test
(Run tests)Runs JSHint and runs the QUnit tests headlessly in PhantomJS.
grunt
(Build absolutely everything and run tests)Compiles and minifies CSS and JavaScript, builds the documentation website, runs the HTML5 validator against the docs, regenerates the Customizer assets, and more. Usually only necessary if you're hacking on Bootstrap itself.
Should you encounter problems with installing dependencies or running Grunt commands, first delete the /node_modules/
directory generated by npm. Then, rerun npm install
.
GRUNT : The JavaScript Task Runner (0) | 2014.09.02 |
---|
http://gruntjs.com/
Getting started
Grunt and Grunt plugins are installed and managed via npm, the Node.js package manager. Grunt 0.4.x requires stable Node.js versions >= 0.8.0
. Odd version numbers of Node.js are considered unstable development versions.
Before setting up Grunt ensure that your npm is up-to-date by running npm update -g npm
(this might requiresudo
on certain systems).
Using Grunt 0.3? Please see Grunt 0.3 Notes
In order to get started, you'll want to install Grunt's command line interface (CLI) globally. You may need to use sudo (for OSX, *nix, BSD etc) or run your command shell as Administrator (for Windows) to do this.
npm install -g grunt-cli
This will put the grunt
command in your system path, allowing it to be run from any directory.
Note that installing grunt-cli
does not install the Grunt task runner! The job of the Grunt CLI is simple: run the version of Grunt which has been installed next to a Gruntfile
. This allows multiple versions of Grunt to be installed on the same machine simultaneously.
1. node.js 설치
2. cmd에서 명령어 입력
Each time grunt
is run, it looks for a locally installed Grunt using node's require()
system. Because of this, you can run grunt
from any subfolder in your project.
If a locally installed Grunt is found, the CLI loads the local installation of the Grunt library, applies the configuration from your Gruntfile
, and executes any tasks you've requested for it to run. To really understand what is happening, read the code.
Working with an existing Grunt project
Assuming that the Grunt CLI has been installed and that the project has already been configured with apackage.json
and a Gruntfile
, it's very easy to start working with Grunt:
npm install
.grunt
.That's really all there is to it. Installed Grunt tasks can be listed by running grunt --help
but it's usually a good idea to start with the project's documentation.
A typical setup will involve adding two files to your project: package.json
and the Gruntfile
.
package.json: This file is used by npm to store metadata for projects published as npm modules. You will list grunt and the Grunt plugins your project needs as devDependencies in this file.
Gruntfile: This file is named Gruntfile.js
or Gruntfile.coffee
and is used to configure or define tasks and load Grunt plugins. When this documentation mentions a Gruntfile
it is talking about a file, which is either a Gruntfile.js
or a Gruntfile.coffee
.
The package.json
file belongs in the root directory of your project, next to the Gruntfile
, and should be committed with your project source. Running npm install
in the same folder as a package.json
file will install the correct version of each dependency listed therein.
There are a few ways to create a package.json
file for your project:
package.json
file.package.json
file.{
"name": "my-project-name",
"version": "0.1.0",
"devDependencies": {
"grunt": "~0.4.5",
"grunt-contrib-jshint": "~0.10.0",
"grunt-contrib-nodeunit": "~0.4.1",
"grunt-contrib-uglify": "~0.5.0"
}
}
The easiest way to add Grunt and gruntplugins to an existing package.json
is with the commandnpm install <module> --save-dev
. Not only will this install <module>
locally, but it will automatically be added to the devDependencies section, using a tilde version range.
For example, this will install the latest version of Grunt in your project folder, adding it to your devDependencies:
npm install grunt --save-dev
The same can be done for gruntplugins and other node modules. Be sure to commit the updatedpackage.json
file with your project when you're done!
프로젝트 파일의 root 지점으로 이동한 뒤, Grunt를 설치한다.
그럼, node_modules 이라는 폴더가 생성되고, 그 안에 생성된 Grunt라는 폴더에는 다음과 같은 파일들이 함께 생성된다.
The Gruntfile.js
or Gruntfile.coffee
file is a valid JavaScript or CoffeeScript file that belongs in the root directory of your project, next to the package.json
file, and should be committed with your project source.
A Gruntfile
is comprised of the following parts:
In the following Gruntfile
, project metadata is imported into the Grunt config from the project'spackage.json
file and the grunt-contrib-uglify plugin's uglify
task is configured to minify a source file and generate a banner comment dynamically using that metadata. When grunt
is run on the command line, theuglify
task will be run by default.
module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
uglify: {
options: {
banner: '/*! <%= pkg.name %> <%= grunt.template.today("yyyy-mm-dd") %> */\n'
},
build: {
src: 'src/<%= pkg.name %>.js',
dest: 'build/<%= pkg.name %>.min.js'
}
}
});
// Load the plugin that provides the "uglify" task.
grunt.loadNpmTasks('grunt-contrib-uglify');
// Default task(s).
grunt.registerTask('default', ['uglify']);
};
Now that you've seen the whole Gruntfile
, let's look at its component parts.
Every Gruntfile
(and gruntplugin) uses this basic format, and all of your Grunt code must be specified inside this function:
module.exports = function(grunt) {
// Do grunt-related things in here
};
Most Grunt tasks rely on configuration data defined in an object passed to the grunt.initConfig method.
In this example, grunt.file.readJSON('package.json')
imports the JSON metadata stored in package.json
into the grunt config. Because <% %>
template strings may reference any config properties, configuration data like filepaths and file lists may be specified this way to reduce repetition.
You may store any arbitrary data inside of the configuration object, and as long as it doesn't conflict with properties your tasks require, it will be otherwise ignored. Also, because this is JavaScript, you're not limited to JSON; you may use any valid JS here. You can even programmatically generate the configuration if necessary.
Like most tasks, the grunt-contrib-uglify plugin's uglify
task expects its configuration to be specified in a property of the same name. Here, the banner
option is specified, along with a single uglify target namedbuild
that minifies a single source file to a single destination file.
// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
uglify: {
options: {
banner: '/*! <%= pkg.name %> <%= grunt.template.today("yyyy-mm-dd") %> */\n'
},
build: {
src: 'src/<%= pkg.name %>.js',
dest: 'build/<%= pkg.name %>.min.js'
}
}
});
Many commonly used tasks like concatenation, minification and linting are available as grunt plugins. As long as a plugin is specified in package.json
as a dependency, and has been installed via npm install
, it may be enabled inside your Gruntfile
with a simple command:
// Load the plugin that provides the "uglify" task.
grunt.loadNpmTasks('grunt-contrib-uglify');
Note: the grunt --help
command will list all available tasks.
You can configure Grunt to run one or more tasks by default by defining a default
task. In the following example, running grunt
at the command line without specifying a task will run the uglify
task. This is functionally the same as explicitly running grunt uglify
or even grunt default
. Any number of tasks (with or without arguments) may be specified in the array.
// Default task(s).
grunt.registerTask('default', ['uglify']);
If your project requires tasks not provided by a Grunt plugin, you may define custom tasks right inside theGruntfile
. For example, this Gruntfile
defines a completely custom default
task that doesn't even utilize task configuration:
module.exports = function(grunt) {
// A very basic default task.
grunt.registerTask('default', 'Log some stuff.', function() {
grunt.log.write('Logging some stuff...').ok();
});
};
Custom project-specific tasks don't need to be defined in the Gruntfile
; they may be defined in external.js
files and loaded via the grunt.loadTasks method.
Gruntfile
, along with an explanation of templates, globbing patterns and importing external data.http://gruntjs.com/getting-started
Compiling CSS and JavaScript (0) | 2014.09.02 |
---|
DATEDIFF ( datepart , startdate , enddate )
Return Type int
datepart |
Abbreviations |
---|---|
year |
yy, yyyy |
quarter |
qq, q |
month |
mm, m |
dayofyear |
dy, y |
day |
dd, d |
week |
wk, ww |
hour |
hh |
minute |
mi, n |
second |
ss, s |
millisecond |
ms |
microsecond |
mcs |
nanosecond |
ns |
http://msdn.microsoft.com/en-us/library/ms189794.aspx
[MSSQL] AUTOINCREMENT 설정하기 (739) | 2013.10.17 |
---|---|
MS-SQL DATETIME CONVERT (59) | 2013.08.29 |
MSSQL AUTO INCREMENT INIT (57) | 2013.07.04 |
[MSSQL] Database 복원 (0) | 2013.05.07 |
Create a new li element : $('<li>');
Select the h2 element nested insind the <div class="article"> ... </div> element. : $('.article h2');
[JS] JSON.parse : Convert this string into array of objects (0) | 2016.08.20 |
---|---|
Get Start Less (0) | 2014.09.02 |
make an Interactive Website 5 coding (0) | 2014.08.22 |
margin by codecademy (0) | 2014.08.21 |
ASP.NET MVC4 WEB API (1) | 2013.10.22 |
Let's use jQuery to build a news reader.
n
keyboard shortcut to go to the next article.o
keyboard shortcut to open the article description.n
keyboard shortcut to go to the next article.o
keyboard shortcut to open the article description.Program skeleton
The index.html file has two scriptelements right before the closing </body>
tag:
var main = function() {
};
$(document).ready(main);
Get Start Less (0) | 2014.09.02 |
---|---|
.prependTo() (0) | 2014.08.22 |
margin by codecademy (0) | 2014.08.21 |
ASP.NET MVC4 WEB API (1) | 2013.10.22 |
Javascript / text / cs 연결할 때 (59) | 2013.08.30 |
User interactions with a web page are called events.
For example, when you click the Like button to the right, the browser announces that a click event has occurred.
When a user clicks the .like-button
element, the event handler toggles the "active"
class. This alternates the button between the normal gray view and the selected blue view.
In the page to the right, click the three share buttons at the top of the page.
One common user event is the click event. A click event occurs when a user clicks on an HTML element.
The .click()
method attaches an event handler to an HTML element so that it can respond to a click event.
$('.social li')
selects each share button at the top of the web page.
The .click()
method attaches an event handler to each button.
The event handler adds the CSS class .active
, which changes the button's background-color to red. We use $(this)
to refer to the HTML element that was clicked on. We can now operate on this element using .toggleClass()
.
Putting it all together, when you click on a share button at the top of the page, a click event is triggered by the browser.
When the click event occurs, the .click()
method runs the event handler. In this code, the event handler changes the button color to red.
In the page to the right, click inside the page, and then press any letter or number key.
Another common user event is the keypress event. A keypress event occurs when a user types a key on the keyboard.
The .keypress()
method attaches an event handler to an HTML element so that it can respond to a keypress event.
$(document)
selects the whole web page.The .keypress()
method attaches an event handler to document
When any keyboard key is pressed, the event handler toggles the dropdown menu.
Putting it all together, when you press any keyboard key, a keypress event is triggered by the browser.
When the keypress event occurs, the .keypress()
method runs the event handler.
Here, the event handler toggles the dropdown menu. Putting it all together, when you press any keyboard key, a keypress event is triggered by the browser.
When the keypress event occurs, the .keypress()
method runs the event handler.
Here, the event handler toggles the dropdown menu.
In the page to the right, click inside the page, and then press the m key.
Triggering a keypress event handler when any key is typed isn't particularly useful. For more control, we can use the event
object.
The event
object contains more information about an event, such as which mouse button was clicked or which key was pressed.
$(document)
selects the whole web page, and the.keypress()
method attaches an event handler todocument
.The event handler takes event
as a parameter. event.which
contains which key was pressed. Keyboard keys are identified by key codes. The m key is identified by the key code 109.
make an Interactive Website 3 JavaScript (0) | 2014.08.22 |
---|---|
make an Interactive Website 2 Jquery coding (0) | 2014.08.22 |
make an Interactive Website 1 (0) | 2014.08.21 |
make website 3 coding (0) | 2014.08.21 |
make web site 2 bootstrap (0) | 2014.08.21 |
In order to make interactive web pages with jQuery, it's useful to know a few things about JavaScript.
JavaScript is a programming language that jQuery is written in, and knowing JavaScript will be helpful for understanding and writing your code.
The next cards will cover a few fundamental JavaScript concepts.
Variables store data so that they can be used later on in the program. The keyword var
creates a new variable namedcounter
. The value 140 is stored in counter
. The statement ends with a semicolon to tell the computer that the statement has ended.
Comparisons
It's possible to compare variables using comparisons.
>
- Greater than
<
- Less than
>=
Greater than or equal to
<=
Less than or equal to
===
Equal to score1 === score2;
!==
Not equal to
make an Interactive Website 4 Event (0) | 2014.08.22 |
---|---|
make an Interactive Website 2 Jquery coding (0) | 2014.08.22 |
make an Interactive Website 1 (0) | 2014.08.21 |
make website 3 coding (0) | 2014.08.21 |
make web site 2 bootstrap (0) | 2014.08.21 |
We are going to use jQuery to create a menu that slides out from the left side.
The index.html file has two scriptelements right before the closing </body>
tag:
Let's start by setting up the basic skeleton for JavaScript programs.
var
and create a function called main
.main
function once the web page has fully loaded./*Inside the app.js file, use the keyword var and create a function called main.*/ var main = function(){ }; /*Use jQuery to run the main function once the web page has fully loaded.*/ $(document).ready(main);
What does this skeleton do?
main
function is where we'll write our program.$(document).ready
runs the main
function as soon as the HTML document has loaded in the browser.Let's start filling out the main
function. Here, we'll select an HTML element in order to operate on it. jQuery lets us select HTML elements using CSS selectors.
main
function.main
function, use jQuery to select the class 'icon-menu'
. $('.icon-menu');$( )
to tell the computer we're using jQuery.'icon-menu'
, we type in '.icon-menu'
.We have just used jQuery to select the'icon-menu'
class using $('.icon-menu')
Now we want to respond to user action.
Specifically we want to respond to a user clicking on this '.icon-menu'
HTML element.
After $('.icon-menu')
, add the .click()
method.
We now have code that says something will happen when the user clicks on theicon-menu
HTML element. But what will happen?!
Clicking on the menu icon should open the menu.
.click()
method.'menu'
class and animate it.Right now, the menu is 285px past the left edge of the screen. That's why it is not visible! Inside the animate method:
a move it 0px to the left
b. make this happen over 200 milliseconds.
We now want to push the rest of the page to the left 285px. Use jQuery to select the body HTML element, animate it, and move it left 285px over 200 milliseconds.
Once the menu is open, we need a way to close it. Let's adapt the three steps we used to open the menu in order to close the menu.
'.icon-close'
element..click()
method.'.icon-close'
element is clicked, use .animate()
to change the left
offset of the menu to -285px, and the left
offset of the body to 0px. Both are done over 200 milliseconds.make an Interactive Website 4 Event (0) | 2014.08.22 |
---|---|
make an Interactive Website 3 JavaScript (0) | 2014.08.22 |
make an Interactive Website 1 (0) | 2014.08.21 |
make website 3 coding (0) | 2014.08.21 |
make web site 2 bootstrap (0) | 2014.08.21 |
1. 웹에서 음악변환
http://media.io/
2. 음악 수정 (cut)
http://mp3cut.net/
뭐 다른 설치필요없이 웹에서 하니까 편리하게 사용 가능^.^
[Fabric] Fabric에서 Firebase로 통합 - 2020년 3월 (0) | 2019.09.12 |
---|---|
[MAC] 숨겨진 폴더, 파일 보는 방법 (0) | 2019.07.31 |
Eclipse 단축키 (0) | 2011.12.29 |
subversion install eclipse (0) | 2011.10.07 |
이클립스 소스 자동정렬 (0) | 2011.09.25 |
Web pages made with HTML and CSS display static content. They don't respond to user actions like clicking a mouse or typing a key.
JavaScript and jQuery are used to make web pages interactive.
JavaScript is a programming language used to create web pages that change in response to user actions.
jQuery is a collection of prewritten JavaScript code that lets us easily create interactive effects on our site.
Click on More and the navigation arrows in the web page to the right.
Click on Flipboard at the top of the web page to the right. The web page has a dropdown menu which shows and hides when you click Flipboard.
This interaction is made with JavaScript and jQuery.
Here's what the web page's HTML looks like.
To include CSS files in HTML we used the linkelement.
Similarly, to include JavaScript files in HTML, we use the script element.
To include CSS files in HTML, we use the linkelement. The link element tells the browser where to find a CSS file.
Similarly, to include JavaScript files in HTML, we use the script element.
The script element tells the browser where to find a JavaScript file. It has an attribute inside the opening <script>
tag named src
, which has the address of the JavaScript file.
The first script loads in jQuery.
The second script loads in app.js. This is where the code for the dropdown menu program lives.
$(".dropdown-menu").show();
to $(".dropdown-menu").toggle();
to toggle the dropdown menu. Then click on Flipboard once to make the menu appear, and again to make it disappear.The $(document).ready()
waits for the HTML document to load completely before running the main()
function.
This is important because JavaScript should only run after the web page has loaded completely in the browser - otherwise there wouldn't be any HTML elements to add interactivity to.
make an Interactive Website 3 JavaScript (0) | 2014.08.22 |
---|---|
make an Interactive Website 2 Jquery coding (0) | 2014.08.22 |
make website 3 coding (0) | 2014.08.21 |
make web site 2 bootstrap (0) | 2014.08.21 |
make web site 1 by codecademy (0) | 2014.08.21 |
The navigation menus are made up of two ulelements. In each ul, the li elements display on new lines because they are block elements. Let's style the li elements so that they display on the same line. This can be done with thedisplay
property.
Nice! The menu items inside each ul now are now inline elements. [We'll see how to move the two uls to display on the same line in the next section.]
Next let's change the position of the text inside the large feature. Currently the text is positioned at the very top of the large feature. Let's move the text down so that its more in the middle of the large feature. This can be done with the position
property.
In index.html, the <div class="jumbotron">..</div>
groups elements that are part of the large feature section of the web page. Inside<div class="jumbotron">..</div>
is the <divclass="container">..</div>
which has the text
Bootstrap is a CSS framework used to build pages faster. Bootstrap provides a lot of useful CSS out of the box. Check out the Bootstrap file at "http://s3.amazonaws.com/codecademy-content/courses/ltp/css/bootstrap.css" - it has CSS properties and values, many of which you've seen already, to style HTML.
Nicely done! What's going on here?
The order of the CSS files matter.
1. The browser first sees shift.css, and makes the Shift font available to use in the page
2. Next the browser sees bootstrap.css, and applies those styles to the page.
3. Then the browser sees main.css, and applies those custom styles to the page. The custom styles override the Bootstrap styles.
The order of the CSS files tell the browser that your styles in main.css are more important than the styles in bootstrap.css, so the final page that loads is the customized web page.
Navigation
In index.html inside <div class="nav">..</div>
, the navigation menus are made up of two ul elements. So far we've styled the lielements to display on the same line. Now let's style the ul elements to show up on the same line too.
Bootstrap provides the .pull-left
class to left-align an element, and the .pull-right
class to right-align an element. Let's use these classes to finish styling the navigation bar.
Looking good! Both menus now show up on the same line, and the navigation bar is complete.
Next, let's use Bootstrap's grid to arrange the three pieces of supporting content inside the<div class="learn-more">..</div>
section. Here's how to use Bootstrap's grid.
<div class="container">
<div class="row">
<div class="col-md-4">
...
</div>
<div class="col-md-4">
...
</div>
<div class="col-md-4">
...
</div>
</div>
</div>
<div class="container">..</div>
, there is a row defined by <div class="row">..</div>
<div class="row">..</div>
, there are three columns each defined by <div class="col-md-4">
Why is the .col-md-4
class being used? Remember that Bootstrap's grid is 12 columns. Therefore, to create three equal-sized columns, they each need to span 4 grid columns.
Excellent! Using Bootstrap's grid, you arranged the three pieces of supporting content into a three-column layout.
Let's use Bootstrap's grid again to create another section on the page. This section will contain a grid of images.
Nice work! Next let's add some images inside the columns.
Bootstrap provides the ".thumbnail" class to easily display grids of images. An img element is wrapped in a div element with the class "thumbnail".
<div class="row">
<div class="col-md-4">
<img src="http://goo.gl/0sX3jq" >
</div>
<div class="col-md-4">
<div class="thumbnail">
<img src="http://goo.gl/Av1pac" >
</div>
<div class="thumbnail">
<img src="http://goo.gl/vw43v1">
</div>
</div>
<div class="col-md-4">
<div class="thumbnail">
<img src="http://goo.gl/0Kd7UO" >
</div>
</div>
</div>
Neighborhood Guides: Final touches
Excellent! Using Bootstrap's grid, we created a brand new section on the web page displaying a grid of images.
Let's finish up this section with a few custom CSS styles.
In main.css, make a new CSS rule that selects.neighborhood-guides
background-color
to #efefef
border-bottom
to 1px solid #dbdbdb
Make a second CSS rule that selects the h2element inside .neighborhood-guides
color
to #393c3d
font-size
to 24px
Make a third CSS rule that selects the pelement inside .neighborhood-guides
font-size
to 15px
margin-bottom
to 13px
Navigation
You've done a lot so far. You learned about HTML, CSS, and Bootstrap, and created the Airbnb home page from scratch.
Now it's time to make it your own. Let's start with the navigation bar and work our way down the page.
make an Interactive Website 3 JavaScript (0) | 2014.08.22 |
---|---|
make an Interactive Website 2 Jquery coding (0) | 2014.08.22 |
make an Interactive Website 1 (0) | 2014.08.21 |
make web site 2 bootstrap (0) | 2014.08.21 |
make web site 1 by codecademy (0) | 2014.08.21 |