When I posted the snippet to allow you to restyle of My Notes, I hadn't thought that it wasn't as straight forward to change the title of Phrase of the Day. This bit of CSS is the easiest way I've found of changing all Phrases of the Day, although if you combine it with the the technique(?) mentioned in the restyling My Notes, you can restyle individual widgets in the same way.
<style>
.widget_phrase-wrap .header {
height:50px;
overflow:hidden;
}
.widget_phrase-wrap .header h2::before {
content: 'My own title \a';
white-space: pre;
}
</style>
Hi, I am trying to create a widget that is able to pull the Total Positive Behaviour Points into a variable, the end result is we will use an if statement to display a specific image depending on a number of points the student has.
I have started by testing with the HTML widget. using the below code to see if I can use the behaviour.getBehaviourTotals API to get the total points this year for the user, however, it is not working.
<script>
var $ap,user;
//Create a div, and give it a unique ID
$ap = $("div", {
id: Frog.Utilities.generateSimpleID()
}
);
$ap.html(
'<b>Your House Points:</b>'+
'<table clase="table" id="your_points">'+
'<tr>'+
"<th>This Year</th>"+
'</tr>'+
'</table>'
);
// Use Frog's API to get the logged in student
user = FrogOS.getUser();
// Use Frog's API to get Behaviour points
Frog.Model
.api('behaviour.getBehaviourTotals',{
Student_uuid: user.uuid,
}).done(function(behaviourResponse){
behaviourResponse.data.pos.year(function(work){
$ap.find('tbody')
.append(
'<tr>'+
'<td>'+
data.pos.year+
'</td>'+
'</tr>'
);
});
});
arguments[0].append($ap);
</script>
any advice appreciated.
Phil
The brilliant @Simon Law has built a new widget which adds a site's menu to a page, to save us all from having to do this manually using text widgets.
You can download this from the showcase page:
https://www.frogeducation.com/community/tutorials/frogcode/frogcode-showcase
Hi
Is there any way I can get a nested page to be centred on a page?
I have created a number of pages with three equal columns - each one has an text widget containing an icon image linked to various places. Each of these 3 column pages are then nested onto one page.
It looks fine on a PC as all three columns show across the page but on a phone it justifies to the left.upsetting the design.