Skip to main content
[Theme] Lattice Started by Spuds · · Read 35801 times 0 Members and 1 Guest are viewing this topic. previous topic - next topic

Re: [Theme] Lattice

Reply #15

How can I change the displayed time on the index page in the 24-hour format?

index.template.php:
Code: [Select]
			<div id="time" class="floatleft"><i class="fa fa-clock-o"></i>
', standardTime(time(), '%d. %B %Y,'), '
<font id="clock">...</font>
<script>
refrClock();

function refrClock()
{
var d = new Date(),
s = d.getSeconds(),
m = d.getMinutes(),
h = d.getHours(),
am_pm;

if (s < 10)
s = "0" + s;

if (m < 10)
m = "0" + m;

if (h > 12) {
h -= 12;
am_pm = "pm";
}
else
am_pm = "am";

if (h < 10)
h = "0" + h;

document.getElementById("clock").innerHTML = h + ":" + m + ":" + s + am_pm;
setTimeout("refrClock()", 1000);
}
</script>
</div>

Re: [Theme] Lattice

Reply #16

This should do it, untested of course  O:-)
Code: [Select]
				<script>
refrClock();

function refrClock()
{
var d = new Date(),
s = d.getSeconds(),
m = d.getMinutes(),
h = d.getHours(),
am_pm;

if (s < 10)
s = "0" + s;

if (m < 10)
m = "0" + m;

if (h > 12)
am_pm = "pm";
else
am_pm = "am";

if (h < 10)
h = "0" + h;

document.getElementById("clock").innerHTML = h + ":" + m + ":" + s + am_pm;
setTimeout(function () {
"use strict";
refrClock();
}, 1000);
}
</script>

That still says am/pm which is useless, so change that  "+ s + am_pm;" to just "+ s;"

Re: [Theme] Lattice

Reply #17

Thank you, Spuds. It works perfect! :)

Re: [Theme] Lattice

Reply #18

Great looking theme, appears to function  perfectly

Re: [Theme] Lattice

Reply #19

Dunno why I haven't seen this yet, I actually like this one.

Re: [Theme] Lattice

Reply #20

I love this theme, but I don't like that the text is greyed-out when editing a post.  Is there any way to make the text while making a post black?

Re: [Theme] Lattice

Reply #21

I'm sure there is ... been a bit since I looked at this one, so let me get it refreshed a bit.

Re: [Theme] Lattice

Reply #22

Updated the zip file in the first post ... that should fix the color issue and update it to a 1.0.6 level of fixes.   

This has some new files due to font awesome changes etc ... So if you have not done any custom edits to the theme, I'd uninstall the theme, delete its directory, and then reinstall it as you need to remove old now unused files.
Last Edit: February 13, 2016, 06:14:26 am by Spuds

Re: [Theme] Lattice

Reply #23

Thanks!

 

Re: [Theme] Lattice

Reply #24

And updated for ElkArte 1.1  O:-)  See the first post for the link etc.