Giter VIP home page Giter VIP logo

harambasic.de's Introduction

Logo - Luka Harambasic

Hi, I'm Luka!

I'm a German based in Copenhagen (Denmark). Currently, I am studying MSc Technology Entrepreneurship @ DTU. Previously, I worked as Mobile UX Technology Consultant @ SAP (CV / LinkedIn). Also feel free to take a look at some of my previous projects. If you want to chat, just start a conversation about handball, woodworking, or cooking.

Website | Twitter | LinkedIn | Email

harambasic.de's People

Contributors

dependabot[bot] avatar henrystoll avatar lukaharambasic avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

harambasicluka

harambasic.de's Issues

Click on Logo

Add an easter egg for clicking on the footer logo

Meta data bugs

Spaces between the tags are missing:

image

Double name for preview:
image

Fix filtering by tag

Seems to work for sorting, but not for tags.

Might be related that stuff got moved into on mount to be able to do static rendering, but it seems like reactivity got lost.

Can I maybe register a listener to URL changes in the onmount?

Titles aren't displayed

Only on posts and lists the title is displayed as they are set manually. All other pages just show Luka Harambasic instead of Page title - Luka Harambasic.

The problem:

  head() {
    return {
      -> title: this.meta.title, <- this.meta doesn't has a title attribute
      meta: [...this.meta],
    }
  },

Sort projects

Sort projects by different criteria:

  • date
  • priority
  • active/inactive

Display project status

Add an attribute to display the project status, e.g.: in progress, completed, failed, concept

fix any

