Skip to content

Commit

Permalink
Adding latest content
Browse files Browse the repository at this point in the history
  • Loading branch information
tnylea committed Oct 5, 2023
1 parent 6ccbb55 commit cbc87cb
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 11 deletions.
9 changes: 9 additions & 0 deletions collections/templates.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,15 @@
"url" : "https://boxed.devdojo.io",
"repo" : "https://github.com/static-templates/boxed"
},
{
"name" : "C64",
"cover" : "https://raw.githubusercontent.com/static-templates/c64/main/assets/images/cover.jpg",
"favicon": "https://raw.githubusercontent.com/static-templates/c64/main/assets/images/favicon.png",
"description": "A retro-style blog template for your next blog or personal website.",
"slug" : "c64",
"url" : "https://c64.devdojo.io",
"repo" : "https://github.com/static-templates/c64"
},
{
"name" : "Static Starter",
"cover" : "https://raw.githubusercontent.com/static-templates/starter/main/assets/images/cover.jpg",
Expand Down
4 changes: 2 additions & 2 deletions includes/template-previews.html
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,11 @@
</div>

<div class="relative flex items-center h-full divide-x divide-neutral-200">
<button @click="window.open(repo(), '_blank');" class="px-3 py-1 text-[0.65rem] font-medium space-x-1.5 h-full hidden md:flex items-center hover:bg-white text-neutral-600 hover:text-neutral-900">
<button @click="window.open(repo, '_blank');" class="px-3 py-1 text-[0.65rem] font-medium space-x-1.5 h-full hidden md:flex items-center hover:bg-white text-neutral-600 hover:text-neutral-900">
<svg class="w-4 h-4 duration-300 ease-out -translate-y-px fill-current" viewBox="0 0 16 16" aria-hidden="true"><path fill="currentColor" d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.012 8.012 0 0 0 16 8c0-4.42-3.58-8-8-8z"></path></svg>
<span>View on Github</span>
</button>
<button @click="window.open(url(), '_blank');" class="px-3 py-1 text-[0.65rem] font-medium space-x-1 h-full flex items-center hover:bg-white text-neutral-600 hover:text-neutral-900">
<button @click="window.open(url, '_blank');" class="px-3 py-1 text-[0.65rem] font-medium space-x-1 h-full flex items-center hover:bg-white text-neutral-600 hover:text-neutral-900">
<span>Open in New Tab</span>
<svg class="w-3.5 h-3.5 duration-100 ease-out fill-current" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><g fill="none" stroke="none"><path d="M10.25 4.75h-2.5a4 4 0 0 0-4 4v7.5a4 4 0 0 0 4 4h7.5a4 4 0 0 0 4-4V14" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path><path d="M20.25 3.75v5.5m0-5.5h-5.5m5.5 0l-10.5 10.5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path></g></svg>
</button>
Expand Down
12 changes: 6 additions & 6 deletions layouts/main.html
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@
return '';
},
setActiveTemplate: function(template_slug){
setActiveTemplate(template_slug){
for(let i =0; i<window.windowTemplates.length; i++){
if(window.windowTemplates[i].slug == template_slug){
this.activeTemplate = window.windowTemplates[i];
Expand All @@ -210,31 +210,31 @@
};
}
},
favicon: function(){
favicon(){
if(this.activeTemplate != null){
return this.activeTemplate.favicon;
}
return '';
},
name: function(){
name(){
if(this.activeTemplate != null){
return this.activeTemplate.name;
}
return '';
},
slug: function(){
slug(){
if(this.activeTemplate != null){
return this.activeTemplate.slug;
}
return '';
},
url: function(){
get url(){
if(this.activeTemplate != null){
return this.activeTemplate.url;
}
return '';
},
repo: function(){
get repo(){
if(this.activeTemplate != null){
return this.activeTemplate.repo;
}
Expand Down
3 changes: 0 additions & 3 deletions pages/templates.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,6 @@ <h2 class="font-book font-styling w-full font-display mb-2 leading-none text-lef
class="flex w-full overflow-hidden transition-all duration-75 ease-out border rounded-md cursor-pointer border-neutral-700 sm:rounded-xl sm:shadow-lg group opacity-95 hover:opacity-100">
<div class="flex flex-col">
<div class="relative overflow-hidden">
<div class="h-6 w-6 z-20 flex-shrink-0 absolute top-0 left-0 ml-2.5 mt-2.5 group-hover:-rotate-12 ease-out duration-300">
<img class="w-full h-full text-white fill-current" src="{template.favicon}" />
</div>
<img src="{template.cover}" class="w-full relative z-10 group-hover:scale-[1.02] transition-all ease-out duration-300 overflow-hidden h-auto">

</div>
Expand Down

0 comments on commit cbc87cb

Please sign in to comment.