On my newly created webpage, I have a column of links that all work except for the top two. I have double checked the code and all of it seems to be uniform. I am not too sure why it is not allowing me to click on the two links at the top, but the rest seem to be working perfectly. If anyone could take a crack at what the problem may be I would really appreciate it! I have pasted the section of the code that I thought might contain the problem! Thanks!
<!DOCTYPEhtml>
<html>
<head>
<title> Rockwell Utilities </title>
<link href="rockwell.css" rel="stylesheet" type="text/css"/>
</head>
<div class="pos_top"><div id="bubbles"><img src="/rockwell/sepiawater.jpg" alt="Water Drop" height="250" width="1000"/></div></div>
<div id="header"><div id="logo"><img src="/rockwell/Rockwellnewnewedit.png" alt="Rockwell Utilities" height="400" width="500" /></div></div>
</body>
<div id="wrapper">
<h1> Rockwell Utilities Welcomes You! </h1>
<div id="intro">
<p>Rockwell Utilities is your number one choice in water and sewage.<br> We provide service to the Lakemoor, Illinois area,
<br>and have since 2007.
</p>
<img src="/rockwell/award.png" alt="Illinois Department of Health" height="200" width="500"/>
<a href="http://www.idph.state.il.us/public/press12/2011_Fluoridation_award_list.pdf"> <p>Rockwell
Utilities wins Illinois Department of Health Community Water Fluoridation Award four consecutive years!</p>
</a>
</div>
<div id="navigation_sidebar">
<div id="navigation_links">
<p>
<img src="/rockwell/emailus.png" alt="Email Us"/>
<img src="/rockwell/paymybill.png"alt="Pay My Bill"/>
<img src="/rockwell/calendar.png"alt="Calendar"/>
<img src="/rockwell/notices.png"alt="Notices"/>
<img src="/rockwell/paymentop.png"alt="Payment Options"/>
<img src="/rockwell/ourrates.png"alt="Our Rates"/>
</p>
Your logo (Rockwellnewnewedit.png) is overlapping the two links.
Have you double checked that email.html and payments.html are in the directory as calendar.html, notices.html, paymenttop.html, and rates.html? If the bottom 4 work and the top 2 give you a 404, that is most likely problem.
I don't know if this causes the problems you describe, but what catches my eye is the fact that there is no space between the src-attribute value ant the alt attribute, as in:
<img src="/rockwell/paymybill.png"alt="Pay My Bill"/>
http://i46.tinypic.com/dpvgo7.png
Your picture is overlapping the two links in this image my suggestion is to shrink the image and use the develop tools to see what is wrong because with that you can see what the picture is doing.
Related
SOLVED
I Simply did not have the closing a tag at the end. Sheesh....
I need help. I'm still a student so still learning. Any help would be appreciated. I'm lost.
I'm using bootstrap5, adding a carousel ("With captions" https://getbootstrap.com/docs/5.1/components/carousel/ for the full code.) to a page and a link in that slide on the h5.
After adding the link, the text went from white to blue and gives me this
"Cannot GET /WilliamVest/%E2%80%9CKeyWestPhotoGallery.html"
I've checked this address NUMEROUS times. Even said it out loud to myself. The link IS in the same folder as the rest of the project.
So why won't it work?
I tried to google and found "data-bs-target" does that have anything to do with it? Like I said, still new so still learning.
****Someone pointed out I missed the quotes in the link. Did not fix it.
I added that quote. It was discolored so I don't know where that came from but I think it's because you were right about the quotation style.
I commented that whole line out and started over. I just wanted to see the difference.
So now, the blue is gone in the lettering but now it won't even open another page to show an error. It does nothing.
First slide label
Key West Photo Gallery -->
This is my code snippet ---- KeyWestPhotoGallery.html is the link I'm trying to get to.
<!-- Carousel of Projects -->
<div id="carouselExampleCaptions" class="carousel slide" data-bs-ride="carousel">
<div class="carousel-indicators">
<button type="button" data-bs-target="#carouselExampleCaptions" data-bs-slide-to="0" class="active" aria-current="true" aria-label="Slide 1"></button>
<button type="button" data-bs-target="#carouselExampleCaptions" data-bs-slide-to="1" aria-label="Slide 2"></button>
<button type="button" data-bs-target="#carouselExampleCaptions" data-bs-slide-to="2" aria-label="Slide 3"></button>
</div>
<div class="carousel-inner">
<div class="carousel-item active">
<img src="Images/palmLighthouse1.jpg" class="d-block w-100" alt="Key West Lighthouse">
<div class="carousel-caption d-none d-md-block">
<h5 class="display-2"><a href=“KeyWestPhotoGallery.html>Key West Photo Gallery</a></h5>
<!-- <p>Some representative placeholder content for the first slide.</p> -->
</div>
You have:
<a href=“KeyWestPhotoGallery.html>
That is not a quote " as used in HTML, that is a Unicode Left Double Quotation Mark a.k.a. opening typographer's quote (a display character with no special meaning). So it thinks that is part of the URL that is why it is urlencoded into that address as %E2%80%9C
let path = "/WilliamVest/%E2%80%9CKeyWestPhotoGallery.html"
console.log(decodeURI(path))
Solutions include the following:
Remove it: <a href=KeyWestPhotoGallery.html> (Unquoted attribute-value syntax)
Or, replace it adding the missing closing quote: <a href="KeyWestPhotoGallery.html"> (Double-quoted attribute-value syntax)
Or, use single quotes: <a href='KeyWestPhotoGallery.html'> (Single-quoted attribute-value syntax)
I am having monumental difficulty using ModX. It's great if you just upload everything once and forget out about it, but making changes to a CSS file that isn't a resource seems to be an absolute nightmare. If the CSS is loaded from a file and cached inside ModX, getting rid of that seems impossible. There is no documentation on this and I have seen a few threads about managing CSS via docs, which I want to try but I can't get a clean slate to start again.
EDIT: links to threads
CSS as ModX Resource
CSS through snippets
I have tried clearing the cache, deleting the cache folder, deleting the css files and then deleting and clearing the cache (which I then tested to see if the css had in fact been dropped but nope, still loads even though it's non-existent from where I can see)
My question is this: what is going on here? How come I can't clear the cache properly? Is this a bug? Am I missing something fundamental to ModX? How do I start again without re-installing ModX? Should I put CSS in a document or a snippet?
No, I don't want to use Sass or cssSweet. Just raw boring normal CSS, please. I'm not building the next Facebook, just want to use this for easy back-end deployment and content management for clients.
My header is a chunk named 'header', as follows. (NOTE: the CSS is found, no issues with initial loading. I have since completely deleted the CSS file, cleared the cache and deleted the cache folder, CSS still loads somehow)
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="HandheldFriendly" content="true">
<meta name="MobileOptimized" content="width">
<title></title>
<link rel="stylesheet" href="bootstrap/css/bootstrap.css">
<link title="timeline-styles" rel="stylesheet" href="assets/timeline/css/timeline.css">
<link rel="stylesheet" href="assets/lightbox/dist/css/lightbox.css">
<link rel="stylesheet" href="assets/fonts/Southampton.ttf">
<link rel="stylesheet" href="assets/css/style.css">
</head>
<body id="section-body">
My main page is a template, as follows:
[[$header]]
[[$navbar]]
<div class="container">
<div class="row">
<div class="col-lg-12 col-md-12 col-sm-12">
<section id="section-banner" class="parallax">
<img id="welcome-banner-words" src="images/web_ready/welcome_banner_words.png" class="w-100" alt="">
</section>
</div>
</div>
<div class="row">
<div class="col-lg-12 col-md-12 col-sm-12">
<section id="section-timeline" class="w-100 h-100">
[[$timeline]]
</section>
</div>
</div>
<div class="row">
<div class="col-lg-12 col-md-12 col-sm-12">
<div id="section-gallery-start" class="divider"></div>
<section id="section-gallery" class="w-100">
<header id="header-gallery">Party Photos!!!</header>
<hr class="horizontal-row-style">
<p class="para-gallery">
Please return to this section after the party to see the photos</p>
<!--[[$gallery]]-->
</section>
</div>
</div>
<div class="row">
<div class="col-lg-12 col-md-12 col-sm-12">
<div id="section-special-start" class="divider"></div>
<section id="section-special" class="w-100">
<section id="section-special-intro-blurb" class="w-100 h-100">
<header id="header-special-intro-blurb">Special Thanks</header>
<hr class="horizontal-row-style">
<p class="para-special-intro-blurb">
</p>
<hr class="horizontal-row-style">
<p class="para-special-intro-blurb">
</p>
<p class="para-special-intro-blurb">Marnie Nana and Grandma Broome</p>
<p class="para-special-intro-blurb"></p>
</section>
[[$special_thanks]]
</section>
</div>
</div>
</div>
[[$footer]]
Mate hope is not late, a simple solution is use MinifyX to process and compress your css, every time you clear the cache it creates a new compressed file with a new name, that means there is no way to save your css path in memory.
Cheers.
When dealing with a browser's cache you can't be certain your viewers are getting the most recent copy of the files that make up the page they're looking at. So by appending a GET value to, for example, a cascading stylesheet, you can make the browser think the stylesheet is dynamic, thus reloading the file every time the modification date changes.
Below is a solution I came up with to combat this little annoyance.
lastModified MODx Extra
It's a snippet I created which you may download via the package manager. Basically, it adds a UNIX timestamp to the end of the path to your file you do not want cached.
I commented out the link to the stylesheet and then saved my header chunk, cleared the cache and then saved the chunk again. This seems to have worked.
However, this is very hacky.
To my other related issue:
Having experimented with a few things, I have found the easiest way to implement CSS is to put it in a chunk called 'css_stylesheet', ensuring that the "Clear Cache on Save" checkbox is checked (which it is by default) so we can play with with code in a live setting if there are bugs, and then reference the chunk in style tags on the header chunk like so:
<style>
[[$css_stylesheet]]
</style>
I guess this is ok, in general it's considered best practice to avoid nesting chunks too much, but it is only one level deep and we do use the same syntax when swapping out php includes so this is fine. It's fine.
Although it would be nice if this consideration were made more obvious in the docs. There should be some notes on translating a site from a php base to ModX, which should highlight the types of documents that should be included as static resources (i.e. bootstrap, jquery etc) and which should be as chunks (custom css, custom js etc)
One other way to break cache would be to add a variable after the css url.
<link rel="stylesheet" href="assets/css/style.css?v1">
You'd have to change the value each time you saved the file, its not sustainable, but it should break css cache so you can see your work.
Really though, you shouldn't need to do anything other than clear your browser cache. I know that some browsers REALLY like to hold onto cache though.
I'm seeking to avoid using this for the splash screen, because it does not work on all devices and for other reasons:
<link rel="apple-touch-startup-image" href="img/splash.png" />
So I'm trying to use this instead and it works fine until it slides into a new page, which is then treated like the splash screen again (e.g. it goes blank when the timer expires - in this case 4 seconds). How can I stop/restrict this behavior, so that changePage remains contained in splash page only?
<body>
<div data-role="page" id="splash">
<div class="splash">
<img src="startup.jpg" alt="startup image" />
<script type='text/javascript'>//<![CDATA[
$(window).load(function(){
$(function() {
setTimeout(hideSplash, 4000);
});
function hideSplash() {
$.mobile.changePage("#home", "fade");
}
});//]]>
</script>
</div>
</div>
<div data-role="page" id="home">
<div data-role="header" data-backbtn="false">
<h1></h1>
</div>
<div data-role="content">
</div>
</div>
</body>
Good idea here is what I'm thinking. Use single pages instead of multi page(multiple data-role=page). For index.html or index.php or whatever. Put your splash page. The reason for this I will explain later on.
index.html
<head>
<!-- First include all jquery stuff -->
<script src="app.js"></script><!-- external script because we can just include it in every page -->
</head>
<body>
<div data-role="page" id="splash">
<div class="splash">
<img src="startup.jpg" alt="startup image" />
</div>
</div>
</body>
app.js
$(document).on('pageinit','#splash',function(){ // the .on() method does require jQuery 1.7 + but this will allow you to have the contained code only run when the #splash page is initialized.
setTimeout(function(){
$.mobile.changePage("home.html", "fade");
}, 4000);
});
Ok so I did it this way because lets say you have navigation menu and you want to send people back to home page. You won't have to show the splash page again. You can just link to home.html. Also splitting up your pages helps keep the dom leaner. I hope this helps.
<link rel="apple-touch-startup-image" href="img/splash.png" />
Is indeed only for apple mobile devices.
A real splashscreen should only be there to show you a nice picture while you're waiting. Its goal is not to make you wait for real reason. In your case it's taking 4seconds out of the life of your users just to make it look cool.
I have modified your code and put it in this jsfiddle : you'll see it works now. For the splashscreen to take the full width/height edit the css to remove the margins. I've set the timer to 2s, that's more than enough I think.
I'm trying to integrate Yoxview to my Rails 3 application that uses Paperclip to upload pictures.
The main problem is that the pictures (both original and thumbs) are not in the public area, i.e. they are accessible via Controller as described here.
The relevant HTML looks like:
<div id="my_wrapper">
<img src="/assets/1/thumb" />
<img src="/assets/2/thumb" />
</div>
When a thumbnail is clicked, I expect the Yoxview player to be opened, but what happens is that the original picture is opened in a browser.
When the pictures are in the public area like this:
<div id="my_wrapper">
<img src="/images/thumbs/1.jpg" />
<img src="/images/thumbs/2.jpg" />
</div>
everything works perfectly!
Any ideas ?
UPDATE
I tried also:
<div id="my_wrapper">
<img src="/images/thumbs/1.jpg" />
<img src="/images/thumbs/2.jpg" />
<img src="/assets/1/thumb" />
<img src="/assets/2/thumb" />
</div>
Here, if I click on thumbs/1.jpg or thumbs/2.jpg the player is opened properly, but shows only these two (original) pictures. If I click on one of the other two thumbs, their original picture is opened in a browser.
I found the answer. It's so simple. Just had to use the allowedUrls option of Yoxview:
allowedUrls: /^\/assets\/\d+\/(thumb|original)$/i
<!DOCTYPE html
PUBLIC "-//W3C//DTD HTML 4.01 Strict//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>A history of Canoe Cove /</title>
</head>
<body>
<div class="tei">
<p>
A History of
</p>
<p>
The
General
Stores
</p>
<p>
There were several general stores in our <a class="search orgName" target="_blank" href="http://islandlives.net/fedora/ilives_book_search/tei.orgNameTERM:%22Cove%22+AND+dc.type:collection">Cove</a> at
different times. The one that lasted longest was at
the Corner across from the school and it had many
owners. Who established it is unclear but John
MacKenzie, the piper, who was also a shoe maker
lived there. He was a relative of the present day
MacKenzies of <a class="search placeName" target="_blank" href="http://islandlives.net/fedora/ilives_book_search/tei.placeNameTERM:%22Canoe Cove%22+AND+dc.type:collection">Canoe Cove</a>.
William
MacKay
who
married
Christena
MacLean
was operating it when it
burned down and a store which had belonged to Neil
"Cooper" MacLean was moved across to the site. This
was later bought by <span class="persName"><a class="search persName" target="_blank" href="http://islandlives.net/fedora/ilives_book_search/tei.persNameTERM:%22MacCannell+Neil%22+AND+dc.type:collection">
Neil
MacCannell
</a></span> of
Long Creek
, a
schoolteacher who taught in the <a class="search orgName" target="_blank" href="http://islandlives.net/fedora/ilives_book_search/tei.orgNameTERM:%22Cove%22+AND+dc.type:collection">Cove</a> for a few years.
<span class="persName"><a class="search persName" target="_blank" href="http://islandlives.net/fedora/ilives_book_search/tei.persNameTERM:%22MacNevin+Hector%22+AND+dc.type:collection">
Hector
MacNevin
</a></span> from <a class="search placeName" target="_blank" href="http://islandlives.net/fedora/ilives_book_search/tei.placeNameTERM:%22St. Catherines%22+AND+dc.type:collection">St. Catherines</a> operated it for a
year while it still belonged to <span class="persName"><a class="search persName" target="_blank" href="http://islandlives.net/fedora/ilives_book_search/tei.persNameTERM:%22MacCannell+Neil%22+AND+dc.type:collection">
Neil
MacCannell
</a></span> because
Neil had accepted a job in <a class="search placeName" target="_blank" href="http://islandlives.net/fedora/ilives_book_search/tei.placeNameTERM:%22Charlottetown%22+AND+dc.type:collection">Charlottetown</a> as clerk of
the Court. Later
Mrs.
John
Angus
Darrach bought it
and she and her son George ran it for years until both
had health problems, and had to close the store after
which closing it never reopened. After George died
and his wife Hazel moved to Montague to live with her
family the building was sold to
Robert
Patterson
. Rob
lived in it for a few years, making many improvements
then sold it to Kirk McAleer.
</p>
</div>
Use the BlackBerry Browser.