Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 64 additions & 0 deletions css/newsPageStyle.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@

.imageHead {
opacity:0.6;
padding:5px;
transform: scale(0.7);

}
.imageHead:hover{
opacity:1;
box-shadow:10px 10px 10px ;
border:0px;
border-color: black;
transform: scale(1.1);
background-color:#0D1042;
}
.img__wrap {
margin:50px;
display: block;
/* height: 200px;
width: 257px;*/
filter: blur(5px) brightness(20%) ;
opacity:0.7;
float:left;
}

.img__description {
position: absolute;
visibility: hidden;
opacity: 0;
top:50%;
left:0px;
}

.img__wrap:hover .img__description {
visibility: visible;
opacity: 1;
background-color: #000;
color: #fff;
transform: scale(1.3);
font-size: 1.5em;
}
.img__wrap:hover {
filter: blur(0px) grayscale(0%) drop-shadow(8px 8px 10px gray) brightness(70%);
opacity:0.7;
}
.moreTopic{
clear:both;
}
.newsTable{
float: left;
margin:50px;
display: block;
text-align: center;
}
table{
border: 3px solid #0D1042;
width:200%;
}
tr{
border: 3px solid #0D1042;
}
td{
border: 3px solid #0D1042;
}
120 changes: 120 additions & 0 deletions js/newPagescript.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
/* counter js */

(function($) {
$.fn.countTo = function(options) {
options = options || {};

return $(this).each(function() {
// set options for current element
var settings = $.extend(
{},
$.fn.countTo.defaults,
{
from: $(this).data("from"),
to: $(this).data("to"),
speed: $(this).data("speed"),
refreshInterval: $(this).data("refresh-interval"),
decimals: $(this).data("decimals"),
},
options
);

// how many times to update the value, and how much to increment the value on each update
var loops = Math.ceil(settings.speed / settings.refreshInterval),
increment = (settings.to - settings.from) / loops;

// references & variables that will change with each update
var self = this,
$self = $(this),
loopCount = 0,
value = settings.from,
data = $self.data("countTo") || {};

$self.data("countTo", data);

// if an existing interval can be found, clear it first
if (data.interval) {
clearInterval(data.interval);
}
data.interval = setInterval(updateTimer, settings.refreshInterval);

// initialize the element with the starting value
render(value);

function updateTimer() {
value += increment;
loopCount++;

render(value);

if (typeof settings.onUpdate == "function") {
settings.onUpdate.call(self, value);
}

if (loopCount >= loops) {
// remove the interval
$self.removeData("countTo");
clearInterval(data.interval);
value = settings.to;

if (typeof settings.onComplete == "function") {
settings.onComplete.call(self, value);
}
}
}

function render(value) {
var formattedValue = settings.formatter.call(
self,
value,
settings
);
$self.html(formattedValue);
}
});
};

$.fn.countTo.defaults = {
from: 0, // the number the element should start at
to: 0, // the number the element should end at
speed: 1000, // how long it should take to count between the target numbers
refreshInterval: 100, // how often the element should be updated
decimals: 0, // the number of decimal places to show
formatter: formatter, // handler for formatting the value before rendering
onUpdate: null, // callback method for every time the element is updated
onComplete: null, // callback method for when the element finishes updating
};

function formatter(value, settings) {
return value.toFixed(settings.decimals);
}
})(jQuery);

jQuery(function($) {
// custom formatting example
$(".count-number").data("countToOptions", {
formatter: function(value, options) {
return value
.toFixed(options.decimals)
.replace(/\B(?=(?:\d{3})+(?!\d))/g, ",");
},
});

// start all the timers
$(".timer").each(count);

function count(options) {
var $this = $(this);
options = $.extend(
{},
options || {},
$this.data("countToOptions") || {}
);
$this.countTo(options);
}
});
function bgChange(id,bg,fontcolor,size) {
document.getElementById(id).style.background = bg;
document.getElementById(id).style.color=fontcolor;
document.getElementById(id).style.fontSize=size;
}
Loading