It’s a quick start method for Mapbox. Upload a picture, and select the colors on your map from the picture.
Category: Multimedia Design
Tutorials for multimedia designers.
-
Open Streetmap API (embed)
Here Open Street Maps is embedded via a simple i-frame – but it’s just a standard map. Not much Leaflet or Mapbox styling is possible when we use the OSM embed options. But at least you may add a marker via the OSM web page. As far as I can see the marker is made via Leaflet somehow.
Since the AUH is a behemoth building complex. But you can use the pointer in order to pinpoint an entrance or building.
-
ER-Diagram Symbols
Above you see the atomic building blocks of the ER-Diagram:
- Entity
- Attribute
- Relation
- Carninalities (Crow’s feet notation) one, zero-or-one, zero-or-many, one-or-many, many.
From Requrements to Deployment
ER-Diagram
This ER-Diagram is inspired by some of the tables in his sample database
Database Implementation
Here are Ben Forta’s tables in PhpMyAdmin “design viewW.
During implementation you will create the tables and structure.
Note that you have to design the data as integers, numbers, etc.:
- cust_id = int(11)
- cust_name = char(50)
The customers table in ER-diagram form.
Normalizing
In the diagram the cardinalities have to be normalized. Here are a few solutions to typical problems.
TIP: From ER-diagram to HTML form
Look at the attributes. Create an input for each field. Then use the INSERT keyword.
-
Create a Stunning Portfolio with WordPress
For multimedia designer an online portfolio is a must. The industry expect you to have one. But what if you have found a nice open source theme, but you need a really stunning front page? Or a costum gallery for your productions? Or a kick ass CV?
Step 1) Create a Child Theme
The code presented in this tutorial is based on my tw17child. The child theme is based on the Twenty Seventeen theme. The code is available on Github.
- Install your open source theme via the Dashboard or by uploading a zip file.
- Create a folder with the name of your child theme.
- Then create a new file in the folder. Name the file style.css:
/* Theme Name: Twenty Seventeen Child Theme URI: http://example.com/twenty-fifteen-child/ Description: Twenty Seventeen Child Theme Author: Per Thykjær Jensen Author URI: https://multimusen.dk Template: twentyseventeen Version: 1.0.0 License: GNU General Public License v2 or later License URI: http://www.gnu.org/licenses/gpl-2.0.html Tags: one-column, two-columns, right-sidebar, flexible-header, accessibility-ready, custom-colors, custom-header, custom-menu, custom-logo, editor-style, featured-images, footer-widgets, post-formats, rtl-language-support, sticky-post, theme-options, threaded-comments, translation-ready Text Domain: tw17child */
As soon as the style.css is ready you’ll be able to see the child theme in the Dashboard. But the styles are not loaded. In WordPress styles and scripts are loaded via the enqueue function in functions.php.
- Create a new empty file. Save it as functions.php.
- Add styles by enqueue:
/** * Styles: both parent and child */ function my_theme_enqueue_styles() { $parent_style = 'parent-style'; wp_enqueue_style( $parent_style, get_template_directory_uri() . '/style.css' ); wp_enqueue_style( 'child-style', get_stylesheet_directory_uri() . '/style.css', array( $parent_style ), wp_get_theme()->get('Version') ); } add_action( 'wp_enqueue_scripts', 'my_theme_enqueue_styles' );
You can add more scripts and stylesheets to this function if you want to after a similar manner.
That’s it! Your child theme is ready. Now it’s time for your creative tweaks.
Step 2) Create Costum Content
Let’s say that you want a costum frontpage:
- In the child theme create a new file.
- Save the file as front-page.php
Add some content to the page, e.g.
<h1>Hello World</h1>
OK, I admit that this is not the most stunning design, you’ve ever laid your eyes upen. But have a look at your frontpage. It’ll display a “Hello World” as expected. You did not use one line of PHP or WordPress template tags. There’s no loop either.
“What can you deduce from this, Sherlock?”
“The game’s afoot, Watson!”
Actually you can add any code you fancy. You don’t need to follow any restrictions made by the original theme. Now you are able to hardcode a cool splash for your website. If you want to, you can add wp_head() and wp_footer() in the code, e.g.
<?php wp_head(); ?> </head>
If you do so WordPress will enable the admin bar and add the WordPress head and footer scritpts and styles from the theme.
Step 3) How to name the files
Actually you can modify any page or post after a similar manner. The secret is naming your costum files correctly, and here the template hierarchy diagram is the key we need. In the diagram you can find the front-page.php. Here are a few samples:
- A page for categories: category.php
- Costum design for a category with the slug icecream: category-icecream.php
- A post with the slug whatever: page-whatever.php
If you don’t add a loop to the page, you can only use hardcoded content on your costum pages.
Sometimes that’s exactly what we need.
Now you’re able to create a bunch of very personal costum pages for your content, such as:
- Galleries
- Animations
- CV
- Portfolio pages
- Costum author pages
-
Drone hijacked on stage
@FrontTrends, Warsaw 2017.
-
Front Trends Impressions
The Front Trends Conference in Warsaw 2017 focused on front end development.
- Front Trends, Warsaw 2017
- Speakers
- Videos on YouTube. (We’re waiting for the 2017 videos …)
-
GitKraken Tutorials ( YouTube )
A few introductions to Github, and the gui GitKraken.
A very fast video
https://youtu.be/j1rP21RcbH0
If you’ve got one hour …
https://youtu.be/f0y_xCeM1Rk
-
Github: The GitKraken GUI
The GitKraken app is a GUI for Github. Some people may prefer a GUI solution. The video above will give an impression of the app.
Branches
A strong feature on Github is the concept of brances. Here you may experiment with some code. Later on the experiments can be merged with the master code ( origin master ).
- Create a branch.
- Chekout the branch ( that is: work on the branch ).
- Edit the file.
- Make sure that the branch is chosen.
- Stage the changed file(s).
- Edit the commit message.
- Push to Github.
Go to Github. If everything is ok the changes should be stored.
Merge a branch to origin master
When you’re satisfied with the code in the branch, you may want to merge the new work with the stem of the tree. The stem is called ‘origin master’. In GitKraken rightclick on remote / master. A popup menu will let you merge from the branch to the master:
Click on the merge option. Then write a commit message, and click on Push.
On the Github web page you’ll be able to follow all the comitted changes:
Above you see the content of the file, and the history. The image below is the online version of the branches:
( The screencast and screendumps were made on a Ubuntu Linux system. )
-
Kode fra dagens Workshop
Her er koden.
-
WordPress and REST API
The newest version of WordPress came with a REST API. It will revolutionize the ways we think about themes. You don’t have to use PHP any more. With HTML, CSS and JavaScript you can get content via Json.
What is REST API?
The very short version is: WordPress will return Json objects from certain endpoints. Here’s a sample:
yourWordPressSite.nu/wp-json/wp/v2/posts
A URL like this will return a Json object with the 10 most recent post. Why don’t you try it in your browser:
https://multimusen.dk/wp-json/wp/v2/posts
But what’s the fuzz all about? Well JavaScript can transmute Json to content on a web page. So now you may program your frontend via JavaScript. This is really good news for Nodejs-developers. But in fact you may develop your web page in any language, that’s able to manipulate Json.
REST API is much more that reading content. You can create, read, update and delete content on the server.
With the REST API WordPress will open the gates to a very interesting future. Perhaps themes as we know them will be obsolete in the near future. Even the Dashboard could be something in the past.
Bang the drums, and hoist the flags! WordPress with REST API is here.
-
Workshop: JavaScript Assignment
Here are some ideas, you might use: