Jump to content
You must now use your email address to sign in [click for more info] ×

Calendar day as Affinity template/assets & a daily showup SVG file


v_kyr

Recommended Posts

Here are some daily calendar vector Affinity template & assets files for (re)use ...

cal_day_template.png.5e09b869966eb97642c1ffd283ca0989.png

cal_day_assets.png.1309791b8e4fed6c3405ec9f824291ea.png

... which are customizable (day/weekday/month & colors), to individual needs.

 

But the overall fun part here is instead the dynamic day changing SVG file, which when opened via some webbrowser, will always show the today's day data, due to inside in the SVG code embedded and executed JavaScript "init()" day handling function code ...

calendar_daily_web.png.ce0c29639198f02426b2c513ee9654a7.png

 

SVG with included & executed JS init() get day date function code:

<svg onload="init()" xmlns="http://www.w3.org/2000/svg"
aria-label="Calendar" role="img"
viewBox="0 0 512 512">
<script type="text/ecmascript"><![CDATA[
function init() {
  var time = new Date();
  var locale = "en-gb";

  var DD   = time.getDate();
  var DDD  = time.toLocaleString(locale, {weekday: "long" });
  var MMM  = time.toLocaleString(locale, {month:   "short"}).toUpperCase();

  document.getElementById("day").textContent= DD;
  document.getElementById("weekday").textContent= DDD;
  document.getElementById("month").textContent= MMM;
}
]]></script>

<path d="M512 455c0 32-25 57-57 57H57c-32 0-57-25-57-57V128c0-31 25-57 57-57h398c32 0 57 26 57 57z" fill="#e0e7ec"/>
<path d="M484 0h-47c2 4 4 9 4 14a28 28 0 1 1-53-14H124c3 4 4 9 4 14A28 28 0 1 1 75 0H28C13 0 0 13 0 28v157h512V28c0-15-13-28-28-28z" fill="#dd2f45"/>

<g fill="#f3aab9">
  <circle cx="470" cy="142" r="14"/>
  <circle cx="470" cy="100" r="14"/>
  <circle cx="427" cy="142" r="14"/>
  <circle cx="427" cy="100" r="14"/>
  <circle cx="384" cy="142" r="14"/>
  <circle cx="384" cy="100" r="14"/>
</g>

<text id="month"
  x="32" 
  y="164" 
  fill="#fff" 
  font-family="monospace"
  font-size="140px"
  style="text-anchor: left">DEC</text>

<text id="day"
  x="256" 
  y="400" 
  fill="#66757f" 
  font-family="monospace"
  font-size="256px"
  style="text-anchor: middle">11</text>

<text id="weekday"
  x="256" 
  y="480" 
  fill="#66757f" 
  font-family="monospace"
  font-size="64px"
  style="text-anchor: middle">Monday</text>
</svg>

 

The corresponding standalone SVG file to manually customize in some text editor and (re)use in webbrowsers ( for web sites, blogs, forums ... etc. )

 

And as always have fun!

☛ Affinity Designer 1.10.8 ◆ Affinity Photo 1.10.8 ◆ Affinity Publisher 1.10.8 ◆ OSX El Capitan
☛ Affinity V2.3 apps ◆ MacOS Sonoma 14.2 ◆ iPad OS 17.2

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.