Jump to content

Welcome!


paulmitchell1989

Recommended Posts

Looking back through all my old Frog stuff I found the sheet from Birmingham Conf 16 'Discover FrogCode Worksheets'

I've used getUser(); but would like the font to be a bit bigger and for it to say Welcome in front of it...any ideas?

Thanks in advance

<div id="myDiv2" class="alert alert-info"></div>
 <script>
var user = FrogOS.getUser()
$('#myDiv2').html(user.attr('displayname'));
</script>

 

Link to comment
Share on other sites

Here's an updated version of the code, including styling:

<style>
  .newDiv {
      /* Sets the color of the text, all standard CSS stuff */
      color:#FF0000; 
  }
</style>
  
<script>
var user = FrogOS.getUser(),
    /* This creates a DIV without a fixed ID, so works better in Frog's sites*/
    newDiv = $("<div>", {
                id: Frog.Utilities.generateSimpleId(),
                class:"newDiv"
              });

newDiv.html(
    /* Add anything you want in the ''s */
    'Hello, '+user.attr('displayname')+'!'
);
/* This bit adds the jQuery created DIV (newDiv) to the HTML widget's rendered code */
this.element.append(newDiv);
</script>

Those worksheets came from a bigger tutorial: https://www.frogcommunity.com/helloworld which talks you through a bit of styling and getUser();

  • Like 1
Link to comment
Share on other sites

Guest Jenny Vosper
On 2/3/2017 at 12:49, Graham Quince said:

 

   I meant 'can't', "can't help you today".

And yes, hang on just a little bit longer, @Edd and @Jenny Vosper have both been bending my ear about widgets they want built.   

Ah yes, give me my Phrase of the Day widget with a set of pre-programmable phrases Mr Quince... *shakes fist*

Link to comment
Share on other sites

22 hours ago, Jenny Vosper said:

Ah yes, give me my Phrase of the Day widget with a set of pre-programmable phrases Mr Quince... *shakes fist*

Well, @Jenny Vosper I think i spy a learning opportunity for you.   ;)

Quick question to everyone else, if @Jenny Vosper and I sat down to build this widget, would you find it useful if we screen recorded it?  Just to clarify, I'm not sure how to build Jenny's widget, but if you'd like to listen in on the learning, would it be something you'd watch?

Link to comment
Share on other sites

Yes - ish

You'll be getting emails soon inviting you to the FrogCode open beta (once Dickens is released beyond beta testers).  FrogCode will be installed on your boxes, but "hidden" until you request access.  There's a document to sign and send back.  

The current plan is in the Easter holidays, we're going to have a FrogCode workshop in the office and an open invite to anyone to attend.  During the day, we'll work with you to teach you how to build widgets and ideally have you build a widget of your own design.  By Easter, we hope to have FrogStore up and running to accept widget submissions too, if not, they'll be available to download from the Community.

Unlike the HTML widget which can be turned on for profiles, FrogCode Editor is set up so that individuals activate it.

 

 

  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...