fix any

  let latestParent: TocNode | null
  const markdownHeadingCopy = JSON.parse(JSON.stringify(markdownHeading))
  if (markdownHeadingCopy.length <= 1) return markdownHeadingCopy
  // TODO fix any
  const entryDepth: number[] = markdownHeading.reduce((acc: number, item: any) => {
    return item.depth < acc ? item.depth : acc
  }, Number.POSITIVE_INFINITY)
  // TODO fix any
  return markdownHeadingCopy.reduce((result: any, entry: any) => {
    if (latestEntry && !latestEntry.children) {
      latestEntry.children = []
    }

04768ef4a7183eec07109eaac495f3afe6020024

other meta data

other meta data

https://github.com/LukaHarambasic/harambasic.de/blob/dfd713009a0fb8ef7200f25adc05348a317cc6d3/src/routes/posts/[slug]/+page.server.ts#L6

import type { PageServerLoad } from './$types'

export const prerender = true

export const load = (async ({ parent, params }) => {
  //TODO other meta data
  // TODO
  // console.log('args', args);
  const { posts } = await parent()
  const [entries] = posts
  const entry = entries.find((post) => post.slug === params.slug)
  return {
    title: entry?.title,
    published: entry?.published,
    relativeLink: entry?.relativePath,
    entry
  }
}) satisfies PageServerLoad

783fda5ca01b651f4f2595728f2f4689d7192088

check if I wanna use it:

check if I wanna use it:

// TODO check if I wanna use it:

import adapter from '@sveltejs/adapter-static'
import { vitePreprocess } from '@sveltejs/kit/vite'

/** @type {import('@sveltejs/kit').Config} */
const config = {
  // Consult https://kit.svelte.dev/docs/integrations#preprocessors
  // for more information about preprocessors
  // TODO check if I wanna use it:
  preprocess: [vitePreprocess({ postcss: true })],

  kit: {
    adapter: adapter(),
    prerender: {
      handleHttpError: ({ path, status, message }) => {
        console.log(status, path, message)
        if (status === 404) {
          return
        }

        // otherwise fail the build
        throw new Error(message)
      }
    }
  }
}

9e24b495c5d513cf61ed03f426c81880f300fbfa

go over dates, maybe adjsut table and also generate dates in same format as othe...

go over dates, maybe adjsut table and also generate dates in same format as others

// TODO go over dates, maybe adjsut table and also generate dates in same format as others

import { join } from 'path'
import * as fs from 'fs/promises'
import { createClient } from '@supabase/supabase-js'

const supabase = createClient(
  'https://xqlghnitokncvzvxoiyq.supabase.co',
  'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6InhxbGdobml0b2tuY3Z6dnhvaXlxIiwicm9sZSI6InNlcnZpY2Vfcm9sZSIsImlhdCI6MTY4MzQyMzYwNSwiZXhwIjoxOTk4OTk5NjA1fQ.QzoaOpgNPQF32zJl5c-Olx6ZEhw03M5mkbAA_zkBrT8'
)

const { data: shareables, error } = await supabase.from('record').select('*').eq('releasable', true)

const saveTo = join('..', '..', 'src', 'content', 'shareable')
shareables.forEach(shareable => {
  // TODO check if file already exists and if so skip
  // TODO go over dates, maybe adjsut table and also generate dates in same format as others
  const { title, description, comment, category, url, updated, created_at } = shareable
  const content =
  `---
title: "${title}"
description: "${description}"
tags: 
- ${category}
url: ${url}
comment: "${comment}"
updated: ${created_at}
published: ${created_at}
---
`
  fs.writeFile(join(saveTo, `${getSlug(title)}.md`), content, 'utf8')
})


function getSlug(str) {
  if (!str) return ''
  const slug = str
      .trim()
      .toLowerCase()
      // remove all chars which aren't characters, numbers or spaces
      .replace(/[^a-zA-Z0-9\s]+/g, '')
      // replace all spaces with dashes
      .replace(/\s+/g, '-')
  return slug
}

12e1151f8ae9d3657855f2dc604c78740aa599ae

Add typo help to posts

As I'm not the best writer I need every help I can get. So let people directly open a PR which fixes. This is quite easy by using the following URL:

https://github.com/LukaHarambasic/harambasic.de/edit/main/content/posts/my-perfect-homeoffice-conference-call-and-podcasting-setup.md

dynamic

https://github.com/LukaHarambasic/harambasic.de/edit/main/content/posts/<<SLUG>>.md

fix any

fix any

  let latestParent: TocNode | null
  const markdownHeadingCopy = JSON.parse(JSON.stringify(markdownHeading))
  if (markdownHeadingCopy.length <= 1) return markdownHeadingCopy
  // TODO fix any
  const entryDepth: number[] = markdownHeading.reduce((acc: number, item: any) => {
    return item.depth < acc ? item.depth : acc
  }, Number.POSITIVE_INFINITY)
  // TODO fix any
  return markdownHeadingCopy.reduce((result: any, entry: any) => {
    if (latestEntry && !latestEntry.children) {
      latestEntry.children = []
    }

04768ef4a7183eec07109eaac495f3afe6020024

Align headline hierarchy

  • The website title is just a link -> every page must have a h1
  • h2 are used on the blog overview but that shouldn't be h2s
  • all other page structures should be checked

check if file already exists and if so skip

check if file already exists and if so skip

// TODO check if file already exists and if so skip

import { join } from 'path'
import * as fs from 'fs/promises'
import { createClient } from '@supabase/supabase-js'

const supabase = createClient(
  'https://xqlghnitokncvzvxoiyq.supabase.co',
  'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6InhxbGdobml0b2tuY3Z6dnhvaXlxIiwicm9sZSI6InNlcnZpY2Vfcm9sZSIsImlhdCI6MTY4MzQyMzYwNSwiZXhwIjoxOTk4OTk5NjA1fQ.QzoaOpgNPQF32zJl5c-Olx6ZEhw03M5mkbAA_zkBrT8'
)

const { data: shareables, error } = await supabase.from('record').select('*').eq('releasable', true)

const saveTo = join('..', '..', 'src', 'content', 'shareable')
shareables.forEach(shareable => {
  // TODO check if file already exists and if so skip
  // TODO go over dates, maybe adjsut table and also generate dates in same format as others
  const { title, description, comment, category, url, updated, created_at } = shareable
  const content =
  `---
title: "${title}"
description: "${description}"
tags: 
- ${category}
url: ${url}
comment: "${comment}"
updated: ${created_at}
published: ${created_at}
---
`
  fs.writeFile(join(saveTo, `${getSlug(title)}.md`), content, 'utf8')
})


function getSlug(str) {
  if (!str) return ''
  const slug = str
      .trim()
      .toLowerCase()
      // remove all chars which aren't characters, numbers or spaces
      .replace(/[^a-zA-Z0-9\s]+/g, '')
      // replace all spaces with dashes
      .replace(/\s+/g, '-')
  return slug
}

dc3eb98d263a6363b927bd30a44524a019158574

check if I wanna use it:

check if I wanna use it:

// TODO check if I wanna use it:

import adapter from '@sveltejs/adapter-vercel'
import { vitePreprocess } from '@sveltejs/kit/vite'

/** @type {import('@sveltejs/kit').Config} */
const config = {
  // Consult https://kit.svelte.dev/docs/integrations#preprocessors
  // for more information about preprocessors
  // TODO check if I wanna use it:
  preprocess: [vitePreprocess({ postcss: true })],

  kit: {

5e36ac8c39029bfe3f70f6bdc888d253703d1094

Rewrite meta data stuff

  head() {
    const { content } = this.meta.find((item) => item.hid === 'og:title') // ==> WHY??? please make .title directly accessible
    return {
      title: content,
      meta: [...this.meta],
    }
  },
  computed: {
    meta() {
      const metaData = {
        title: `Services`, // service - needs to be here manually
        description:
          'Hire me for your next project in one of the following areas: Agile Project Management, New Work Consulting, Technical Partnership.',
        url: `/services`, // service - could be retrieved from router
        img: `/social/services.png`, // service - could be retrieved from router + .png
        imgAlt: `Services - ${this.globals.title}`, // this is generated with getSiteMeta  and doesn't uses title
      }
      return getSiteMeta(metaData)
    },
  },

A lot of this should be combined and rewritten, most of this should happen in a helper to have as little as possible boilerplate code in the pages.

Add social links to layout

E.g. add the icons for twitter, github, linkedin & email to the footer.
Could make sense to add them in the center.

before continuing check the following implementation by Brian lovin

before continuing check the following implementation by Brian lovin

He solves it in a smarter way, which doesn't require to sotre the image

https://github.com/brianlovin/briOS/blob/e337307c1a91d5099565955ce9d79b2de30f1fce/src/graphql/resolvers/mutations/bookmarks/getBookmarkMetaData.ts#L28

// TODO before continuing check the following implementation by Brian lovin

import { join } from 'path'
import * as fs from 'fs/promises'

// TODO before continuing check the following implementation by Brian lovin
// He solves it in a smarter way, which doesn't require to sotre the image
// https://github.com/brianlovin/briOS/blob/e337307c1a91d5099565955ce9d79b2de30f1fce/src/graphql/resolvers/mutations/bookmarks/getBookmarkMetaData.ts#L28

async function directoryExists(path) {
    try {
        const stat = await fs.stat(path);

5aa96a896b50460b925f16a93c907ba1546facd2

Nested sections

On some pages there are <sections> directly nested in , this should be a class="wrapper" which then contains the <sections>.

Add private mode

Main focus of this website is still around tech, put I sometimes want to share non tech stuff, e.g.

  • Cooking recipes
  • Google map lists cities I have bin
  • Spotify playlists
  • Maybe other stuff

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.