Anonymous
Not logged in
Talk
Contributions
Create account
Log in
Publication Station
Search
Editing
Updatable Website
(section)
From Publication Station
Namespaces
Page
Discussion
More
More
Page actions
Read
Edit
History
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== book-website == The ''book-website'' try address this issue, with a quick'n'dirty JS+HTML system for '''loading html content from content.html into index.html''', without a webserver. NOTE: '''it will only work in Firefox'''; Chrome will refuse to so, due to same origin policies The motivation to do so, is to allow content (in content.html) to be easily updatable, and decoupled from the rest of the webpage files. Folder structure: <pre>book-website/ βββ content.html ----> CONTENT βββ index.html ----> LANDING PAGE βββ jquery-3.1.1.min.js βββ load.js ----> JS where content is loaded, sections and TOC are created βββ README.md βββ style.css ----> CSS style info </pre> * <code>content.html</code> will store updatable content * <code>style.css</code> stores the CSS Making changes to CSS can be done in * <code>index.html</code> receives the content from content.html allows HTML (such as menus) to be added * <code>load.js</code> besides loading content, also includes a function which generates a Table-of-contents <code>generate_toc</code>, using the h1 elements to create entries: <pre> <ul> <li><a href="#id_of_firsth1">First h1</a></li> <li><a href="#id_ofsecond_h1">Second h2</a></li> <ul></pre>
Summary:
Please note that all contributions to Publication Station are considered to be released under the Creative Commons Attribution-NonCommercial-ShareAlike (see
Publication Station:Copyrights
for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource.
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Navigation
Main navigation
Main page
Printmaking Studio
Print Studio
Dig. Publishing Studio
Namespaces
Grafiwiki
Random Page
Log in
Wiki tools
Wiki tools
Page tools
Page tools
User page tools
More
What links here
Related changes
Page information
Page logs